Message ID | 1397322931-16688-1-git-send-email-fathi.boudra@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sat, 2014-04-12 at 20:15 +0300, Fathi Boudra wrote: > Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> > --- > scripts/package/builddeb | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/scripts/package/builddeb b/scripts/package/builddeb > index f46e4dd..24cb3b1 100644 > --- a/scripts/package/builddeb > +++ b/scripts/package/builddeb > @@ -165,6 +165,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then > fi > fi > > +if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then > + mkdir -p "$tmpdir/boot/dtb/$version" The boot loader only needs to read at most one of the installed DTB files on any given system, and you can't in general expect it to read a DTB from the filesystem. So why not install them in /usr/lib/linux-image-$version where flash-kernel expects? > + INSTALL_DTBS_PATH="$tmpdir/boot/dtb/$version" $MAKE KBUILD_SRC= dtbs_install > +fi > + The dtbs_install target is (currently) specific to arm so this appears to break other architectures where CONFIG_OF is used. (But it's good to know that it's there, and we should maybe start using it in the Debian official packages.) Ben. > if [ "$ARCH" != "um" ]; then > $MAKE headers_check KBUILD_SRC= > $MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
On 14 April 2014 22:55, Ben Hutchings <ben@decadent.org.uk> wrote: > On Sat, 2014-04-12 at 20:15 +0300, Fathi Boudra wrote: >> Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> >> --- >> scripts/package/builddeb | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/scripts/package/builddeb b/scripts/package/builddeb >> index f46e4dd..24cb3b1 100644 >> --- a/scripts/package/builddeb >> +++ b/scripts/package/builddeb >> @@ -165,6 +165,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then >> fi >> fi >> >> +if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then >> + mkdir -p "$tmpdir/boot/dtb/$version" > > The boot loader only needs to read at most one of the installed DTB > files on any given system, and you can't in general expect it to read a > DTB from the filesystem. So why not install them in > /usr/lib/linux-image-$version where flash-kernel expects? From various discussions, I think it's agreed that /usr/lib/... isn't the right path to use (and we use it since years in Linaro images unfortunately). The consensus seems to follow bootloader spec: http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/ and install the DTBs under /boot. Get it versioned is preferable. It should address the various bootloaders (U-boot, UEFI, GRUB, barebox, etc...) requirements, except the VFAT file system. IMO we should support the distribution wide consensus in this case, instead of flash-kernel (Debian/Ubuntu specific tool) expectations. We'll probably end up by adding a symlink to keep compatibility with older systems or fix flash-kernel. Any other feedback on this topic is appreciated. >> + INSTALL_DTBS_PATH="$tmpdir/boot/dtb/$version" $MAKE KBUILD_SRC= dtbs_install >> +fi >> + > > The dtbs_install target is (currently) specific to arm so this appears > to break other architectures where CONFIG_OF is used. Right. I'll fix it. > (But it's good to know that it's there, and we should maybe start using > it in the Debian official packages.) > > Ben. > >> if [ "$ARCH" != "um" ]; then >> $MAKE headers_check KBUILD_SRC= >> $MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr" > > -- > Ben Hutchings > I say we take off; nuke the site from orbit. It's the only way to be sure. Cheers,
On Tue, 2014-04-15 at 08:02 +0300, Fathi Boudra wrote: > On 14 April 2014 22:55, Ben Hutchings <ben@decadent.org.uk> wrote: > > On Sat, 2014-04-12 at 20:15 +0300, Fathi Boudra wrote: > >> Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> > >> --- > >> scripts/package/builddeb | 5 +++++ > >> 1 file changed, 5 insertions(+) > >> > >> diff --git a/scripts/package/builddeb b/scripts/package/builddeb > >> index f46e4dd..24cb3b1 100644 > >> --- a/scripts/package/builddeb > >> +++ b/scripts/package/builddeb > >> @@ -165,6 +165,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then > >> fi > >> fi > >> > >> +if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then > >> + mkdir -p "$tmpdir/boot/dtb/$version" > > > > The boot loader only needs to read at most one of the installed DTB > > files on any given system, and you can't in general expect it to read a > > DTB from the filesystem. So why not install them in > > /usr/lib/linux-image-$version where flash-kernel expects? > > From various discussions, I think it's agreed that /usr/lib/... isn't > the right path to use (and we use it since years in Linaro images > unfortunately). > The consensus seems to follow bootloader spec: > http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/ > and install the DTBs under /boot. I wasn't aware of such consensus. I have seen an earlier version of this spec and it seemed to be only supported by one distribution. > Get it versioned is preferable. > It should address the various bootloaders (U-boot, UEFI, GRUB, > barebox, etc...) requirements, except the VFAT file system. It seems to me that: - It might work with U-boot, except for the many exising versions that it doesn't work with. - It might work with GRUB, though that doesn't seem to be widely used yet on ARM. - It won't work with UEFI because /boot/dtb will not be on the ESP. (And dpkg can't upgrade on a filesystem that doesn't support hard links so you should never expect to install files directly on the ESP.) > IMO we should support the distribution wide consensus in this case, > instead of flash-kernel (Debian/Ubuntu specific tool) expectations. > We'll probably end up by adding a symlink to keep compatibility with > older systems or fix flash-kernel. > > Any other feedback on this topic is appreciated. [...] flash-kernel works today and you are proposing to do something that might eventually work some time in the future. Ben.
diff --git a/scripts/package/builddeb b/scripts/package/builddeb index f46e4dd..24cb3b1 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -165,6 +165,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then fi fi +if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then + mkdir -p "$tmpdir/boot/dtb/$version" + INSTALL_DTBS_PATH="$tmpdir/boot/dtb/$version" $MAKE KBUILD_SRC= dtbs_install +fi + if [ "$ARCH" != "um" ]; then $MAKE headers_check KBUILD_SRC= $MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> --- scripts/package/builddeb | 5 +++++ 1 file changed, 5 insertions(+)