From ba6f2b39a9561f0fc8e6b73ef31ab86896ce9778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Tue, 2 Oct 2018 03:15:30 +0200 Subject: [PATCH 1/5] Fixed typo (+ instead of *) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d6df3d1..4d842f1 100644 --- a/Makefile +++ b/Makefile @@ -292,7 +292,7 @@ ${eval ${call offset,sectors_fat12_start, $${bytes_fat12_start} / $${sector_s ${eval ${call offset,bytes_fat12_size, $${sectors_fat12_size} * $${sector_size}, sectors_fat12_size,}} ${eval ${call offset,bytes_fat12_end, $${bytes_fat12_start} + $${bytes_fat12_size}, bytes_fat12_start bytes_fat12_size,}} # It is probably not necessary to align the GPT mirror end on a track boundary. -${eval ${call offset,bytes_gpt_mirror_size, $${sectors_gpt_mirror_size} + $${sector_size}, sectors_gpt_mirror_size,}} +${eval ${call offset,bytes_gpt_mirror_size, $${sectors_gpt_mirror_size} * $${sector_size}, sectors_gpt_mirror_size,}} ${eval ${call offset,bytes_gpt_mirror_end, $${bytes_fat12_end} + $${bytes_gpt_mirror_size}, bytes_fat12_end bytes_gpt_mirror_size,}} ${eval ${call offset,bytes_gpt_mirror_start, $${bytes_gpt_mirror_end} - $${bytes_gpt_mirror_size}, bytes_gpt_mirror_end bytes_gpt_mirror_size,}} ${eval ${call offset,bytes_zip_end, $${bytes_os_size}, bytes_os_size,}} From f98acb766264e042e73a0fd9fd06c3236e11a023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Sat, 1 Sep 2018 10:38:00 +0200 Subject: [PATCH 2/5] debug sikuli installation error --- utils/install-sikulix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/install-sikulix.sh b/utils/install-sikulix.sh index 4156332..5e530a3 100755 --- a/utils/install-sikulix.sh +++ b/utils/install-sikulix.sh @@ -5,5 +5,5 @@ set -e # The sikuli-ide packaged with ubuntu 16.04 does not seem to work correctly: missing dependencies, some dependencies are too recent, … mkdir ~/sikulix/ wget https://launchpad.net/sikuli/sikulix/1.1.3/+download/sikulixsetup-1.1.3.jar -O ~/sikulix/sikulixsetup-1.1.3.jar -(cd ~/sikulix && java -jar sikulixsetup-1.1.3.jar options 1 1.1) +(cd ~/sikulix && java -jar sikulixsetup-1.1.3.jar options 1 1.1) || (cat ~/sikulix/SikuliX-1.1.3-SetupLog.txt; exit 1) echo 'export PATH="$HOME/sikulix/:$PATH"' From 0e59aa2cc285b7708a6bc4ed68db28240092eeea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Mon, 24 Sep 2018 09:24:12 +0200 Subject: [PATCH 3/5] make -j 10 sometimes fails to mount the resulting ISO9660 filesystem, added more information and a dump of the OS binary to help debug the issue --- Makefile | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 4d842f1..af68422 100644 --- a/Makefile +++ b/Makefile @@ -511,6 +511,19 @@ test/requiring_sudo: ${tests_requiring_sudo:test/%=${bld}/test_pass/sudo_%} ${bl # check that the fat filesystem can be mounted and has the correct contents ${bld}/test_pass/sudo_fat12_mount: ${os_filename} ${dep_bytes_fat12_start} ${bld}/check_makefile | ${bld}/mnt_fat12 sudo umount ${bld}/mnt_fat12 || true + # debug failure to mount the FAT12 filesystem + (set -x ;\ + grep '^' ${bld}/offsets/* ;\ + (sudo mount -o loop,ro,offset=${bytes_fat12_start} $< ${bld}/mnt_fat12) || true ;\ + dmesg | tail ;\ + ls -l ${bld}/mnt_fat12 | (grep os.zip || true) ;\ + sudo umount ${bld}/mnt_fat12 || true ;\ + sleep 10 ;\ + cat ${os_filename} | xz | base64 ;\ + (sudo mount -o loop,ro,offset=${bytes_fat12_start} $< ${bld}/mnt_fat12) || true ;\ + sudo umount ${bld}/mnt_fat12 || true ;\ + ) > debug-fat12.log 2>&1 + cat debug-fat12.log sudo mount -o loop,ro,offset=${bytes_fat12_start} $< ${bld}/mnt_fat12 ls -l ${bld}/mnt_fat12 | grep os.zip sudo umount ${bld}/mnt_fat12 @@ -518,12 +531,19 @@ ${bld}/test_pass/sudo_fat12_mount: ${os_filename} ${dep_bytes_fat12_start} ${bld ${bld}/test_pass/sudo_iso_mount: ${os_filename} ${bld}/check_makefile | ${bld}/mnt_iso sudo umount ${bld}/mnt_iso || true - grep '^' ${bld}/offsets/* # debug failure to mount the ISO9660 filesystem - (sudo mount -o loop,ro $< ${bld}/mnt_iso) || true - dmesg | tail # debug failure to mount the ISO9660 filesystem - hexdump -C ${os_filename} - ls -l ${bld}/mnt_iso | grep os.zip - sudo umount ${bld}/mnt_iso + # debug failure to mount the ISO9660 filesystem + (set -x ;\ + grep '^' ${bld}/offsets/* ;\ + (sudo mount -o loop,ro $< ${bld}/mnt_iso) || true ;\ + dmesg | tail ;\ + cat ${os_filename} | xz | base64 ;\ + ls -l ${bld}/mnt_iso | grep os.zip ;\ + sudo umount ${bld}/mnt_iso || true ;\ + sleep 11 ;\ + (sudo mount -o loop,ro $< ${bld}/mnt_iso) || true ;\ + sudo umount ${bld}/mnt_iso || true ;\ + ) > debug-iso.log 2>&1 + cat debug-iso.log sudo mount -o loop,ro $< ${bld}/mnt_iso sudo umount ${bld}/mnt_iso touch $@ From 584a8541c0fd47bbf8907c1d899d97f0147ed7bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Mon, 24 Sep 2018 09:35:12 +0200 Subject: [PATCH 4/5] Fixed dependency in Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index af68422..b73cba8 100644 --- a/Makefile +++ b/Makefile @@ -213,7 +213,7 @@ ${bld}/os.32k: example-os/os.asm ${bld}/check_makefile nasm -w+macro-params -w+macro-selfref -w+orphan-labels -w+gnu-elf-extensions -o $@ $< # Circumvent the fact that faketime does not work on system binaries in macos -./utils/mkisofs ./utils/mformat ./utils/mcopy: Makefile # TODO: depend on the mkisofs binary +./utils/mkisofs ./utils/mformat ./utils/mcopy: ${bld}/check_makefile # TODO: depend on the mkisofs binary cp $$(which $$(basename $@)) $@ chmod u+x $@ From 3669ba800ebb061d5c05a1b97894ea7c61760683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Mon, 24 Sep 2018 09:38:57 +0200 Subject: [PATCH 5/5] Tests should fail if the OS filename argument is missing. --- test/bochs.sh | 1 + test/dosbox.sh | 1 + test/gui-sh-mac.sh | 1 + test/gui-sh.sh | 1 + test/qemu-system-i386-cdrom.sh | 1 + test/qemu-system-i386-floppy.sh | 1 + test/virtualbox.sh | 1 + 7 files changed, 7 insertions(+) diff --git a/test/bochs.sh b/test/bochs.sh index 9ddebcd..cfbcb27 100755 --- a/test/bochs.sh +++ b/test/bochs.sh @@ -3,6 +3,7 @@ set -e if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then echo "Usage: $0 operating_system_file" + exit 1 fi os_filename="$1" diff --git a/test/dosbox.sh b/test/dosbox.sh index 9f5571d..767802d 100755 --- a/test/dosbox.sh +++ b/test/dosbox.sh @@ -3,6 +3,7 @@ set -e if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then echo "Usage: $0 operating_system_file" + exit 1 fi os_filename="$1" diff --git a/test/gui-sh-mac.sh b/test/gui-sh-mac.sh index 7659996..e9f12b8 100755 --- a/test/gui-sh-mac.sh +++ b/test/gui-sh-mac.sh @@ -3,6 +3,7 @@ set -e if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then echo "Usage: $0 operating_system_file" + exit 1 fi # Force the path to be relative or absolute, but with at least one / # Otherwise, the command will be searched in the $PATH, instead of using the diff --git a/test/gui-sh.sh b/test/gui-sh.sh index 8326c52..5fc2480 100755 --- a/test/gui-sh.sh +++ b/test/gui-sh.sh @@ -3,6 +3,7 @@ set -e if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then echo "Usage: $0 operating_system_file" + exit 1 fi # Force the path to be relative or absolute, but with at least one / # Otherwise, the command will be searched in the $PATH, instead of using the diff --git a/test/qemu-system-i386-cdrom.sh b/test/qemu-system-i386-cdrom.sh index 0ac9ea4..e412b87 100755 --- a/test/qemu-system-i386-cdrom.sh +++ b/test/qemu-system-i386-cdrom.sh @@ -3,6 +3,7 @@ set -e if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then echo "Usage: $0 operating_system_file" + exit 1 fi os_filename="$1" diff --git a/test/qemu-system-i386-floppy.sh b/test/qemu-system-i386-floppy.sh index 9b0e7b6..fd57cdf 100755 --- a/test/qemu-system-i386-floppy.sh +++ b/test/qemu-system-i386-floppy.sh @@ -3,6 +3,7 @@ set -e if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then echo "Usage: $0 operating_system_file" + exit 1 fi os_filename="$1" diff --git a/test/virtualbox.sh b/test/virtualbox.sh index db152f8..73f6020 100755 --- a/test/virtualbox.sh +++ b/test/virtualbox.sh @@ -3,6 +3,7 @@ set -e if test $# -ne 1 || test "$1" = '-h' -o "$1" = '--help'; then echo "Usage: $0 operating_system_file" + exit 1 fi os_filename="$1"