[Toybox] Fwd: build help please with toybox

scsijon scsijon at lamiaworks.com.au
Fri Nov 22 08:07:13 PST 2019


I'm playing with a minimal-linux iso script, this should work changing 
from busybox to toybox with this>

-----minimal-2.sh-------- (excuse any wraps)
#!/bin/sh
#source minimal-linux at github.com/ivandavedov/minimal gpl3 with kernel 
busybox syslinux
#20191122 scsijon test alpha only, new kernel, toybox ilo busybox, 
syslinux, use .gz srcs on purpose
#20191122 scsijon some hashed out as downloads ok and rm not wanted 
first time manually delete for now fix later

set -ex
KERNEL_VERSION=5.3.12
TOYBOX_VERSION=0.8.2
SYSLINUX_VERSION=6.03
#wget -O kernel.tar.gz 
http://kernel.org/pub/linux/kernel/v5.x/linux-${KERNEL_VERSION}.tar.gz
#wget -O toybox.tar.gz 
https://landley.net/toybox/downloads/toybox-${TOYBOX_VERSION}.tar.gz
#wget -O syslinux.tar.gz 
http://kernel.org/pub/linux/utils/boot/syslinux/syslinux-${SYSLINUX_VERSION}.tar.gz
#rm -rd linux-${KERNEL_VERSION}
#rm -rd toybox-${TOYBOX_VERSION}
#rm -rd syslinux-${SYSLINUX_VERSION}
#rm -rd isoimage
tar -xvf kernel.tar.gz
tar -xvf toybox.tar.gz
tar -xvf syslinux.tar.gz
mkdir isoimage
cd toybox-${TOYBOX_VERSION}
LDFLAGS="--static" make defconfig toybox
make toybox install
cd _install
rm -f linuxrc
mkdir dev proc sys
echo '#!/bin/sh' > init
echo 'dmesg -n 1' >> init
echo 'mount -t devtmpfs none /dev' >> init
echo 'mount -t proc none /proc' >> init
echo 'mount -t sysfs none /sys' >> init
echo 'setsid cttyhack /bin/sh' >> init
chmod +x init
find . | cpio -R root:root -H newc -o | gzip > ../../isoimage/rootfs.gz
cd ../../linux-${KERNEL_VERSION}
make mrproper defconfig bzImage
cp arch/x86/boot/bzImage ../isoimage/kernel.gz
cd ../isoimage
cp ../syslinux-${SYSLINUX_VERSION}/bios/core/isolinux.bin .
cp ../syslinux-${SYSLINUX_VERSION}/bios/com32/elflink/ldlinux/ldlinux.c32 .
echo 'default kernel.gz initrd=rootfs.gz' > ./isolinux.cfg
xorriso \
   -as mkisofs \
   -o ../minimal_linux_live.iso \
   -b isolinux.bin \
   -c boot.cat \
   -no-emul-boot \
   -boot-load-size 4 \
   -boot-info-table \
   ./
cd ..
set +ex
---------------------------

but, picking up from "mkdir isoimage" below 3 lines starting with tar 
above, i'm getting this in the toybox part>

--------------------------------
+ mkdir isoimage
+ cd toybox-0.8.2
+ LDFLAGS=--static
+ make defconfig toybox
cc -o kconfig/conf kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \
	-DPROJECT_NAME=\"ToyBox\"
In file included from kconfig/zconf.tab.c:2338:0:
scripts/kconfig/lex.zconf.c: In function ‘yy_get_next_buffer’:
scripts/kconfig/lex.zconf.c:890:16: error: ‘EINTR’ undeclared (first use 
in this function)
scripts/kconfig/lex.zconf.c:1513:3: note: in expansion of macro ‘YY_INPUT’
scripts/kconfig/lex.zconf.c:890:16: note: each undeclared identifier is 
reported only once for each function it appears in
scripts/kconfig/lex.zconf.c:1513:3: note: in expansion of macro ‘YY_INPUT’
In file included from kconfig/zconf.tab.c:2340:0:
kconfig/confdata.c: In function ‘conf_split_config’:
kconfig/confdata.c:655:17: error: ‘ENOENT’ undeclared (first use in this 
function)
     if (errno != ENOENT) {
                  ^
kconfig/Makefile:73: recipe for target 'kconfig/conf' failed
make: *** [kconfig/conf] Error 1
#
---------------------

any ideas or help please?

thanks



More information about the Toybox mailing list