clfs

clfs.git
git clone git://git.lenczewski.org/clfs.git
Log | Files | Refs | README

aarch64-linux-musl-qemu.sh (455B)


      1 #!/bin/sh
      2 
      3 set -ex
      4 
      5 KERNEL="$BOOTROOT/$KERNEL"
      6 INITRD="$BOOTROOT/$INITRD"
      7 ROOTFS="$BOOTROOT/$ROOTFS" # TODO: unused, write this to a temporary disk
      8 
      9 QEMU_OPTS="
     10 	-kernel $KERNEL
     11 	-append 'console=ttyS0'
     12 	-cpu max
     13 	-m 128M
     14 	-nographic
     15 	-serial mon:sdio
     16 	-nodefaults
     17 "
     18 
     19 if [ ! -f "$KERNEL" ]; then
     20 	echo "No kernel was built, cannot run qemu!"
     21 	exit 1
     22 fi
     23 
     24 if [ -f "$INITRD" ]; then
     25 	QEMU_OPTS="$QEMU_OPTS -initrd $INITRD"
     26 fi
     27 
     28 qemu-system-aarch64 $QEMU_OPTS