diff options
author | kartofen <mladenovnasko0@gmail.com> | 2023-04-30 13:21:44 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2023-04-30 13:21:44 +0300 |
commit | d42853496fc976ef3d067af421a1a3811660033d (patch) | |
tree | 272ece830ae755e92f715b77f632e24b1adec2d8 /vm.sh | |
parent | a78c52265d755a2294a743e186ad5a6b5456d9f1 (diff) |
i am getting tired of the makefile
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 |