Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 2.21 KB

README.md

File metadata and controls

60 lines (45 loc) · 2.21 KB

TinyEhci

asm

Tiny, less than 512 bytes, bare metal EHCI read. Boot loader.

Features

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

Requirements

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

Install

If you want to write boot sector to UsbDrive/usbstick/FlashCard screenshots. It is not safe!

Usage

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.

Tests

...comming soon partially...

Build

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

Contributing

Can ask questions. PRs are accepted. No requirements for contributing.

Thanks

tatOs, kolibriOs

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)

License

See the LICENSE file for license rights and limitations (MIT).