On Sat, Jul 15, 2017 at 09:32:50PM +0300, Riku Voipio wrote:
>
> This is correct path. That is where the kernel package installs dtbs to.
>
> > But it should be /dtb-4.9.0-3-armmp-lpae
>
> > This error make the menu unusable. No matter what entry you choose, file to
> > load
> > dtb file and u-boot fallback to boot.scr for loading the images.
>
> I think you have a partition setup where /boot is a separate
> partition. This is unfortunately
> not supported at the moment. You need to set up fdtdir setting in
> /etc/default/u-boot file to fit
> your setup.
I added this line to the /etc/default/u-boot:
U_BOOT_FDT_DIR="/dtbs/"
but the script generate an empty line instead of the fdtdir line.
The problem is still due to the /boot being in a separate partition. The
script have already has some logic to handle a separated boot partition, but
is not used for the fdtdir.
I propose the following patch:
--- /usr/sbin/u-boot-update 2017-06-26 07:47:08.000000000 +0200
+++ u-boot-update 2017-07-18 14:09:56.831731116 +0200
@@ -135,11 +135,15 @@
if [ "$(stat --printf %d /)" = "$(stat --printf %d /boot)" ]
then
+ #_BOOT_DIRECTORY is the boot directory for u-boot at boot time
+ #_BOOT_PATH is where is mounted the boot directory after boot
# / and /boot are on the same filesystem
_BOOT_DIRECTORY="/boot"
+ _BOOT_PATH="/"
else
# / and /boot are not on the same filesystem
_BOOT_DIRECTORY=""
+ _BOOT_PATH="/boot/"
fi
@@ -156,10 +160,10 @@
else
_INITRD=""
fi
- if [ -e ${U_BOOT_FDT_DIR}${_VERSION}/${U_BOOT_FDT} ] && [ -n
"${U_BOOT_FDT}" ]
+ if [ -e ${_BOOT_PATH}${U_BOOT_FDT_DIR}${_VERSION}/${U_BOOT_FDT} ] &&
[ -n "${U_BOOT_FDT}" ]
then
_FDT="fdt ${U_BOOT_FDT_DIR}${_VERSION}/${U_BOOT_FDT}"
- elif [ -d ${U_BOOT_FDT_DIR}${_VERSION}/ ]
+ elif [ -d ${_BOOT_PATH}/${U_BOOT_FDT_DIR}${_VERSION}/ ]
then
_FDT="fdtdir ${U_BOOT_FDT_DIR}${_VERSION}/"
else
Also, the script should stop with a error message, if a file or a directory is
not found, so it will not create a
invalid configuration file.
Thanks,
Diego