diff options
author | Riku Voipio <riku.voipio@linaro.org> | 2014-01-27 13:51:03 +0200 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2014-01-27 13:51:03 +0200 |
commit | a8f96555d0373417a4f66b745eb4ba6f43f962a6 (patch) | |
tree | f263bc3505f5a5a8ed7ac9da23392b8c3bac69e8 | |
parent | fafe2c44b1d69359932335b58d541793e2ef4f01 (diff) |
Full midway support
Add a json file and bootscript for midway.
Add neccesary mods to makelavaimg to finish the job
-rw-r--r-- | files/midway-boot.txt | 15 | ||||
-rw-r--r-- | lava/xen-midway.json | 37 | ||||
-rwxr-xr-x | makelavaimg | 37 |
3 files changed, 79 insertions, 10 deletions
diff --git a/files/midway-boot.txt b/files/midway-boot.txt new file mode 100644 index 0000000..5431929 --- /dev/null +++ b/files/midway-boot.txt @@ -0,0 +1,15 @@ +setenv initrd_high "0xffffffff" +setenv fdt_high "0xffffffff" +setenv dom0_addr "0x1000000" +setenv bootargs "console=hvc0,115200n8 nosplash root=%%UUID%% rootwait ro" +printenv +fdt addr $fdt_addr; fdt resize +fdt set /chosen xen,xen-bootargs "console=dtuart dtuart=/soc/serial@fff36000" +fdt mknod /chosen module +fdt set /chosen/module compatible "xen,linux-zimage" "xen,multiboot-module" +fdt set /chosen/module reg <0x0 $dom0_addr 0x0 0x00a00000> +fdt set /chosen/module bootargs "$bootargs" +ext2load scsi 0:1 $dom0_addr zImage +ext2load scsi 0:1 $ramdisk_addr_r uInitrd +ext2load scsi 0:1 $kernel_addr_r xen +bootz $kernel_addr_r $ramdisk_addr_r $fdt_addr diff --git a/lava/xen-midway.json b/lava/xen-midway.json new file mode 100644 index 0000000..9a09e65 --- /dev/null +++ b/lava/xen-midway.json @@ -0,0 +1,37 @@ +{ + "actions": [ + { + "command": "deploy_linaro_image", + "metadata": { + "rootfs.type": "server", + "ubuntu.distribution": "ubuntu", + "ubuntu.name": "midway" + }, + "parameters": { + "image": "http://snapshots.linaro.org/ubuntu/images/xen/latest/xenlava-midway.img.gz" + } + }, + { + "command": "lava_test_shell", + "parameters": { + "testdef_repos": [ + { + "git-repo": "http://git.linaro.org/git/ci/xen-ci.git", + "testdef": "lava/xentest.yaml" + } + ], + "timeout": 9600 + } + }, + { + "command": "submit_results", + "parameters": { + "server": "http://validation.linaro.org/RPC2/", + "stream": "/anonymous/xentest/" + } + } + ], + "device_type": "midway", + "job_name": "Xen Midway test", + "timeout": 172800 +} diff --git a/makelavaimg b/makelavaimg index 186bf4c..727efc3 100755 --- a/makelavaimg +++ b/makelavaimg @@ -82,31 +82,48 @@ sudo linaro-media-create --hwpack-force-yes --dev ${dev} --image-file xenlava-$ --image-size 3G --bootloader u_boot # Install kpartx -sudo apt-get install kpartx +sudo apt-get install kpartx u-boot-tools #loopmount partitions sudo kpartx -a -v ${image} -MOUNT=a +BOOTMOUNT=bootfs +MOUNT=rootfs + #add the hypervisor to the boot image +mkdir $BOOTMOUNT +sudo mount $BOOT $BOOTMOUNT mkdir $MOUNT -sudo mount $BOOT $MOUNT -sudo cp xen $MOUNT -sudo umount $MOUNT -rmdir $MOUNT +sudo mount $ROOTFS $MOUNT + +# midway uses a u-boot script for booting, we use our own script with xen stuff + +case $hwpack in + midway) + sudo chmod a+r $BOOTMOUNT/boot.txt + UUID=`tr ' ' '\n' < $BOOTMOUNT/boot.txt |sed -n /UUID/s/.*=//p` + sed -e "s/%%UUID%%/$UUID/" ${FILES}/files/midway-boot.txt > /tmp/boot.txt + mkimage -A arm -T script -C none -n "xen lava" -d /tmp/boot.txt /tmp/boot.scr + sudo cp /tmp/boot.txt /tmp/boot.scr $BOOTMOUNT + cat /tmp/boot.txt + sudo cp $MOUNT/boot/vmlinuz*midway $BOOTMOUNT/zImage + ;; +esac + +sudo cp xen $BOOTMOUNT #add hvc0 init file and xen tools package to the rootfs image -mkdir $MOUNT -sudo mount $ROOTFS $MOUNT sudo cp ${FILES}/files/hvc0.conf ${MOUNT}/etc/init/ sudo cp ${FILES}/files/linaro-repo.list ${MOUNT}/etc/apt/sources.list.d/ sudo dpkg-deb --extract xen-upstream-*.deb $MOUNT + sudo umount $MOUNT rmdir $MOUNT - +sudo umount $BOOTMOUNT +rmdir $BOOTMOUNT #tidy up mapper devices sudo kpartx -d ${image} #compress the image -gzip ${image} +gzip -9 ${image} |