Changes between Version 8 and Version 9 of venice/boot


Ignore:
Timestamp:
06/08/2023 06:05:03 PM (13 months ago)
Author:
Tim Harvey
Comment:

updated the FLASH MAP for boot firmware being placed on eMMC boot0 hardware partition and removed SOC specific note regarding compressed disk images

Legend:

Unmodified
Added
Removed
Modified
  • venice/boot

    v8 v9  
    1919== Boot Firmware Image
    2020The firmware image contains all of the components of the 'Boot Firmware':
    21 - MBR partition table
    22 - ATF
    23 - Device Tree Binary
    24  - Note device tree source code (eg GW7200) is located in kernel source code at path: linux-venice/arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx.dtsi
    25  - Link for the source code [https://github.com/Gateworks/linux-venice here]
     21- ARM Trusted Firmware (ATF)
     22- SPL
    2623- U-Boot
     24- U-Boot environment
     25
     26This firmware is typically put on the eMMC boot0 hardware partition to keep it separate from the eMMC user partition used for the OS.
    2727
    2828Venice Boot Firmware Image Map:
    2929 * imx8mm:
    30 ||= start-end                 =||= len =||= item =||= notes =||
    31 || 0x0000000 - 0x0008400 || 33KiB  || MBR Partition Table || only first 512B used ||
    32 || 0x0008400 - 0x0060000 || 350KiB || SPL || Loads and u-boot.itb and transfers control to the ATF ||
    33 || 0x0060000 - 0x0FF0000 || 15MiB  || u-boot.itb || FIT image containing u-boot, ATF, and fdt ||
    34 || 0x0FF0000 - 0x1000000 || 64KB   || U-Boot env || redudant 32KB env ||
    35 || 0x1000000 -           ||        || Disk Partitions || used by the OS ||
     30||= start-end             =||= len   =||= item =||= notes =||
     31|| 0x00000000 - 0x00008400 || 33KiB   || unused ||
     32|| 0x00008400 - 0x00060000 || 351KiB  || SPL (spl.bin) || Loads and u-boot.itb and transfers control to the ATF ||
     33|| 0x00060000 - 0x003F0000 || 3648KiB || U-Boot (u-boot.itb) || FIT image containing u-boot, ATF, and fdt ||
     34|| 0x003F0000 - 0x00400000 || 64KB    || U-Boot env || redundant 32KB env ||
    3635 * imx8mn/imx8mp:
    37 ||= start-end                 =||= len =||= item =||= notes =||
    38 || 0x0000000 - 0x0008400 || 32KiB  || MBR Partition Table || only first 512B used ||
    39 || 0x0008000 - 0x0060000 || 351KiB || SPL || Loads and u-boot.itb and transfers control to the ATF ||
    40 || 0x0060000 - 0x0FF0000 || 15MiB  || u-boot.itb || FIT image containing u-boot, ATF, and fdt ||
    41 || 0x0FF0000 - 0x1000000 || 64KB   || U-Boot env || redudant 32KB env ||
    42 || 0x1000000 -           ||        || Disk Partitions || used by the OS ||
     36||= start-end             =||= len   =||= item =||= notes =||
     37|| 0x00000000 - 0x00058000 || 352KiB  || SPL (spl.bin) || Loads and u-boot.itb and transfers control to the ATF ||
     38|| 0x00058000 - 0x003F0000 || 3680KiB || U-Boot(u-boot.itb) || FIT image containing u-boot, ATF, and fdt ||
     39|| 0x003F0000 - 0x00400000 || 64KB    || U-Boot env || redundant 32KB env ||
     40
     41Note that the size of the SPL and offset/size of U-Boot can vary based on bootloader configuration but the start offset of the SPL is dictated by the SOC BOOTROM per boot device and hardware partition.
     42
     43== Legacy Boot Firmware Image
     44The original Gateworks IMX8MM Boot Firmware (now considered legacy) was installed to the eMMC user hardware partition.
     45
     46Legacy Venice IMX8MM Boot Firmware Image Map:
     47||= start-end             =||= len  =||= item =||= notes =||
     48|| 0x00000000 - 0x00008400 || 33KiB  || MBR Partition Table || only first 512B used ||
     49|| 0x00008400 - 0x00060000 || 351KiB || SPL (spl.bin) || Loads and u-boot.itb and transfers control to the ATF ||
     50|| 0x00060000 - 0x00FF0000 || 15MiB  || U-Boot (u-boot.itb) || FIT image containing u-boot, ATF, and fdt ||
     51|| 0x00FF0000 - 0x01000000 || 64KB   || U-Boot env || redundant 32KB env ||
     52|| 0x01000000 -            ||        || Disk Partitions || used by the OS ||
    4353
    4454
    4555[=#disk-images]
    46 == Building a Bootable Disk Images
    47 Gateworks releases compressed disk images that can be easily flashed using the U-Boot Bootloader. These disk images contain a partition table so they are tailored to the specific device size they are intended for. Additionally they are commonly configured for a small partition size to keep flash programming time at a minimum. This requires resizing the rootfs filesystem in order to take advantage of the remaining flash space.
     56== Installing Compressed Disk OS Images
     57Gateworks releases compressed disk images for various Linux based operating systems that can be easily flashed using the U-Boot Bootloader. These disk images contain a partition table so they are tailored to the specific device size they are intended for. Additionally they are commonly configured for a small partition size to keep flash programming time at a minimum. This requires resizing the rootfs filesystem in order to take advantage of the remaining flash space.
    4858
    49 Once you have a root filesystem directory/tarball and have a kernel Image you can create a compressed disk image that can be installed easily from the bootloader.
    50 
    51 This is process is demonstrated in the [https://github.com/Gateworks/bsp-venice/blob/master/Makefile Venice BSP makefile]
    52 
    53 Once you have a compressed disk image you can install this using the methods described in [wiki:venice#firmware-update venice/firware-update]. For example in the bootloader:
     59You can install a compressed disk image using the methods described in [wiki:venice/firmware#firmware-update venice/firmware-update]. For example in the bootloader:
    5460{{{#!bash
    5561setenv dev 2 # emmc device; use mmc list to see all mmc devs
    5662tftpboot ${loadaddr} firmware.img.gz && gzwrite mmc ${dev} ${loadaddr} ${filesize}
    5763}}}
    58  * always take care to use a compressed disk image that is compatible with the SoC on your board (see [wiki:venice/firmware#serial-ethernet venice/firmware] for details)
     64
     65If you are interested in creating a compressed disk image with a custom root filesystem directory/tarball with a kernel and bootscript you can following along the process used in the in the [https://github.com/Gateworks/bsp-venice/blob/master/Makefile Venice BSP makefile]
    5966
    6067If you created a filesystem that did not stretch to the partition it was installed on (as we create a minimally sized filesystem image to fit within the eMMC device for faster programming) you will want to resize it after booting to Linux. This is a one time operation after flashing a compressed disk image and can be done using the 'growpart_once' script that we install on the Ubuntu Root filesystems found in the script [https://github.com/Gateworks/ubuntu-rootfs/blob/master/ubuntu-rootfs.sh here] (search for growpart_once)