u-boot-script-boundary: Allow board-specific boot scripts

This update allows board directories to over-ride the boot script
(6x_bootscript-yocto.txt) or upgrade script (6x_upgrade.txt).

This is a bit complicated because the Yocto MACHINE variable
is not the same as the board directory (u-boot/board/boundary/x)
in either the imx6qsabrelite or nitrogen6x-lite case.

The scripts in board/boundary/nitrogen6x/ are used as a default
if a board doesn't override them.

Note that the boot scripts are only partially functional at this
stage, since there are references to named panels which are not
yet supported.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
This commit is contained in:
Eric Nelson 2014-01-25 16:12:21 -07:00 committed by Otavio Salvador
parent e5fff91555
commit e459991ed6

View File

@ -14,16 +14,33 @@ S = "${WORKDIR}/git"
inherit deploy
do_mkimage () {
# workaround the case where MACHINE=imx6qsabrelite
boarddir=nitrogen6x;
if test "${MACHINE}" = "nitrogen6x-lite"; then
boarddir=nit6xlite;
fi
# allow deploy to use the ${MACHINE} name to simplify things
if [ ! -d board/boundary/${MACHINE} ]; then
mkdir board/boundary/${MACHINE}
fi
bootscript=board/boundary/${boarddir}/6x_bootscript-yocto.txt;
if ! [ -f $bootscript ]; then
bootscript=board/boundary/${boarddir}/6x_bootscript-yocto.txt;
fi
echo "bootscript == $bootscript"
upgradescript=board/boundary/${boarddir}/6x_upgrade.txt;
if ! [ -f $upgradescript ]; then
upgradescript=board/boundary/nitrogen6x/6x_upgrade.txt;
fi
uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
-n "boot script" -d board/boundary/nitrogen6x/6x_bootscript-yocto.txt \
-n "boot script" -d $bootscript \
board/boundary/${MACHINE}/6x_bootscript
uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
-n "upgrade script" -d board/boundary/nitrogen6x/6x_upgrade.txt \
-n "upgrade script" -d $upgradescript \
board/boundary/${MACHINE}/6x_upgrade
}