User avatar
DougieLawson
Posts: 31214
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: USB boot now working on Pi3

Mon Jun 19, 2017 4:54 pm

What USB device are you trying to boot? Does it have a small primary FAT partition with bootcode.bin (and the other firmware stuff) on it?

Can you try a simple USB stick which has a dd'd copy if Raspbian Jessie 2017-04-10 on it?
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

NoNameHere
Posts: 7
Joined: Mon Jun 19, 2017 10:38 am

Re: USB boot now working on Pi3

Tue Jun 20, 2017 5:17 am

I'm using generic 8Gb USB stick which has 2017-04-10-raspbian-jessie-lite.img written to it using Win32DiskImager. It looks like RPi's usb hub/ethernet chip quite literally doesn't power on (It works flawlessly in Raspbian), leds on both USB stick or Ethernet port never light up. If SDcard is inserted RPi will try to boot from it. I tried leaving only bootcode.bin, start.elf and config.txt (with program_usb_boot_mode=1 in it) on FAT partition, but it still tried to continue booting from SD and complained about missing kernel file. I also noticed that last byte of OTP changed after booting with program_usb_boot_mode=1 for the first time: 66:00000000 -> 66:000000aa (before and after), the boot mode bit appears to be set correctly: 17:3020000a

User avatar
DougieLawson
Posts: 31214
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: USB boot now working on Pi3

Tue Jun 20, 2017 6:00 am

Try using one of these Sandisk Cruzer 32GB sticks http://www.misco.co.uk/product/193953/S ... lash-Drive they are known to work with RPi3Bs.

http://www.argos.co.uk/product/2459422 also stocks them.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

NoNameHere
Posts: 7
Joined: Mon Jun 19, 2017 10:38 am

Re: USB boot now working on Pi3

Tue Jun 20, 2017 7:07 am

Considering that Ethernet boot also shows no signs of working (Cable plugged in, but leds on Ethernet port never light up), i guess my RPi just can't boot from USB/Ethernet.

sarahgad
Posts: 30
Joined: Fri Jan 20, 2017 12:07 pm

Re: USB boot now working on Pi3

Thu Jun 22, 2017 7:48 am

NoNameHere wrote:Considering that Ethernet boot also shows no signs of working (Cable plugged in, but leds on Ethernet port never light up), i guess my RPi just can't boot from USB/Ethernet.
Have you checked it thoroughly?

NoNameHere
Posts: 7
Joined: Mon Jun 19, 2017 10:38 am

Re: USB boot now working on Pi3

Thu Jun 22, 2017 11:30 am

sarahgad wrote:
NoNameHere wrote:Considering that Ethernet boot also shows no signs of working (Cable plugged in, but leds on Ethernet port never light up), i guess my RPi just can't boot from USB/Ethernet.
Have you checked it thoroughly?
I tried adding program_gpio_bootmode=1 to /boot/config.txt and OTP changed correctly, I pulled GPIO 22 to low and checked it with gpio readall. According to boot flow description, GPIO 22 should correspond to SD1 bootmode, and pulling it to low should disable it, yet RPi just boots from an SDcard instead of doing nothing.
I guess at this point problem is somwhere in the BCM2837, or I was doing something wrong all along.

User avatar
DougieLawson
Posts: 31214
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: USB boot now working on Pi3

Fri Jun 23, 2017 7:26 am

Before you start you MUST have a 4.4.50-V7+ or later kernel on your SDCard and on your bootable USB device. If not then get that with sudo apt-get update && sudo apt-get -y dist-upgrade.

Power down, pull the USB device. Insert your bootable (4.4.50+ or later) SDCard.

Run echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt from a command line or LXTerminal window.

Reboot from the SDCard.

Pull the SDCard, plug in the bootable USB device.

For regular USB booting you need to set the OTP once with that boot from an SDCard with "program_usb_boot_mode".
You won't need to pull any GPIOs, that's only to change the boot order once the OTP bit is set.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

NoNameHere
Posts: 7
Joined: Mon Jun 19, 2017 10:38 am

Re: USB boot now working on Pi3

Fri Jun 23, 2017 12:27 pm

I have alreay set the program_gpio_bootmode

Code: Select all

