[haiku-commits] Change in haiku[master]: m68k: fixup_next_boot_floppy: force bootblock at 8k to fit before tgz

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 27 Jul 2020 01:55:27 +0000

From François Revol <revol@xxxxxxx>:

François Revol has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/3100 ;)


Change subject: m68k: fixup_next_boot_floppy: force bootblock at 8k to fit 
before tgz
......................................................................

m68k: fixup_next_boot_floppy: force bootblock at 8k to fit before tgz

We don't have room for disklabel copies anymore.

Change-Id: I22502167a4f5f8bc3df1b017072461d77a299b16
---
M src/tools/fixup_next_boot_floppy/fixup_next_boot_floppy.c
1 file changed, 5 insertions(+), 3 deletions(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/00/3100/1

diff --git a/src/tools/fixup_next_boot_floppy/fixup_next_boot_floppy.c 
b/src/tools/fixup_next_boot_floppy/fixup_next_boot_floppy.c
index 5a53f2b..8bcd95f 100644
--- a/src/tools/fixup_next_boot_floppy/fixup_next_boot_floppy.c
+++ b/src/tools/fixup_next_boot_floppy/fixup_next_boot_floppy.c
@@ -41,7 +41,9 @@
        int fd;
        uint16_t sum;
        int labelOffsets[] = { 0, 15, 30, 45 };
-       int numLabels = sizeof(labelOffsets) / sizeof(int);
+       // HACK: for now we force a single label + bootlock at 8kb (min offset 
the ROM allows) to fit before the tgz
+       int numLabels = 1; //sizeof(labelOffsets) / sizeof(int);
+       uint32_t bootBlockStart = 0x8; // usually 0x20

        struct disk_label disklabel = {
                H2B32(DL_V3),
@@ -63,7 +65,7 @@
                H2B16(0),
                H2B16(0),
                H2B16(0),
-               H2B32(0x20),H2B32(0xffffffff),  // boot blocks in 1024 bytes 
sectors
+               H2B32(bootBlockStart),H2B32(0xffffffff),        // boot blocks 
in 1024 bytes sectors
                // XXX: move it closer to start?
                "haiku_loader",//"fdmach"
                "schredder",//"silly"
@@ -97,7 +99,7 @@
        }
        */

-       // TODO: update boot block offsets!
+       // TODO: take boot block offsets as arg?

        sum = checksum_16((uint16_t *)&disklabel, SUM_CNT);
        fprintf(stderr, "checksum: 0x%04x\n", sum);

--
To view, visit https://review.haiku-os.org/c/haiku/+/3100
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: I22502167a4f5f8bc3df1b017072461d77a299b16
Gerrit-Change-Number: 3100
Gerrit-PatchSet: 1
Gerrit-Owner: François Revol <revol@xxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: m68k: fixup_next_boot_floppy: force bootblock at 8k to fit before tgz - Gerrit