Tiny, less than 512 bytes, bare metal EHCI read. Boot loader.
A full search is performed to find only the specific memory card in the USB2 slot. Tricks, how to reduce them, and details in explanations
Nasm to building.
To run
- Qemu to run "local"/RightNow in Emulator/VM.
- To run on real hardware in the real world: hardware with "Usb Legacy" boot support and something like HxD to write the boot sector to a usbstick.
Hardware requirements details in blog
If you want to write boot sector to UsbDrive/usbstick/FlashCard screenshots. It is not safe!
Change the path to qemu and nasm in include/paths.cmd
Build step5_gh/bootsector.img
and then run the qemu emulator.
step5_gh/build_and_run_nographic.bat
or write the assembled step5_gh/bootsector.img
to flash usb stick, starting from the first sector.
Then you need to switch the BIOS to boot from USB and enable the "Legacy Usb" mode.
...comming soon partially...
Just provide the path to nasm to compile one bootsector.asm
File extension convention:
- *.asm - callable code
- *.inc - defines, true/false, contants
- *.inl - inline code
- *.mac - macro with arguments
Can ask questions. PRs are accepted. No requirements for contributing.
USB2 Standard group https://www.usb.org/
- Universal Serial Bus Specification, Revision 2.0
- usbmassbulk_10.pdf
- ehci-specification-for-usb.pdf
SCSI Standard group
- SCSI Commands Reference Manual - Seagate
- SCSI Block Commands - 3 (SBC-3)
- SCSI Block Commands - 2 (SBC-2)
See the LICENSE file for license rights and limitations (MIT).