diff options
-rw-r--r-- | recipes-bsp/u-boot/u-boot-socfpga-common.inc | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-socfpga-common.inc b/recipes-bsp/u-boot/u-boot-socfpga-common.inc index 2ef338d..702c4d5 100644 --- a/recipes-bsp/u-boot/u-boot-socfpga-common.inc +++ b/recipes-bsp/u-boot/u-boot-socfpga-common.inc | |||
@@ -10,4 +10,57 @@ SRC_URI = "git://git.denx.de/u-boot.git;branch=master" | |||
10 | 10 | ||
11 | S = "${WORKDIR}/git" | 11 | S = "${WORKDIR}/git" |
12 | 12 | ||
13 | do_compile_append_stratix10() { | ||
14 | if [ -n "${UBOOT_CONFIG}" ] | ||
15 | then | ||
16 | unset i j k | ||
17 | for config in ${UBOOT_MACHINE}; do | ||
18 | i=$(expr $i + 1); | ||
19 | for type in ${UBOOT_CONFIG}; do | ||
20 | j=$(expr $j + 1); | ||
21 | if [ $j -eq $i ] | ||
22 | then | ||
23 | ${OBJCOPY} -I binary -O ihex --change-addresses 0xffe00000 ${B}/${config}/${SPL_BINARY} ${B}/${config}/${SPL_BINARY}.ihex | ||
24 | fi | ||
25 | done | ||
26 | unset j | ||
27 | done | ||
28 | unset i | ||
29 | else | ||
30 | ${OBJCOPY} -I binary -O ihex --change-addresses 0xffe00000 ${B}/${SPL_BINARY} ${B}/${SPL_BINARY}.ihex | ||
31 | fi | ||
32 | |||
33 | } | ||
34 | |||
35 | do_deploy_append_stratix10() { | ||
36 | if [ -n "${SPL_BINARY}" ] | ||
37 | then | ||
38 | if [ -n "${UBOOT_CONFIG}" ] | ||
39 | then | ||
40 | for config in ${UBOOT_MACHINE}; do | ||
41 | i=$(expr $i + 1); | ||
42 | for type in ${UBOOT_CONFIG}; do | ||
43 | j=$(expr $j + 1); | ||
44 | if [ $j -eq $i ] | ||
45 | then | ||
46 | install -m 644 ${B}/${config}/${SPL_BINARY}.ihex ${DEPLOYDIR}/${SPL_IMAGE}.ihex-${type}-${PV}-${PR} | ||
47 | rm -f ${DEPLOYDIR}/${SPL_BINARYNAME}.ihex ${DEPLOYDIR}/${SPL_BINARYNAME}.ihex-${MACHINE}-${type} | ||
48 | ln -sf ${SPL_IMAGE}.ihex-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}.ihex-${type} | ||
49 | ln -sf ${SPL_IMAGE}.ihex-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}.ihex | ||
50 | ln -sf ${SPL_IMAGE}.ihex-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}.ihex-${MACHINE}-${type} | ||
51 | ln -sf ${SPL_IMAGE}.ihex-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}.ihex-${MACHINE} | ||
52 | fi | ||
53 | done | ||
54 | unset j | ||
55 | done | ||
56 | unset i | ||
57 | else | ||
58 | install -m 644 ${B}/${SPL_BINARY}.ihex ${DEPLOYDIR}/${SPL_IMAGE}.ihex | ||
59 | rm -f ${DEPLOYDIR}/${SPL_BINARYNAME}.ihex ${DEPLOYDIR}/${SPL_BINARYNAME}.ihex-${MACHINE} | ||
60 | ln -sf ${SPL_IMAGE}.ihex ${DEPLOYDIR}/${SPL_BINARYNAME}.ihex | ||
61 | ln -sf ${SPL_IMAGE}.ihex ${DEPLOYDIR}/${SPL_BINARYNAME}.ihex-${MACHINE} | ||
62 | fi | ||
63 | fi | ||
64 | } | ||
65 | |||
13 | RPROVIDES_${PN} += "u-boot" | 66 | RPROVIDES_${PN} += "u-boot" |