Merge pull request #1 from vagrantc/master

fix and improve support for FDT dirs
This commit is contained in:
Riku Voipio
2017-01-17 17:46:51 +02:00
committed by GitHub
2 changed files with 7 additions and 5 deletions

View File

@@ -9,5 +9,6 @@ U_BOOT_MENU_LABEL="Debian GNU/Linux"
U_BOOT_PARAMETERS="rw rootwait"
U_BOOT_ROOT=""
U_BOOT_TIMEOUT="50"
U_BOOT_FDT="qcom/apq8016-sbc.dtb"
#U_BOOT_FDT="qcom/apq8016-sbc.dtb"
#U_BOOT_FDT_DIR="/boot/dtbs/"

View File

@@ -80,6 +80,7 @@ U_BOOT_DEFAULT="${U_BOOT_DEFAULT:-l0}"
U_BOOT_ENTRIES="${U_BOOT_ENTRIES:-all}"
U_BOOT_TIMEOUT="${U_BOOT_TIMEOUT:-50}"
U_BOOT_MENU_LABEL="Debian GNU/Linux kernel"
U_BOOT_FDT_DIR="${U_BOOT_FDT_DIR:-/usr/lib/linux-image-}"
# Find parameter for root from fstab
if [ -z "${U_BOOT_ROOT}" ]
@@ -155,12 +156,12 @@ do
else
_INITRD=""
fi
if [ -e /usr/lib/linux-image-${_VERSION}/${U_BOOT_FDT} ]
if [ -e ${U_BOOT_FDT_DIR}${_VERSION}/${U_BOOT_FDT} ] && [ -n "${U_BOOT_FDT}" ]
then
_FDT="fdt /usr/lib/linux-image-${_VERSION}/${U_BOOT_FDT}"
elif [ -d usr/lib/linux-image-${_VERSION}/ ]
_FDT="fdt ${U_BOOT_FDT_DIR}${_VERSION}/${U_BOOT_FDT}"
elif [ -d ${U_BOOT_FDT_DIR}${_VERSION}/ ]
then
_FDT="fdtdir /usr/lib/linux-image-${_VERSION}/"
_FDT="fdtdir ${U_BOOT_FDT_DIR}${_VERSION}/"
else
_FDT=""
fi