raspberrypi / usbboot

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

Possible to bootload custom kernels on CM3+ to avoid MSD for imaging eMMC? #92

Closed hires closed 2 years ago

hires commented 2 years ago

I've read about the Pi boot process as it relates to SD cards as well as usbboot. I'd like to use usbboot to bring up a minimal system in a ramdisk so that I can access eMMC myself and implement the disk loader using a method other than MSD. Maybe someone already did this, if so please point to an example.

I'm trying to create a simpler process for imaging the CM3+ that doesn't involve disks showing up on a user's PC. I'd like to expand the usbboot process so that bootloading and imaging the eMMC could be done through the same mechanism.

A few questions:

Thanks!

ghollingworth commented 2 years ago

I would suggest you have a look at

https://github.com/raspberrypi/gpioexpander

and

https://github.com/raspberrypi/scriptexecutor

These are both buildroot based Linux builds which you can upload to a Raspberry Pi through the USB device interface using rpiboot.

Scriptexecutor could be used as it is, all you need to do is provide a script (from a local webserver) which is executed on the client (the unit under test) to do whatever setup you require. This can then access whatever data source you have available (network filesystem for example) to get the image to write to the filesystem.

In fact that's exactly how our CM4 provisioning software works https://github.com/raspberrypi/cmprovision

Unfortunately it's limited to CM4 only....