u-boot: add support for SPL UART variant
[glsdk/meta-ti-glsdk.git] / recipes-bsp / u-boot / u-boot-ti.inc
1 require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc
3 FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot:"
5 LICENSE = "GPLv2+"
6 LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
8 PACKAGE_ARCH = "${MACHINE_ARCH}"
10 PROVIDES += "u-boot"
11 PKG_${PN} = "u-boot"
12 PKG_${PN}-dev = "u-boot-dev"
13 PKG_${PN}-dbg = "u-boot-dbg"
15 S = "${WORKDIR}/git"
17 UBOOT_SUFFIX = "img"
19 # SPL (Second Program Loader) to be loaded over UART
20 SPL_UART_BINARY ?= ""
21 SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}"
22 SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}"
24 do_install_append () {
25     if [ "x${SPL_UART_BINARY}" != "x" ]
26     then
27         install ${S}/spl/${SPL_UART_BINARY} ${D}/boot/${SPL_UART_IMAGE}
28         ln -sf ${SPL_UART_IMAGE} ${D}/boot/${SPL_UART_BINARY}
29     fi
30 }
32 do_deploy_append () {
33     cd ${DEPLOYDIR}
34     if [ "x${SPL_UART_BINARY}" != "x" ]
35     then
36         install ${S}/spl/${SPL_UART_BINARY} ${DEPLOYDIR}/${SPL_UART_IMAGE}
37         rm -f ${DEPLOYDIR}/${SPL_UART_BINARY} ${DEPLOYDIR}/${SPL_UART_SYMLINK}
38         ln -sf ${SPL_UART_IMAGE} ${DEPLOYDIR}/${SPL_UART_BINARY}
39         ln -sf ${SPL_UART_IMAGE} ${DEPLOYDIR}/${SPL_UART_SYMLINK}
40     fi
41 }