:: commit fb827cb5bf3cc6f16b5ba6ce6bf202d935ac13ca

mintsuki <mintsuki@protonmail.com> — 2020-04-21 13:12

parents: 41ea91c694

Make qloader2-install less verbose

diff --git a/Makefile b/Makefile
index a1fb6ce6..5c9adba5 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ echfs-test: all
 	parted -s test.img mkpart primary 6144s 131038s
 	echfs-utils -g -p1 test.img quick-format 512
 	echfs-utils -g -p1 test.img import test/test.elf boot/test.elf
-	echfs-utils -g -p1 test.img import test/qloader2.cfg boot/qloader2.cfg
+	echfs-utils -g -p1 test.img import test/qloader2.cfg qloader2.cfg
 	./qloader2-install src/qloader2.bin test.img 2048
 	qemu-system-x86_64 -hda test.img -monitor stdio
 
diff --git a/qloader2-install b/qloader2-install
index 3a183081..c585c7fe 100755
--- a/qloader2-install
+++ b/qloader2-install
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-set -ex
+set -e
 
 if [ -z "$2" ]; then
     echo "Usage: $0 <path to qloader2 binary> <device> [stage2 start sector]"
@@ -24,10 +24,10 @@ echo "dd $STAGE2_SECT" > "$BINARY_SECT_SRC"
 nasm "$BINARY_SECT_SRC" -f bin -o "$BINARY_SECT_BIN"
 
 # Copy the loader to the device.
-dd if="$DEVICE"          of="$MBR"    bs=1   count=64 skip=446
-dd if="$QLOADER2"        of="$DEVICE" bs=512 count=1  conv=notrunc
-dd if="$QLOADER2"        of="$DEVICE" bs=512 count=63 skip=1   seek=$(( $STAGE2_SECT )) conv=notrunc
-dd if="$BINARY_SECT_BIN" of="$DEVICE" bs=1   count=4  seek=$(( 0x1b0 )) conv=notrunc
-dd if="$MBR"             of="$DEVICE" bs=1   count=64 seek=446 conv=notrunc
+dd if="$DEVICE"          of="$MBR"    bs=1   count=64 skip=446 2>/dev/null
+dd if="$QLOADER2"        of="$DEVICE" bs=512 count=1  conv=notrunc 2>/dev/null
+dd if="$QLOADER2"        of="$DEVICE" bs=512 count=63 skip=1   seek=$(( $STAGE2_SECT )) conv=notrunc 2>/dev/null
+dd if="$BINARY_SECT_BIN" of="$DEVICE" bs=1   count=4  seek=$(( 0x1b0 )) conv=notrunc 2>/dev/null
+dd if="$MBR"             of="$DEVICE" bs=1   count=64 seek=446 conv=notrunc 2>/dev/null
 
 rm "$MBR" "$BINARY_SECT_SRC" "$BINARY_SECT_BIN"
diff --git a/test/qloader2.cfg b/test/qloader2.cfg
index 6569024d..0af6b557 100644
--- a/test/qloader2.cfg
+++ b/test/qloader2.cfg
@@ -6,5 +6,5 @@ KERNEL_PROTO=stivale
 KERNEL_CMDLINE=none
 
 MODULE_PARTITION=1
-MODULE_PATH=/boot/qloader2.cfg
+MODULE_PATH=qloader2.cfg
 MODULE_STRING=something here
tab: 248 wrap: offon