raspberrypi / firmware

This repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware.
5.13k stars 1.68k forks source link

Fail to boot Pi2Bv1.1 from USB MSD with SDCARD bootcode.bin ONLY when USB wifi attached #1491

Open clivem opened 3 years ago

clivem commented 3 years ago

Searching back through old issues, I found https://github.com/raspberrypi/firmware/issues/1032 and https://github.com/raspberrypi/firmware/issues/1070 Both seemed to have been closed with a workaround rather than resolution. Basic issue remains the same as those prior reports, trying to boot a Pi2Bv1.1 with bootcode.bin ONLY sdcard does not succeed if additional device is also plugged into USB ports. In this case, the USB MSD (Sandisk Cruzer Fit 16GB) is not enumerated by bootcode.bin. (NB. this also applies when any other USB wifi dev is plugged in, not just specific to rtl8192cu chipset dev.)

pi@Akkordion2B3:~$ lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
        |__ Port 3: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
        |__ Port 5: Dev 5, If 0, Class=Vendor Specific Class, Driver=rtl8192cu, 480M

The following output is from when bootcode.bin fails to find the MSD device, because the rtl8192cu wifi is plugged in....

Raspberry Pi Bootcode

Found SD card, config.txt = 0, start.elf = 0, recovery.elf = 0, timeout = 1
Trying USB
Set address 4
Num devices = 1, addr = 4
get_config_descriptor 41 bytes
device class = 9
Hub device found at addr 4, enumerating HUB
Initialise hub
Found 5 ports, multi_tt = 1
Setting interface 0
Enabling PORT POWER on port 1
Enabling PORT POWER on port 2
Enabling PORT POWER on port 3
Enabling PORT POWER on port 4
Enabling PORT POWER on port 5
Waiting for devices to respond to reset
Found device on port 1
Found highspeed device
Set address 5
Num devices = 2, addr = 5
get_config_descriptor 39 bytes
device class = 255
Device found: type = Ethernet adapter, addr = 5
Found device on port 5
Found highspeed device
Set address 6
Num devices = 3, addr = 6
get_config_descriptor 46 bytes
device class = 0
interface_desc[1] = 4
Device found: type = Ethernet adapter, addr = 6
Trying booting from Ethernet device addr 5
Initialise ethernet with MAC b8:27:eb:aa:d7:3b
Wait for Link up
Failed to initialise link
Trying booting from Ethernet device addr 5
Initialise ethernet with MAC b8:27:eb:aa:d7:3b
Wait for Link up

The following is a successful boot after the rtl8192cu wifi dongle is removed leaving only the MSD connected to a USB port.

Raspberry Pi Bootcode

Found SD card, config.txt = 0, start.elf = 0, recovery.elf = 0, timeout = 1
Trying USB
Set address 4
Num devices = 1, addr = 4
get_config_descriptor 41 bytes
device class = 9
Hub device found at addr 4, enumerating HUB
Initialise hub
Found 5 ports, multi_tt = 1
Setting interface 0
Enabling PORT POWER on port 1
Enabling PORT POWER on port 2
Enabling PORT POWER on port 3
Enabling PORT POWER on port 4
Enabling PORT POWER on port 5
Waiting for devices to respond to reset
Found device on port 1
Found highspeed device
Set address 5
Num devices = 2, addr = 5
get_config_descriptor 39 bytes
device class = 255
Device found: type = Ethernet adapter, addr = 5
Found device on port 3
Found highspeed device
Set address 6
Num devices = 3, addr = 6
get_config_descriptor 32 bytes
device class = 0
interface_desc[1] = 4
Device found: type = Mass storage, addr = 6
Trying booting from MSD device addr 6
Retrieving the config descriptor
Found ep_in = 00000001, ep_out = 00000002
GetMaxLun returned 0, max_lun = 0
Sending and retrying TEST_UNIT_READY
Sending SCSI_COMMAND_INQUIRY
Sending READ_CAPACITY
init_msd returned 0
USB device configuration set
Initialised mass storage, block size = 512, block count = 31260672
MBR read and decoded successfully
FAT32 partition decoded successfully
start.elf found in first partition on USB MSD, booting
Read File: config.txt, 2104 (bytes)

Raspberry Pi Bootcode
Read File: config.txt, 2104
Read File: start_cd.elf, 785532 (bytes)
Read File: fixup_cd.dat, 3163 (bytes)
[    0.000000] Booting Linux on physical CPU 0xf00

NB. Also have timeout file on SDCARD and using latest bootcode.bin from master.

clivem commented 3 years ago

Ping @ghollingworth ........