diff --git a/build b/build index 3a68c60..61498b1 100755 --- a/build +++ b/build @@ -41,6 +41,9 @@ cp /boot/vmlinuz $BOOT/ # create compressed bundles # ... TODO! +if [ -d sb ]; then + cp sb/* $LIVEKITDATA/$LIVEKITNAME/ +fi # create ISO for CD image echo "Creating ISO file for CD boot..." diff --git a/initramfs/init b/initramfs/init index fa20194..298adc8 100644 --- a/initramfs/init +++ b/initramfs/init @@ -24,6 +24,12 @@ DATA="$(find_data $LIVEKITNAME)" # add data to union union_append_bundles "$DATA" + +mkdir /m +mount /dev/sr0 /m +modprobe squashfs +mkdir /s +mount -o loop -t squashfs /m/mylinux/core.sb /s # possibly switch root # testing message diff --git a/initramfs/initramfs_create b/initramfs/initramfs_create index 68c6a86..3d0d460 100755 --- a/initramfs/initramfs_create +++ b/initramfs/initramfs_create @@ -52,32 +52,20 @@ 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 +#for i in $(seq 0 255); do +# mknod $INITRAMFS/dev/loop$i b 7 $i +#done -#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 /usr/bin/strace # TODO: add all comon filesystems which are NOT compiled in kernel already copy_including_deps /$LMK/kernel/fs/squashfs copy_including_deps /$LMK/kernel/drivers/staging/zram +copy_including_deps /$LMK/kernel/drivers/block/loop.* copy_including_deps /$LMK/modules.* depmod -b $INITRAMFS diff --git a/livekitlib b/livekitlib index bac8e75..9ee511f 100644 --- a/livekitlib +++ b/livekitlib @@ -113,10 +113,11 @@ init_proc() # make sure some devices are there 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 - + echo /sbin/mdev > /proc/sys/kernel/hotplug + mdev -s + modprobe zram + modprobe loop + modprobe squashfs } # Activate zram (auto-compression of RAM) @@ -127,7 +128,6 @@ init_zram() { debug_log "init_zram" echo "Setting dynamic RAM compression using ZRAM" - modprobe zram echo 536870912 > /sys/block/zram0/disksize # 512MB mkswap /dev/zram0 swapon /dev/zram0 -p 32767