# Anatomy of a Raspberry Pi Boot Image



## balanga (Jul 26, 2017)

According to https://wiki.freebsd.org/FreeBSD/arm/Raspberry Pi

A FreeBSD bootable image for Raspberry Pi has both FAT and UFS partitions containing the following files:


FAT Partition
bootcode.bin - First stage boot
start.elf - Second stage boot
config.txt - configuration for start.elf
rpi.dtb - FDT file loaded via config.txt
uboot.bin - Third stage: U-Boot loader
uEnv.txt - configuration file for U-Boot
ubldr - Fourth stage: FreeBSD bootloader

UFS Partition
/boot/kernel - dynamic kernel
... rest of FreeBSD ...

I'm running FreeBSD 12.0 and my FAT partition contains:-

```
23/12/2016  08:21            17,900 bootcode.bin
23/12/2016  08:21         2,664,088 start.elf
23/12/2016  08:21         3,621,768 start_x.elf
23/12/2016  08:21           567,672 start_cd.elf
23/12/2016  08:21               103 config.txt
23/12/2016  08:21             9,590 rpi2.dtb
23/12/2016  08:21           301,088 u-boot.bin
23/12/2016  08:21           231,800 ubldr.bin
23/12/2016  08:21           283,886 ubldr
23/12/2016  08:21             6,161 fixup.dat
23/12/2016  08:21             9,214 fixup_x.dat
23/12/2016  08:21             2,366 fixup_cd.dat
23/12/2016  08:21               607 README
23/12/2016  08:21             1,447 LICENCE.broadcom
              14 File(s)      7,717,690 bytes
```


There seems to be some discrepancy here. Does anyone know what's going on?

I'm particulary interested in what should be in uEnv.txt which I don't have.


----------



## acheron (Jul 26, 2017)

uEnv.txt is useless.


----------



## balanga (Jul 26, 2017)

Maybe for you... but what is supposed to be in it? It is used by other u-Boot environments such as the one I'm using.


----------



## Phishfry (Jul 26, 2017)

uEnv.txt is no longer being used.
https://lists.freebsd.org/pipermail/freebsd-arm/2017-July/016423.html


----------



## balanga (Jul 26, 2017)

Phishfry said:


> uEnv.txt is no longer being used.
> https://lists.freebsd.org/pipermail/freebsd-arm/2017-July/016423.html



Is there any way to find out what used to be in it? I'm using an ArchLinux version of u-Boot which does use uEnv.txt, so if I can get hold of an old one I can test my system.


----------



## toam (May 16, 2018)

No boot for my freebsdrpi.img on my sdcard, v6 or 7, current, or stable release.
Then, in FIRST, and simply, looks your config.txt (theses few lines for booting are so limited rather than raspbian os) on MSDOSBOOT partition (fat), it's the same configuration than an linux boot on rpi, see theses links for details :

https://elinux.org/RPiconfig
https://www.raspberrypi.org/forums/viewtopic.php?t=83614
https://www.raspberrypi.org/documentation/configuration/config-txt/video.md


----------

