Add busybox shell replacements module
On the OLPC XO-1, there is a noticable delay during boot while the initramfs is loaded from disk and uncompressed, so we have an interest in making it small. We are also pushed for disk space. Using busybox instead of all the regular tools saves a lot of space. I have not tried every module but the basics are working with busybox's replacements. Our initramfs is now down to 1.9mb.master
parent
d118a5990a
commit
dbcc4e94c5
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
inst busybox /sbin/busybox
|
||||
|
||||
# List of shell programs that we use in other official dracut modules, that
|
||||
# must be supported by the busybox installed on the host system
|
||||
progs="echo grep usleep [ rmmod insmod mount uname umount setfont kbd_mode stty gzip bzip2 chvt readlink blkid dd losetup tr sed seq ps more cat rm free ping netstat vi ping6 fsck ip hostname basename mknod mkdir pidof sleep chroot ls cp mv dmesg mkfifo less ln modprobe"
|
||||
|
||||
# FIXME: switch_root should be in the above list, but busybox version hangs
|
||||
# (using busybox-1.15.1-7.fc14.i686 at the time of writing)
|
||||
|
||||
for i in $progs; do
|
||||
path=$(find_binary "$i")
|
||||
ln -s /sbin/busybox "$initdir/$path"
|
||||
done
|
||||
|
||||
Loading…
Reference in New Issue