Bootloading from SD card

Nov 16, 2009 22 Replies

I also did a FAT-12 PC bootsector in 512 bytes:

formatting link

This code requires that the second stage or kernel or whatever be in the root directory, but it need not be physically contiguous on the disk.

FAT-16 wouldn't be too different, but I agree that a FAT-32 bootloader probably wouldn't fit in 512 bytes.

13 vs 5 instructions for FAT12 vs FAT16 in the code I wrote.

No, I don't think it's even possible, but I haven't tried.

And see no point doing so, either. :-)

ArarghMail911 at [drop the 'http://www.' from ->] http://www.arargh.com BCET Basic Compiler Page: http://www.arargh.com/basic/index.html To reply by email, remove the extra stuff from the reply address.

Forgot to mention that I cheated and just copied the first 64k worth of FAT to memory. For FAT12, that handles the split across sectors headache.

ArarghMail911 at [drop the 'http://www.' from ->] http://www.arargh.com BCET Basic Compiler Page: http://www.arargh.com/basic/index.html To reply by email, remove the extra stuff from the reply address.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required