From 6b2b1d2fc92b827b8dc9023ad289eabfc754fcf7 Mon Sep 17 00:00:00 2001 From: Elaina Claus Date: Fri, 4 Oct 2024 22:17:35 -0400 Subject: [PATCH] change test kernel stage name also pointed up a bug in memory.inc --- include/memory.inc | 1 + scripts/create-disk.sh | 10 +++++----- src/miniboot32/{BOOT_386.nasm => BOOTi686.nasm} | 0 src/stage2/stage2.nasm | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) rename src/miniboot32/{BOOT_386.nasm => BOOTi686.nasm} (100%) diff --git a/include/memory.inc b/include/memory.inc index 73d7fcb..5ebf4da 100755 --- a/include/memory.inc +++ b/include/memory.inc @@ -243,6 +243,7 @@ endstruc ; STACK BOTTOM ; ; first argument == starting offset from bp for lower 16bits +; BUG: needs fixed for cdecl16 %macro MOV_DWORD_EAX 1 mov ax, [bp+(%1+2)] shl eax, 16 diff --git a/scripts/create-disk.sh b/scripts/create-disk.sh index ccfa103..994cb22 100755 --- a/scripts/create-disk.sh +++ b/scripts/create-disk.sh @@ -29,7 +29,7 @@ fi mbr_file=build/mbr.bin vbr_file=build/vbr.bin stage2_file=build/stage2.bin -boottest_file=build/BOOT_386.bin +boottest_file=build/BOOTi686.bin # Disk creation options @@ -38,7 +38,7 @@ disk_tmp_file=/tmp/disk.img disk_file_final=./disk.img.gz # $disk_sector_size * $disk_size = total bytes, default is 256MiB -disk_size=524288 +disk_size=(524288 * 2) disk_sector_size=512 if ! [ -e $disk_tmp_file ]; then @@ -66,7 +66,7 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then # get first partition, this is sloppy might need to review this... firstpart=$(lsblk -ilp -o NAME $ld | tr '\n' ' ' | awk '{print $3}') - mkfs.fat -v -F32 $firstpart + mkfs.fat -v -n 'STEVIAFS' $firstpart # copy MBR while preserving partition table dd if=$mbr_file of=$ld bs=1 count=440 @@ -89,9 +89,9 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then mkdir $mount_point fi mount $firstpart $mount_point - + mkdir -p $mount_point/STEVIA if [ -e $boottest_file ]; then - cp -v $boottest_file $mount_point + cp -v $boottest_file $mount_point/STEVIA/BOOTi686.BIN else echo "unable to find boot32.bin!" exit 3 diff --git a/src/miniboot32/BOOT_386.nasm b/src/miniboot32/BOOTi686.nasm similarity index 100% rename from src/miniboot32/BOOT_386.nasm rename to src/miniboot32/BOOTi686.nasm diff --git a/src/stage2/stage2.nasm b/src/stage2/stage2.nasm index e98146c..94c27c1 100755 --- a/src/stage2/stage2.nasm +++ b/src/stage2/stage2.nasm @@ -829,7 +829,7 @@ IntToHex_table: NewLine_cstr: db StrCRLF_NUL BootTarget_str: - db "BOOT_386BIN" + db "BOOTI686BIN" ; ############# ;