From d42853496fc976ef3d067af421a1a3811660033d Mon Sep 17 00:00:00 2001 From: kartofen Date: Sun, 30 Apr 2023 13:21:44 +0300 Subject: i am getting tired of the makefile --- vm.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'vm.sh') diff --git a/vm.sh b/vm.sh index 9972464..cd0d725 100755 --- a/vm.sh +++ b/vm.sh @@ -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 -- cgit v1.2.3