{"action":"created","issue":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/1243","labels_url":"https://api.github.com/repos/raspberrypi/linux/issues/1243/labels{/name}","comments_url":"https://api.github.com/repos/raspberrypi/linux/issues/1243/comments","events_url":"https://api.github.com/repos/raspberrypi/linux/issues/1243/events","html_url":"https://github.com/raspberrypi/linux/issues/1243","id":124083283,"number":1243,"title":"Using usbboot to boot, format microSD, and replicate one PiZero to another","user":{"login":"hh","id":31331,"avatar_url":"https://avatars.githubusercontent.com/u/31331?v=3","gravatar_id":"","url":"https://api.github.com/users/hh","html_url":"https://github.com/hh","followers_url":"https://api.github.com/users/hh/followers","following_url":"https://api.github.com/users/hh/following{/other_user}","gists_url":"https://api.github.com/users/hh/gists{/gist_id}","starred_url":"https://api.github.com/users/hh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hh/subscriptions","organizations_url":"https://api.github.com/users/hh/orgs","repos_url":"https://api.github.com/users/hh/repos","events_url":"https://api.github.com/users/hh/events{/privacy}","received_events_url":"https://api.github.com/users/hh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-28T15:50:17Z","updated_at":"2015-12-28T16:35:01Z","closed_at":null,"body":"Can we make viral software that replicates with $5 hardware?\r\n\r\nLet's make it it easy for people starting out and without dependency on internet or other hardware to replicate / flash PiZero's using only PiZeros? \r\n\r\n[SDCARD][RPI_SRC] <==usb otg cable ==><==usb micro==>[RPI_TARTGET][BLANKSDCARD]\r\n\r\nThe target rpi would start with an unformatted or emtpy microSD card.\r\nUsing [usbboot](https://github.com/raspberrypi/tools/tree/master/usbboot) on the source rpi we could boot a kernel + rootfs on the target rpi, that would let the target device show up as a mass_storage gadget exporting the blank microSD card.\r\n\r\nWe could format the target rpi with whatever we needed to at that point, preferably with the ability to do what we just accomplished to yet another target rpi.\r\n\r\n/cc @lurch"},"comment":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/comments/167600095","html_url":"https://github.com/raspberrypi/linux/issues/1243#issuecomment-167600095","issue_url":"https://api.github.com/repos/raspberrypi/linux/issues/1243","id":167600095,"user":{"login":"lurch","id":476186,"avatar_url":"https://avatars.githubusercontent.com/u/476186?v=3","gravatar_id":"","url":"https://api.github.com/users/lurch","html_url":"https://github.com/lurch","followers_url":"https://api.github.com/users/lurch/followers","following_url":"https://api.github.com/users/lurch/following{/other_user}","gists_url":"https://api.github.com/users/lurch/gists{/gist_id}","starred_url":"https://api.github.com/users/lurch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lurch/subscriptions","organizations_url":"https://api.github.com/users/lurch/orgs","repos_url":"https://api.github.com/users/lurch/repos","events_url":"https://api.github.com/users/lurch/events{/privacy}","received_events_url":"https://api.github.com/users/lurch/received_events","type":"User","site_admin":false},"created_at":"2015-12-28T16:35:01Z","updated_at":"2015-12-28T16:35:01Z","body":"It's quite a while since I last played with this - the person to ask would obviously be @ghollingworth \r\n\r\nI *think* that `usbbootcode.bin` is analogous to `bootcode.bin` from  https://github.com/raspberrypi/firmware/tree/master/boot , and `msd.elf` and `buildroot.elf` are then analogous to `start.elf` from that same firmware directory. I.e. these are all closed-source low-level binaries that run on the GPU itself, and so can only be made by Raspberry Pi engineers.\r\n\r\nGiven that it's not recommended to try DD-ing from a mounted filesystem, I guess for one RPi-Zero to be able to write a complete OS to another RPi-Zero containing a blank SD card, the booted RPi-Zero would need to have a copy of the raspbian.img on it's filesystem. So for that img file to then be self-replicating, is an interesting chicken-and-egg problem... ;-)   (I'm sure it's probably possible, I'm just too tired to think about it right now)"}}