{"action":"created","issue":{"url":"https://api.github.com/repos/raspberrypi/usbboot/issues/30","repository_url":"https://api.github.com/repos/raspberrypi/usbboot","labels_url":"https://api.github.com/repos/raspberrypi/usbboot/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/raspberrypi/usbboot/issues/30/comments","events_url":"https://api.github.com/repos/raspberrypi/usbboot/issues/30/events","html_url":"https://github.com/raspberrypi/usbboot/issues/30","id":309302882,"number":30,"title":"\"Failed to write complete file to USB device\" when using custom hardware","user":{"login":"FiesoDuck","id":5773030,"avatar_url":"https://avatars0.githubusercontent.com/u/5773030?v=4","gravatar_id":"","url":"https://api.github.com/users/FiesoDuck","html_url":"https://github.com/FiesoDuck","followers_url":"https://api.github.com/users/FiesoDuck/followers","following_url":"https://api.github.com/users/FiesoDuck/following{/other_user}","gists_url":"https://api.github.com/users/FiesoDuck/gists{/gist_id}","starred_url":"https://api.github.com/users/FiesoDuck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FiesoDuck/subscriptions","organizations_url":"https://api.github.com/users/FiesoDuck/orgs","repos_url":"https://api.github.com/users/FiesoDuck/repos","events_url":"https://api.github.com/users/FiesoDuck/events{/privacy}","received_events_url":"https://api.github.com/users/FiesoDuck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-03-28T10:11:27Z","updated_at":"2018-04-03T11:27:09Z","closed_at":null,"author_association":"NONE","body":"Hi\r\n\r\nin an effort to streamline the process of programming multiple CMs we designed a custom pcb following the official IO-Boards usb circuit.\r\n![flash adapter](https://user-images.githubusercontent.com/5773030/38021342-d4e9f71a-327c-11e8-9dc6-98aa97e972d1.PNG)\r\n\r\n![flasher3](https://user-images.githubusercontent.com/5773030/38022826-e002f1e8-3280-11e8-9196-9acf13a50328.png)\r\n\r\nWhen booting the CMs as a mass storage device it works as intended. Currently we are using 16x flash pcbs at once and some command line magic to make it all happen.\r\n\r\nNow we tried to boot the CMs with the directory option\r\n`sudo ./rpiboot -d /outputdir`\r\n\r\nThis fails with following output:\r\n\r\n> philip@Dell:~/usbboot$ sudo ./rpiboot -v -d /media/philip/ext4_Entwicklung/scriptexecutor/output\r\n> Waiting for BCM2835/6/7\r\n> Device located successfully\r\n> Initialised device correctly\r\n> Found serial number 0\r\n> Sending bootcode.bin\r\n> libusb_bulk_transfer returned 0\r\n> Writing 50216 bytes\r\n> libusb_bulk_transfer returned 0\r\n> Successful read 4 bytes \r\n> Waiting for BCM2835/6/7\r\n> Device located successfully\r\n> Initialised device correctly\r\n> Found serial number 1\r\n> Second stage boot server\r\n> Received message GetFileSize: autoboot.txt\r\n> Cannot open file autoboot.txt\r\n> Received message GetFileSize: config.txt\r\n> File size = 47885 bytes\r\n> Received message ReadFile: config.txt\r\n> File read: config.txt\r\n> libusb_bulk_transfer returned 0\r\n> Received message GetFileSize: recovery.elf\r\n> Cannot open file recovery.elf\r\n> Received message GetFileSize: start.elf\r\n> File size = 2855972 bytes\r\n> Received message ReadFile: start.elf\r\n> File read: start.elf\r\n> libusb_bulk_transfer returned 0\r\n> Received message GetFileSize: fixup.dat\r\n> File size = 6669 bytes\r\n> Received message ReadFile: fixup.dat\r\n> File read: fixup.dat\r\n> libusb_bulk_transfer returned 0\r\n> Received message GetFileSize: recovery.elf\r\n> Cannot open file recovery.elf\r\n> Received message GetFileSize: config.txt\r\n> File size = 47885 bytes\r\n> Received message ReadFile: config.txt\r\n> File read: config.txt\r\n> libusb_bulk_transfer returned -7\r\n> Failed to write complete file to USB device\r\n\r\nIf i switch the exact CM to the official IO-Board and execute the exact command it works as expected.\r\n\r\nTested on Ubuntu 17.10"},"comment":{"url":"https://api.github.com/repos/raspberrypi/usbboot/issues/comments/378217302","html_url":"https://github.com/raspberrypi/usbboot/issues/30#issuecomment-378217302","issue_url":"https://api.github.com/repos/raspberrypi/usbboot/issues/30","id":378217302,"user":{"login":"FiesoDuck","id":5773030,"avatar_url":"https://avatars0.githubusercontent.com/u/5773030?v=4","gravatar_id":"","url":"https://api.github.com/users/FiesoDuck","html_url":"https://github.com/FiesoDuck","followers_url":"https://api.github.com/users/FiesoDuck/followers","following_url":"https://api.github.com/users/FiesoDuck/following{/other_user}","gists_url":"https://api.github.com/users/FiesoDuck/gists{/gist_id}","starred_url":"https://api.github.com/users/FiesoDuck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FiesoDuck/subscriptions","organizations_url":"https://api.github.com/users/FiesoDuck/orgs","repos_url":"https://api.github.com/users/FiesoDuck/repos","events_url":"https://api.github.com/users/FiesoDuck/events{/privacy}","received_events_url":"https://api.github.com/users/FiesoDuck/received_events","type":"User","site_admin":false},"created_at":"2018-04-03T11:27:09Z","updated_at":"2018-04-03T11:27:09Z","author_association":"NONE","body":"Same result as before.\r\n\r\nIf libraries were missing,  shouldn't the error be more like \r\n`vcdbg: error while loading shared libraries: libelftoolchain.so: cannot open shared object file: No such file or directory`"}}
{"actor":{"display_login":"FiesoDuck"}}