On Wed, Feb 26, 2020 at 8:39 AM Chris Johns <chr...@rtems.org> wrote:
> On 22/2/20 1:45 am, G. S. Niteesh wrote: > > Hi, > > > > This is regarding adding RPi support to the boot image generation tool. > > > > The boot process for Raspberry Pi is very unconventional. The GPU starts > > first, initializes RAM, other hardware, loads the bootloaders and then > starts > > the ARM CPU. > > > > The minimum files that are required to boot an RPi are > > bootcode.bin, startx.elf, fixup.dat, kernel.img, config.txt > > There are also other variants of startx.elf and fixup.dat. > > Please have a look > > at > https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md > > for information on the variants. > > > > From what I have tried on my Rpi3 model b v1.2 the minimum files that are > > required are start_x.elf, fixup_x.dat, bootcode.bin, kernel.img, > config.txt > > But for this to work, we must add start_x=1 to config.txt because by > default > > start.elf is loaded. > > I would have look at how the tool maps to RPi to know if it needs more > work :) > > > > > So, what should be the values for the first and second stages in > rtems-boot.ini > > for Rpi? > > Would this be bootcode.bin? For all models of RPi except RPi4 use bootcode.bin as the first stage. But for RPi4 the bootcode.bin is replaced by boot code in EEPROM. Then the second stage would be start*.elf. And we might have an extra stage depending on whether U-Boot is used or not. Please note that I have mentioned start*.elf. There are variants of start.elf, I have mentioned them below. But I guess start_x.elf could be used as the default firmware since it has everything that a user needs. start.elf: The basic firmware for the GPU start_x.elf: Basic firmware with camera driver and extra video codecs start_db.elf: Debug version of the firmware (but not sure whether start.elf or start_x,elf) start_cd.elf: is a cut-down version with no support hardware blocks like codecs and 3D. And there are variants of start.elf for RPi4 ( start4.elf, start4x.elf, start4db.elf and start4cd.elf) There is also an additional file fixup*.dat which is required for booting. And also it is necessary to make sure that they are matched pairs with start*.elf. This below site has all this mentioned very clearly. https://www.raspberrypi.org/documentation/configuration/boot_folder.md > And also wouldn't it be nice if we could add a files field, which will > copy the > > specified files to the image? This would save a lot of typing in case of > RPi > > Do you have an example? Incase of RPi we have to provide additional files like config.txt and fixup*.dat and maybe in the user like to provide other additional files then it would nice to make the "file" field to support folders instead of repeating the field again and again for every additional file. Thank you, Niteesh. > > Chris >
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel