Possible Duplicate:
How can i put a compiled boot sector onto a USB stick or disk?
I'm busy creating a basic boot loader, it is for software that needs to run without an OS
I also want to write a small console app that moves the compiled bootloader to my SD card.
The problem I am running into is writing that specific boot loader to Sector0 on an SD card. The SD card is slotted into my SD Card slot on my laptop.
Can I accomplish this using a C# console app ? if not, what are my options on getting that boot loader on the SD card?
Update: The bootloader is written in C, I would like the console app that transfers the boot loader to be in C#
You could use low level IO API to write a file to a specific sector. Have a look at WriteFile documentation for more info.
A much easier idea would be to create an image file with your bootloader (and optionally, partition table and/or file systems) and use an external tool like dd or Image Writer to actually write the image to the SD card.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With