pi@raspberrypi:~ $ vcgencmd otp_dump | grep 17
17:3030000a
So both program_usb_boot_mode=1 and program_gpio_bootmode=1 did what they should.
GPIOs doesn't seem to affect anything, I tried pulling both GPIO 22 and GPIO 23 to low (Corresponding to SD1 and SD2 bootmodes, https://www.raspberrypi.org/documentati ... ootflow.md) but RPi ignores it and boots from SD, also no results with SDcard ejected and GPIO 26 pulled to high: USB ports just never power on. It seems that my RPi completely ignores bits in OTP memory or I have BCM2837 with old bootrom (if such ever existed).
And yes, everything was performed on a fully updated installation of Raspbian.

User avatar
DougieLawson
Posts: 31214
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: USB boot now working on Pi3

Fri Jun 23, 2017 1:53 pm

Pull the SDCard out (or erase the stuff in the FAT /boot partition) and it will boot from USB no GPIO pulling needed.

If you're trying to have a bootable SDCard inserted then you need to pull GPIO 22 & 23 LOW (connected to a GND pin) to prevent it trying to read any SDCards.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

NoNameHere
Posts: 7
Joined: Mon Jun 19, 2017 10:38 am

Re: USB boot now working on Pi3

Fri Jun 23, 2017 3:02 pm

DougieLawson wrote:...pull GPIO 22 & 23 LOW (connected to a GND pin) to prevent it trying to read any SDCards.
I did exactly that, gpio readall confirmed that both GPIO 22 and 23 are at low (22 is at high by default). Yet RPi ignores that and boots from SDcard. If SDcard is not inserted, RPi just never powers on USB (No 5V power at ports).

User avatar
DougieLawson
Posts: 31214
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: USB boot now working on Pi3

Fri Jun 23, 2017 3:18 pm

