From 5a26b77b90e1e8bbedaa6dcd2c6f595cf0880680 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sat, 30 Mar 2019 01:09:06 +0000 Subject: [PATCH] Add config file check to see if we create kernel DT sym link to enable use of firmware DT --- 10-devicetree.install | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/10-devicetree.install b/10-devicetree.install index 752e5d0..3345391 100755 --- a/10-devicetree.install +++ b/10-devicetree.install @@ -9,6 +9,18 @@ KERNEL_VERSION="$2" #BOOT_DIR_ABS="$3" #KERNEL_IMAGE="$4" +[ -f /etc/u-boot.conf ] && source /etc/u-boot.conf || true +[ -z "$FIRMWAREDT" ] || FirmwareDT=$FIRMWAREDT + +if [[ $FirmwareDT == "True" ]] +then + # if we want to use firmware DT we remove symlink to current kernel DT + if [ -h /boot/dtb ]; then + rm -f /boot/dtb + fi + exit 0 +fi + # Setup a /boot/dtb -> /boot/dtb-$newest_kernel_version symlink so that # u-boot can find the correct dtb to load. #