Question to Cross Compiling Guide



  • Hi,

    first... I'm quite a new with that stuff, but I'm willing to learn things ;-)

    I've created a Cross-Compile Environment for Omega the way like it's described in the wiki.

    Everything works fine and I got a *. bin firmware file, which I successfully flashed on my onion.

    Reason for building a new image was to get usb audio working, so I just enabled kmod-usb-audio and kmod-sound-core and started building process. After a couple of hours I got my image.

    Problem is now, I like the onion web interface and this was missing (also wifisetup script and such other onion tools were missing).

    So my question is how to get them back running, or better, how to activate usb audio support without changing original omega image?

    Thanks in advance.


  • administrators

    Hi @Thomas-Mueller, as opposed to using the .bin file that results in the compilation, you can browse into the bin/ar71xx/packages directory and see the .ipk packages that results from the compilation process. So what you should do at this point is to reflash the Omega with the stock image found here: http://repo.onion.io/omega/images/, and use opkg to install the ipk package that corresponds to the audio functionalities you are trying to add.

    Let me know how it goes!



  • For the stable version omega-v0.0.5-b251.bin from http://repo.onion.io/omega/images/ :

    I couldn't use the wiki instructions as it built an incompatible toolchain and the binaries wouldn't run.

    I had to use the toolchain quoted here: https://community.onion.io/topic/9/how-to-install-gcc/51

    (direct link: https://s3-us-west-2.amazonaws.com/onion-downloads/openwrt/OpenWrt-SDK-ar71xx-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-i686.tar.bz2 )

    It has a newer version of feeds.conf.default than the one linked from https://onion.io/downloads

    (direct link: https://downloads.onion.io/openwrt/sdk_ar71xx.tar.bz2 )



  • @Boken-Lin
    I would really like a toolchain supplied for each released version (or at least, instructions for generating one myself that matches the released version), so I can build a version from source using the instructions in the wiki. Is this available somewhere?

    I think this requires a feeds.conf.default and the .config generated with make menuconfig. I'm not sure if these are the only things required, as the wiki instructions does not put the https://github.com/OnionIoT/OpenWRT-Packages into the factory image. How are these packages included for the versions supplied at http://repo.onion.io/omega/images/ ? Is there anything else required to build an image the same from source?


  • administrators

    Hi @Alli-W, the toolchain should be the same from version to version. The toolchain basically comprises of tools like gcc and ld (linker) that has been configured to produce binary in the format of the Omega rather than the host computer. There aren't any specific instructions to generating them. When you run make for the very first time, they are compiled from source by default (otherwise other sources cannot be compiled as they are all dependent on having a toolchain).

    In order to add the feeds from the Onion repository, you simply need to add the following line:

    src-git onion https://github.com/OnionIoT/OpenWRT-Packages.git
    

    to feeds.conf file.



  • Thank you for your response.

    I understand what the toolchain is and what it is for.

    I'm saying that the versions of feeds.conf supplied in different downloads of the toolchains are different. The wiki suggests to use the latest git version. The toolchain on the main page uses Barrier Breaker. The version posted in the post mentioned above uses Chaos Calmer. I want to know which git branches are used for the official stable builds, as this appears not to be documented anywhere, and I would like to build my own image.

    When following the latest git version documented in the wiki, it builds a different toolchain environment than is used in the stable releases, so the binaries link against the wrong library type and version which means the packages will not run on the stable onion omega builds. This is why I would like to see the exact .config generated with make menuconfig that is used with the stable builds.


  • administrators

    Hi @alzeih, sorry about the confusion. The stable release builds are built with the CC branch, which is available here: git://git.openwrt.org/15.05/openwrt.git.


  • administrators

    @alzeih Just updated that on the Cross Compile tutorial.



  • @Boken-Lin Am currently rebuilding all my stuff using git://git.openwrt.org/15.05/openwrt.git as you reference above - I note that this appears to use uclibc rather than musl that appeared to be the default under the original git repository (git://git.openwrt.org/openwrt.git as mentioned in https://wiki.onion.io/Tutorials/Cross-Compile).

    This may be why I had been having difficulties with stuff I had tried to build (will report later if things work now).

    However, https://wiki.onion.io/Tutorials/Cross-Compile does not appear to (yet) mention git://git.openwrt.org/15.05/openwrt.git as in your post above.


  • administrators

    @Kit-Bishop Sorry about that! Fixed now.

    Yes, the stable release uses uClibc, but they switched over to musl because it seems that the development on uClibc has stalled. However, i think they have found a new active fork of uClibc called uClibc-ng, and they have added that to their development branch. I'm not sure if they will be sticking to musl or moving to uClibc-ng moving forward.



  • @Boken-Lin All good. Thanks for the info. I had always assumed (from some earlier posts) that we were supposed to use the uclibc toolchain etc.


Log in to reply
 

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.