Closed UtkarshVerma closed 1 year ago
And what happens if you don't specify -d .
?
To answer my own question, I think it only sends the embedded boot files, including the MSD version of start.elf.
rpiboot is intended to support booting of arbitrary Pis. Believing that it is better to fail early rather than wait until a device has been detected, it checks upfront for the presence of both bootcode.bin
and bootcode4.bin
. If you know that you don't need one or both of them then they can (I think, without testing) just be empty files.
One other question I have is regarding the
config.txt
. To get USB boot to work, I had to have two copies ofconfig.txt
. One inboot.img
and one in my directory. Is this normal or did I do it incorrectly?
I can't give you a definitive answer on this, but I can see why you might need both. config.txt is used at multiple stages of booting - from bootcode when choosing a start.elf file, from start.elf when choosing a kernel, and for all the Device Tree processing, Under normal circumstances these multiple uses will all be from the same source (e.g. the SD card), but USB booting a boot.img is different.
First, the downloaded bootcode reads config.txt from somewhere so it knows what to do. It can't be boot.img
because it doesn't know that it is needed, so it has to be your directory. There it finds boot_ramdisk=1
, and requests boot.img
.
The start file in boot.img
then requests config.txt
, and because it has a ramdisk loaded it gets it from there.
It makes sense if you think about - the different stages of booting get different information from config.txt, and there's no reason why it should all come from the same file, even though it normally does. The initial config.txt
needs to do little more than set boot_ramdisk=1
, so you could cut it right down to help you understand how it works.
Thanks for the explanation. Creating empty bootcode.bin
works for me, and since this is the intended behaviour, I'll close the issue.
Describe the bug
I'm flashing a boot ramdisk to my Raspberry Pi 4 over USB. I just noticed that
rpiboot
always sends the embeddedbootcode4.bin
to my device, which means that I don't need a bootcode file anyway.But if I don't have the bootcode in my directory,
rpiboot
complains about it not being there.Steps to reproduce the behaviour
config.txt
(boot_ramdisk=1),boot.img
.rpiboot -d . -l
Device(s)
Other
Compute Module IO board.
No response
RPIBOOT logs
No response
Kernel logs
No response
Device UART logs
No response