board/freescale/common/imx: make post-image.sh arm64 compatible

This commit makes the common post-image.sh script used by Freescale
platforms compatible with arm64:

 - Support having DTBs in sub-folders

 - Support a kernel image in the 'Image' format

Signed-off-by: Erik Larsson <karl.erik.larsson@gmail.com>
Signed-off-by: Christopher Dahlberg <crille.dahlberg@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Erik Larsson 2018-04-12 14:35:23 +02:00 committed by Thomas Petazzoni
parent 4dabf12d0f
commit 4755bf2bd4

View File

@ -7,10 +7,10 @@
# #
dtb_list() dtb_list()
{ {
local DTB_LIST="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([a-z0-9 \-]*\)"$/\1/p' ${BR2_CONFIG})" local DTB_LIST="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([\/a-z0-9 \-]*\)"$/\1/p' ${BR2_CONFIG})"
for dt in $DTB_LIST; do for dt in $DTB_LIST; do
echo -n "\"$dt.dtb\", " echo -n "\"`basename $dt`.dtb\", "
done done
} }
@ -23,6 +23,8 @@ linux_image()
{ {
if grep -Eq "^BR2_LINUX_KERNEL_UIMAGE=y$" ${BR2_CONFIG}; then if grep -Eq "^BR2_LINUX_KERNEL_UIMAGE=y$" ${BR2_CONFIG}; then
echo "\"uImage\"" echo "\"uImage\""
elif grep -Eq "^BR2_LINUX_KERNEL_IMAGE=y$" ${BR2_CONFIG}; then
echo "\"Image\""
else else
echo "\"zImage\"" echo "\"zImage\""
fi fi