summaryrefslogtreecommitdiff
path: root/recipes-bsp/u-boot
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/u-boot')
-rw-r--r--recipes-bsp/u-boot/libubootenv_%.bbappend4
-rw-r--r--recipes-bsp/u-boot/u-boot-distro-boot.bb4
-rw-r--r--recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in8
3 files changed, 13 insertions, 3 deletions
diff --git a/recipes-bsp/u-boot/libubootenv_%.bbappend b/recipes-bsp/u-boot/libubootenv_%.bbappend
index 3f8a71b..679edae 100644
--- a/recipes-bsp/u-boot/libubootenv_%.bbappend
+++ b/recipes-bsp/u-boot/libubootenv_%.bbappend
@@ -2,11 +2,13 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
SRC_URI:append = " file://fw_env.config"
+OURFILEPATH = "${@d.getVar("UNPACKDIR") or '${WORKDIR}'}"
+
PACKAGE_ARCH = "${MACHINE_ARCH}"
RRECOMMENDS:${PN} += "u-boot-default-env"
do_install:append() {
install -d ${D}/${sysconfdir}
- install -m 0644 ${WORKDIR}/fw_env.config ${D}/${sysconfdir}/
+ install -m 0644 ${OURFILEPATH}/fw_env.config ${D}/${sysconfdir}/
}
diff --git a/recipes-bsp/u-boot/u-boot-distro-boot.bb b/recipes-bsp/u-boot/u-boot-distro-boot.bb
index 5f696df..91268c7 100644
--- a/recipes-bsp/u-boot/u-boot-distro-boot.bb
+++ b/recipes-bsp/u-boot/u-boot-distro-boot.bb
@@ -9,6 +9,8 @@ SRC_URI = " \
file://boot.cmd.in \
"
+S = "${@d.getVar("UNPACKDIR") or '${WORKDIR}'}"
+
APPEND ?= ""
KERNEL_BOOTCMD ??= "bootz"
@@ -20,7 +22,7 @@ inherit deploy
do_deploy() {
sed -e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/;s/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/;s/@@KERNEL_DTB_PREFIX@@/${DTB_PREFIX}/;s/@@APPEND@@/${APPEND}/' \
- "${WORKDIR}/boot.cmd.in" > boot.cmd
+ "${S}/boot.cmd.in" > boot.cmd
mkimage -T script -C none -n "Distro boot script" -d boot.cmd boot.scr
install -m 0644 boot.scr ${DEPLOYDIR}/boot.scr-${MACHINE}
diff --git a/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in b/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in
index 9760ccc..9fd1440 100644
--- a/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in
+++ b/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in
@@ -67,8 +67,14 @@ if test "${root_devtype}" = ""; then
fi
fi
+# Set console baudrate only when required
+setexpr _res sub "," "_" ${console}
+if test ! $? -eq 0; then
+ env set console "${console},${baudrate}"
+fi
+
env set appendargs @@APPEND@@
-env set setupargs console=tty1 console=${console},${baudrate}
+env set setupargs console=tty1 console=${console}
if test ${kernel_image} = "fitImage"; then
env set kernel_addr_load ${ramdisk_addr_r}