summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorDalon Westergreen <dalon.westergreen@intel.com>2017-01-20 15:39:43 -0800
committerKhem Raj <raj.khem@gmail.com>2017-01-20 18:33:21 -0800
commitff7b0dfbc38b609b2018a4481deb86dd5e98769f (patch)
tree7d59a7d0f0ec440ae118b0fc7deb7ed690147f71 /classes
parentaf1bfa9cecb0cc4d1134f59909bb4f741c17b1a7 (diff)
downloadmeta-altera-ff7b0dfbc38b609b2018a4481deb86dd5e98769f.tar.gz
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
Diffstat (limited to 'classes')
-rw-r--r--classes/sdcard_image-socfpga.bbclass3
1 files changed, 2 insertions, 1 deletions
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"
26 26
27# uBoot ENV offset 27# uBoot ENV offset
28SDIMG_UBOOT_ENV_OFFSET ?= "512" 28SDIMG_UBOOT_ENV_OFFSET ?= "512"
29ENV_BASE_NAME ??= "${UBOOT_CONFIG}"
29 30
30# Boot partition begin at sector 1024 31# Boot partition begin at sector 1024
31# This is required as for c5/a5 mainline uboot hard codes the location 32# This is required as for c5/a5 mainline uboot hard codes the location
@@ -173,7 +174,7 @@ IMAGE_CMD_socfpga-sdimg () {
173 fi 174 fi
174 175
175 if [ -e "${DEPLOY_DIR_IMAGE}/u-boot-env-${ENV_BASE_NAME}.bin" ]; then 176 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 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
177 fi 178 fi
178 179
179} 180}