Fix problem with enabling MSD on some CM / CM3 devices
This commit is contained in:
parent
e89ead9a80
commit
ec9155c978
8
main.c
8
main.c
@ -227,6 +227,8 @@ int second_stage_boot(libusb_device_handle *usb_device)
|
||||
{
|
||||
int size, retcode = 0;
|
||||
|
||||
sleep(1);
|
||||
|
||||
size = ep_write(&boot_message, sizeof(boot_message), usb_device);
|
||||
if (size != sizeof(boot_message))
|
||||
{
|
||||
@ -242,7 +244,7 @@ int second_stage_boot(libusb_device_handle *usb_device)
|
||||
return -1;
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
usleep(125);
|
||||
size = ep_read((unsigned char *)&retcode, sizeof(retcode), usb_device);
|
||||
|
||||
if (size > 0 && retcode == 0)
|
||||
@ -254,6 +256,8 @@ int second_stage_boot(libusb_device_handle *usb_device)
|
||||
printf("Failed : 0x%x", retcode);
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
|
||||
return retcode;
|
||||
|
||||
}
|
||||
@ -494,10 +498,8 @@ int main(int argc, char *argv[])
|
||||
printf("Second stage boot server\n");
|
||||
file_server(usb_device);
|
||||
}
|
||||
libusb_reset_device(usb_device);
|
||||
|
||||
libusb_close(usb_device);
|
||||
sleep(5);
|
||||
}
|
||||
while(loop || desc.iSerialNumber == 0);
|
||||
|
||||
|
||||
BIN
msd/bootcode.bin
BIN
msd/bootcode.bin
Binary file not shown.
BIN
msd/start.elf
BIN
msd/start.elf
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user