diff options
| author | Dalon Westergreen <dalon.westergreen@intel.com> | 2017-01-20 15:39:43 -0800 |
|---|---|---|
| committer | Dalon Westergreen <dalon.westergreen@intel.com> | 2017-01-20 16:44:05 -0800 |
| commit | fb8728b073ffca2acc0bdaf7f76c3a7c7b8073dc (patch) | |
| tree | 7b2555068a6e1c011cbc7de62c87daf762110010 /classes | |
| parent | f43c2def652f91f584ec6acfc3ee99d54d5f19ab (diff) | |
| download | meta-altera-fb8728b073ffca2acc0bdaf7f76c3a7c7b8073dc.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
Diffstat (limited to 'classes')
| -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 | } |
