I have successfully cross-compiled linux-4.9.229 kernel for arch=arm on Macos M1, with steps like these:
$ brew install gcc-arm-embedded --cask
$ brew install cmake autoconf libtool gcc automake openssl
$ brew link openssl --force
$ make multi_v7_defconfig
$ export ARCH=arm
$ export CROSS_COMPILE="arm-none-eabi-"
$ make -j 8
After that, I was trying to cross-compile busybox for arch=arm, but I got err like this:
$ export ARCH=arm
$ export CROSS_COMPILE="arm-none-eabi-"
$ make defconfig
$ make -j 8
CC applets/applets.o
In file included from include/libbb.h:13,
from include/busybox.h:8,
from applets/applets.c:9:
include/platform.h:164:11: fatal error: byteswap.h: No such file or directory
164 | # include <byteswap.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.build:198: applets/applets.o] Error 1
make: *** [Makefile:372: applets_dir] Error 2
I saw that besides byteswap.h, I also lack endian.h:

What can I do to solve this? please~