Para BeagleBone Black, as configurações de ambiente corretas são armv7-a
, como podemos ver aqui e aqui , e precisamos pegar as configurações do kernel de aqui com bb.org_defconfig
, e use cabeçalhos de aqui e correções para gcc
de here , e lembre-se de criar o% finalgcc
com --disable-libsanitizer
.
Eu usei o seguinte comando antes de criar musl
:
sed -i 's/\/dev\/null\/utmp/\/var\/run\/utmp/g;s/\/dev\/null\/wtmp/\/var\/log\/wtmp/g' include/paths.h include/utmp.h
E o seguinte antes de criar busybox
para resolver wtmp
issues:
sed -i 's/\(CONFIG_\)\(.*\)\(INETD\)\(.*\)=y/# is not set/g;s/\(CONFIG_IFPLUGD\|CONFIG_ASH_HELP\|CONFIG_FEATURE_VERBOSE\|CONFIG_UEVENT\)=y/# is not set/' .config
sed -i '/utmpx\.h/,/endif/s/__UCLIBC__/LIBBB_H/' include/libbb.h
Lista completa de pacotes:
wget -cO bootscripts-embedded-HEAD.tar.gz -c 'http://git.clfs.org/?p=bootscripts-embedded.git;a=snapshot;h=HEAD;sf=tgz'
wget -cO gcc-5.2.0-musl-1.patch 'https://raw.githubusercontent.com/GregorR/musl-cross/master/patches/gcc-5.2.0-musl.diff'
wget -c \
'http://ftp.gnu.org/gnu/binutils/binutils-2.25.1.tar.bz2' \
'http://busybox.net/downloads/busybox-1.24.0.tar.bz2' \
'ftp://gcc.gnu.org/pub/gcc/releases/gcc-5.2.0/gcc-5.2.0.tar.bz2' \
'http://ftp.gnu.org/gnu/gmp/gmp-5.1.3.tar.xz' \
'http://sethwklein.net/iana-etc-2.30.tar.bz2' \
'http://ftp.barfooze.de/pub/sabotage/tarballs/kernel-headers-3.12.6-5.tar.xz' \
'https://github.com/beagleboard/linux/archive/4.1.tar.gz' \
'ftp://ftp.denx.de/pub/u-boot/u-boot-2015.10.tar.bz2' \
'ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz' \
'ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.3.tar.xz' \
'http://www.musl-libc.org/releases/musl-1.1.9.tar.gz' \
'https://matt.ucc.asn.au/dropbear/releases/dropbear-2015.68.tar.bz2' \
'http://www.red-bean.com/~bos/netplug/netplug-1.2.9.2.tar.bz2' \
'http://downloads.sourceforge.net/libpng/zlib-1.2.9.tar.gz' \
'http://patches.clfs.org/embedded-dev/iana-etc-2.30-update-2.patch' \
'http://patches.clfs.org/embedded-dev/netplug-1.2.9.2-fixes-1.patch' \
'http://downloads.sourceforge.net/libpng/zlib-1.2.8.tar.gz'
Isso resolve todos os problemas.