u-boot-menu: update to 0.2

Allow usage of the DEVICETREEDIR extlinux.conf configuration stanza.

Closes: #25887 [via git-merge-pr]
This commit is contained in:
Cameron Nemo 2020-10-25 19:57:15 +00:00 committed by Andrew J. Hesford
parent 58b5abbf82
commit a0c5c4b693
3 changed files with 10 additions and 3 deletions

View file

@ -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=""

View file

@ -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

View file

@ -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 <repk@triplefau.lt>"