raspberrypi / usbboot

Raspberry Pi USB booting code, moved from tools repository
Apache License 2.0
905 stars 229 forks source link

rpiboot program encounter Failed control transfer. #73

Closed yoyojacky closed 2 years ago

yoyojacky commented 3 years ago

I have flashed eMMC via Raspberry Pi 4B with ./rpiboot, and it shows some error , does it matter? pi@rpi8g:~/usbboot $ make

cc -Wall -Wextra -g -o bin2c bin2c.c
./bin2c msd/bootcode.bin msd/bootcode.h
./bin2c msd/start.elf msd/start.h
./bin2c msd/bootcode4.bin msd/bootcode4.h
./bin2c msd/start4.elf msd/start4.h
cc -Wall -Wextra -g -o rpiboot main.c -lusb-1.0

pi@rpi8g:~/usbboot $ sudo ./rpiboot

Loading embedded: bootcode4.bin
Sending bootcode.bin
Successful read 4 bytes
Waiting for BCM2835/6/7/2711...
Loading embedded: bootcode4.bin
Sending bootcode.bin
Failed control transfer (-1,24)
Failed to write correct length, returned -1
Waiting for BCM2835/6/7/2711...
Loading embedded: bootcode4.bin
Second stage boot server
Loading embedded: start4.elf
File read: start4.elf
Second stage boot server done
NumberOneGit commented 3 years ago

I'm receiving the same error with my new CM4 modules in Ubuntu and in Windows (but in Windows it replaces -1 with -9).

aethernet commented 2 years ago

same here on mac with a CM4


RPIBOOT: build-date Jan 13 2022 version 20220111~130126 97f618fc
Waiting for BCM2835/6/7/2711...
Loading embedded: bootcode4.bin
Device located successfully
Initialised device correctly
Found serial number 3
Sending bootcode.bin
libusb_bulk_transfer sent 24 bytes; returned 0
Writing 121888 bytes
libusb_bulk_transfer sent 121888 bytes; returned 0
Successful read 4 bytes 
Waiting for BCM2835/6/7/2711...
Loading embedded: bootcode4.bin
Device located successfully
Initialised device correctly
Found serial number 3
Sending bootcode.bin
libusb: warning [darwin_transfer_status] transfer error: device not responding (value = 0xe00002ed)
Failed control transfer (-1,24)
Failed to write correct length, returned -1
Waiting for BCM2835/6/7/2711...
timg236 commented 2 years ago

Duplicate of https://github.com/raspberrypi/usbboot/issues/36. Please can you re-test with the latest release of rpiboot.