• 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.
    Tim Gover authored
     
    Browse File »


  • 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>
    Nicolai Buchwitz authored
     
    Browse File »


  • 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)
    Evan Gates authored
     
    Browse File »




  • * 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.
    tim authored
     
    Browse File »



  • 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.
    Chris Burton authored
     
    Browse File »


  • 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>
    Phil Elwell authored
     
    Browse File »



  • 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>
    Petr Tesarik authored
     
    Browse File »

  • * 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.
    Phil Elwell authored
     
    Browse File »




  • * 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.
    Chris Burton authored
     
    Browse File »