u-boot: add support for SPL UART variant
authorDenys Dmytriyenko <denys@ti.com>
Tue, 25 Jun 2013 00:14:37 +0000 (20:14 -0400)
committerDenys Dmytriyenko <denys@ti.com>
Tue, 25 Jun 2013 18:12:25 +0000 (14:12 -0400)
This is an adaptation of a patch by Carlos Hernandez

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
recipes-bsp/u-boot/u-boot-ti-staging_2013.01.01.bb
recipes-bsp/u-boot/u-boot-ti.inc

index 5fbd0c97f52a08c7407b50e592a97f36281dd685..ea72e4dfe91bc7fc8ed7eb005b49fa55116a5844 100644 (file)
@@ -2,7 +2,7 @@ require u-boot-ti.inc
 
 DESCRIPTION = "u-boot bootloader for TI devices"
 
-PR = "r4+gitr${SRCPV}"
+PR = "r5+gitr${SRCPV}"
 
 SRC_URI = "git://git.ti.com/ti-u-boot/ti-u-boot.git;protocol=git;branch=${BRANCH}"
 
@@ -12,3 +12,4 @@ BRANCH ?= "ti-u-boot-2013.01.01"
 SRCREV = "7552b4c906b0a50fbc5225dc43ed0192618e9d5d"
 
 SPL_BINARY = "MLO"
+SPL_UART_BINARY = "u-boot-spl.bin"
index 968f3e41bd602f78790e8bfb364b016918ba7840..c024e9634ae7ce9e04d4f730b82951c5edf9c0d5 100644 (file)
@@ -15,3 +15,27 @@ PKG_${PN}-dbg = "u-boot-dbg"
 S = "${WORKDIR}/git"
 
 UBOOT_SUFFIX = "img"
+
+# SPL (Second Program Loader) to be loaded over UART
+SPL_UART_BINARY ?= ""
+SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}"
+SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}"
+
+do_install_append () {
+    if [ "x${SPL_UART_BINARY}" != "x" ]
+    then
+        install ${S}/spl/${SPL_UART_BINARY} ${D}/boot/${SPL_UART_IMAGE}
+        ln -sf ${SPL_UART_IMAGE} ${D}/boot/${SPL_UART_BINARY}
+    fi
+}
+
+do_deploy_append () {
+    cd ${DEPLOYDIR}
+    if [ "x${SPL_UART_BINARY}" != "x" ]
+    then
+        install ${S}/spl/${SPL_UART_BINARY} ${DEPLOYDIR}/${SPL_UART_IMAGE}
+        rm -f ${DEPLOYDIR}/${SPL_UART_BINARY} ${DEPLOYDIR}/${SPL_UART_SYMLINK}
+        ln -sf ${SPL_UART_IMAGE} ${DEPLOYDIR}/${SPL_UART_BINARY}
+        ln -sf ${SPL_UART_IMAGE} ${DEPLOYDIR}/${SPL_UART_SYMLINK}
+    fi
+}