Current section

Files

Jump to
nerves_system_kd240 fwup_include fwup-common.conf
Raw

fwup_include/fwup-common.conf

#
# Firmware metadata
#
# All of these can be overriden using environment variables of the same name.
#
# Run 'fwup -m' to query values in a .fw file.
# Use 'fw_printenv' to query values on the target.
#
# These are used by Nerves libraries to introspect.
define(NERVES_FW_PRODUCT, "Nerves Firmware")
define(NERVES_FW_DESCRIPTION, "")
define(NERVES_FW_VERSION, "${NERVES_SDK_VERSION}")
define(NERVES_FW_PLATFORM, "kd240")
define(NERVES_FW_ARCHITECTURE, "aarch64")
define(NERVES_FW_AUTHOR, "ZEAM VM")
define(NERVES_FW_DEVPATH, "/dev/sda")
define(NERVES_FW_APPLICATION_PART0_DEVPATH, "/dev/sda3") # Linux part number is 1-based
define(NERVES_FW_APPLICATION_PART0_FSTYPE, "f2fs")
define(NERVES_FW_APPLICATION_PART0_TARGET, "/root")
define(NERVES_PROVISIONING, "${NERVES_SYSTEM}/images/fwup_include/provisioning.conf")
# Default paths if not specified via the commandline
define(ROOTFS, "${NERVES_SYSTEM}/images/rootfs.squashfs")
# This configuration file will create an image that has an MBR and the
# following 3 partitions:
#
# +-----------------------------+
# | MBR |
# +-----------------------------+
# | Firmware configuration data |
# | (formatted as uboot env) |
# +-----------------------------+
# | p0*: Boot A (FAT32) |
# | boot.scr, kernel image, |
# | *.dtb |
# +-----------------------------+
# | p0*: Boot B (FAT32) |
# +-----------------------------+
# | p1*: Rootfs A (squashfs) |
# +-----------------------------+
# | p1*: Rootfs B (squashfs) |
# +-----------------------------+
# | p2: Application (f2fs) |
# +-----------------------------+
#
# The p0/p1 partition points to whichever of configurations A or B that is
# active.
#
# The image is sized to be less than 2 GB so that it fits on nearly any SDCard
# around. If you have a larger SDCard and need more space, feel free to bump
# the partition sizes below.
define(MBR_PART_START_OFFSET, 1)
define(UBOOT_ENV_OFFSET, ${MBR_PART_START_OFFSET})
define(UBOOT_ENV_COUNT, 16) # 512 * 16 / 1024 = 8 KiB
define-eval(BOOT_A_PART_OFFSET, "${UBOOT_ENV_OFFSET} + ${UBOOT_ENV_COUNT}")
define(BOOT_A_PART_COUNT, 65536) # 512 * 65536 / 1024 / 1024 = 32 MiB
define-eval(BOOT_B_PART_OFFSET, "${BOOT_A_PART_OFFSET} + ${BOOT_A_PART_COUNT}")
define(BOOT_B_PART_COUNT, ${BOOT_A_PART_COUNT})
define-eval(ROOTFS_A_PART_OFFSET, "${BOOT_B_PART_OFFSET} + ${BOOT_B_PART_COUNT}")
define(ROOTFS_A_PART_COUNT, 262144) # 512 * 262144 / 1024 / 1024 = 128 MiB
define-eval(ROOTFS_B_PART_OFFSET, "${ROOTFS_A_PART_OFFSET} + ${ROOTFS_A_PART_COUNT}")
define(ROOTFS_B_PART_COUNT, ${ROOTFS_A_PART_COUNT})
# Application partition. This partition can occupy all of the remaining space.
# Size it to fit the destination.
define-eval(APP_PART_OFFSET, "${ROOTFS_B_PART_OFFSET} + ${ROOTFS_B_PART_COUNT}")
define(APP_PART_COUNT, 1048576) # 512 * 1048576 / 1024 / 1024 = 512 MiB
# Firmware archive metadata
meta-product = ${NERVES_FW_PRODUCT}
meta-description = ${NERVES_FW_DESCRIPTION}
meta-version = ${NERVES_FW_VERSION}
meta-platform = ${NERVES_FW_PLATFORM}
meta-architecture = ${NERVES_FW_ARCHITECTURE}
meta-author = ${NERVES_FW_AUTHOR}
meta-vcs-identifier = ${NERVES_FW_VCS_IDENTIFIER}
meta-misc = ${NERVES_FW_MISC}