how to build own package
I didn't succed in building an own package.
I followed https://github.com/OnionIoT/OpenWRT-Packages/wiki/Setting-Up-the-Cross-Compile-Environment and tried to build a modified htop package.
Building works fine but when I try to run the self-built htop on the onion omega I get:
root@omega1:~# ls -l -rwxr-xr-x 1 12424 11900 109886 Nov 21 12:13 htop* root@omega1:~# ./htop bash: ./htop: No such file or directory root@omega1:~# ldd htop bash: ./htop: No such file or directory root@omega1:~# file htop htop: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked (uses shared libs), not stripped
Hi @Johannes-Zellner, we just realized there might be a bug in the tutorial we posted, but we haven't been able to pin point exactly where the problem is yet. Can you try to do another compilation with the SDK and toolchain provided here?
Please let me know if it fixes the issue.
Thanks, building works with the SDK you supplied and I get a running executable.
file ...on executables which run on the omega yields
corrupted section header size, see below. This looks a bit suspicios for me and is true for both self-built executables and those installed from the repositories.
root@omega1:/usr/bin# file htop htop: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked (uses shared libs), corrupted section header size
@Johannes-Zellner That's an interesting discovery. A quick google search didn't yield anything useful. I will be looking into it to see what the message means and what should be done to resolve it. Thanks for letting us know!
@Boken-Lin Does this mean that the docker-onion-omega container I built may not function? If so, I do know that borromeotlhs/docker-onion-omega-nodejs:v1 does build working containers (as I think it uses a generic toolchain).
@Theodore-Borromeo I think there might be a problem with the recent openwrt git repository. The toolchain we have uploaded was built from a repository we cloned a couple of months back, and it seems to be working fine. I think all you need to do is to swap the toolchain with the one from the above link to make it work.