Hi there. When I try to run the amebad_flash_tool I get an error about the glibc version. amebad_image_tool seems to work okay. I need to reflash to get wifi working.
Is the source for amebad_flash_tool available somewhere so I can recompile it for my libraries? Or are there other ways to flash?
./amebad_flash_tool
[16162] Error loading Python lib '/tmp/_MEIFJNdJc/libpython3.8.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/_MEIFJNdJc/libpython3.8.so.1.0)
That’s great. It compiles and all. However it doesn’t look like any of it works the same way as what’s described on the page about CLI firmware install. Any pointers on how to do the equivalent steps? (i.e., erase then write the latest firmware)
Hassle Realtek to provide source or build for other platforms: Its python built with pyinstaller from the look of it. My development platform is Debian 10 and has same problem as it was built on a platform with a later LIBC version.
You will get the 'GLIBC_2.29' not found error if your system uses an older version of glibc. 2.29 and greater are quite recent.
To work around this, you can run the flash tools in a chroot environment that has a more recent version of glibc. I use debootstrap to install a mini debian system which has a more recent version of glibc, and chroot to run commands within it.
TMP_AREA=$(mktemp -d)
debootstrap bullseye "${TMP_AREA}"
touch "${TMP_AREA}/device"
mount --bind "/dev/ttyACM0" "${TMP_AREA}/device"
# Put all the flash tools and files into TMP_AREA.
# Run the tools like this:
LC_ALL='C.UTF-8' LANG='C.UTF-8' chroot "${TMP_AREA}" /amebad_flash_tool erase --port '/device'