my-linux

os on linux kernel from scratch
git clone git://git.evenfri.xyz/my-linux.git
Log | Files | Refs | README

start.sh (491B)


      1 #!/bin/sh
      2 
      3 loc_linux="linux_img"
      4 linux="linux/arch/x86/boot/bzImage"
      5 initramfs="initramfs.cpio.gz"
      6 
      7 if [ -f "$linux" ]; then
      8   cp "$linux" "$loc_linux"
      9   [ -f "./linux/.config" ] && cp "./linux/.config" "./linux_config"
     10 fi
     11 
     12 cd coreutils
     13 mk
     14 cd ..
     15 
     16 ./initramfs.sh
     17 
     18 if [ ! -f "$initramfs" ]; then
     19   echo "Error: $initramfs not found!" >&2
     20   exit 1
     21 fi
     22 
     23 exec qemu-system-x86_64 \
     24   -kernel "$loc_linux" \
     25   -initrd "$initramfs" \
     26   -m 256 \
     27   -append "rdinit=/bin/init init=/bin/init loglevel=3"