From ff7b0dfbc38b609b2018a4481deb86dd5e98769f Mon Sep 17 00:00:00 2001 From: Dalon Westergreen Date: Fri, 20 Jan 2017 15:39:43 -0800 Subject: add support to generate uboot environment images create uboot environment images to populate the sdcard images. This allows non-default uboot environments to be used without the need for changing / patching uboot Initially add de0-nano-soc environment --- classes/sdcard_image-socfpga.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/sdcard_image-socfpga.bbclass b/classes/sdcard_image-socfpga.bbclass index 8ac12b1..672ea6d 100644 --- a/classes/sdcard_image-socfpga.bbclass +++ b/classes/sdcard_image-socfpga.bbclass @@ -26,6 +26,7 @@ FAT_SPACE ?= "102400" # uBoot ENV offset SDIMG_UBOOT_ENV_OFFSET ?= "512" +ENV_BASE_NAME ??= "${UBOOT_CONFIG}" # Boot partition begin at sector 1024 # This is required as for c5/a5 mainline uboot hard codes the location @@ -173,7 +174,7 @@ IMAGE_CMD_socfpga-sdimg () { fi if [ -e "${DEPLOY_DIR_IMAGE}/u-boot-env-${ENV_BASE_NAME}.bin" ]; then - dd if=${DEPLOY_DIR_IMAGE}/u-boot-env-${ENV_BASE_NAME}.bin of=${SDIMG} bs=1 seek=${SDIMG_UBOOT_ENV_OFFSET} + dd if=${DEPLOY_DIR_IMAGE}/u-boot-env-${ENV_BASE_NAME}.bin of=${SDIMG} conv=notrunc bs=1 seek=${SDIMG_UBOOT_ENV_OFFSET} && sync && sync fi } -- cgit v1.2.3-54-g00ecf