From 02f84f98c3730cd0bbdcaff0fd99882428a49ddb Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 24 Mar 2016 11:48:04 +0100 Subject: [PATCH] Explicitly set Qemu disk-image format to raw Prevents the annoying warning about WARNING: Image format was not specified for 'bin/test.img' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. --- repos/dde_linux/run/usb_storage.run | 2 +- repos/libports/run/libc_block.run | 4 ++-- repos/libports/run/libc_ffat_fs.run | 4 ++-- repos/libports/run/libc_filesystem_test.inc | 4 ++-- repos/libports/run/qt5_textedit.run | 2 +- repos/os/run/ahci_bench.run | 2 +- repos/os/run/ahci_blk.run | 2 +- repos/os/run/sd_card.run | 2 +- repos/os/run/usb_block.run | 2 +- repos/ports/run/seoul-disc.run | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/repos/dde_linux/run/usb_storage.run b/repos/dde_linux/run/usb_storage.run index b149f49b8b..06ca448f04 100644 --- a/repos/dde_linux/run/usb_storage.run +++ b/repos/dde_linux/run/usb_storage.run @@ -107,7 +107,7 @@ catch { exec sh -c $cmd } # # Qemu opts for EHCI # -append qemu_args "-drive if=none,id=disk,file=$disk_image" +append qemu_args "-drive if=none,id=disk,file=$disk_image,format=raw" append qemu_args { \ -m 128 -nographic -M pc \ -device usb-ehci,id=ehci \ diff --git a/repos/libports/run/libc_block.run b/repos/libports/run/libc_block.run index 1c0ea08a1c..37c8e0e505 100644 --- a/repos/libports/run/libc_block.run +++ b/repos/libports/run/libc_block.run @@ -126,8 +126,8 @@ catch { exec sh -c $cmd } # Qemu # append qemu_args " -m 128 -nographic " -append_if $use_ahci_drv qemu_args " -drive id=disk,file=$disk_image,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d" -append_if $use_sd_card_drv qemu_args " -drive file=$disk_image,if=sd,cache=writeback " +append_if $use_ahci_drv qemu_args " -drive id=disk,file=$disk_image,format=raw,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d" +append_if $use_sd_card_drv qemu_args " -drive file=$disk_image,format=raw,if=sd,cache=writeback " run_genode_until {.*child "test-libc_block" exited with exit value 0.*} 60 diff --git a/repos/libports/run/libc_ffat_fs.run b/repos/libports/run/libc_ffat_fs.run index 27f4b18911..652125e073 100644 --- a/repos/libports/run/libc_ffat_fs.run +++ b/repos/libports/run/libc_ffat_fs.run @@ -134,8 +134,8 @@ catch { exec sh -c $cmd } # Qemu # append qemu_args " -m 128 -nographic " -append_if $use_ahci_drv qemu_args " -drive id=disk,file=$disk_image,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d" -append_if $use_sd_card_drv qemu_args " -drive file=$disk_image,if=sd,cache=writeback " +append_if $use_ahci_drv qemu_args " -drive id=disk,file=$disk_image,format=raw,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d" +append_if $use_sd_card_drv qemu_args " -drive file=$disk_image,format=raw,if=sd,cache=writeback " run_genode_until {.*child "test-libc_vfs" exited with exit value 0.*} 60 diff --git a/repos/libports/run/libc_filesystem_test.inc b/repos/libports/run/libc_filesystem_test.inc index 6c0a931b5b..d67c2f2097 100644 --- a/repos/libports/run/libc_filesystem_test.inc +++ b/repos/libports/run/libc_filesystem_test.inc @@ -163,8 +163,8 @@ catch { exec sh -c $cmd } # Qemu # append qemu_args " -m 128 -nographic " -append_if $use_ahci qemu_args " -drive id=disk,file=$disk_image,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d" -append_if $use_sd_card_drv qemu_args " -drive file=$disk_image,if=sd,cache=writeback " +append_if $use_ahci qemu_args " -drive id=disk,file=$disk_image,format=raw,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d" +append_if $use_sd_card_drv qemu_args " -drive file=$disk_image,format=raw,if=sd,cache=writeback " run_genode_until ".*child \"test-libc_$filesystem\" exited with exit value 0.*" 60 diff --git a/repos/libports/run/qt5_textedit.run b/repos/libports/run/qt5_textedit.run index faa58c8a9e..cb7de9805f 100644 --- a/repos/libports/run/qt5_textedit.run +++ b/repos/libports/run/qt5_textedit.run @@ -160,7 +160,7 @@ set cmd "mkfs.vfat -F32 $disk_image" puts "formating disk image with vfat file system: $cmd" catch { exec sh -c $cmd } -append_if $use_ahci_driver qemu_args " -drive id=disk,file=$disk_image,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d" +append_if $use_ahci_driver qemu_args " -drive id=disk,file=$disk_image,format=raw,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d" append qemu_args " -m 256" diff --git a/repos/os/run/ahci_bench.run b/repos/os/run/ahci_bench.run index fd929906ea..a889afd82b 100644 --- a/repos/os/run/ahci_bench.run +++ b/repos/os/run/ahci_bench.run @@ -93,7 +93,7 @@ append_platform_drv_boot_modules build_boot_image $boot_modules append qemu_args " -nographic -m 256 " -append qemu_args " -drive id=disk,file=bin/ext2.raw,if=none -device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0 -boot d" +append qemu_args " -drive id=disk,file=bin/ext2.raw,format=raw,if=none -device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0 -boot d" append qemu_args " -drive id=cd,file=[run_dir]/../ahci_bench.iso,if=none,media=cdrom -device ide-cd,drive=cd,bus=ahci.1" run_genode_until "Done.*\n" 100 diff --git a/repos/os/run/ahci_blk.run b/repos/os/run/ahci_blk.run index 1a20ba8c04..d0e5e6efb4 100644 --- a/repos/os/run/ahci_blk.run +++ b/repos/os/run/ahci_blk.run @@ -84,7 +84,7 @@ append_platform_drv_boot_modules build_boot_image $boot_modules append qemu_args " -nographic -m 256 " -append qemu_args " -drive id=disk,file=bin/ext2.raw,if=none -device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0 -boot d" +append qemu_args " -drive id=disk,file=bin/ext2.raw,format=raw,if=none -device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0 -boot d" append qemu_args " -drive id=cd,file=[run_dir]/../ahci_blk.iso,if=none,media=cdrom -device ide-cd,drive=cd,bus=ahci.1" run_genode_until "Tests finished successfully!" 100 diff --git a/repos/os/run/sd_card.run b/repos/os/run/sd_card.run index 8a1a8cc545..7bea306451 100644 --- a/repos/os/run/sd_card.run +++ b/repos/os/run/sd_card.run @@ -79,7 +79,7 @@ lappend_if [have_spec rpi] boot_modules platform_drv set disk_image "bin/sd_card.img" build_boot_image $boot_modules -append qemu_args "-drive file=$disk_image,if=sd,cache=writeback -nographic " +append qemu_args "-drive file=$disk_image,format=raw,if=sd,cache=writeback -nographic " if { [file exists $disk_image] == 0 } then { # create empty block device file diff --git a/repos/os/run/usb_block.run b/repos/os/run/usb_block.run index 6acd5632c3..dc75591e84 100644 --- a/repos/os/run/usb_block.run +++ b/repos/os/run/usb_block.run @@ -155,7 +155,7 @@ if {$use_qemu} { # Qemu opts for EHCI # append qemu_args " -m 128 -nographic -M pc -boot order=d " -append qemu_args " -drive if=none,id=disk,file=$disk_image " +append qemu_args " -drive if=none,id=disk,file=$disk_image,format=raw " append qemu_args " -device usb-ehci,id=ehci -device usb-storage,bus=ehci.0,drive=disk " run_genode_until {.*child "test-usb" exited with exit value 0.*} 100 diff --git a/repos/ports/run/seoul-disc.run b/repos/ports/run/seoul-disc.run index 2f468d1928..82fb29fb05 100644 --- a/repos/ports/run/seoul-disc.run +++ b/repos/ports/run/seoul-disc.run @@ -38,7 +38,7 @@ if {[have_include power_on/qemu]} { append qemu_args " -m 1024 " append qemu_args " -cpu phenom" - append_if $use_block_sata qemu_args " -drive id=disk,file=bin/seoul-disc.raw,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d" + append_if $use_block_sata qemu_args " -drive id=disk,file=bin/seoul-disc.raw,format=raw,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d" } run_genode_until forever