ulde
Posts: 6
Joined: Thu Mar 21, 2013 8:14 am

CM3 and rpiboot

Wed Jan 18, 2017 3:41 pm

Is anybody having problems with rpiboot running on Raspbian?
I installed rpiboot on Raspbian Jessie Lite 2017-01-11, but can't make it work with two CM3 modules.

This is what I get:
Waiting for BCM283x ...
Initialised device correctly
Found serial number 0
Found serial = 0: writing file ./usbbootcode.bin
Successful read 4 bytes
Waiting for BCM283x ...

The same two modules work just fine with rpiboot on Windows.

The installation steps are:
sudo apt-get install libusb-1.0-0-dev
git clone --depth=1 https://github.com/raspberrypi/usbboot.git
cd usbboot/
make
sudo make install
sudo rpiboot


Thanks

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: CM3 and rpiboot

Wed Jan 18, 2017 4:22 pm

No such issues for me putting it in mass storage mode with rpiboot from another Pi (Zero) running Raspbian.

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

Re: CM3 and rpiboot

Wed Jan 18, 2017 6:08 pm

The first time I tried to flash a CM1 I couldn't get it to work using a Pi. Set it aside to work on other things and came back to that effort some months later. In the mean time, Raspbian had been upgraded from Wheezy to Jessie. The second time around, it worked flawlessly. I doubt that is any help to you, though.

That experience is part of why I'm looking forward to doing some things with the CM3L.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1659
Joined: Sat Sep 10, 2011 11:43 am

Re: CM3 and rpiboot

Thu Jan 19, 2017 3:09 pm

Going to push an update to rpiboot soon which should fix this kind of stuff!
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

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

Re: CM3 and rpiboot

Fri Jan 20, 2017 12:58 am

gsh wrote:Going to push an update to rpiboot soon which should fix this kind of stuff!
Yay! At the rate things are going, that will probably be out before I have need of it. (I'm hoping the same is true of boot-over-USB.)

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1659
Joined: Sat Sep 10, 2011 11:43 am

Re: CM3 and rpiboot

Fri Jan 20, 2017 11:46 am

OK,

I've now updated rpiboot to a better version (in every way!)

Just follow the usual instructions to build and convert the CM3 / CM / Pi Zero / A+ into a mass storage device...

Code: Select all

git clone https://github.com/raspberrypi/usbboot
sudo apt-get install libusb-1.0-0-dev
make
./rpiboot
More information ....

Rather than supplying a usbbootcode.bin (which was specific to USB device booting) I've now integrated this functionality into the standard bootcode.bin you'd get from the firmware in github (or in the /boot directory on a Raspbian build). So you can now boot a standard firmware build over USB device.

Basically rpiboot now has a directory that you point it at and it'll serve those files over the USB device connection to the standard firmware running on the Pi (bootcode.bin and start.elf). So if you run rpiboot on a Pi and point rpiboot at the /boot directory it'll serve those files...

Note, For the moment you'll need to update your Raspbian server to the next branch to get this working right now

Code: Select all

BRANCH=next sudo rpi-update
But if you do that on a standard Pi, then build and run the latest rpiboot

Code: Select all

git clone https://github.com/raspberrypi/usbboot
sudo apt-get install libusb-1.0-0-dev
make
./rpiboot -d /boot
This will actually serve the files in the /boot directory (including the config.txt, cmdline.txt, kernel, dtbs and everything) from that directory...

This is really useful for Pi Zero and A+ as well, but it's awesome for booting compute modules and running a bunch of test code, just build a buildroot configuration including an initramfs with your test / configuration code and boot it... Five seconds to start programming the Compute module!

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

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

Re: CM3 and rpiboot

Fri Jan 20, 2017 6:52 pm

gsh wrote:OK,

I've now updated rpiboot to a better version (in every way!)
This sounds great :)
gsh wrote: This will actually serve the files in the /boot directory (including the config.txt, cmdline.txt, kernel, dtbs and everything) from that directory...

