diff options
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-socfpga-env.inc')
-rw-r--r-- | recipes-bsp/u-boot/u-boot-socfpga-env.inc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-socfpga-env.inc b/recipes-bsp/u-boot/u-boot-socfpga-env.inc new file mode 100644 index 0000000..55621b9 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-socfpga-env.inc | |||
@@ -0,0 +1,25 @@ | |||
1 | DEPENDS += "u-boot-mkenvimage-native" | ||
2 | |||
3 | #Env binary size | ||
4 | ENV_SIZE = "4096" | ||
5 | |||
6 | #Env base Name | ||
7 | ENV_BASE_NAME ??= "${UBOOT_CONFIG}" | ||
8 | |||
9 | # Env base file correspond to common part of all environment | ||
10 | ENV_BASE_FILE = "${WORKDIR}/${ENV_BASE_NAME}.env" | ||
11 | |||
12 | do_environment_mkimage() { | ||
13 | if [ -e ${WORKDIR}/${PV}/${ENV_BASE_NAME}.env ]; then | ||
14 | mkenvimage -s ${ENV_SIZE} -o ${WORKDIR}/${ENV_BASE_NAME}.bin ${WORKDIR}/${PV}/${ENV_BASE_NAME}.env | ||
15 | fi | ||
16 | } | ||
17 | |||
18 | do_deploy_append() { | ||
19 | if [ -e ${WORKDIR}/${ENV_BASE_NAME}.bin]; then | ||
20 | install -d ${DEPLOYDIR} | ||
21 | install -m 644 ${WORKDIR}/${ENV_BASE_NAME}.bin ${DEPLOYDIR}/u-boot-env-${ENV_BASE_NAME}.bin | ||
22 | fi | ||
23 | } | ||
24 | |||
25 | addtask environment_mkimage after do_compile before do_deploy | ||