How I cross-compiled FAAD2 for Omega2+
Let me start off by saying I consider myself extremely ignorant when it comes to compiling C, Linux, cross-compiling anything, LEDE/OpenWrt, toolchains, and on and on. However, I was finally able to cross-compile the FAAD2 audio decoder to work on the Omega2+. I can't promise that I remember every step I took (there was a lot of trial and error) but I'll do my best to describe what I did to make it happen.
I did this on a Linux Mint system, fyi.
I began by downloading WereCatf's source repo
git clone https://github.com/WereCatf/source omega-sdk
Then I ran
make menuconfigand selected Onion Omega2+ from the Target Profile option.
Save the configuration and exit the menu.
make toolchain/installand go watch a movie (or two). Seriously, this step took 3 hours. Also worth noting is that I tried to do this on a mac running Sierra and was not able to get this part to work. Something is weird with the version of pkg-config on OS X.
After you see Frodo hurl the ring into the lava you can come back and extract the FAAD2 source (or whatever you're trying to compile) into the
make package/faad2-2.7/compile(or whatever the dir to your package is)
You should now be able to find the compiled binary (or whatever you're compiling) in the
build_dirdirectory. In my case I found what I was looking for in
build_dir/target-mipsel_24kc_musl-1.1.15/faad2-2.7/common/faadCopy the binary to your Omega and try running it.
Gabriel Ongpauco last edited by
That's amazing, thanks for sharing!
luz last edited by
Thanks for sharing these instructions!
Also worth noting is that I tried to do this on a mac running Sierra and was not able to get this part to work. Something is weird with the version of pkg-config on OS X.
I'm building OpenWrt and LEDE for months now on macOS sierra without any problems - except that the file system where LEDE is on must be case sensitive (macOS standard is case insensitive). So I just put LEDE onto a case-sensitive disk image. In the meantime, the openwrt wiki has been updated and documents the procedure.
Did you follow a different procedure?
Thanks for writing this up.
It didn't quite work the way you stated, I even tried compiling FAAD2.
It needed a
Makefile- I used the
helloworldexample in MediaTek's LinkIt Smart 7688 docs and made some changes to my source to get it building.