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.
First some resources I found helpful:
FAAD2 source
Using OpenWrt SDK to Build C/C++ Programs
Cross-compile on OpenWRT Wiki
Cross compiling Rust applications for the Omega
WereCatf's source repoI began by downloading WereCatf's source repo
git clone https://github.com/WereCatf/source omega-sdk
cd omega-sdk
Then I ran
make menuconfig
and selected Onion Omega2+ from the Target Profile option.
Save the configuration and exit the menu.Now run
make toolchain/install
and 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
package
folder.
Now runmake 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 thebuild_dir
directory. In my case I found what I was looking for inbuild_dir/target-mipsel_24kc_musl-1.1.15/faad2-2.7/common/faad
Copy the binary to your Omega and try running it.Good luck!
-
That's amazing, thanks for sharing!
-
@Daniel-Hinds-Bond said in How I cross-compiled FAAD2 for Omega2+:
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?
-
said in How I cross-compiled FAAD2 for Omega2+:
make toolchain/install
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 thehelloworld
example in MediaTek's LinkIt Smart 7688 docs and made some changes to my source to get it building.