inches
Posts: 16
Joined: Tue May 03, 2016 7:55 pm

Hanging on "File read: start.elf" when flashing boot

Tue May 16, 2017 9:54 pm

I am following the instructions here: https://www.raspberrypi.org/documentati ... lashing.md


and am following the instructions in "BUILDING RPIBOOT ON YOUR HOST SYSTEM (CYGWIN/LINUX)" but as soon as I run sudo ./rpiboot on my host Pi it says "File read: start.elf" the green ACT light on the CMIO3 turns off and nothing seems to happen. I'm trying to flash the emmc on my CM3.

Code: Select all

~/usbboot $ ./rpiboot
Waiting for BCM2835/6/7
Sending bootcode.bin
Succeddful read 4 bytes
Waiting for BCM2835/6/7
Second stage boot server
File read: start.elf
Should I be waiting over 10m or is there something stalled?

[EDIT] I ran ./rpiboot with -v and -l and I got more information.

Code: Select all

...
Received message ReadFile: start.elf
File read: start.elf
libusb_bulk_transfer returned 0
Revieved message GetFileSize: fixup.dat
Cannot open file fixup.dat
[EDIT 2]
Ok, so I can't say definitively what ended up working because I've tried things over and over, but I'm pretty sure it was some combination of not having my raspbian updated properly. I had done all the updates on an existing Pi I had sitting around with an old Jessie pre-Pixel and that didn't work, and then on the latest raspbian-lite which didn't work, but only now after updating that lite install did it.

I ended up using the standard ./rpiboot without defining a boot directory, and I used a wget to dl the raspbian lite image before this

Code: Select all

 sudo dd if=raw_os_image_of_your_choice.img of=/dev/sda bs=4MiB


And it boots now!
Last edited by inches on Wed May 17, 2017 10:30 pm, edited 5 times in total.

inches
Posts: 16
Joined: Tue May 03, 2016 7:55 pm

Re: Hanging on "File read: start.elf" when flashing boot

Wed May 17, 2017 2:21 am

I upgraded my host Pi to the latest raspbian with Pixel and attempted to do the same thing. It is still hanging at "File read: start.elf" and the green ACT light went off on the CMIO, but this time I guess I'll let it run overnight.

[EDIT] Did not work after waiting overnight. An edit in the first post reveals additional issues with fixup.dat.

inches
Posts: 16
Joined: Tue May 03, 2016 7:55 pm

Re: Hanging on "File read: start.elf" when flashing boot

Wed May 17, 2017 4:58 pm

Tried a fresh install of raspbian lite on the host Pi and still no dice. Now I'm attempting to clone https://github.com/raspberrypi/firmware.git on the host Pi in order to take advantage of the -d flag to specify the directory with which to boot the device. I'm hoping there may be some sort of alternative fixup.dat file that get generated when booting with these files instead.

inches
Posts: 16
Joined: Tue May 03, 2016 7:55 pm

Re: Hanging on "File read: start.elf" when flashing boot

Wed May 17, 2017 11:15 pm

See update in post 1. Fresh install of lite + full updates did end up working.

troque
Posts: 2
Joined: Sun Jun 11, 2017 10:35 am
Location: California

Re: Hanging on "File read: start.elf" when flashing boot

Sun Jun 11, 2017 11:16 am

Hi,

I just got a new CM dev kit so I'm still a newbie at the intricacies of the raspberry pi. I was following the same guide you were using (https://www.raspberrypi.org/documentati ... lashing.md) and I was also having the same exact problem on my CM V1 that you originally had where my host machine (I have a bootable USB stick with Ubuntu 16.04.2 that I use with my Macbook Air) stops at "File read: start.elf" and the ACT light turns off when running sudo ./rpiboot. Then I cloned the firmware that was on the link that you provided (i.e., https://github.com/raspberrypi/firmware.git) and now I'm getting this:

Code: Select all

