Closed timg236 closed 3 years ago
Since using rpiboot with bootcode.bin files newer than March don't get to stage two with a Pi Zero/CM3+/etc. any chance it could still fall back to using the old built-in bootcode.bin when -d is used and there's no bootcode.bin in the directory?
Since using rpiboot with bootcode.bin files newer than March don't get to stage two with a Pi Zero/CM3+/etc. any chance it could still fall back to using the old built-in bootcode.bin when -d is used and there's no bootcode.bin in the directory?
@burtyb I think it would be better to fix bootcode.bin bootcode.bin.zip
Please could you try the attached? It looks like fallout from the move to the common branch where BCM2711 PHY behaviour was selected on 2835
@burtyb I think it would be better to fix bootcode.bin
I agree :).
Please could you try the attached? It looks like fallout from the move to the common branch where BCM2711 PHY behaviour was selected on 2835
No joy using this bootcode.bin but it's different to what I'd reported in the issue as it doesn't have any "new full-speed USB device number" lines.
==> /var/log/kern.log <== Oct 13 13:21:45 cnat kernel: [ 3579.166278] usb 1-1.1.4: new full-speed USB device number 10 using xhci_hcd Oct 13 13:21:45 cnat kernel: [ 3579.272304] usb 1-1.1.4: New USB device found, idVendor=0a5c, idProduct=2763, bcdDevice= 0.00 Oct 13 13:21:45 cnat kernel: [ 3579.272320] usb 1-1.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Oct 13 13:21:45 cnat kernel: [ 3579.272333] usb 1-1.1.4: Product: BCM2708 Boot Oct 13 13:21:45 cnat kernel: [ 3579.272343] usb 1-1.1.4: Manufacturer: Broadcom ==> /var/log/daemon.log <== Oct 13 13:21:45 cnat rpiboot[1466]: Device located successfully Oct 13 13:21:45 cnat rpiboot[1466]: libusb: error [udev_hotplug_event] ignoring udev action bind Oct 13 13:21:46 cnat rpiboot[1466]: Initialised device correctly Oct 13 13:21:46 cnat rpiboot[1466]: Found serial number 0 Oct 13 13:21:46 cnat rpiboot[1466]: Sending bootcode.bin Oct 13 13:21:46 cnat rpiboot[1466]: libusb_bulk_transfer sent 24 bytes; returned 0 Oct 13 13:21:46 cnat rpiboot[1466]: Writing 52480 bytes Oct 13 13:21:46 cnat rpiboot[1466]: libusb_bulk_transfer sent 52480 bytes; returned 0 Oct 13 13:21:47 cnat rpiboot[1466]: Failed : 0x0 ==> /var/log/kern.log <== Oct 13 13:21:47 cnat kernel: [ 3581.392094] usb 1-1.1.4: USB disconnect, device number 10 ==> /var/log/daemon.log <== Oct 13 13:21:48 cnat rpiboot[1466]: Waiting for BCM2835/6/7/2711...
@burtyb I think it would be better to fix bootcode.bin
I agree :).
bootcode.bin.zip Please could you try the attached? It looks like fallout from the move to the common branch where BCM2711 PHY behaviour was selected on 2835
No joy using this bootcode.bin but it's different to what I'd reported in the issue as it doesn't have any "new full-speed USB device number" lines.
==> /var/log/kern.log <== Oct 13 13:21:45 cnat kernel: [ 3579.166278] usb 1-1.1.4: new full-speed USB device number 10 using xhci_hcd Oct 13 13:21:45 cnat kernel: [ 3579.272304] usb 1-1.1.4: New USB device found, idVendor=0a5c, idProduct=2763, bcdDevice= 0.00 Oct 13 13:21:45 cnat kernel: [ 3579.272320] usb 1-1.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Oct 13 13:21:45 cnat kernel: [ 3579.272333] usb 1-1.1.4: Product: BCM2708 Boot Oct 13 13:21:45 cnat kernel: [ 3579.272343] usb 1-1.1.4: Manufacturer: Broadcom ==> /var/log/daemon.log <== Oct 13 13:21:45 cnat rpiboot[1466]: Device located successfully Oct 13 13:21:45 cnat rpiboot[1466]: libusb: error [udev_hotplug_event] ignoring udev action bind Oct 13 13:21:46 cnat rpiboot[1466]: Initialised device correctly Oct 13 13:21:46 cnat rpiboot[1466]: Found serial number 0 Oct 13 13:21:46 cnat rpiboot[1466]: Sending bootcode.bin Oct 13 13:21:46 cnat rpiboot[1466]: libusb_bulk_transfer sent 24 bytes; returned 0 Oct 13 13:21:46 cnat rpiboot[1466]: Writing 52480 bytes Oct 13 13:21:46 cnat rpiboot[1466]: libusb_bulk_transfer sent 52480 bytes; returned 0 Oct 13 13:21:47 cnat rpiboot[1466]: Failed : 0x0 ==> /var/log/kern.log <== Oct 13 13:21:47 cnat kernel: [ 3581.392094] usb 1-1.1.4: USB disconnect, device number 10 ==> /var/log/daemon.log <== Oct 13 13:21:48 cnat rpiboot[1466]: Waiting for BCM2835/6/7/2711...
Can I check exactly rpiboot was run? To test this I used a PI4 and copied the attached recovery.bin and the start.elf from the msd directory into a temporary directory then ran the new rpiboot executable pointed at this directory.
Can I check exactly rpiboot was run? To test this I used a PI4 and copied the attached recovery.bin and the start.elf from the msd directory into a temporary directory then ran the new rpiboot executable pointed at this directory.
I'm using the overlay option which is what caused my confusion as previously with -o enabled it would load bootcode.bin from the -d directory once but with this patch it's checking bootcode.bin exists in the "-d" directory on startup and then tries loading it from the overlay directory if there's a bootcode.bin in there (which I hadn't updated when I tested yesterday).
For me (probably the main/only user of the overlay option) I'd be happy for bootcode[4].bin to only load from the "-d" dir by ignoring the bootcode files on the overlay check with something like
if(overlay&&(pathname[0] != 0)&&(strcmp(fname, "bootcode4.bin") != 0)&&(strcmp(fname, "bootcode.bin") != 0))
Or alternatively skip the bootcode[4].bin exists check when overlay is enabled and remove the "(bootcode.bin is always preloaded from the base directory)" help line.
Sorry, I forgot to say with the bootcode.bin in the zip it works OK now once I'd updated it in all locations.
@burtyb I have to admit that I didn't try the overlay option :) I've added the patch that you suggested and made the logging slightly more verbose to indicate where the file was actually loaded from.
@ghollingworth
@pelwell Can you merge this?
@burtyb I have to admit that I didn't try the overlay option :) I've added the patch that you suggested and made the logging slightly more verbose to indicate where the file was actually loaded from.
@timg236 looks like these changes are missing in the merged code?
I've submitted the changes via a separate PR https://github.com/raspberrypi/usbboot/pull/65
@XECDesign