u-boot-toradex: build nand padded binary

The machines using raw NAND flash need a binary which prepends u-boot.imx
with 1k byte for easier flashing.
With u-boot-toradex_2019.07 the u-boot-nand.imx target no longer exists.
so build that binary separately in do_configure.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
This commit is contained in:
Max Krummenacher 2020-03-27 22:00:43 +01:00 committed by Otavio Salvador
parent 5aa137ffe8
commit 174762ee25
3 changed files with 16 additions and 2 deletions

View File

@ -21,7 +21,7 @@ PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils"
PREFERRED_RPROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils" PREFERRED_RPROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils"
UBOOT_BINARY = "u-boot-nand.imx" UBOOT_BINARY = "u-boot-nand.imx"
UBOOT_MAKE_TARGET = "u-boot-nand.imx" UBOOT_MAKE_TARGET = "u-boot.imx"
UBOOT_MACHINE ?= "colibri-imx6ull_defconfig" UBOOT_MACHINE ?= "colibri-imx6ull_defconfig"
IMAGE_FSTYPES += "tar.xz" IMAGE_FSTYPES += "tar.xz"

View File

@ -25,7 +25,7 @@ PREFERRED_RPROVIDER_u-boot-fw-utils ?= "u-boot-toradex-fw-utils"
# U-Boot NAND binary includes 0x400 padding required for NAND boot # U-Boot NAND binary includes 0x400 padding required for NAND boot
UBOOT_BINARY = "u-boot-nand.imx" UBOOT_BINARY = "u-boot-nand.imx"
UBOOT_MAKE_TARGET = "u-boot-nand.imx" UBOOT_MAKE_TARGET = "u-boot.imx"
UBOOT_MACHINE ?= "colibri_imx7_defconfig" UBOOT_MACHINE ?= "colibri_imx7_defconfig"
IMAGE_FSTYPES += "tar.xz" IMAGE_FSTYPES += "tar.xz"

View File

@ -9,3 +9,17 @@ B = "${WORKDIR}/build"
do_configure[cleandirs] = "${B}" do_configure[cleandirs] = "${B}"
inherit fsl-u-boot-localversion inherit fsl-u-boot-localversion
# U-Boot is flashed 1k into a NAND block, create a binary which prepends
# U-boot with 1k of zeros to ease flashing
nand_padding () {
dd bs=1024 count=1 if=/dev/zero | cat - u-boot.imx > u-boot-nand.imx
}
do_compile_append_colibri-imx6ull () {
nand_padding
}
do_compile_append_colibri-imx7 () {
nand_padding
}