Waiting for BCM2835/6/7
Device located successfully
Initialised device correctly
Found serial number 0
Sending bootcode.bin
libusb_bulk_transfer returned 0
Writing 50268 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 = 2852452 bytes
Received message ReadFile: start.elf
File read: start.elf
libusb_bulk_transfer returned 0
Received message GetFileSize: fixup.dat
File size = 6668 bytes
Received message ReadFile: fixup.dat
File read: fixup.dat
libusb_bulk_transfer returned 0
Received message GetFileSize: recovery.elf
Cannot open file recovery.elf
Received message GetFileSize: config.txt
Cannot open file config.txt
Received message GetFileSize: dt-blob.bin
Cannot open file dt-blob.bin
Received message GetFileSize: recovery.elf
Cannot open file recovery.elf
Received message GetFileSize: config.txt
Cannot open file config.txt
Received message GetFileSize: bootcfg.txt
Cannot open file bootcfg.txt
Received message GetFileSize: cmdline.txt
Cannot open file cmdline.txt
Received message GetFileSize: recovery.img
Cannot open file recovery.img
Received message GetFileSize: kernel.img
File size = 4377360 bytes
Received message GetFileSize: armstub.bin
Cannot open file armstub.bin
Received message GetFileSize: kernel.img
File size = 4377360 bytes
Received message ReadFile: kernel.img
File read: kernel.img
libusb_bulk_transfer returned 0
Received message GetFileSize: bcm2708-rpi-cm.dtb
File size = 14916 bytes
Received message ReadFile: bcm2708-rpi-cm.dtb
File read: bcm2708-rpi-cm.dtb
libusb_bulk_transfer returned 0
Received message GetFileSize: config.txt
Cannot open file config.txt
Received message Done: 

Second stage boot server done
which made me think that it was working, but I didn't see any new devices appearing. Also, the ACT light still turns off once it finishes. When I used lsblk before and after ./rpiboot completes, I keep getting the same devices:

Code: Select all

sdb      8:16   1  59.6G  0 disk /cdrom
├─sdb2   8:18   1   2.4M  0 part 
└─sdb1   8:17   1   1.5G  0 part 
loop0    7:0    0   1.4G  1 loop /rofs
sda      8:0    0   113G  0 disk 
├─sda2   8:2    0 112.2G  0 part 
├─sda3   8:3    0 619.9M  0 part 
└─sda1   8:1    0   200M  0 part
I'm fairly certain that /dev/sda is my Macbook Air and /dev/sdb is the bootable USB stick, but I'm not quite sure why the new device is not there.

troque
Posts: 2
Joined: Sun Jun 11, 2017 10:35 am
Location: California

Re: Hanging on "File read: start.elf" when flashing boot

Sun Jun 11, 2017 11:47 pm

I've figured it out! Even though the original command sudo ./rpiboot would stall at "File read: start.elf" the storage device is still created. I just opened a new terminal window and used dd to put the OS image. In my case, the new device is /dev/sdc.

Code: Select all

[email protected]:~/Desktop/usbboot$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sdb      8:16   1  59.6G  0 disk /cdrom
├─sdb2   8:18   1   2.4M  0 part 
└─sdb1   8:17   1   1.5G  0 part 
loop0    7:0    0   1.4G  1 loop /rofs
sdc      8:32   1   3.7G  0 disk 
├─sdc2   8:34   1   1.2G  0 part /media/ubuntu/f2100b2f-ed84-4647-b5ae-089280112716
└─sdc1   8:33   1    41M  0 part /media/ubuntu/boot
sda      8:0    0   113G  0 disk 
├─sda2   8:2    0 112.2G  0 part 
├─sda3   8:3    0 619.9M  0 part 
└─sda1   8:1    0   200M  0 part 
Minor question for anyone who sees this, is there something I should be worried about because it was stalling at "File read: start.elf", or was it really designed to halt then?

Return to “Compute Module”