-
The '-v' option is useful for debugging problems because it caues the file and transfer sizes to be emitted. However, on Windows libusb generates too much log spam hiding the useful information. Change USB log params so WARNINGS only appear with -vv. Windows / Cygwin uses the old API version so just implement the minimal change for now.
-
Indicate when a file is emtpy or missing because this is normally due to a script / symlink issue rather than the file being intentionally blank.
-
Move the port and path filter match logic up to prevent rpiboot from loading any files if the device does not meet the given criteria. For devices that should be ignored, the current implementation generates numerous messages such as "Loading embedded: bootcode.bin." Because the check occurs AFTER the filters have been evaluated, file handling takes place even for ignored devices. Signed-off-by: Nicolai Buchwitz <n.buchwitz@kunbus.com>
-
Add option to look for CM with specific USB path.
-
Previously two commits added a fallback fmemopen for OS X/BSD that didn't support fmemopen, then fixed some of the ifdef logic around it. Unforunately the logic was backwards, as libc implementations do not define _POSIX_C_SOURCE in order to advertise features. Instead the user defines _POSIX_C_SOURCE to control which definitions are available. Check _POSIX_VERSION to see if the libc is new enough to implement fmemopen. If it is too old, assume that we're on a BSD compatible system and use the fallback fmemopen that depends on funopen. This solves the problem for some environments, but is still incorrect as it will try to use the fallback even on a system that does not include funopen. Fixes: 45c7237 (Fixup for recent firmware inclusion changes (#34)) Fixes: 17f6b01 (Fix cross-platform building)
-
Capture the changelog version and git version (if available)
-
Also add extra logging to indicate where the file was loaded from to make it more obvious where a file is loaded from. Update Windows installer
-
* Add 2711 bootcode and FW binaries with the 4 suffix. * Use the device descriptor to select the correct bootcode and hack it so that bootcode.bin translates to bootcode4.bin on a Pi4 allowing the files to remain in the same directory. * Add the latest best for recovery.bin and pieeprom.bin for CM4 * Update the installer. Move the second stage preparation until after the device descriptor has been retrieved because BCM2711 needs a different bootcode.bin. If the '-d' argument specified then check for bootcode.bin in the specified directory and don't fail over to the embedded fmem files. Remove the default 'msd' directory and the references to /usr/share because the behaviour conflicts with the original change to use the fmem files.
-
It's possible that SerialNumber=3 might be received twice due to differences in timing causing rpiboot to exit too early i.e. before the second stage has started. Tweak the loop condition to handle this.
-
Fixes: https://github.com/raspberrypi/usbboot/issues/53
-
With recent kernels I get timeouts booting Linux with rpiboot, after increasing the timeout to 3000 I have no issues. Debugging I see the ep_read call after ReadFile: cmdline.txt (before it tries to retrieve recovery.img/kernel.img) takes around 2.1-2.2 seconds which looks to be related to the size of the iniramfs I'm using.
-
Current output Failed : 0x0Waiting for BCM2835/6/7 And now Failed : 0x0 Waiting for BCM2835/6/7/2711...
-
Commit 45c7237d9dc2 ("Fixup for recent firmware inclusion changes") breaks builds on non-Apple platforms. Fix it for platforms that already have fmemopen - others may still need attention. See: https://github.com/raspberrypi/usbboot/issues/47 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
-
* Fix check against NULL for a static var actually looking for an empty c string. * Update .gitignore for code change moving msd firmware to static vars. * Fix support for OS X and *BSD after adding static vars for msd firmware.
-
* Do not require root privileges Give members of plugdev group access to the usb device by udev rules. * Disallow requests for files outside directory * Be more verbose about errors * Error out if permission was denied while opening device. * Show error if request for file containing .. was denied.
-
The second stage can/will support file-server so don't force bootcode.bin for 2711. The second stage will (probably) reply with SerialNumber==1 when it wants the file-server as on Pi3.
-
The BCM2711 can also boot in USB device mode. Note that the boot ROM code now sets the iSerialNumber to 3, but it does not expect the second stage boot server, instead it downloads a single image over USB. Signed-off-by: Petr Tesarik <petr@tesarici.cz>
-
* Add support for larger files. Based on original patch by ZoltanSzenczi: https://github.com/raspberrypi/tools/pull/20 * Fix typo in max transfer size. Original patch had a magic number of "LIBUSB_MAX_TRANSFER 507904" Assume that 496K ia a typo for 4096K, although 8M also works for me. * Put back out_ep and long timeout. Master uses out_ep variable instead of hard coding 0x01. Master also sets a much longer time out for the transfer. Transfering 4MB takes almost 5 seconds, so the original patch was dangerously close to timing out here. Master uses 100 second timeout, which is plenty. * Use 16KB instead of 4MB. The usbfs buffer memory is apparently shared across all usbfs devs. So we should try not to use a huge amount of it. Using a 16KB buffer here has no observable impact on performance as the trasnfer will be split up in to packets at least that small anyway. This also removes the abort counter. That doesn't seem to do anything except make the transfer fail if it has to be split into more than 20 parts. There is no "retry" code to break out of; the loop always aborts after a single error. * Reduce the timeout for 16KB blocks. Since the block size is reduced we no longer need to set a huge time out of 100 seconds. 5 seconds should be plenty to transfer 16KB. It should in fact take well under 1 second.
-
This helps avoid picking up the wrong files when msd files have already been installed as a debian package
-
From a patch by mypiandrew. See: https://github.com/raspberrypi/usbboot/issues/21
-
* Add boot directory overlay support (USB path) * Sleep before libusb_control_transfer seems to prevent timeout errors?? * Cleanup (removing unneeded sleep/spacing) Break out of "file_server" loop if the device no longer exists (prevents getting stuck in the loop) Sleep longer in the main detection loop (reduces CPU usage) * Cleanup merged code * Add delay option to reduce CPU usage (e.g. 500 = 7% CPU usage, 5000 = 1% CPU usage) * Require space between "-m" option and delay value.
-
Add lintian overrides
-
Fixes a small number of booting problems
-
Without the reset Pi Zero W doesn't boot the kernel.
-
Enable immediately stdout flushing for better integration with automated sdout parsing from external application.
-
loop=0