diff --git a/recipes-bsp/u-boot/u-boot-fw-config-stm32mp/fw_env.config.mmc b/recipes-bsp/u-boot/u-boot-fw-config-stm32mp/fw_env.config.mmc new file mode 100644 index 0000000..6a1575b --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-fw-config-stm32mp/fw_env.config.mmc @@ -0,0 +1,15 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash. +# Futhermore, if the Flash sector size is omitted, this value is assumed to +# be the same as the Environment size, which is valid for NOR and SPI-dataflash +# Device offset must be prefixed with 0x to be parsed as a hexadecimal value. + +# On a block device a negative offset is treated as a backwards offset from the +# end of the device/partition, rather than a forwards offset from the start. + +# Block device example +/dev/disk/by-partlabel/ssbl -0x2000 0x2000 +/dev/disk/by-partlabel/ssbl -0x4000 0x2000 + diff --git a/recipes-bsp/u-boot/u-boot-fw-config-stm32mp/fw_env.config.nand b/recipes-bsp/u-boot/u-boot-fw-config-stm32mp/fw_env.config.nand new file mode 100644 index 0000000..b6da8ff --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-fw-config-stm32mp/fw_env.config.nand @@ -0,0 +1,11 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash. +# Futhermore, if the Flash sector size is omitted, this value is assumed to +# be the same as the Environment size, which is valid for NOR and SPI-dataflash +# Device offset must be prefixed with 0x to be parsed as a hexadecimal value. + +# UBI volume by name +/dev/ubi0:uboot_config 0x0 0x4000 0x40000 +/dev/ubi0:uboot_config_r 0x0 0x4000 0x40000 diff --git a/recipes-bsp/u-boot/u-boot-fw-config-stm32mp/fw_env.config.nor b/recipes-bsp/u-boot/u-boot-fw-config-stm32mp/fw_env.config.nor new file mode 100644 index 0000000..f9f4e6e --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-fw-config-stm32mp/fw_env.config.nor @@ -0,0 +1,12 @@ +# Configuration file for fw_(printenv/setenv) utility. +# Up to two entries are valid, in this case the redundant +# environment sector is assumed present. +# Notice, that the "Number of sectors" is not required on NOR and SPI-dataflash. +# Futhermore, if the Flash sector size is omitted, this value is assumed to +# be the same as the Environment size, which is valid for NOR and SPI-dataflash +# Device offset must be prefixed with 0x to be parsed as a hexadecimal value. + +# NOR example +# MTD device name Device offset Env. size Flash sector size Number of sectors +/dev/mtd4 0x280000 0x2000 0x10000 +/dev/mtd4 0x2C0000 0x2000 0x10000 diff --git a/recipes-bsp/u-boot/u-boot-fw-config-stm32mp_2020.01.bb b/recipes-bsp/u-boot/u-boot-fw-config-stm32mp_2020.01.bb new file mode 100644 index 0000000..8752651 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-fw-config-stm32mp_2020.01.bb @@ -0,0 +1,27 @@ +SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = " \ + file://fw_env.config.mmc \ + file://fw_env.config.nand \ + file://fw_env.config.nor \ +" +DEPENDS += "u-boot-fw-utils" + +# Specific function to manage any trial for source code extraction through +# devtool which can not be supported as we're sharing original source from +# virtual/bootloader provider via STAGING_UBOOT_DIR shared folder +python () { + if bb.data.inherits_class('devtool-source', d): + bb.fatal('The %s recipe does not actually check out own source and thus cannot be supported by devtool.' % d.getVar("BPN")) +} + +do_install () { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/fw_env.config.* ${D}${sysconfdir}/ +} + + +FILES_${PN} += "${sysconfdir}/" +RDEPENDS_${PN} += "u-boot-fw-utils"