Skip to main content

Custom Firmware for ASVCK

This page explains how to package the default firmware for the ASVCK board. The demonstrated flow can be applied for running other custom firmware as well.

Firmware Package Contents

For the overall information about firmware packaging, see Linux Firmware Packages.

A proper firmware package for a virtual ASVCK board contains the following files:

  • Info.json - for the meta information in JSON format about the firmware version, type, build, unique identifier, and device identifier.
  • kernel - the Linux kernel file.
  • devicetree - hardware components data for the Linux kernel.
  • sdcard - required but not used by the ASVCK.
  • seflash - the partition for the secure element hardware component.
  • efiv - a partition for the EFI runtime’s NVRAM vars.
  • flash - the partition for the flash hardware component.
  • loaderfile - the boot ROM.

Create the Package

The first step is to compile Arm's ASVCK Hogun Yocto image.

Next, assemble each of the firmware package contents.

  • For Info.json, flash, and loaderfile, use the files included in the AVH source image. You can download this firmware package on the device creation page.

  • For kernel, use the build file build/tmp/deploy/images/corstone1000-hogun/Image-initramfs-corstone1000-hogun.bin.

  • For devicetree, use the build file build/tmp/work/corstone1000_hogun-poky-linux-musl/u-boot/1_2021.07-r0/build/corstone1000_defconfig/arch/arm/dts/corstone1000-hogun.dtb.

    You will need to apply the following patch:

    --- corstone1000-hogun.dts  2024-01-19 14:56:23
    +++ corstone1000-hogun.dts.patched 2024-01-19 14:56:08
    @@ -208,12 +208,12 @@
    reg = <0xc0000000 0x4100000>;
    };

    - frame_buffer@0x80000000 {
    + frame_buffer@0xd0000000 {
    compatible = "shared-dma-pool";
    no-map;
    #address-cells = <0x01>;
    #size-cells = <0x01>;
    - reg = <0x80000000 0xf000000>;
    + reg = <0xd0000000 0xf000000>;
    phandle = <0x0c>;
    };

    You can accomplish this with:

    dtc -Idtb -Odts < corstone1000-hogun.dtb > corstone1000-hogun.dts
    patch -p1 < framebuffer.patch
    dtc -Idts -Odtb < corstone1000-hogun.dts > corstone1000-hogun.dtb
  • For sdcard, use a file of any size filled with 0s. Create it with the command dd if=/dev/zero bs=4096 count=1 > sdcard. (The sdcard isn't used by the ASVCK.)

  • For seflash, use an 8 MB file filled with 1s. Create it with the command dd if=/dev/zero bs=$((0x100000)) count=8 | tr '\0' '\377' > seflash.

  • For efiv, use a 64 kB file filled with 0s. Create it with the command dd if=/dev/zero bs=$((0x400)) count=64 > efiv

Run the Package

Follow the steps Upload Firmware in Web UI to upload and run your custom firmware package.