diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-bsp/u-boot/u-boot.inc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc index d826a40c9c..53c87c28f0 100644 --- a/meta/recipes-bsp/u-boot/u-boot.inc +++ b/meta/recipes-bsp/u-boot/u-boot.inc | |||
@@ -28,6 +28,17 @@ SPL_BINARY ?= "" | |||
28 | SPL_IMAGE ?= "${SPL_BINARY}-${MACHINE}-${PV}-${PR}" | 28 | SPL_IMAGE ?= "${SPL_BINARY}-${MACHINE}-${PV}-${PR}" |
29 | SPL_SYMLINK ?= "${SPL_BINARY}-${MACHINE}" | 29 | SPL_SYMLINK ?= "${SPL_BINARY}-${MACHINE}" |
30 | 30 | ||
31 | # Additional environment variables or a script can be installed alongside | ||
32 | # u-boot to be used automatically on boot. This file, typically 'uEnv.txt' | ||
33 | # or 'boot.scr', should be packaged along with u-boot as well as placed in the | ||
34 | # deploy directory. Machine configurations needing one of these files should | ||
35 | # include it in the SRC_URI and set the UBOOT_ENV parameter. | ||
36 | UBOOT_ENV_SUFFIX ?= "txt" | ||
37 | UBOOT_ENV ?= "" | ||
38 | UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}" | ||
39 | UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}" | ||
40 | UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}" | ||
41 | |||
31 | do_compile () { | 42 | do_compile () { |
32 | if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then | 43 | if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then |
33 | sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' config.mk | 44 | sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' config.mk |
@@ -62,6 +73,12 @@ do_install () { | |||
62 | install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} | 73 | install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} |
63 | ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY} | 74 | ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY} |
64 | fi | 75 | fi |
76 | |||
77 | if [ "x${UBOOT_ENV}" != "x" ] | ||
78 | then | ||
79 | install ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE} | ||
80 | ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY} | ||
81 | fi | ||
65 | } | 82 | } |
66 | 83 | ||
67 | FILES_${PN} = "/boot ${sysconfdir}" | 84 | FILES_${PN} = "/boot ${sysconfdir}" |
@@ -82,6 +99,14 @@ do_deploy () { | |||
82 | ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY} | 99 | ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY} |
83 | ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} | 100 | ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} |
84 | fi | 101 | fi |
102 | |||
103 | if [ "x${UBOOT_ENV}" != "x" ] | ||
104 | then | ||
105 | install ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE} | ||
106 | rm -f ${DEPLOYDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} | ||
107 | ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY} | ||
108 | ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} | ||
109 | fi | ||
85 | } | 110 | } |
86 | 111 | ||
87 | addtask deploy before do_build after do_compile | 112 | addtask deploy before do_build after do_compile |