This is really useful for Pi Zero and A+ as well, but it's awesome for booting compute modules and running a bunch of test code, just build a buildroot configuration including an initramfs with your test / configuration code and boot it... Five seconds to start programming the Compute module!

Gordon
I've given it a quick try from a Pi3 running the kernel from BRANCH=next (4.4.43-v7+ #948), pointing it to the /boot/ directory and tried to boot both a Pi Zero and CM3L (in a CMIO3).

I expected to see the kernel starting and failing to find the root filesystem on the serial (I have "dtparam=uart0=on" in config.txt for the CM3L) but all I see is the ACT light turning off/on 4 times then solid on for ~3 seconds and repeating (same thing on both Zero and CM3L).

Is this how it should work or have I got something wrong?

Thanks,
Chris.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1659
Joined: Sat Sep 10, 2011 11:43 am

Re: CM3 and rpiboot

Fri Jan 20, 2017 6:54 pm

What do you get on the stdout? Does it read bootcode.bin start.elf, kernel.img etc?

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

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

Re: CM3 and rpiboot

Fri Jan 20, 2017 8:15 pm

gsh wrote:What do you get on the stdout? Does it read bootcode.bin start.elf, kernel.img etc?

Gordon
It looks like it's only sending bootcode.bin (running as root) to the CM3L.

Code: Select all

./rpiboot -v -d /boot/
Waiting for BCM2835/6/7
Found device 1 idVendor=0x0403 idProduct=0x6015
Found device 2 idVendor=0x0a5c idProduct=0x2764
Device located successfully
Initialised device correctly
Found serial number 0
Sending bootcode.bin
libusb_bulk_transfer returned 0
Writing 50832 bytes
libusb_bulk_transfer returned 0
Successful read 4 bytes
And to the Pi Zero I get Failed 0x0 (I didn't spot it earlier as it doesn't have a newline after the text).

Code: Select all

# ./rpiboot -v -d /boot/
Waiting for BCM2835/6/7
Found device 1 idVendor=0x0403 idProduct=0x6015
Found device 2 idVendor=0x0a5c idProduct=0x2763
Device located successfully
Initialised device correctly
Found serial number 0
Sending bootcode.bin
libusb_bulk_transfer returned 0
Writing 50832 bytes
libusb_bulk_transfer returned 0
Failed : 0x0
Chris.

EricTPG
Posts: 1
Joined: Fri Jan 20, 2017 10:05 pm

Re: CM3 and rpiboot

Fri Jan 20, 2017 10:15 pm

I had a weird user experience related to CM3 and rpiboot:

First attempt:
desktop:~/git/usbboot$ ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2 /dev/sda5 /dev/sda6
desktop:~/git/usbboot$ sudo ./rpiboot
Waiting for BCM2835/6/7
Sending bootcode.bin
Failed to read correct length, returned 64
Second (and multiple later) attempts:
desktop:~/git/usbboot$ sudo ./rpiboot
Waiting for BCM2835/6/7
Sending bootcode.bin
Failed to read correct length, returned 0

