User avatar
Gavinmc42
Posts: 1433
Joined: Wed Aug 28, 2013 3:31 am

Zero USB booting

Mon May 29, 2017 12:47 pm

Just used rpiboot to get an Ultibo kernel.bin working on a Zero with no SDcard.
Used the standard start.elf and bootload.bin plus kernel.bin in the msd folder.

USB takes a bit of time to connect, so it is not as fast as normal <2 sec SDcard boot.
But this now means a Cluster hat of 4 Zero's and no SDcards needed for the Zero's?
Now network booting for the mother Pi3? 5 connected Pi's - no SD's :shock:

Rats, HDMI is same side as USB, else 5 HDMI outputs no SD, USB extension cables?
Need to get a few more Zero's, only got 4 but two are Zero W which I want to save for bots.
Time to start camping out on disty webshops.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
rpdom
Posts: 11522
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: Zero USB booting

Mon May 29, 2017 1:02 pm

That sounds like it could be interesting. I'm working on a cluster of four Zeroes, one of which has a HubPiWi attached to provide USB connections for the other three and WiFi for connection to the rest of the world.

I removed the USB sockets from the HubPiWi and ran thin cables for the data through the GPIO connector holes of each Zero and soldered them the the PP pads by the USB. I also soldered a couple of bits of solid core wire to connect together all the Pin 2 and also the Pin 6 of each Pi, so all I need to do is provide power to one of them. I just need to work on the software and networking now.

User avatar
Gavinmc42
Posts: 1433
Joined: Wed Aug 28, 2013 3:31 am

Re: Zero USB booting

Mon May 29, 2017 1:15 pm

This makes it easy, hope the USB hub chip does not cause problems.
http://clusterhat.com/
Noticed it on Pimoroni and got one with a Zero W to save some shipping pain.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Gavinmc42
Posts: 1433
Joined: Wed Aug 28, 2013 3:31 am

Re: Zero USB booting

Mon Jul 17, 2017 12:41 pm

Managed to get piCore 9.0.3 booting with latest rpiboot :D
Still need to figure out how to load the extensions
Waiting for BCM2835/6/7
Sending bootcode.bin
Successful read 4 bytes
Waiting for BCM2835/6/7
Second stage boot server
File read: config.txt
File read: start.elf
File read: fixup.dat
File read: config.txt
File read: config.txt
File read: cmdline.txt
File read: kernel4922.img
File read: 9.0.3.gz
File read: bcm2708-rpi-b-plus.dtb
File read: config.txt
File read: overlays/dwc2.dtbo
Failed control transfer
Second stage boot server done
No idea why it reads the config.txt 4 times?
Why bcm2708-rpi-b-plus.dtb on a Zero?
File read: overlays/dwc2.dtbo is because I have this dtoverlay=dwc2 in the config.txt
This seems to fail?

Overlays and USB to ethernet issues too, but that's to be expected as I have no clue how to do that even with a SD card.
Try to get it working on Jessie Lite?

This learning Pi stuff can take longer than expected.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

dwelch67
Posts: 824
Joined: Sat May 26, 2012 5:32 pm

Re: Zero USB booting

Mon Jul 17, 2017 1:48 pm

at least two reads of config.txt seems to make sense bootcode.bin and start.elf are different firmware and looks like each are reading it, the other reads who knows perhaps different sub programs in start.elf or one read is looking for one thing (what speed are we clocking to), and another is looking for something else (do they want to start the arm in 32 bit mode or 64).
Could be separate developers wrote different parts of that firmware.

User avatar
Gavinmc42
Posts: 1433
Joined: Wed Aug 28, 2013 3:31 am

Re: Zero USB booting

Tue Jul 18, 2017 1:53 am

The rpiboot software seems to be initially just for USB msd.
But it does seem to be getting usable as a way to load an OS into ram and run it.
Not sure it it will ever be the way to run full Raspbian on a Zero :lol:

Got a Cluster hat which takes four Zero's, one way to get 100 GPIO on a Pi2/3 ;)
Rpiboot could be extended into a tool for using Zero's as programmable USB gadgets for any Pi/PC/OS.

bootcode. bin and start.elf change too, newer ones are better, whoops 7 days ago, newer still ;) .
If we use Zero's as GPIO extenders we probably don't need the jpeg stuff which means using the cutdown versions - start_cd.elf etc. This means even faster booting as these are much smaller.

The possibilities of using Zero's for high speed ADC/logic analyzers, USB LCDs, HDMI displays, even parallel image sensors etc :lol: Pi Camera is a bit more complex as it requires the start_x.elf versions plus the firmware. But raspistill/vid etc do run on piCore if a way can be figured out to load the required extensions.

Maybe Buildroot could be used to make a OS with everything loaded?
Raw-CSI is getting workable and latest firmware seems to be splitting out the ISP pipeline, baremetal camera one day?

At the moment Ultibo and other baremetal tools seem to be good enough to make a kernel.bin that can do GPIO stuff.
Just the four files are needed, bootcode.bin, start.elf, fixup.dat, kernel.bin. fixup.dat not really needed if you can live with only 256MB of ram, but it is not very big anyway. config.txt if any tweaking is needed?

Logic analyzer with 500MB of ram 8-) Digital CRO?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

burtyb
Posts: 18
Joined: Sat Mar 05, 2016 4:19 pm

Re: Zero USB booting

Thu Aug 03, 2017 11:56 am

Not sure if you're still interested in this but I've got this working on the Cluster HAT and it seems to be quite stable (with over 2000 successful boots) and should also works with just a USB cable connecting the Pi Zero to a Pi 3 for example.

I have a guide and an image for download on https://goo.gl/E3RBSR and the script I used to create it is linked at the bottom of the page.

It uses a modified rpiboot (https://github.com/burtyb/usbboot) which supports overlay boot directories (based on USB path) so I can send a different cmdline.txt/etc. to each Pi Zero so they NFS mount a different root directory.

User avatar
Gavinmc42
Posts: 1433
Joined: Wed Aug 28, 2013 3:31 am

Re: Zero USB booting

Sat Aug 05, 2017 8:00 am

Interesting, the ZeroStem frees up access to the HDMI.
A 10 port USB hub would be fun.
Just need more Zero's, time to check stock again?
They still only one at a time :(

A PCB for vertical mounting the Zeros in a ring, mini Cray :lol:
https://en.wikipedia.org/wiki/Cray

DSI/CSI/HDMI high speed serial comms?
Mini desktop coffee cup super computer ;)

Gokrazy is way to make Go apps that just need boot/, start and kernel.
viewtopic.php?p=1191365
This would make for another interesting no SD card USB boot option.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Gavinmc42
Posts: 1433
Joined: Wed Aug 28, 2013 3:31 am

Re: Zero USB booting

Tue Aug 08, 2017 8:34 am

Trying to get USB Ethernet working on Zero's.
Jessie Lite is big so I have been attempting piCore.

Eventually from a Cluster hat, but I was thinking the cluster hat if it sits on a Pi3, the Pi3 could netboot.
A Pi3 and 4 Zero's, none with SD cards.

No way do I want to put 5 versions of Jessie over the network.
PiCore is much smaller if I figure out this overlay/module stuff.

USB Ethernet gadget mode on Ultibo would be best but needs a USB driver?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “Bare metal”

Who is online

Users browsing this forum: No registered users and 5 guests