switched to busybox

pull/5/head
Tomas M 2012-09-06 13:04:23 -05:00
parent 445fe3906b
commit 0421e9e1ab
4 changed files with 43 additions and 15 deletions

View File

@ -0,0 +1,4 @@
#!/bin/bash
# we're using precompiled busybox i486 binary, which runs on 64bit systems as well!
wget -O ./busybox http://busybox.net/downloads/binaries/latest/busybox-i486
chmod a+x ./busybox

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# Initial script for Linux Live Kit
# Author: Tomas M <http://www.linux-live.org/>
@ -28,4 +28,4 @@ union_append_bundles "$DATA"
# testing message
echo "If you see this message, then something went terribly wrong. Sorry!"
/bin/bash
/bin/sh

View File

@ -35,22 +35,45 @@ copy_including_deps()
rm -Rf $INITRAMFS
mkdir -p $INITRAMFS/{bin,dev,etc,lib,lib64,mnt,proc,root,run,sbin,sys,tmp,usr,var/log}
if [ ! -e busybox/busybox ]; then
cd busybox
./update
cd ..
fi
cp busybox/busybox $INITRAMFS/bin
busybox/busybox | grep , | grep -v Copyright | tr "," " " | while read LINE; do
for TOOL in $LINE; do
ln -s busybox $INITRAMFS/bin/$TOOL
ln -s ../bin/busybox $INITRAMFS/sbin/$TOOL
done
done
mknod $INITRAMFS/dev/console c 5 1
mknod $INITRAMFS/dev/null c 1 3
mknod $INITRAMFS/dev/ram0 b 1 0
#mknod $INITRAMFS/dev/systty
mknod $INITRAMFS/dev/tty1 c 4 1
mknod $INITRAMFS/dev/tty2 c 4 2
mknod $INITRAMFS/dev/tty3 c 4 3
mknod $INITRAMFS/dev/tty4 c 4 4
#tar -C $INITRAMFS -xf initrd-tree.tar.gz
#rm $INITRAMFS/* 2>/dev/null # only files
#copy_including_deps /lib64/libc.so.*
#copy_including_deps /lib64/libm.so.*
copy_including_deps /dev/ram /dev/systty /dev/fuse
copy_including_deps /dev/tty /dev/tty?
copy_including_deps /bin/bash /bin/mount /bin/umount /bin/mkdir
copy_including_deps /bin/ln /bin/cat /bin/ls /bin/free
copy_including_deps /sbin/blkid /sbin/swapon /sbin/mkswap /sbin/modprobe
copy_including_deps /bin/grep /bin/egrep /bin/cut /bin/tr
copy_including_deps /sbin/lsmod
copy_including_deps /sbin/fdisk
copy_including_deps /bin/uname
copy_including_deps /usr/bin/vi
copy_including_deps /usr/bin/strace
#copy_including_deps /dev/ram /dev/systty /dev/fuse
#copy_including_deps /dev/tty /dev/tty?
#copy_including_deps /bin/bash /bin/mount /bin/umount /bin/mkdir
#copy_including_deps /bin/ln /bin/cat /bin/ls /bin/free
#copy_including_deps /sbin/blkid /sbin/swapon /sbin/mkswap /sbin/modprobe
#copy_including_deps /bin/grep /bin/egrep /bin/cut /bin/tr
#copy_including_deps /sbin/lsmod
#copy_including_deps /sbin/fdisk
#copy_including_deps /bin/uname
#copy_including_deps /usr/bin/vi
#copy_including_deps /usr/bin/strace
# TODO: add all comon filesystems which are NOT compiled in kernel already
copy_including_deps /$LMK/kernel/fs/squashfs

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# Functions library :: for Linux Live Kit scripts
# Author: Tomas M. <http://www.linux-live.org>
@ -116,6 +116,7 @@ init_devs()
if [ ! -e /dev/console ]; then mknod dev/console c 5 1; fi
if [ ! -e /dev/null ]; then mknod dev/null c 1 3; fi
if [ ! -e /dev/zram0 ]; then mknod dev/zram0 b 252 0; fi
}
# Activate zram (auto-compression of RAM)
@ -185,4 +186,4 @@ mount_device()
union_append_bundles()
{
echo "B"
}
}