I then removed the HDMI cable that I had already plugged in (didn't see that one coming, did you?):
desktop:~/git/usbboot$ sudo ./rpiboot -v
Waiting for BCM2835/6/7
Found device 1 idVendor=0x1d6b idProduct=0x0003
Found device 2 idVendor=0x8087 idProduct=0x0a2b
Found device 3 idVendor=0x04f2 idProduct=0x0976
Found device 4 idVendor=0x03f0 idProduct=0xd407
Found device 5 idVendor=0x0a5c idProduct=0x2764
Device located successfully
Initialised device correctly
Found serial number 0
Sending bootcode.bin
libusb_bulk_transfer returned 0
Writing 50900 bytes
libusb_bulk_transfer returned 0
Successful read 4 bytes

Hooray! Let's check /dev/sd*:
desktop:~/git/usbboot$ ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2 /dev/sda5 /dev/sda6

Nope. Try again?:
desktop:~/git/usbboot$ sudo ./rpiboot
Waiting for BCM2835/6/7
Second stage boot server
File read: start.elfdesktop:~/git/usbboot$ ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2 /dev/sda5 /dev/sda6 /dev/sdb

Well, at least we made it this far...

The docs at:
https://www.raspberrypi.org/documentati ... lashing.md

Really need to be updated to reflect the new location of the rpiboot source. And that it seems to need to be run twice?

I apologize if this is thread hijacking, but this seemed mostly related.

Thanks,
Eric

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1659
Joined: Sat Sep 10, 2011 11:43 am

Re: CM3 and rpiboot

Sat Jan 21, 2017 7:04 am

TLDR

Add the -l option, I'll fix it on Monday


So the problem here is that the rpiboot application needs to go through it's inner loop twice, once to send bootcode.bin and a second time to become the file server for the firmware. Unfortunately without the -l command line option it'll just drop out the loop the first time...

As for the HDMI monitor I can only assume it's a problem with your power supply in some way. It's not something that happens on my desk!
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

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

Re: CM3 and rpiboot

Sat Jan 21, 2017 8:09 am

Docs will be updated Monday, there are some other things that need fixing too.
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.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1659
Joined: Sat Sep 10, 2011 11:43 am

Re: CM3 and rpiboot

Sat Jan 21, 2017 9:20 am

Actually it's already been fixed, thanks to our awesome community!

Just do:

git pull
make
sudo ./rpiboot

Hopefully this should now work...

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

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

Re: CM3 and rpiboot

Mon Jan 23, 2017 2:06 pm

Following on from my earlier update re issues trying to boot (now trying with the updated usbboot and "./rpiboot -d /boot/ -l -v") I noticed after sending bootcode.bin the USB device (CM3/Zero) disconnects but it never reconnects with serial=1 so I assume this is why it isn't sending the rest of the files required to boot :/.

CM3L

Code: Select all

Jan 23 12:52:17 controller kernel: [  644.929896] usb 1-1.2: new high-speed USB device number 5 using dwc_otg
Jan 23 12:52:17 controller kernel: [  645.030407] usb 1-1.2: config index 0 descriptor too short (expected 55, got 32)
Jan 23 12:52:17 controller kernel: [  645.030893] usb 1-1.2: New USB device found, idVendor=0a5c, idProduct=2764
Jan 23 12:52:17 controller kernel: [  645.030914] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 23 12:52:17 controller kernel: [  645.030931] usb 1-1.2: Product: BCM2710 Boot
Jan 23 12:52:17 controller kernel: [  645.030947] usb 1-1.2: Manufacturer: Broadcom
Jan 23 12:52:21 controller kernel: [  649.184120] usb 1-1.2: USB disconnect, device number 5
Zero

Code: Select all

Jan 23 12:59:24 controller kernel: [ 1072.173161] usb 1-1.2: new full-speed USB device number 6 using dwc_otg
Jan 23 12:59:25 controller kernel: [ 1072.282958] usb 1-1.2: New USB device found, idVendor=0a5c, idProduct=2763
Jan 23 12:59:25 controller kernel: [ 1072.282988] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 23 12:59:25 controller kernel: [ 1072.283005] usb 1-1.2: Product: BCM2708 Boot
Jan 23 12:59:25 controller kernel: [ 1072.283021] usb 1-1.2: Manufacturer: Broadcom
Jan 23 12:59:40 controller kernel: [ 1088.026605] usb 1-1.2: USB disconnect, device number 6
Chris.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1659
Joined: Sat Sep 10, 2011 11:43 am

Re: CM3 and rpiboot

Mon Jan 23, 2017 2:46 pm

Chris,

I've got a change for something I've seen which is similar, basically the first stage works and downloads bootcode.bin but the second stage then fails to start up the USB correctly. email me at gordon@raspberrypi.org and I'll send you a new version of bootcode.bin to see if that fixes it for you...

Thanks

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

AndyPi
Posts: 83
Joined: Wed Feb 22, 2012 10:24 pm
Location: Gloucestershire,UK

Re: CM3 and rpiboot

Tue Jan 24, 2017 2:20 pm

Hi,
I am trying with zero too and get a long wait. Did your revised bootcode fix ?
andrew@andrew-desktop:~$ sudo ./usbboot/rpiboot -d zero/boot -v
Waiting for BCM2835/6/7
Found device 1 idVendor=0x0a5c idProduct=0x2763
Device located successfully
Initialised device correctly
Found serial number 0
Sending bootcode.bin
libusb_bulk_transfer returned 0
Writing 17932 bytes
libusb_bulk_transfer returned 0
Successful read 4 bytes
Waiting for BCM2835/6/7
Andy

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1659
Joined: Sat Sep 10, 2011 11:43 am

Re: CM3 and rpiboot

Wed Jan 25, 2017 9:23 am

Please email me at gordon@raspberrypi.org and I'll send you the modified version to compare....
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

themeerd
Posts: 12
Joined: Tue Apr 26, 2016 11:54 am

Re: CM3 and rpiboot

Fri May 26, 2017 6:58 am

I have started to experience similar issues with CM3. J3 and J4 is connected properly. The host OS is ubuntu 14.04 and I am using this command line: sudo ./rpiboot -v -l

Here is the output:

Code: Select all

Found device 1 idVendor=0x0a5c idProduct=0x2764
Device located successfully
Initialised device correctly
Found serial number 0
Sending bootcode.bin

libusb_bulk_transfer returned 0
Writing 50408 bytes
libusb_bulk_transfer returned 0
Successful read 4 bytes 
Waiting for BCM2835/6/7
Found device 1 idVendor=0x8087 idProduct=0x8001
Found device 2 idVendor=0x1d6b idProduct=0x0002
Found device 3 idVendor=0x8087 idProduct=0x8009
Found device 4 idVendor=0x1d6b idProduct=0x0002
Found device 5 idVendor=0x1d6b idProduct=0x0003
Found device 6 idVendor=0x093a idProduct=0x2510
Found device 7 idVendor=0x049c idProduct=0x0002
Found device 8 idVendor=0x04a5 idProduct=0x0001
Found device 9 idVendor=0x04a5 idProduct=0x9213
Found device 10 idVendor=0x1d6b idProduct=0x0002
Found device 1 idVendor=0x0a5c idProduct=0x2764
Device located successfully
Initialised device correctly
Found serial number 1
Second stage boot server
Received message GetFileSize: autoboot.txt
Cannot open file autoboot.txt
Received message GetFileSize: config.txt
Cannot open file config.txt
Received message GetFileSize: recovery.elf
Cannot open file recovery.elf
Received message GetFileSize: start.elf
File size = 433448 bytes
Received message ReadFile: start.elf
File read: start.elf
libusb_bulk_transfer returned 0
Received message GetFileSize: fixup.dat
Cannot open file fixup.dat
CM3 works when I plug it to my custom baseboard. May the CMIO be broken somehow?

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1659
Joined: Sat Sep 10, 2011 11:43 am

Re: CM3 and rpiboot

Sat May 27, 2017 5:47 am

I'd suggest everyone try again, I've checked in a new version of rpiboot which has a bunch of fixes in the code...

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

Will_H
Posts: 13
Joined: Wed Mar 01, 2017 2:29 am
Location: Dallas, Texas, USA

Re: CM3 and rpiboot

Thu Jun 01, 2017 12:55 am

I've had a couple of odd episodes when trying to use rpiboot on Windows. For some reason it was failing on multiple Windows machines and on multiple CMs (1 and 3) - no new drive letter would ever appear. I looked at the output of the app and got the following:

Case #1 (CM3):
Waiting for BCM283x ...
Initialised device correctly
Found serial number 0
Found serial = 0: writing file ./usbbootcode.bin
Successful read 4 bytes
Waiting for BCM283x ...
Initialised device correctly
Found serial number 1
Found serial = 1: writing file ./msd.elf
Failed control transfer
Failed to write correct length, returned -9



Case #2 (CM1):
Waiting for BCM283x ...
Initialised device correctly
Found serial number 0
Found serial = 0: writing file ./usbbootcode.bin <-- hangs at this point, so disconnected USB
Failed control transfer
Failed to write correct length, returned -9

I found that I could take the same cables, CM and interface, connect to a RPi3 and run the Linux version or rpiboot just fine. I could then then transfer the USB cable back over to the Windows machines and it would then see the new USB drive.

From that point I was able to successfully flash the CMs. I have no idea why they suddenly failed on the Windows rpiboot as it had been working fine for weeks. I have heard of others having similar problems - one turned out to be the user was using a USB extender cable between the PC and interface board.

I think it would be useful if the rpiboot app on Windows didn't close and displayed some kind of error message in cases like the above, otherwise people are left thinking that it succeeded when in fact it didn't.
Will Hollingworth
Director - Software Development and Innovation
NEC Display Solutions, Inc.

themeerd
Posts: 12
Joined: Tue Apr 26, 2016 11:54 am

Re: CM3 and rpiboot

Fri Jun 02, 2017 7:53 pm

gsh wrote:I'd suggest everyone try again, I've checked in a new version of rpiboot which has a bunch of fixes in the code...

Gordon
Not worked for me. Here is the output after the update:

Code: Select all

sudo ./rpiboot -v -l
Waiting for BCM2835/6/7
Device located successfully
Initialised device correctly
Found serial number 0
Sending bootcode.bin
libusb_bulk_transfer returned 0
Writing 50216 bytes
libusb_bulk_transfer returned 0
Successful read 4 bytes 
Waiting for BCM2835/6/7
Device located successfully
Initialised device correctly
Found serial number 1
Second stage boot server
Received message GetFileSize: autoboot.txt
Cannot open file autoboot.txt
Received message GetFileSize: config.txt
Cannot open file config.txt
Received message GetFileSize: recovery.elf
Cannot open file recovery.elf
Received message GetFileSize: start.elf
File size = 433616 bytes
Received message ReadFile: start.elf
File read: start.elf
libusb_bulk_transfer returned 0
Received message GetFileSize: fixup.dat
Cannot open file fixup.dat
Just to ensure, I tried the same command line on two different CM3s. Both of them failed.

themeerd
Posts: 12
Joined: Tue Apr 26, 2016 11:54 am

Re: CM3 and rpiboot

Fri Jun 02, 2017 8:06 pm

One final one: I have tried the sequence written above with a CM1 that has been plugged in CMIOv3. Usbboot reports same messages (Cannot open file fixup.dat) but the device gets mounted and becomes accessible.

themeerd
Posts: 12
Joined: Tue Apr 26, 2016 11:54 am

Re: CM3 and rpiboot

Wed Jun 07, 2017 10:57 am

Any updates?

whited
Posts: 1
Joined: Thu Jul 20, 2017 1:40 pm

Re: CM3 and rpiboot

Thu Jul 20, 2017 4:24 pm

I am unable to install the boot loader on any compute module 3. I have been using the original compute module and have had issues with only one board out of about 50+ that I have used.
I have tried using the Linux bootloader version posed in this forum and the windows version. After running the software the CM3 does not end up with a drive or mount point associated with it. What is the trick to getting the CM3 modules to show up like the original CM does?

Has the windows version posted on https://www.raspberrypi.org/documentati ... lashing.md
been updated with the newest rpiboot code?

wittend
Posts: 12
Joined: Wed May 08, 2013 3:13 pm

Re: CM3 and rpiboot

Fri Aug 11, 2017 4:34 pm

Has the windows version posted on https://www.raspberrypi.org/documentati ... lashing.md
been updated with the newest rpiboot code?
Re: CM3 and rpiboot
I do wish that someone would answer this question. It is not working for me, and I am wasting a lot of time

Return to “Compute Module”