wrobi
Posts: 1
Joined: Tue Aug 06, 2019 10:35 am

Re: Raspberry Pi 4 usb boot?

Fri Mar 13, 2020 9:40 am

procount wrote:
Wed Mar 04, 2020 12:34 pm
Yes.
If you flash NOOBS (or PINN) onto the SD card, you have the choice to install any OSes to the SD card OR to a USB stick.
Thanks for your hint!
In my case installation with NOOBS was ok, but Raspbian didn't boot. I have a JMicron JMS567 USB controller.

My solution is:
-Hold shift key for recovery mode.
-Edit cmdline.txt, and insert following text to the start: "usb-storage.quirks=152d:0578:u "

It works for me. So I recommend to write up your adapter’s ID before the installation. You will use the lsusb command:

Code: Select all

pi@raspberrypi:~ $ lsusb
 Bus 002 Device 002: ID 152d:0578 JMicron Technology Corp. / JMicron USA Technology Corp. JMS567 SATA 6Gb/s bridge

User avatar
peterscargill
Posts: 16
Joined: Fri Apr 17, 2015 10:40 pm
Location: Northumberland
Contact: Website

Re: Raspberry Pi 4 usb boot?

Mon Mar 16, 2020 4:06 pm

9 monthes after Pi4 launch and STILL no USB BOOT... is this a voluteer project? Can it REALLY be that hard?
Regards

Peter Scargill (tech.scargill.net)

User avatar
dickon
Posts: 1539
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: Raspberry Pi 4 usb boot?

Mon Mar 16, 2020 4:16 pm

peterscargill wrote:
Mon Mar 16, 2020 4:06 pm
Can it REALLY be that hard?
Yes. Yes, it can.

