diff options
Diffstat (limited to 'vm.sh')
-rwxr-xr-x | vm.sh | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -2,7 +2,8 @@ function run { - st qemu-system-x86_64 \ + # st \ + qemu-system-x86_64 \ -kernel "$BIND/$KERNEL_NAME" \ -initrd "$BIND/$INITFS_NAME" \ -append "console=ttyS0" -nographic @@ -12,7 +13,6 @@ function initramfs { IMG="$(pwd)/$1" DIR="${IMG%.*}" - mkdir -p $DIR # get busybox things @@ -20,15 +20,13 @@ function initramfs ln -sf busybox $DIR/bin/sh ln -sf busybox $DIR/bin/dmesg ln -sf busybox $DIR/bin/mount - # ln -sf busybox $DIR/bin/bash # copy the things - mkdir -p $DIR/usr/ - cp -r $BIND/* $DIR/usr/ - - rm -f $DIR/usr/kernel* # no need for the kernel - rm -f $DIR/usr/*.img # no need for the initramfs - rm -rf $DIR/usr/initramfs # no need for the initramfs + mkdir -p "$DIR/usr" + find "$BIND" -maxdepth 1 -mindepth 1 \ + ! -name "*initramfs*" \ + ! -name "*kernel*" \ + -exec cp -r {} "$DIR/usr" \; # copy the script and the bin cp $2 $DIR/init |