Make qloader2-install less verbose

This commit is contained in:
mintsuki 2020-04-21 15:12:00 +02:00
parent 41ea91c694
commit fb827cb5bf
3 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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"

View File

@ -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