[Toybox] FreeBSD porting, removing bashisms

Ed Maste emaste at freebsd.org
Tue Jan 8 18:39:10 PST 2019


On Tue, 8 Jan 2019 at 20:54, Rob Landley <rob at landley.net> wrote:
>
>   make allnoconfig KCONFIG_ALLCONFIG=mini.config

Yep, that seems to work (a few cosmetic build issues):

% gmake allnoconfig KCONFIG_ALLCONFIG=mini.config
% gmake
scripts/make.sh
scripts/make.sh: line 18: nproc: command not found
Generate headers from toys/*/*.c...
Make generated/config.h from .config.
generated/flags.h Compile
toybox....................................................................................................................strip:
open toybox failed: Permission denied
strip failed, using unstripped
.
volta% ./toybox
acpi ascii base64 basename bunzip2 bzcat cal cat catv chgrp chmod
chown chroot chrt chvt cksum clear cmp comm count cpio crc32 cut date
dirname dos2unix du echo egrep expand factor fallocate false fgrep
file find flock fmt fsync grep groups head help hexedit hostname iconv
id kill killall killall5 link ln logger logname ls lsmod lspci lsusb
makedevs mkdir mkfifo mknod mkpasswd mkswap mktemp modinfo mountpoint
nice nl nohup od paste patch pidof pmap printenv printf pwd pwdx readlink
realpath renice reset rev rm rmdir sed seq setsid shred sleep sort
split strings sync sysctl tac tee test time timeout touch true truncate
tty uname uniq unix2dos unlink usleep uudecode uuencode uuidgen vmstat
w watch wc which who whoami xargs xxd yes

We don't have an nproc command; sysctl -n hw.ncpu will return the # of
CPUs on FreeBSD. I'm not sure how to plumb that into scripts/make.sh
in a nice way. It ends up as CPUS=1 though and thus works fine. And
the strip failure is due to the existing toybox (from previous build)
being installed r-x.

Anyhow, mini.config looks good.



More information about the Toybox mailing list