(Be advised before you point me at instructions for an older release of MacOS, I have tried that, and it doesn't work.)
I'm trying to get buildroot going but Apparently Apple's "clang can totally just impersonate gcc" theory is false, and even after doing "port select --set gcc mp-gcc7", MacPorts seems to be using the wrong compiler. I can't even find a straight answer on whether I should be installing "arm-elf-gcc" or "arm-none-eabi-gcc", but neither of them will build when doing "port install".
Fun fact: buildroot requires GNU sed. Because we're still innovating in sed syntax here in the 21st century, FFS.
Update: Apparently buildroot does attempt to download and build its own cross-compilation toolchain if you run it with a functional native gcc. So here's how far I've gotten so far in this buildroot-2016.08 shitshow:
- port install gsed
- export PATH=/opt/local/libexec/gnubin:$PATH
- make raspberrypi3_defconfig
- port install gcc7 gcc_select
- port select --set gcc mp-gcc7
- port install coreutils md5sha1sum findutils
- make all
m4 doesn't build; manually add this to its "configure" command:
ac_cv_type_struct_sched_param=yes- toolchain doesn't build. add this to toolchain/toolchain-wrapper.c:
static const char *program_invocation_short_name;
...
program_invocation_short_name = basename; toolchain still doesn't build. remove this from toolchain/toolchain-wrapper.mk:
-Wl,--hash-style=$(TOOLCHAIN_WRAPPER_HASH_STYLE)And then this:
/scripts/Makefile.headersinst:55: *** Missing UAPI file ./include/uapi/linux/netfilter/xt_CONNMARK.h. Stop.Guess what that means? It means "After all these years, jackasses in charge of the Linux kernel still spitefully and with malice aforethought include case-conflicting file names in the source."
Apparently their official policy is "all reasonable file systems are case sensitive." (This is objectively false: all reasonable file systems are case preserving insensitive with Unicode canonicalization.)
So this means start over from scratch inside a sparseimage:
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 8g buildrootAnd then this: compilation of uclibc-1.0.17 fails with:
./../include/elf.h:30:10: fatal error: endian.h: No such file or directory
../utils/porting.h:48:10: fatal error: link.h: No such file or directory
No idea what's going on there.
Update 2: Ok, so I finally accepted the truth that "the only way to build a Debian system is using another Debian system" and installed a Debian in VirtualBox to run Buildroot to create a CF card to run on a Pi.
It is one fucked up universe we live in where "run another operating system in an emulator" makes more sense than "just cross-compile." What is this, A Deepness in the Sky?
Fun fact: Virtualbox "recommends" the Debian emulator have 1GB of RAM, which is apparently insufficient for compiling a Linux kernel. Of course the build process has completely sensible error messages when that goes wrong. Oh wait, no it doesn't.
So now Buildroot spat out something that boots, but not something that recognizes USB keyboards, so that's lovely. Back down into the salt mines...