Git Product home page Git Product logo

Comments (4)

pelwell avatar pelwell commented on August 28, 2024

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.

JamesH65 avatar JamesH65 commented on August 28, 2024

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.

klslz avatar klslz commented on August 28, 2024

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.

pelwell avatar pelwell commented on August 28, 2024

The code is here to view - tell me how it should work?

from usbboot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.