See your local kernel source tree, and look at the drivers/usb/{class,common,core,host,storage} directories, plus the bits of drivers/scsi/* that are pertinent to mass-storage for details.

W. H. Heydt
Posts: 12638
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Raspberry Pi 4 usb boot?

Mon Mar 16, 2020 4:24 pm

peterscargill wrote:
Mon Mar 16, 2020 4:06 pm
9 monthes after Pi4 launch and STILL no USB BOOT... is this a voluteer project? Can it REALLY be that hard?
Here's an exercise for you list. Make a list of *everything* that has to be considered to make USB boot work. Then state *exactly* what has to be checked and done to make each step works reliably and correctly. Be sure to take into account every possible interface device and boot device to make sure that *all* of them work.

Your resultant document will be judged--in part--on correct spelling and grammar.

User avatar
thagrol
Posts: 3077
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Raspberry Pi 4 usb boot?

Mon Mar 16, 2020 4:25 pm

dickon wrote:
Mon Mar 16, 2020 4:16 pm
peterscargill wrote:
Mon Mar 16, 2020 4:06 pm
Can it REALLY be that hard?
Yes. Yes, it can.

See your local kernel source tree, and look at the drivers/usb/{class,common,core,host,storage} directories, plus the bits of drivers/scsi/* that are pertinent to mass-storage for details.
Don't forget the PCIe stuff that's needed before you even get to the USB 3 hardware.
Arguing with strangers on the internet since 1993.

User avatar
dickon
Posts: 1539
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: Raspberry Pi 4 usb boot?

Mon Mar 16, 2020 4:33 pm

thagrol wrote:
Mon Mar 16, 2020 4:25 pm
dickon wrote:
Mon Mar 16, 2020 4:16 pm
peterscargill wrote:
Mon Mar 16, 2020 4:06 pm
Can it REALLY be that hard?
Yes. Yes, it can.

See your local kernel source tree, and look at the drivers/usb/{class,common,core,host,storage} directories, plus the bits of drivers/scsi/* that are pertinent to mass-storage for details.
Don't forget the PCIe stuff that's needed before you even get to the USB 3 hardware.
Good point. I'd forgotten that was now at the end of a PCIe lane. Add relevant portions of drivers/pci/* to that list. And bear in mind you can't use the Linux source tree, because it's GPL, and this needs to not be GPL because of other non-GPL code it needs to link to. You might find something more manageable in FreeRTOS or the *BSDs, but good luck either way.

thenrie
Posts: 10
Joined: Mon Feb 19, 2018 1:04 am

Re: Raspberry Pi 4 usb boot?

Tue Mar 17, 2020 12:22 am

Question: Earlier post on this thread indicated that with the /boot and /rootfs on the USB hdd, fstab should be edited to direct to /boot on the SD card, so that updates, etc will be written to the SD. I have been booting from my USB hdd with both /boot and /rootfs on the hdd. I used the sd card copier utility in Accessories. fstab automatically updated and shows my hdd drive for both boot and file system. The SD card is automatically mounting as /home/media/pi. Of course, the SD card has to be inserted to get things started, but it seems to be working fine.

Do I need to edit /etc/fstab as indicated above? If left as-is, will not updates automatically go to the hdd, since that's where the system is and the SD is just being read from to start the boot process?

I have a coding IQ of about 49, so take it easy on me. :)

lurk101
Posts: 55
Joined: Mon Jan 27, 2020 2:35 pm

Re: Raspberry Pi 4 usb boot?

Tue Mar 17, 2020 1:39 am

thagrol wrote:
Mon Mar 16, 2020 4:25 pm
Don't forget the PCIe stuff that's needed before you even get to the USB 3 hardware.
Having authored PCIe drivers, PCIe is no big deal. USB stack however is a different story. Will it even all fit in currently provisioned EEPROM?

ejolson
Posts: 5372
Joined: Tue Mar 18, 2014 11:47 am

Re: Raspberry Pi 4 usb boot?

Tue Mar 17, 2020 2:40 am

lurk101 wrote:
Tue Mar 17, 2020 1:39 am
thagrol wrote:
Mon Mar 16, 2020 4:25 pm
Don't forget the PCIe stuff that's needed before you even get to the USB 3 hardware.
Having authored PCIe drivers, PCIe is no big deal. USB stack however is a different story. Will it even all fit in currently provisioned EEPROM?
That PCIe is easy compared to USB is my understanding as well. Fortunately, it may be possible to boot using only a partial USB stack. Alternatively, this may be another opportunity to deploy Minix behind the scenes like Intel did with their baseboard management system.

Image
https://en.m.wikipedia.org/wiki/MINIX_3

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26659
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi 4 usb boot?

Tue Mar 17, 2020 7:53 am

lurk101 wrote:
Tue Mar 17, 2020 1:39 am
thagrol wrote:
Mon Mar 16, 2020 4:25 pm
Don't forget the PCIe stuff that's needed before you even get to the USB 3 hardware.
Having authored PCIe drivers, PCIe is no big deal. USB stack however is a different story. Will it even all fit in currently provisioned EEPROM?
True, its just something else that needs to be written and tested. It all adds up.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26659
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi 4 usb boot?

Tue Mar 17, 2020 7:55 am

peterscargill wrote:
Mon Mar 16, 2020 4:06 pm
9 monthes after Pi4 launch and STILL no USB BOOT... is this a voluteer project? Can it REALLY be that hard?
Not only difficult, but also not the only thing the engineer involved is working on, and not the highest priority.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

fruitoftheloom
Posts: 23334
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Raspberry Pi 4 usb boot?

Tue Mar 17, 2020 9:18 am

peterscargill wrote:
Mon Mar 16, 2020 4:06 pm
9 monthes after Pi4 launch and STILL no USB BOOT... is this a voluteer project? Can it REALLY be that hard?

You are completely wrong as the 4B was originally planned to be released March 2020, it is only a few days past PiDay :roll:
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

User avatar
thagrol
Posts: 3077
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Raspberry Pi 4 usb boot?

Tue Mar 17, 2020 12:34 pm

jamesh wrote:
Tue Mar 17, 2020 7:53 am
lurk101 wrote:
Tue Mar 17, 2020 1:39 am
thagrol wrote:
Mon Mar 16, 2020 4:25 pm
Don't forget the PCIe stuff that's needed before you even get to the USB 3 hardware.
Having authored PCIe drivers, PCIe is no big deal. USB stack however is a different story. Will it even all fit in currently provisioned EEPROM?
True, its just something else that needs to be written and tested. It all adds up.
Which was my point in mentioning it. Not that it may or may not be difficult but that's it needed to be added to the list of things to be done.
Arguing with strangers on the internet since 1993.

JumpZero
Posts: 1131
Joined: Thu Mar 28, 2013 7:35 pm
Location: 127.0.0.1

Re: Raspberry Pi 4 usb boot?

Tue Mar 17, 2020 1:29 pm

thenrie wrote:
Tue Mar 17, 2020 12:22 am
Question: Earlier post on this thread indicated that with the /boot and /rootfs on the USB hdd, fstab should be edited to direct to /boot on the SD card, so that updates, etc will be written to the SD. I have been booting from my USB hdd with both /boot and /rootfs on the hdd. I used the sd card copier utility in Accessories. fstab automatically updated and shows my hdd drive for both boot and file system. The SD card is automatically mounting as /home/media/pi. Of course, the SD card has to be inserted to get things started, but it seems to be working fine.

Do I need to edit /etc/fstab as indicated above? If left as-is, will not updates automatically go to the hdd, since that's where the system is and the SD is just being read from to start the boot process?

I have a coding IQ of about 49, so take it easy on me. :)
You have to edit fstab and direct /boot to the SD
If you don't the next kernel update and associated librairies will go the hdd and at the next reboot the system will freeze/fail/etc.. because it has boot with the kernel on the SD and it's not matching the system librairies on the hdd.

RonR
Posts: 1199
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: Raspberry Pi 4 usb boot?

Tue Mar 17, 2020 6:46 pm

thenrie wrote:
Tue Mar 17, 2020 12:22 am
Do I need to edit /etc/fstab as indicated above? If left as-is, will not updates automatically go to the hdd, since that's where the system is and the SD is just being read from to start the boot process?

All you need to do is run: usb-boot

All necessary configuration will be done for you.

lingon
Posts: 158
Joined: Fri Aug 26, 2011 7:31 am

Re: Raspberry Pi 4 usb boot?

Fri Mar 27, 2020 8:50 am

According to the firmware changelog there seems to be change for the so far unannounced Compute Module 4 regarding USB-booting:
firmware: USB device boot for CM4
https://github.com/raspberrypi/firmware ... 52f27ed745

So getting USB-boot for the regular Raspberry Pi 4 will need some more patience.

W. H. Heydt
Posts: 12638
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Raspberry Pi 4 usb boot?

Fri Mar 27, 2020 4:41 pm

lingon wrote:
Fri Mar 27, 2020 8:50 am
According to the firmware changelog there seems to be change for the so far unannounced Compute Module 4 regarding USB-booting:
firmware: USB device boot for CM4
https://github.com/raspberrypi/firmware ... 52f27ed745

So getting USB-boot for the regular Raspberry Pi 4 will need some more patience.
Hmmm... Since NEC is planning to release the first wave of the new--CM4-capable--displays in August, one might well expect the CM4 itself in that time frame. This gives me modest hope for the one item on my current (and previously private) wish list: USB booting by the time the Pi4B has been available for a year (that is, one *might* hope for the feature by the end of June).

Of course, with SARS-CoV-19 running loose, all bets are off for when these events will actually transpire.

ejolson
Posts: 5372
Joined: Tue Mar 18, 2014 11:47 am

Re: Raspberry Pi 4 usb boot?

Fri Mar 27, 2020 4:59 pm

W. H. Heydt wrote:
Fri Mar 27, 2020 4:41 pm
lingon wrote:
Fri Mar 27, 2020 8:50 am
According to the firmware changelog there seems to be change for the so far unannounced Compute Module 4 regarding USB-booting:
firmware: USB device boot for CM4
https://github.com/raspberrypi/firmware ... 52f27ed745

So getting USB-boot for the regular Raspberry Pi 4 will need some more patience.
Hmmm... Since NEC is planning to release the first wave of the new--CM4-capable--displays in August, one might well expect the CM4 itself in that time frame. This gives me modest hope for the one item on my current (and previously private) wish list: USB booting by the time the Pi4B has been available for a year (that is, one *might* hope for the feature by the end of June).

Of course, with SARS-CoV-19 running loose, all bets are off for when these events will actually transpire.
I think the epidemic related quarantines and lock downs might result in greater software programmer productivity as well as reproductivity. I'm also looking forward to improved boot firmware for the Pi 4B.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26659
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi 4 usb boot?

Fri Mar 27, 2020 5:28 pm

ejolson wrote:
Fri Mar 27, 2020 4:59 pm
W. H. Heydt wrote:
Fri Mar 27, 2020 4:41 pm
lingon wrote:
Fri Mar 27, 2020 8:50 am
According to the firmware changelog there seems to be change for the so far unannounced Compute Module 4 regarding USB-booting:

https://github.com/raspberrypi/firmware ... 52f27ed745

So getting USB-boot for the regular Raspberry Pi 4 will need some more patience.
Hmmm... Since NEC is planning to release the first wave of the new--CM4-capable--displays in August, one might well expect the CM4 itself in that time frame. This gives me modest hope for the one item on my current (and previously private) wish list: USB booting by the time the Pi4B has been available for a year (that is, one *might* hope for the feature by the end of June).

Of course, with SARS-CoV-19 running loose, all bets are off for when these events will actually transpire.
I think the epidemic related quarantines and lock downs might result in greater software programmer productivity as well as reproductivity. I'm also looking forward to improved boot firmware for the Pi 4B.
Depends if the guy doing the works get it I suppose! There are going to be impacts in various areas as this thing progresses, I would not expect any timescales to be even vaguely accurate. My productivity has dropped off a lot, because trying to home school the children and lots of worrying about one's own health is really not conducive to getting work done.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2393
Joined: Thu Jul 11, 2013 2:37 pm

Re: Raspberry Pi 4 usb boot?

Fri Mar 27, 2020 6:18 pm

lingon wrote:
Fri Mar 27, 2020 8:50 am
According to the firmware changelog there seems to be change for the so far unannounced Compute Module 4 regarding USB-booting:
firmware: USB device boot for CM4
https://github.com/raspberrypi/firmware ... 52f27ed745

So getting USB-boot for the regular Raspberry Pi 4 will need some more patience.
That's for booting over USB2.0 OTG when attached to a host, not mass-storage boot. You could substitute CM4 for RPI4 in that commit message, the meaning would be the same.
Rockets are loud.
https://astro-pi.org

andrum99
Posts: 1219
Joined: Fri Jul 20, 2012 2:41 pm

Re: Raspberry Pi 4 usb boot?

Fri Mar 27, 2020 8:02 pm

jdb wrote:
Fri Mar 27, 2020 6:18 pm
lingon wrote:
Fri Mar 27, 2020 8:50 am
According to the firmware changelog there seems to be change for the so far unannounced Compute Module 4 regarding USB-booting:
firmware: USB device boot for CM4
https://github.com/raspberrypi/firmware ... 52f27ed745

So getting USB-boot for the regular Raspberry Pi 4 will need some more patience.
That's for booting over USB2.0 OTG when attached to a host, not mass-storage boot. You could substitute CM4 for RPI4 in that commit message, the meaning would be the same.

Just to clarify: "USB device boot" means booting the Pi with the USB interface in device mode, which allows you to connect the Pi to a PC and use the Pi as a USB device, for example. On the Pi 4, only the "legacy" USB controller built into the SoC can do device mode.

Booting a Pi from USB needs the Pi's USB interface in host mode, which allows you to plug USB devices into it.

ejolson
Posts: 5372
Joined: Tue Mar 18, 2014 11:47 am

Re: Raspberry Pi 4 usb boot?

Fri Mar 27, 2020 9:18 pm

andrum99 wrote:
Fri Mar 27, 2020 8:02 pm
jdb wrote:
Fri Mar 27, 2020 6:18 pm
lingon wrote:
Fri Mar 27, 2020 8:50 am
According to the firmware changelog there seems to be change for the so far unannounced Compute Module 4 regarding USB-booting:

https://github.com/raspberrypi/firmware ... 52f27ed745

So getting USB-boot for the regular Raspberry Pi 4 will need some more patience.
That's for booting over USB2.0 OTG when attached to a host, not mass-storage boot. You could substitute CM4 for RPI4 in that commit message, the meaning would be the same.

Just to clarify: "USB device boot" means booting the Pi with the USB interface in device mode, which allows you to connect the Pi to a PC and use the Pi as a USB device, for example. On the Pi 4, only the "legacy" USB controller built into the SoC can do device mode.

Booting a Pi from USB needs the Pi's USB interface in host mode, which allows you to plug USB devices into it.
I think I understand. Is this the same idea as booting a Pi Zero over USB using rpiboot on a host computer to deliver the kernel and initial RAM filesystem?

lingon
Posts: 158
Joined: Fri Aug 26, 2011 7:31 am

Re: Raspberry Pi 4 usb boot?

Sat Mar 28, 2020 7:08 am

jdb wrote:
Fri Mar 27, 2020 6:18 pm

That's for booting over USB2.0 OTG when attached to a host, not mass-storage boot. You could substitute CM4 for RPI4 in that commit message, the meaning would be the same.
OK, thanks for explaining what this really is about.

cleverca22
Posts: 776
Joined: Sat Aug 18, 2012 2:33 pm

Re: Raspberry Pi 4 usb boot?

Sat Mar 28, 2020 6:56 pm

jdb wrote:
Fri Mar 27, 2020 6:18 pm
lingon wrote:
Fri Mar 27, 2020 8:50 am
According to the firmware changelog there seems to be change for the so far unannounced Compute Module 4 regarding USB-booting:
firmware: USB device boot for CM4
https://github.com/raspberrypi/firmware ... 52f27ed745

So getting USB-boot for the regular Raspberry Pi 4 will need some more patience.
That's for booting over USB2.0 OTG when attached to a host, not mass-storage boot. You could substitute CM4 for RPI4 in that commit message, the meaning would be the same.
ah, nice!
ive experimented with device boot on the rpi4 a bit, but without good dwc2 docs, its virtually impossible to load the next stage, so i havent really done much beyond confirm it can boot to a shell, and is limited to 128kb of ram via L2 cache

it sounds like there is now official support for getting the old mass-storage emulation on the rpi4, to expose the eMMC/SD over usb?

pepeEL
Posts: 85
Joined: Thu Feb 26, 2015 11:23 am

Re: Raspberry Pi 4 usb boot?

Sun Mar 29, 2020 6:14 pm

Is any news about implement USB Boot for rpi4 ? When ?

Return to “General discussion”