raspberrypi / usbboot

Raspberry Pi USB booting code, moved from tools repository
Apache License 2.0
878 stars 221 forks source link

[Question] Where is the source located of `msd/bootcode.bin` & `msd/start*.elf`? #144

Closed WeeJeWel closed 2 years ago

WeeJeWel commented 2 years ago

I'd like to view an example on how to compile my own bootable firmware (specifically to try flashing a CM4 over WebUSB for fun).

Is this source available anywhere?

pelwell commented 2 years ago

The VPU firmware is closed-source. The recommended method for a task such as the one you describe is to create a Buildroot Linux system with an initrd that does the job.

timg236 commented 2 years ago

Take a look at the msd gadget for an example kernel and initrd. The ARM stage loading does not require Linux so you can replace the kernel with bare metal ARM code

cleverca22 commented 2 years ago

specifically to try flashing a CM4 over WebUSB for fun

already implemented that! https://github.com/librerpi/rpi-tools/tree/master/webusbboot

WeeJeWel commented 2 years ago

specifically to try flashing a CM4 over WebUSB for fun

already implemented that! https://github.com/librerpi/rpi-tools/tree/master/webusbboot

Yes, that’s nice, but it mounts as MSD which then isn’t available anymore from a browser.