PSA: Installing opkg Packages on USB Storage will cause a boot-loop!
Unfortunately, our current uboot implementation doesn't play nice with USB storage and installing opkg packages on USB storage will cause a boot loop!
This can only be corrected by using the Ethernet Expansion to flash the Omega with new firmware as described in this post.
is this a PSA for certain firmware revs, or are all firmwares susceptible to needing the Ethernet shield if you even attempt this?
@Theodore-Borromeo this applies to all firmware releases!
Sweet sassy-molassy. That is a fail :( I just posted a question to see if there is a way to flash a rescue image to USB or to allow a way for serial loading of firmware through uboot over serial. . .
@Theodore-Borromeo We will be working on those features of the uboot. We originally intended to use a version of uboot that allows you to directly boot into a USB key, but the author of the uboot refused to open source it, which is against GPL. So our only choice is to reverse engineer it.
perhaps rebuilding while enabling: CONFIG_CMD_USB
per the README could get us somewhere, no?
Alternatively, should users download this version of uboot (or build it themselves via running a docker build common), would it not then get you around the 'distribution' clause of the GPL v2? I think, seeing how I'd like to be able to recover my device should I brick it accidentally, that this may be a workable alternative, right?
@Theodore-Borromeo Hmmm, that's kinda interesting. Let me do some research into it.
@Boken-Lin I just spoke with one of the maintainers of uboot, and the issue is that whatever uboot binary is on the device is provided by the vendor (either your team or your device manufacturer). Therefore, I think it would be prudent to reach out to the odm to furnish the source behind that binary. Even if they have proprietary code linking to uboot, they are now obligated to provide all source once this was sold and distributed.
I do oss compliance work for my day job, so I'm confused as to why the uboot team would have anything to say about a random board they don't sell?
@Theodore-Borromeo Also, the source for v1.1.4 is about 9 years old and is at:
The previous link I provided is the 'master' tag at what I presume to be the stable edge of development.
@Theodore-Borromeo The uboot on the Omega is provided by us: https://github.com/OnionIoT/uboot. The team behind the uboot with the feature of booting into a USB are a bunch of guys we met in China while doing the manufacturing of Omega, and unfortunately many Chinese organizations (except a few larger ones with international reputation) completely disregard open source laws.
@Lazar-Demin Also, why is uboot even aware of usb mounts during boot? I thought that generally, /etc/fstab was cleared out? Is it possible that we could fix this by making opkg a little better at running packages off of usb, and ignoring them when usb isn't present/mounted?
Did you follow the guide at: https://wiki.openwrt.org/doc/techref/opkg to effect installations to externally mounted drives. They seem to mention, specifically, that each startup script needs to:
Libraries installed along with those packages are also installed to the external filesystem. This causes the programm [sic] not to start during bootup.
You need to manually set the LD_LIBRARY_PATH in each 'external' startup script: