The pupose of this is to support U-boot managed FreeBSD bootup by using
only binary images, without any device with a partition table.
This functionality has been ported from sys/powerpc/ofw/ofw_initrd.c
Please find the example U-boot usage below:
setenv kernel_comp_addr_r 0x3000000 setenv kernel_comp_size 0x04000000 setenv fdt_addr_r 0x2000000 dhcp tftp $fdt_addr_r rk3328-rock64.dtb tftp $kernel_addr_r kernel.bin.gz setenv ramdisk_addr_r 0x07000000 tftp $ramdisk_addr_r mfsroot fdt addr $fdt_addr_r fdt chosen $ramdisk_addr_r $filesize booti $kernel_addr_r - $fdt_addr_r
The "fdt chosen" command above embeds ramdisk setting into the actual fdt tree.
The "mfsroot" image is an uncompressed UFS disk image.
FreeBSD boot log should contain the following:
md0: Embedded image 11534336 bytes at 0xffffa0007c42b000 mountroot> ? List of GEOM managed disk devices: ufsid/6416031dd9f2971da ufsid/6416031dd9f2971d md0a md0