diff --git a/QA.sh b/QA.sh index a6e9cb5..8d5abc2 100755 --- a/QA.sh +++ b/QA.sh @@ -24,14 +24,6 @@ if [ "$(uname)" = "Linux" ] && [ -e /dev/kvm ]; then fi fi -if [ "$DISK" = "" ]; then - export DISK=$JEHANNE/hacking/sample-disk.img -fi - -if [ -a $DISK ]; then - bootDisk="-device ahci,id=ahci -drive id=boot,file=$DISK,index=0,cache=writeback,if=none -device ide-drive,drive=boot,bus=ahci.0" -fi - if [ "$KERNDIR" = "" ]; then KERNDIR=$JEHANNE/arch/$ARCH/kern/ fi @@ -41,10 +33,32 @@ fi if [ "$NCPU" = "" ]; then NCPU=1 fi +if [ "$CPU_MODEL" = "" ]; then + CPU_MODEL=Opteron_G1 +fi + +appendLine="nobootprompt=tcp maxcores=1024 fs=10.0.2.2 auth=10.0.2.2 nvram=/boot/nvram nvrlen=512 nvroff=0 $KAPPEND" +appendLine="-append '$appendLine'" +kernelLine="-kernel $KERNEL $*" +if [ "$DISK" = "" ]; then + if [ "$QA_DISK" != "" ]; then + # disk to run QA checks + export DISK=$QA_DISK + # will boot from disk, no need for kernel and so on + appendLine="" + kernelLine="" + else + export DISK=$JEHANNE/hacking/sample-disk.img + fi +fi + +if [ -a $DISK ]; then + bootDisk="-device ahci,id=ahci -drive id=boot,file=$DISK,index=0,cache=writeback,if=none -device ide-drive,drive=boot,bus=ahci.0" +fi cd $KERNDIR read -r cmd <> /dev/sdE0/ctl @@ -69,7 +76,7 @@ disk/prep -w -a nvram -a fs /dev/sdE0/plan9 disk/prep -p /dev/sdE0/plan9 >> /dev/sdE0/ctl cat /dev/sdE0/ctl -disk/format -d /dev/sdE0/dos /hacking/disk-setup/syslinux.cfg /hacking/disk-setup/bios/* /arch/amd64/kern/initrd /arch/amd64/kern/jehanne.32bit +disk/format -d /dev/sdE0/dos /hacking/disk-setup/syslinux.cfg /hacking/disk-setup/bios/* $DISK_INITRD $DISK_KERNEL dd -if /hacking/nvram -of /dev/sdE0/nvram @@ -113,6 +120,7 @@ cd qa dircp /root/qa . cd /n/newfs lc +$AFTER_DISK_FILL unmount /n/newfs echo df >> /srv/hjfs.cmd echo sync >> /srv/hjfs.cmd