What happens if you connect GPIO 22 & 23 to 3V3 (pin#1 or pin#17 with a 10K current limiting resistor)?

What's on your USB device? Does it have a straight dd'd (or Etcher'ed) copy of "Midsummer Raspbian" 2017-06-61 2017-06-21?

Edit: fixed the calendary anomaly and time warp.
Last edited by DougieLawson on Fri Jun 23, 2017 4:54 pm, edited 1 time in total.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

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

Re: USB boot now working on Pi3

Fri Jun 23, 2017 3:55 pm

DougieLawson wrote:"Midsummer Raspbian" 2017-06-61?
When is June 61st? July 30th?

NoNameHere
Posts: 7
Joined: Mon Jun 19, 2017 10:38 am

Re: USB boot now working on Pi3

Fri Jun 23, 2017 4:52 pm

DougieLawson wrote:What happens if you connect GPIO 22 & 23 to 3V3 (pin#1 or pin#17 with a 10K current limiting resistor)?
Tried that, but it didn't visibly affect anything, gpio readall confirms that both pins are high. If SDcard is inserted RPi boots from it, otherwise RPi dosn't do anything, USB ports never power on.

Flash drive has a copy of 2017-04-10 Raspbian Lite, written using Win32DiskImager (dd pretty much).

User avatar
DougieLawson
Posts: 31214
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: USB boot now working on Pi3

Fri Jun 23, 2017 4:55 pm

rpdom wrote:
DougieLawson wrote:"Midsummer Raspbian" 2017-06-61?
When is June 61st? July 30th?
I blame it on visiting The Doctor Who Experience in Cardiff on Thursday.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

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

Re: USB boot now working on Pi3

Fri Jun 23, 2017 5:00 pm

DougieLawson wrote:I blame it on visiting The Doctor Who Experience in Cardiff on Thursday.
Lucky you! There's not long left for that place (unless you have a TARDIS and can visit it earlier). We're hoping to be able to get there before it closes.

User avatar
DougieLawson
Posts: 31214
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: USB boot now working on Pi3

Fri Jun 23, 2017 5:04 pm

rpdom wrote:
DougieLawson wrote:I blame it on visiting The Doctor Who Experience in Cardiff on Thursday.
Lucky you! There's not long left for that place (unless you have a TARDIS and can visit it earlier). We're hoping to be able to get there before it closes.
We were in Cardiff for Robbie Williams at the Principality Stadium on Wednesday. Dr Who and lunch with a good friend on Thurs. I hope someone can workout how to get a reprieve for the Dr Who exhibit, they've got so much that was rescued from BBC Lime Grove and from BBC Television Centre.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

rexlee
Posts: 5
Joined: Wed Jan 04, 2017 4:52 am
Location: Geelong Australia

Re: USB boot now working on Pi3

Thu Jun 29, 2017 9:46 am

Hi all,
I started to set up my PI3B for USB booting today.
I used
echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt
to add the required line to config.txt OK
I then rebooted and following the advice I used
$ vcgencmd otp_dump | grep 17:
to check to see if the config has changed as it should. However, it reports back
17:1020000a
instead of the
17:3020000a
which is what we require.
What do I do next before proceeding.
If this problem has occurred before, I apologize, but have not been able to find any reference to it.

rexlee in Oz


Edit. NOW SOLVED
I had a Raspbian distribution which came with openPlotter. I reformatted another SD card(which had been corrupted) and installed the latest Raspbian and I got the USB boot set OK this time.

lorccan
Posts: 5
Joined: Thu Jun 29, 2017 2:41 pm

Re: USB boot now working on Pi3

Thu Jun 29, 2017 2:58 pm

I am stuck with getting a Pi3 to boot off any USB device - I have tried a SanDisk thumb drive and a USB HDD, but neither work.

This is what I've tried:
  • imaged SD with 2017-06-21-raspbian-jessie.img
    mounted SD and touched ssh at the root of boot partition

    booted Pi of the SD and ssh'd in (over ethernet)

    did:

    Code: Select all

    echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt
    rebooted Pi

    checked:

    Code: Select all

    vcgencmd top_dump | grep 17:
    - which returns 17:3020000a as expected

    imaged thumb drive | USB HDD with 2017-06-21-raspbian-jessie.img

    mounted and touched ssh at the root of boot partition
However, when I try booting the Pi with either USB device plugged-in and the SD card removed I see the usual red LED and a little activity on the ethernet port, but no flashing green/yellow LED.

Am I missing something? I'm finding this very frustrating ;)

lorccan
Posts: 5
Joined: Thu Jun 29, 2017 2:41 pm

Re: USB boot now working on Pi3

Fri Jun 30, 2017 6:41 pm

I discovered what I was missing - needed to add the program_usb_boot_mode=1 to the end of /boot/config.txt on the USB drive as well

User avatar
DougieLawson
Posts: 31214
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: USB boot now working on Pi3

Fri Jun 30, 2017 8:40 pm

lorccan wrote:I discovered what I was missing - needed to add the program_usb_boot_mode=1 to the end of /boot/config.txt on the USB drive as well
That's not true. You need it on the SDCard /boot/config.txt for the last boot you do from SDCard before you attempt to boot from USB. I have three raspberries that boot from USB and do not have program_usb_boot_mode in any config.txt.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

lorccan
Posts: 5
Joined: Thu Jun 29, 2017 2:41 pm

Re: USB boot now working on Pi3

Sat Jul 01, 2017 10:58 am

I agree that it's not listed in the instructions, but it does seem to have solved the problem for me. I can now reliably boot from any USB device that has this mod.

Alternatively, can you see anything amiss with the steps that I listed?

User avatar
DougieLawson
Posts: 31214
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: USB boot now working on Pi3

Sat Jul 01, 2017 1:36 pm

Take it out see if it still works. The instructions at
https://www.raspberrypi.org/documentati ... des/msd.md are all you need to do. Nothing more, nothing less.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

lorccan
Posts: 5
Joined: Thu Jun 29, 2017 2:41 pm

Re: USB boot now working on Pi3

Sat Jul 01, 2017 1:48 pm

Just tried. It does still boot off the USB drive without the entry.

Still doesn't explain why (on 2 different Pi3 and 3 different USB devices) it would not work before.

Do you see any variance between what I posted as my steps and the instructions you referred to (which are the ones I followed)?

User avatar
DougieLawson
Posts: 31214
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: USB boot now working on Pi3

Sat Jul 01, 2017 5:53 pm

lorccan wrote: Do you see any variance between what I posted as my steps and the instructions you referred to (which are the ones I followed)?
You've not explained how you copied 2017-06-21 Raspbian to your HDD. It should be a complete dd from if=/dev/mmcblk0p1 to of=/dev/sda nothing special, no mucking about.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

lorccan
Posts: 5
Joined: Thu Jun 29, 2017 2:41 pm

Re: USB boot now working on Pi3

Sun Jul 02, 2017 10:34 am

I used dd:

Code: Select all

dd bs=4m if=/<path>/2017-06-21-raspbian-jessie.img of=/dev/disk7

Return to “General discussion”

Who is online

Users browsing this forum: Alligator, Bing [Bot], Dflex, Heater, jamesh, Kimchi, Silverlock and 72 guests