From a0c5c4b69366265118a261c4515ce51c0602987c Mon Sep 17 00:00:00 2001 From: Cameron Nemo Date: Sun, 25 Oct 2020 19:57:15 +0000 Subject: [PATCH] u-boot-menu: update to 0.2 Allow usage of the DEVICETREEDIR extlinux.conf configuration stanza. Closes: #25887 [via git-merge-pr] --- srcpkgs/u-boot-menu/files/extlinux.default | 4 ++++ srcpkgs/u-boot-menu/files/kernel.d/extlinux | 5 ++++- srcpkgs/u-boot-menu/template | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/srcpkgs/u-boot-menu/files/extlinux.default b/srcpkgs/u-boot-menu/files/extlinux.default index e02d310cf3..2e36728c2e 100644 --- a/srcpkgs/u-boot-menu/files/extlinux.default +++ b/srcpkgs/u-boot-menu/files/extlinux.default @@ -1,3 +1,7 @@ TIMEOUT=10 +# Defaults to current kernel cmdline if left empty CMDLINE="" +# set this to use a DEVICETREEDIR line in place of an FDT line +USE_DEVICETREEDIR="" +# relative dtb path supplied to FDT line, as long as above is unset DTBPATH="" diff --git a/srcpkgs/u-boot-menu/files/kernel.d/extlinux b/srcpkgs/u-boot-menu/files/kernel.d/extlinux index 8b052af949..2c724b101f 100644 --- a/srcpkgs/u-boot-menu/files/kernel.d/extlinux +++ b/srcpkgs/u-boot-menu/files/kernel.d/extlinux @@ -14,6 +14,7 @@ add_kernel() { ver=${1} kernel=$(get_bootpath "/boot/vmlinux-${ver}") initrd=$(get_bootpath "/boot/initramfs-${ver}.img") + devicetreedir=$(get_bootpath "/boot/dtbs/dtbs-${ver}") fdt=$(get_bootpath "/boot/dtbs/dtbs-${ver}/${DTBPATH}") cmdline="${CMDLINE}" @@ -23,7 +24,9 @@ add_kernel() { if [ -e "${BOOTPART}/${initrd}" ]; then echo "\tINITRD ${initrd}" >> ${OUTFILE} fi - if [ -n "${DTBPATH}" ] && [ -e "${BOOTPART}/${fdt}" ]; then + if [ -n "${USE_DEVICETREEDIR}" ]; then + printf "\tDEVICETREEDIR ${devicetreedir}\n" >> ${OUTFILE} + elif [ -n "${DTBPATH}" ] && [ -e "${BOOTPART}/${fdt}" ]; then echo "\tFDT ${fdt}" >> ${OUTFILE} fi if [ -n "${cmdline}" ]; then diff --git a/srcpkgs/u-boot-menu/template b/srcpkgs/u-boot-menu/template index 5442a53fc9..31ef746ba3 100644 --- a/srcpkgs/u-boot-menu/template +++ b/srcpkgs/u-boot-menu/template @@ -1,7 +1,7 @@ # Template file for 'u-boot-menu' pkgname=u-boot-menu -version=0.1 -revision=2 +version=0.2 +revision=1 conf_files="/etc/default/extlinux" short_desc="Create an u-boot menu with currently available kernels" maintainer="Remi Pommarel "