Comments (4)
A CM4 (or any USB-bootable device) waiting for USB boot presents itself as a USB device/gadget over the OTG USB port. After the 2nd stage bootloader (bootcode*.bin) has been sent it appears as a different USB device because it is now running a different USB stack. If the downloaded image is to activate Mass Storage Device mode then you get a third kind of device - MSD.
The standard way to program a batch of devices is to run rpiboot in a loop, allowing it to detect new devices as they are attached. It is not possible to distinguish between a CM4 running an image which doesn't present a USB gadget and no CM4 - they look just the same, i.e. an absence of a USB device.
The CM4 hardware is working the way we want it to work, and unfortunately it doesn't support the features you think are important. If you want to switch to a mode where you attach a CM4 before starting rpiboot and get an error message about there being no device attached then you just need to write a wrapper script that runs lsusb and complains if it doesn't find something bootable. Alternatively you might be able to arrange that your custom images create yet another kind of USB gadget, which would then be able to be detected by your wrapper. Either way, we won't be changing the rpiboot source, but you can always fork it yourself - that's the beauty of open source software!
from usbboot.
If your aim is batch programming, you may be interested in the CM Provisioner which can work over USB or ethernet, depending on the target.
https://github.com/raspberrypi/cmprovision
from usbboot.
Wow. I didn't expect such a rebuff.
Of course I can write a wrapper to steer around the flaw. (As anybody else of the
thousands of admins out there can do . )
However. It'd be much simpler to introduce a very ,I'd expect , minor change to the program.
Instead of having a program stalling forever it could simply bail out after a couple of seconds.
I am just saying.
Anyhow. Thx for listening.
from usbboot.
The code is here to view - tell me how it should work?
from usbboot.
Related Issues (20)
- rpiboot stops at File read: start4.elf HOT 3
- wlan0 goes missing after working for a while HOT 1
- RPI boot not working on windows and Mac for CM4 rev5 HOT 5
- WSL build info missing dependencies HOT 1
- Build usbboot on macOS with apple silicon HOT 8
- Unable to load rpiboot on Macbook pro with RPI CM4 + Home Assistant Yellow HOT 2
- Windows 11 failing to load bootcode4.bin HOT 2
- make not working on Ubuntu 22.04 HOT 4
- Raspberry Pi 4B: Have to run `rpiboot` twice to get it to boot my kernel HOT 5
- rpiboot asks for presence of bootcode files even when they are not used HOT 3
- CM4 not being recognized HOT 11
- AvailabilityInternalLegacy.h not found on macOS Sanoma 14.0 (23A344) HOT 3
- Contradicting documentation: rpiboot GPIO pins HOT 1
- RPi5: wlan0 doesn't exist when Boot Order is USB->SDCARD HOT 1
- Running `rpiboot` reports `Cannot open file fixup4.dat` HOT 4
- Cannot compile on M1 MacBook HOT 3
- Cannot open file fixup.dat MacOS M1 CM3+ HOT 9
- Failed to read correct length, returned 0 HOT 1
- Following install of Home Assistant, USBboot stops working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from usbboot.