toybox 957 + patches

Core libraries and systems
Post Reply
Message
Author
musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#16 Post by musher0 »

Thanks.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

#17 Post by Ibidem »

New toybox build.
Features a rudimentary getty, with which I can boot the system using toybox init. Usage is simply
ttyN::respawn:/sbin/getty
(it ignores baud rate, and autodetects tty).
Also fixes some breakage in fdisk, and adds modprobe, ftpget, ftpput (all from Ashwini Sharma) and xfs_freeze (simple FIFREEZE/FITHAW wrapper, for if you want to temporarily make an fs readonly without causing any disruption beyond writes blocking).

Applets:

Code: Select all

acpi addgroup adduser basename blkid bzcat cal cat chgrp chmod chown 
chroot chvt cksum clear cmp comm count cp cpio cut date dd df dhcp 
dhcpd dirname dmesg dos2unix du dumpleases echo egrep eject env expand 
expr fallocate false fdisk fgrep find free fstype ftpget ftpput getty 
grep groupadd groups halt head help hostname id ifconfig init insmod 
kill killall klogd link ln logger login logname losetup ls lsmod lspci 
lsusb md5sum mdev mkdir mkfifo mknod mkpasswd mkswap mktemp modinfo 
modprobe mount mountpoint mv nc netcat netstat nice nl nohup od oneit 
passwd paste patch pgrep pidof pivot_root pkill pmap poweroff printenv 
ps pwd readlink realpath reboot renice resolve_modalias rev rm rmdir 
rmmod route seq setsid sha1sum sleep sort split stat su swapoff swapon 
switch_root sync syslogd tac tail taskset tee test tftpd time timeout 
top touch traceroute true truncate tty umount uname uniq unix2dos 
unlink unshare uptime useradd usleep uudecode uuencode vconfig vmstat 
watch wc which whoami xargs xfs_freeze xzcat yes 
Sources are in the usual place (https://github.com/idunham/toybox build).

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

#18 Post by Ibidem »

And another build of toybox:
-A more complete getty
-fixup modprobe
-freeramdisk, openvt, deallocvt
-gzip (based on sflate)
-cpio -d
-grep -zZ
-I'm disabling dhcpd and related dumpleases, tftpd, and telnetd.

Commands:

Code: Select all

acpi addgroup adduser basename blkid brctl bzcat cal cat chgrp chmod 
chown chroot chvt cksum clear cmp comm count cp cpio cut date dd deallocvt 
delgroup df dhcp dirname dmesg dos2unix du echo egrep eject env expand 
expr false fdisk fgrep find free freeramdisk fstype ftpget ftpput 
getty grep groupadd groupdel groups gzip halt head help hostname id 
ifconfig init insmod kill killall klogd link ln logger login logname 
losetup ls lsmod lspci lsusb md5sum mkdir mkfifo mknod mkpasswd mkswap 
mktemp modinfo modprobe more mount mountpoint mv nc netcat netstat 
nice nl nohup od openvt passwd paste patch pgrep pidof pkill pmap 
poweroff printenv ps pwd readlink realpath reboot renice rev rm rmdir 
rmmod route seq setsid sha1sum sleep sort split stat su swapoff swapon 
switch_root sync syslogd tac tail taskset tee telnet test time timeout 
touch true truncate tty umount uname uniq unix2dos unlink unshare 
uptime useradd usleep uudecode uuencode vconfig vmstat watch wc which 
whoami xargs xfs_freeze xzcat yes
Sources are in the usual place; I built this with

Code: Select all

make CC=/opt/musl/bin/musl-gcc CFLAGS="-Os -static" KCONFIG_BUILD=CONFIG.build; sstrip toybox; ./toybox gzip -gc <toybox >toybox.gz
(note that the above requires sstrip from http://www.muppetlabs.com/~breadbox/sof ... ckers.html)
Attachments
CONFIG.build.gz
gzipped .config
(1.22 KiB) Downloaded 306 times

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

#19 Post by Ibidem »

Size optimization, from smallest to largest:
gcc-3.4, -Os -fomit-frame-pointer 390k
gcc-4.2, -Os -fomit-frame-pointer 393k
gcc-4.2, -Os 394k (a few bytes larger)
gcc-3.4, -Os 394k (largest of the four)

Some small fixes have taken place, and xfs_freeze is now fsfreeze.
TOybox 0.4.8 is on the way.

Post Reply