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

Running released binary on a Raspberry Pi 3B (Raspbian 11 = "bullseye") #738

Closed
lure23 opened this issue Feb 2, 2025 · 4 comments
Closed

Comments

@lure23
Copy link

lure23 commented Feb 2, 2025

I'm mostly using probe-rs but would now need to set up espflash as well, on a Raspberry Pi.

I noticed there's a prebuilt release of 3.3.0 for armv7-unknown-linux-gnueabihf - GREAT!

Downloaded, scp:ed over to the Pi, launching gives:

$ ./espflash 
./espflash: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by ./espflash)
./espflash: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.32' not found (required by ./espflash)
./espflash: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.34' not found (required by ./espflash)

This looks similar to #454 - which was resolved.

My options are:

a) upgrading to Bookworm - would like to avoid that, since it seems like a full reinstall. My Pi is stable as it is, and I have no other urgent need to upgrade.
b) cross-compile; what I do for probe-rs

Perhaps my question is: is the 3.3.0 binary release expected to work on Raspbian OS 11 ("bullseye")?

system info

$ uname -a
Linux rpi 6.1.21-v7+ #1642 SMP Mon Apr  3 17:20:52 BST 2023 armv7l GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye
@github-project-automation github-project-automation bot moved this to Todo in esp-rs Feb 2, 2025
@lure23 lure23 changed the title Unable to run released binary on a Raspberry Pi 3B (Raspbian 11 = "bullseye") Running released binary on a Raspberry Pi 3B (Raspbian 11 = "bullseye") Feb 2, 2025
@lure23
Copy link
Author

lure23 commented Feb 2, 2025

As a side-note, I was able to get espflash running, via cross-compile, with the libudev feature disabled:

$ git clone https://github.com/esp-rs/espflash.git
$ cd espflash
$ git checkout v3.3.0
$ cross build -p espflash --release --target=armv7-unknown-linux-gnueabihf --no-default-features --features=cli
   Compiling espflash v3.3.0 (/project/espflash)
    Finished `release` profile [optimized] target(s) in 1m 11s

On sudo-capable RPi account:

$ sudo usermod -a -G dialout probe-rs    # yes, the user-id for this is `probe-rs` ;)

However, launching such a result causes:

$ espflash board-info
[2025-02-02T20:32:28Z INFO ] Serial port: '/dev/ttyUSB0'
[2025-02-02T20:32:28Z INFO ] Connecting...
[2025-02-02T20:41:36Z INFO ] Using flash stub
Chip type:         esp32c6 (revision v0.0)
Crystal frequency: 40 MHz
Flash size:        4MB
Features:          WiFi 6, BT 5
MAC address:       54:32:04:07:15:10

If there's a way to cross-compile with the libudev feature, I'd be interested to know. I have pkg-config and libudev-dev, but likely only for x86, not ARM target. But this will do.

@Vollbrecht
Copy link

You don't need a full reinstall to updated a debian installation ;D I have a server running that started as debian8 and is running 12 now only updating via apt :p

But problem aside in the past i cross compiled probe-rs for raspberry pi3b+ via cross. Building espflash should be even simpler. It just was something like cross build --target armv7-unknown-linux-gnueabihf --release but you need to obvious make sure that the container build is using a older glibc that you are running on your pi with debian11.

@lure23
Copy link
Author

lure23 commented Feb 3, 2025

Thanks @Vollbrecht

I got the remote espflash working last night, as explained in my comment.

What remains is:

  •  would the released armv7-unknown-linux-gnueabihf binary be expected to work on "bullseye" (11) or does it require a later OS. If someone answers here, this Issue might work as documentation, even when closed.
  •  cross-compiling espflash with the default features (libudev)

None of this is a personal itch for me, any more. I got the cross-compiled version up and running, and will document the steps in a repo I own. Eventually..

@SergioGasquez
Copy link
Member

would the released armv7-unknown-linux-gnueabihf binary be expected to work on "bullseye" (11) or does it require a later OS.

It requires a later OS, as it was built with gh-hosted-runners that don't support that GLIBC version anymore.

@lure23 lure23 closed this as completed Feb 3, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants