busybox: find extlinux on alternative /flash layouts

This commit is contained in:
Christian Hewitt 2021-03-25 02:05:24 +00:00
parent f7812aaf95
commit 9ca8e10854

View File

@ -6,8 +6,9 @@
COMPATIBLE=$(cat /proc/device-tree/compatible 2>/dev/null | tr -d '\000' | sed -n -e 's/.*\(allwinner\|amlogic\|fsl\|nxp\|qcom\|raspberrypi\|rockchip\|samsung\).*/\1/p')
do_dtfile(){
if [ -e /flash/extlinux/extlinux.conf ]; then
DTFILE=$(grep FDT /flash/extlinux/extlinux.conf | sed 's,^ *FDT /,,g')
if [[ -n $(find /flash -name extlinux.conf) ]]; then
EXTLINUX=$(find /flash -name extlinux.conf)
DTFILE=$(grep FDT "${EXTLINUX}" | sed 's,^ *FDT /,,g')
elif [ -e /flash/boot.ini ]; then
DTFILE=$(grep -m 1 dtb_name /flash/boot.ini | cut -d \" -f2 | sed 's,/dtb/,,g')
elif [ -e /flash/uEnv.ini ]; then