From 9ca8e10854777eb2ac1d61ed45ff896d64386ae3 Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Thu, 25 Mar 2021 02:05:24 +0000 Subject: [PATCH] busybox: find extlinux on alternative /flash layouts --- packages/sysutils/busybox/scripts/dthelper | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/sysutils/busybox/scripts/dthelper b/packages/sysutils/busybox/scripts/dthelper index a60e6b95f4..6dd9d10114 100755 --- a/packages/sysutils/busybox/scripts/dthelper +++ b/packages/sysutils/busybox/scripts/dthelper @@ -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