GRUB on DOC: 2Mb issues
Miguel Freitas
miguel at cetuc.puc-rio.br
Wed Aug 30 10:46:20 EDT 2000
On 30 Aug 00, at 9:57, David Woodhouse wrote:
> doc_stage1.S could be hacked to work with both. See the existing loader
> code in the DiskOnChip firmware for inspiration.
>
> There's no real reason to waste the second half of the pages either - and
> we could easily make the checksums work in _both_ types of device at once.
Yes, but to not waste the second half of pages AND make
doc_stage1.S work for all devices we would need to add code to
identify the nand chip. I don't know how much bigger doc_stage1
would be, but it will be probably more than 256 bytes.
Suppose that we can fit that smart doc_stage1 in 512 bytes, so it
will have 2 halfs of 256 bytes. Output of makecsum could be made
as follow:
- First half of stage1, with a checksum byte for 512 paged device,
ie, we should only sum half each 512-page of the first 16Kb.
- Second half of stage2 (this will NOT be loaded by IPL on 512-
page devices). checksum will be generated by summing all the first
8Kb.
- Second half of stage2. checksum = 0.
- Unused 256 bytes, just to simplify stage1 (so it won't have to deal
with READ0 / READ1 commands)
- Stage2 from grub.
BTW, forgot my suggestion for "loadbios" ioctl...
Regards,
Miguel Freitas
To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org
More information about the linux-mtd
mailing list