Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm compilations give a "Illegal instruction" on a Raspberry Pi 2 #8924

Closed
jdevora opened this issue Oct 15, 2016 · 5 comments
Closed

Arm compilations give a "Illegal instruction" on a Raspberry Pi 2 #8924

jdevora opened this issue Oct 15, 2016 · 5 comments

Comments

@jdevora
Copy link

jdevora commented Oct 15, 2016

I have a Raspberry Pi 2 running Raspbian

My understating is that I should be able to run the ARM 32 bits compilation on it.

I follow those steps but at the end it will throw an Illegal Instruction error.

$ wget https://bitcoin.org/bin/bitcoin-core-0.13.0/SHA256SUMS.asc
$ wget https://bitcoin.org/bin/bitcoin-core-0.13.0/bitcoin-0.13.0-arm-linux-gnueabihf.tar.gz
$ sha256sum bitcoin-0.13.0-arm-linux-gnueabihf.tar.gz|grep -f SHA256SUMS.asc
  7c657ec6f6a5dbb93b9394da510d5dff8dd461df8b80a9410f994bc53c876303  bitcoin-0.13.0-arm-linux-gnueabihf.tar.gz
$ tar -zxf bitcoin-0.13.0-arm-linux-gnueabihf.tar.gz
$ bitcoin-0.13.0/bin/bitcoind
  Illegal instruction

$ lsb_release -a
 No LSB modules are available.
 Distributor ID: Raspbian
 Description:    Raspbian GNU/Linux 8.0 (jessie)
 Release:        8.0
 Codename:       jessie
$ uname -a
 Linux raspberrypi 4.1.7+ #817 PREEMPT Sat Sep 19 15:25:36 BST 2015 armv6l GNU/Linux

Was it never intended to work on a Raspberry Pi 2 or is there something missing on my part or at the compilation options?

@mruddy
Copy link
Contributor

mruddy commented Oct 15, 2016

Quick question, are you sure that you're using a Raspberry Pi 2 Model B and not a Raspberry Pi Model B+? https://www.element14.com/community/docs/DOC-78141/l/identifying-your-model-of-raspberry-pi

Your uname output shows armv6l and not armv7l. Raspberry Pi 1 used ARMv6.

What does this show you: egrep -i 'model|hardware' /proc/cpuinfo?

EDIT: @jdevora Also, maybe it's possible that you are using a Pi 2 and running a Raspbian that is built to target ARMv6 and that is causing your problem. I'm sure that the bitcoind binary is targeting ARMv7-A:

readelf -A bitcoin-0.13.0/bin/bitcoind | egrep -i 'cpu_name|cpu_arch'
Tag_CPU_name: "7-A"
Tag_CPU_arch: v7
Tag_CPU_arch_profile: Application

@jdevora
Copy link
Author

jdevora commented Oct 16, 2016

Sorry, my mistake, I inserted the SD card in my Pi B+ instead of the Pi 2.

@jdevora jdevora closed this as completed Oct 16, 2016
@laanwj
Copy link
Member

laanwj commented Oct 17, 2016

Yes, the binary targets ARMv7. Should arguably have mentioned that in the release notes. It is also news to me that RPI1 was only ARMv6.

@mruddy
Copy link
Contributor

mruddy commented Oct 18, 2016

@laanwj we could add a quick note to the 0.13.0 and/or 0.13.1 release notes. Something about the binaries being built for ARMv7-A and thus being able to be run on platforms backwards compatible to that architecture. I know we probably don't want to list all the products that might work, but giving the example of RasPi 2 & 3 vs RasPi 1 would probably be helpful to people.

@laanwj
Copy link
Member

laanwj commented Oct 18, 2016

@mruddy Yes, that'd be a good idea

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants