summaryrefslogtreecommitdiff
path: root/recipes-bsp/u-boot
diff options
context:
space:
mode:
authorSergio Prado <sergio.prado@e-labworks.com>2020-08-21 08:24:44 -0300
committerSergio Prado <sergio.prado@e-labworks.com>2020-08-21 08:31:15 -0300
commit2b85dbe743daac36743449cfedb3b188220f7a90 (patch)
tree16a31fbcf4a8522d891f27893d192ee2d8c0b346 /recipes-bsp/u-boot
parent06c4f6f3639b36d20e5c26f82e487ec045c36899 (diff)
u-boot-toradex: make padding directory configurable
When using UBOOT_CONFIG, U-Boot is built in a subdirectory named after the defconfig name (e.g. ${B}/colibri_imx7_defconfig). So let's make it possible to override the directory where the padding is done for NAND devices. Related-to: TOR-1332 Signed-off-by: Sergio Prado <sergio.prado@toradex.com>
Diffstat (limited to 'recipes-bsp/u-boot')
-rw-r--r--recipes-bsp/u-boot/u-boot-toradex_2020.07.bb5
1 files changed, 3 insertions, 2 deletions
diff --git a/recipes-bsp/u-boot/u-boot-toradex_2020.07.bb b/recipes-bsp/u-boot/u-boot-toradex_2020.07.bb
index 10b4e58..fd6359e 100644
--- a/recipes-bsp/u-boot/u-boot-toradex_2020.07.bb
+++ b/recipes-bsp/u-boot/u-boot-toradex_2020.07.bb
@@ -9,6 +9,7 @@ DEPENDS += "bc-native dtc-native"
BOOT_TOOLS = "imx-boot-tools"
+PADDING_DIR = "${B}"
nand_padding () {
# pad the end of U-Boot with 0x00 up to the the end of the CSF area
@@ -17,11 +18,11 @@ nand_padding () {
#objcopy -I binary -O binary --pad-to $PAD_END u-boot.imx u-boot.imx.zero-padded
# assume that the above never need more than 10k of padding and skip the
# shell magic to get a correct size.
- dd bs=10k count=1 if=/dev/zero | cat u-boot.imx - > u-boot.imx.zero-padded
+ dd bs=10k count=1 if=/dev/zero | cat ${PADDING_DIR}/u-boot.imx - > ${PADDING_DIR}/u-boot.imx.zero-padded
# U-Boot is flashed 1k into a NAND block, create a binary which prepends
# U-boot with 1k of zeros to ease flashing
- dd bs=1024 count=1 if=/dev/zero | cat - u-boot.imx.zero-padded > u-boot-nand.imx
+ dd bs=1024 count=1 if=/dev/zero | cat - ${PADDING_DIR}/u-boot.imx.zero-padded > ${PADDING_DIR}/u-boot-nand.imx
}
do_compile_append_colibri-imx6ull () {