Skip to content

canonical/boot-fw-snap-mtk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boot Fimware Snap for the MediaTek Genio board

This repository contains the boot firmware snap for the MediaTek Genio board. This snap contains all boot firmware required for the MediaTek Genio board.

Naming Convention

The name of boot firmware snaps must follow rules below.

  1. The snap name can't be longer than 40 characters

  2. Snap name: boot-fw-{BOARD-VENDOR}-{BOARD-NAME}-{BOARD-VER}

    Examples:
    boot-fw-mtk-g1200evk-p1v2
    boot-fw-mtk-g1200evkufs-p1v2
    boot-fw-mtk-g700evk-p1v3
    boot-fw-mtk-g350evk-p1v3

    If your board name or board version contains dash (-), please remove it.
    Example:
    Board name: g1200-evk-ufs
    Board version: p1-v2
    Snap name: boot-fw-mtk-g1200evkufs-p1v2

  3. The SKU Number field of System Information (Type 1) in SMBIOS should contain boot firmware snap name.

    SKU Number: {BOARD-VENDOR}-{BOARD-NAME}-{BOARD-VER} Example:

    $ sudo dmidecode  
    ...  
    Handle 0x0001, DMI type 1, 27 bytes  
    System Information  
            Manufacturer: MediaTek  
            Product Name: Genio 1200 EVK P1V2  
            Version: Not Specified  
            Serial Number: Not Specified  
            UUID: Not Settable  
            Wake-up Type: Reserved  
            SKU Number: mtk-g1200evk-p1v2  
    

    SMBIOS Specifications: https://www.dmtf.org/standards/smbios
    To generate SMBIOS tables in U-Boot, CONFIG_SYSINFO and CONFIG_SYSINFO_SMBIOS options must be enabled. For details, please see https://docs.u-boot.org/en/latest/develop/smbios.html

Capsule on disk update

In order to support capsule on disk update and LVFS in the future, ODMs have to re-generate GUIDs of boot firmware because capsules are GUID based and should be board specific.

Take the MediaTek Genio 1200 board as an example. GUIDs for the following boot firmware defined in include/configs/mt8195.h should be replaced by GUIDs re-generated by ODM.

GENIO_1200_EVK_FIT_IMAGE_GUID
GENIO_1200_EVK_FIP_IMAGE_GUID
GENIO_1200_EVK_BL2_IMAGE_GUID
GENIO_1200_EVK_FW_IMAGE_GUID
GENIO_1200_EVK_ENV_IMAGE_GUID

You can use the online generator to manually convert Instance IDs to GUIDs.

Directory Hierarchy

├── boot-firmware (Pre-built boot firmware)
│   ├── bl2.img
│   ├── bootassets.vfat (Boot logo)
│   ├── fip.bin (bl31.bin, tee.bin and u-boot.bin)
│   ├── firmware.vfat (Device tree)
│   ├── lk.bin (Flash agent)
│   └── u-boot-initial-env
├── copyright  (Copyright files for boot firmware)
│   ├── copyright.arm-trusted-firmware
│   ├── copyright.lk
│   ├── copyright.optee_os
│   └── copyright.u-boot
├── README
├── snap
│   └── snapcraft.yaml (Default build script: All the details the snapcraft command needs to build a snap)
└── snap-build
    └── snapcraft-snap-build.yaml (All the details the snapcraft command needs to build boot firmware)

How To Create Boot Firmware Snap For Your board

  1. Fork this branch.

  2. Replace boot fimware in /boot-firmware with pre-built boot firmware of your board.

  3. Update snap/snapcraft.yaml accordingly.
    Please update fields in snap/snapcraft.yaml: name, version, summary, description, etc

  4. Create an Ubuntu SSO account at https://login.ubuntu.com

  5. Register your boot firmware snap at https://dashboard.snapcraft.io/register-snap/.
    The manual review is required for a snap with prefix "boot-fw". Please contact Canonical account field engineer for snap review and track creation.

  6. Build and upload your firmware snap to store

    # Build boot firmware snap
    $ snapcraft
    
    # Upload boot firmware snap to the public store
    # UBUNTU_LTS_VER: 22, 24, or ...
    $ snapcraft upload boot-fw-${BAORD-VENDOR}-${BOARD-NAME}-${BOARD-VER}_${SNAP-VER}_arm64.snap --release=${UBUNTU_LTS_VER}/candidate
    
    # Release your snap to stable channel after it's verified.
    # Get revision from https://dashboard.snapcraft.io/snaps/${YOUR_SNAP_NAME}
    $ snapcraft release boot-fw-${BAORD-VENDOR}-${BOARD-NAME}-${BOARD-VER} ${SNAP-REVISION} ${UBUNTU_LTS_VER}/stable
    

    For details, please see https://ubuntu.com/tutorials/create-your-first-snap#1-overview

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published