summaryrefslogtreecommitdiff
path: root/recipes-bsp/u-boot/u-boot-toradex_2016.11.bbappend
blob: c8d0cd185c12da22c1ef37da263f994e3a4021de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
include conf/tdx_version.conf

LOCALVERSION = "-${TDX_VER_ITEM}"

SRCREV = "52259cf22a165c0721bb26c723c0dc5e2659eaa7"
SRCBRANCH = "2016.11-toradex"
SRCREV_use-head-next = "${AUTOREV}"
SRCBRANCH_use-head-next = "2016.11-toradex-next"

# Hack around building two U-Boot configurations, one with, one without SPL
# if using UBOOT_CONFIG to build more than one configuration, the current code in
# u-boot.inc assumes all are either with or without SPL.
compile_add() {
    if [ -n "${UBOOT_CONFIG}" ]
    then
        for config in ${UBOOT_MACHINE}; do
            touch ${B}/${config}/${SPL_BINARY}
        done
    fi
}
deploy_add() {
    # if SPL is zero sized file, remove all deployed artefacts
    if [ -n "${SPL_BINARY}" ]
    then
        if [ -n "${UBOOT_CONFIG}" ]
        then
            for config in ${UBOOT_MACHINE}; do
                i=$(expr $i + 1);
                for type in ${UBOOT_CONFIG}; do
                    j=$(expr $j + 1);
                    if [ $j -eq $i ]
                    then
                        if [ ! -s ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR} ]
                        then
                            rm -f ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR}
                            rm -f ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}
                            rm -f ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
                            rm -f ${DEPLOYDIR}/${SPL_SYMLINK}
                        else
                            ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${SPL_BINARYNAME}
                        fi
                    fi
                done
                unset  j
            done
            unset  i
        fi
    fi
}
do_compile_append_mx6() {
    compile_add
}
do_compile_append_use-mainline-bsp() {
    compile_add
}
do_deploy_append_mx6() {
    deploy_add
}
do_deploy_append_use-mainline-bsp() {
    deploy_add
}