diff options
Diffstat (limited to 'classes/sdcard_image-socfpga.bbclass')
-rw-r--r-- | classes/sdcard_image-socfpga.bbclass | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/classes/sdcard_image-socfpga.bbclass b/classes/sdcard_image-socfpga.bbclass index 879c2c1..8ac12b1 100644 --- a/classes/sdcard_image-socfpga.bbclass +++ b/classes/sdcard_image-socfpga.bbclass | |||
@@ -24,6 +24,9 @@ BOOT_SPACE ?= "2048" | |||
24 | # Fat partition size | 24 | # Fat partition size |
25 | FAT_SPACE ?= "102400" | 25 | FAT_SPACE ?= "102400" |
26 | 26 | ||
27 | # uBoot ENV offset | ||
28 | SDIMG_UBOOT_ENV_OFFSET ?= "512" | ||
29 | |||
27 | # Boot partition begin at sector 1024 | 30 | # Boot partition begin at sector 1024 |
28 | # This is required as for c5/a5 mainline uboot hard codes the location | 31 | # This is required as for c5/a5 mainline uboot hard codes the location |
29 | # of the uboot image in the sdcard to 0xa00 sector | 32 | # of the uboot image in the sdcard to 0xa00 sector |
@@ -167,6 +170,10 @@ IMAGE_CMD_socfpga-sdimg () { | |||
167 | dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY} of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync | 170 | dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY} of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync |
168 | else | 171 | else |
169 | bbfatal "${SPL_BINARY} does not exist." | 172 | bbfatal "${SPL_BINARY} does not exist." |
170 | fi | 173 | fi |
174 | |||
175 | if [ -e "${DEPLOY_DIR_IMAGE}/u-boot-env-${ENV_BASE_NAME}.bin" ]; then | ||
176 | dd if=${DEPLOY_DIR_IMAGE}/u-boot-env-${ENV_BASE_NAME}.bin of=${SDIMG} bs=1 seek=${SDIMG_UBOOT_ENV_OFFSET} | ||
177 | fi | ||
171 | 178 | ||
172 | } | 179 | } |