################################################################## # Script: disk_launch # Purpose: Launch an installed Slackware ARM host via QEMU # Author: Stuart Winter # Date: 24-Apr-2009 # Version: 1.01 ################################################################## # 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. # The installation notes recommend /dev/sda2 ROOTFSDEV=/dev/sda2 # If you want a VNC server instead of displaying to your # vconsole/X, uncomment this - but note that the setting below # offers no security - not even a password! VISUALOUTPUT="-vnc :1" ## Uncomment this if you want a VNC Server # # If you'd like to output the boot process to your terminal window # on the host machine, uncomment the two lines below: #VISUALOUTPUT="-serial /dev/tty -nographic" #KAPPEND="console=ttyAMA0" # 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" # If you are using bridged mode and have more than 1 QEMU host # on your network, you'll need to set the MAC address: # QEMU begins at 52:54:00:12:34:56 - so I increment it for # each new host. # MACADDR=",macaddr=52:54:00:12:34:57" # If you're using a bridge on your X86 host, so that the Slackware ARM # host can become a real host on your network with its own IP, # uncomment the next line. This requires a bit more setup on your # host. To begin with you may prefer to use NAT, as the installer does: # NETTYPE="-net nic${MACADDR} -net tap,ifname=tap0,script=qemu-network-tun.sh" # Using NAT - this is the easiest way, but your Slackware ARM host # does not appear as a real host on the network: NETTYPE="-net nic,vlan=0${MACADDR} -net user,vlan=0" # Load the 'tunnel' interface module: modprobe tun # To open a serial console, you can pass "console=ttyAMA0" to # QEMU's -kernel parameter # And add this to the OS' /etc/inittab: # s1:12345:respawn:/sbin/agetty -L ttyAMA0 38400 vt100 qemu-system-arm $VISUALOUTPUT $NETTYPE \ -M versatilepb \ -m 256 \ -kernel zImage-versatile \ -hda harddisk.img \ -localtime \ -usb \ -no-reboot \ -k $KEYBOARD \ -initrd initrd-versatile.gz \ -append "nofont root=$ROOTFSDEV rootfs=$ROOTFSTYPE $KAPPEND" # Flattened Device Tree: # You need qemu to be built with --enable-fdt # which also requires the 'device-tree-compiler' package # to be installed. # -dtb dtb/versatile-pb.dtb \ # EOF