On Thu, May 14, 2020 at 9:06 AM Rob Landley <r...@landley.net> wrote: > > On 5/13/20 5:26 PM, Patrick Oppenlander wrote: > > That works for: > > > > % make root LINUX=../linux > > > > I alread have a bunch of cross compilers installed & in my path: > > > > % ls -1 /opt/cross > > aarch64-linux-musleabi > > armv7m-linux-musleabi > > armv7m-linux-musleabihf > > arm-cdd-linux-musleabi > > arm-linux-musleabi > > arm-none-eabi > > arm_cortex_m0-eabi-newlib > > m32c-elf > > m68k-elf > > powerpc-eabispe > > x86_64-linux-musl > > > > So I tried > > > > % make root CROSS_COMPILE=arm-linux-musleabi- LINUX=../linux > > > > Which fails with "Unknown $TARGET" > > It's taking everything before the first dash and feeding it into a big if/else > staircase. In theory arrcchh6644 should work, and m68k and x86_64. but "arm" > it > doesn't known armv5l vs armv7l (different kernel configs)...
Neat. I tried: % make root CROSS_COMPILE=aarch64-linux-musleabi- LINUX=../linux which worked perfectly. > > OK, maybe > > > > % make root TARGET=arm CROSS_COMPILE=arm-linux-musleabi- LINUX=../linux > > > > That fails with "cp: bad 'toybox': No such file or directory" > > I suspect there was at least one error message before that, which you didn't > copy? Sorry, perhaps I overlooked something. Here's the full output: % make root TARGET=arm CROSS_COMPILE=arm-linux-musleabi- LINUX=../linux scripts/mkroot.sh -- LINUX=../linux CROSS_COMPILE=arm-linux-musleabi- TARGET=arm Building for arm === airlock cleaned cc -o kconfig/conf kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \ -DPROJECT_NAME=\"ToyBox\" scripts/genconfig.sh kconfig/conf -D /dev/null Config.in > /dev/null scripts/make.sh Generate headers from toys/*/*.c... generated/newtoys.h Library probe........... Make generated/config.h from /home/patrick/src/ext/toybox/root/.airlock. generated/flags.h generated/globals.h generated/tags.h generated/help.h Compile toybox-arm............................................................................................................................................................................................ scripts/install.sh --symlink --force --airlock Compile instlist... Generate headers from toys/*/*.c... Library probe........... Make generated/config.h from /home/patrick/src/ext/toybox/root/.airlock. Install commands... cp: cannot stat 'toybox': No such file or directory make: *** [Makefile:49: install_airlock] Error 1 make: *** [Makefile:80: root] Error 1 make root TARGET=arm CROSS_COMPILE=arm-linux-musleabi- LINUX=../linux 21.18s user 3.64s system 552% cpu 4.491 total > > Maybe I should read the script.. OK, looks like TARGET should be > > armv7l in this case > > > > % make root TARGET=armv7l CROSS_COMPILE=arm-linux-musleabi- LINUX=../linux > > > > Nope, same problem. > > > > OK I think what's happening is that the TARGET variable is leaking > > into make.sh which then generates toybox-$TARGET which mkroot.sh > > doesn't expect? > > I've never set it on the mkroot command line before, so it's always been a > local > and never exported from mkroot into child processes. I can add an explicit > "unexport", or I could rip the suffix plumbing out of make.sh. > Is there some other usecase for the suffix plubing in make.sh? Patrick _______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net