################################################################## # Script: disk_launch # Purpose: Launch an installed Slackware ARM host via QEMU # Author: Stuart Winter # Date: 28-May-2020 # Version: 1.03 ################################################################## # Select your root filesystem's format. # By default Slackware uses 'ext4', but if you chose another, you # need to uncomment it and comment out the others. # ROOTFSTYPE=ext4 #ROOTFSTYPE=ext3 #ROOTFSTYPE=ext2 #ROOTFSTYPE=xfs #ROOTFSTYPE=reiserfs #ROOTFSTYPE=jfs ## Don't choose this one! see installation notes # # Select your root filesystem device. ROOTFSDEV=/dev/vda2 # You'll see the console output in the terminal window from which # you run qemu. VISUALOUTPUT="-nographic" KAPPEND="console=ttyAMA0,115200n8" # Select your keyboard - this gets overridden by the OS when you # choose your keymap, so it's not prudent to change it unless you # have a non-standard keyboard such as a Mac (according to qemu(1)). # If there is a problem when booting the OS, and you are dropped to # a rescue shell, this may also be another reason to have a correct # key mapping. # # The best advise is that if you find that your keyboard is going # crazy in QEMU, please set it to one in the list below ;-) # # The available keyboard options are: # # ar de-ch es fo fr-ca hu ja mk no pt-br sv # da en-gb et fr fr-ch is lt nl pl ru th # de en-us fi fr-be hr it lv nl-be pt sl tr # KEYBOARD="en-gb" # Use NAT for networking. This is the most simple option. NETTYPE="-net nic -net user,restrict=n" # Load the 'tunnel' interface module: modprobe tun # Run qemu: qemu-system-arm $VISUALOUTPUT $NETTYPE \ -m 1024 \ -M vexpress-a9 \ -smp $( nproc ) \ -k $KEYBOARD \ -rtc base=localtime \ -no-reboot \ -drive if=none,file=hda.qcow2,format=qcow2,id=hd \ -device virtio-blk-device,drive=hd \ -dtb dtb/vexpress-v2p-ca9.dtb \ -initrd initrd-armv7 \ -kernel zImage-armv7 \ -append "$KAPPEND nofont root=$ROOTFSDEV rootfstype=$ROOTFSTYPE"