No packages can be installed with latest image

Started by blinkenlight, August 10, 2015, 02:37:08 PM

Previous topic - Next topic

blinkenlight

Finding out the original image my RT5350F-Olinuxino shipped with was unusable due to the partition size mismatch it contained, I upgraded the board to the provided latest Olimex binary image (the one at [1]). It worked (eventually) and the file system is now writable - what I noticed however was that unlike the original image, this one came without either 'uhttpd' or 'luci' therefore the web interface could not be launched. Downloading and installing the missing packages was not a problem, however, actually launching them seem to be a rather big one: I can't run any package I download from the preconfigured OpenWRT repo.

Specifically, trying to launch anything comes back with something like:

/bin/ash: /usr/bin/uhttpd: not found

...even though the file is clearly there and executable.

Following some research, this seems to be an issue caused by linking to different libs than the ones actually present on the system. Checking with readelf, this is what I get ('busybox' is an Olimex-image-binary which does run, the other ones are from installed packages that do not):

root@mybox:/media/DAVDrive$ readelf -a nano | grep equest
      [Requesting program interpreter: /lib/ld-musl-mipsel-sf.so.1]
root@mybox:/media/DAVDrive$ readelf -a uhttpd | grep equest
      [Requesting program interpreter: /lib/ld-musl-mipsel-sf.so.1]
root@mybox:/media/DAVDrive$ readelf -a busybox | grep equest
      [Requesting program interpreter: /lib/ld-uClibc.so.0]


In summary, unless I'm misunderstanding something it appears that the latest image is just as unusable as the previous one, providing different libs than the ones actual OpenWRT packages are linked to: both lacking essential packages and making them impossible to install.

Considering I know next to nothing about building OpenWRT from scratch, partitioning the NAND and/or pitfalls of various cross-upgrading images of different provenance, I'd much appreciate some advice about what is the easiest way out of this conundrum.

A) - I'm aware I could probably try recompiling every and all packages I need to uClibc, but for me that is the least acceptable solution, only an option if absolutely, positively nothing else can be done. And I very much doubt that.
B) - I noticed there seems to be an official OpenWRT image [2] supporting the RT5350F-Olinuxino explicitly. Would upgrading to that be an option? What would the explicit procedure be? Why are there two versions, initramfs and squashfs - which one to use and what's the other one for? Would there be any drawbacks using it vs. the Olimex provided image?
C) - If the above is not an option, are there anywhere repos with packages linked to uClibc that would work with the current Olimes image?
D) - If the above is not an option, would there be some way to compile the Olimex image in a form that would work with the existing packages in the OpenWRT repo? How would I go about that?

Thanks for reading this far, help would be much appreciated...

[1] - https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/RT5350F/Prebuilt%20images/openwrt-ramips-rt305x-olinuxino-rt5350f-squashfs-sysupgrade.bin
[2] - https://downloads.openwrt.org/snapshots/trunk/ramips/rt305x/openwrt-ramips-rt305x-olinuxino-rt5350f-squashfs-sysupgrade.bin

Daniel

OpenWrt Chaos Calmer has not been released yet. You can't use the precopiled packages because of frequent changes that make them incompatible with your image. The only way to get an usable system is to compile the OpenWrt and all the packages you need yourself.

Best Regards,
Daniel

blinkenlight

Quote from: Daniel on August 11, 2015, 05:04:03 AM
You can't use the precopiled packages because of frequent changes that make them incompatible with your image.

My experience (since the last post) is that both the Chaos Calmer RC3 and the current CC trunk are perfectly able to install and run their corresponding packages from the corresponding specific repositories - alas, they are both contain the partition size bug: apparently filing an actual OpenWRT bug report wasn't exactly high on the Olimex priority list. Conversely, as noted, the Olimex image has the right partition size but can't use anything from the trunk repositories itself links to. In a word: unfortunate.

Quote from: Daniel on August 11, 2015, 05:04:03 AM
The only way to get an usable system is to compile the OpenWrt and all the packages you need yourself.

I'm arriving at the same conclusion, sadly in a somewhat belated manner - to use an analogy, buying this module I was aware I'm buying a "kit car" that will need (hardware) assembly, I just didn't expect to need to mine and forge my own steel for the chassis, extract and refine my own petrol for fuel and herd my own cattle for the leather upholstery; the advertised "preloaded OpenWRT with Linux Kernel 3.18.11" doesn't quite convey I would need to do all that.

Anyway, thank you for your time - it looks like my RT5350F-OLinuXino is currently no more than paperweight. Maybe an image that actually works will surface eventually but I'm not holding my breath.

PS - for anyone else reading this, yes both the official OpenWRT RC3 and the trunk "squashfs-sysupgrade" images can be used with the board apparently without any ill effects - I've used the MTD method to flash them as described in [1], it worked fine.

Best regards,
- blinkenlight

[1] - http://wiki.openwrt.org/doc/howto/generic.sysupgrade#mtd

Giovanni_R

I run into the same problem and did the step further compiling the Openwrt sources found on Olimex git account. I managed to determine which packages were missing to get the web-based administration interface and modified the openwrt sources .config file accordingly. It took several hours of compilation and the 66MB source directory grew to 5.5GB at the end.

But finally I installed the compiled image successfully on my EVB board and the web interface works. Note that I did not do much testing but clicking around.

I can provide you the openwrt image I compiled, if you want. The only difference w.r.t the sources on olimex git is that I enabled (inside make menuconfig interface) LuCI -> Collections -> luci.

Note that I still have the 5.5G build dir around. If you need a package in particular, I can always try to enable it in the "make menuconfig" interface and restart the compilation, the image will get compiled fast.

Regards,
Giovanni

blinkenlight

Quote from: Giovanni_R on August 11, 2015, 09:58:35 PM
I can provide you the openwrt image I compiled, if you want. The only difference w.r.t the sources on olimex git is that I enabled (inside make menuconfig interface) LuCI -> Collections -> luci.

Note that I still have the 5.5G build dir around. If you need a package in particular, I can always try to enable it in the "make menuconfig" interface and restart the compilation, the image will get compiled fast.

Your offer is extremely generous, thank you. I think I'll rather put this project on back burner for a while until things catch up a bit, because I'm trying to build a tiny specialized server and I have no idea for now exactly what packages it will need. But the offer is much appreciated indeed.

Giovanni_R

Quote from: blinkenlight on August 10, 2015, 02:37:08 PM
D) - If the above is not an option, would there be some way to compile the Olimex image in a form that would work with the existing packages in the OpenWRT repo? How would I go about that?

If you go compiling the source yourself, have a look at this option when doing make menuconfig:
Advanced configuration options->Toolchain Options->C Library implementation
Select Use musl instead of Use uClibc

Maybe this will render your image compatible with the Openwrt packages repositories.

blinkenlight

Thankfully, a really simple workaround has been suggested (and seems to work quite nicely although I do still have some difficulties staying logged into luci) here: https://github.com/OLIMEX/openwrt/issues/2