grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] 10_linux: Add devicetree command, if a dtb is present.


From: Leif Lindholm
Subject: Re: [PATCH] 10_linux: Add devicetree command, if a dtb is present.
Date: Tue, 28 May 2019 12:01:02 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Tue, May 28, 2019 at 11:27:08AM +0200, Daniel Kiper wrote:
> On Thu, May 23, 2019 at 10:31:13PM +0100, Dimitri John Ledkov wrote:
> > Specifically support dtb paths as created by flash-kernel package on
> > Debian/Ubuntu systems, and a generic one. Possibly this needs to be
> > extended to support other devicetree blob paths as installed on other
> > distributions (similar to how multiple initrd paths are
> > supported).
> >
> > This is particularly useful during new platforms bring up, which may
> > not yet be fully supported by Linux kernel. Currently I have tested
> > this patch, on top of Debian grub2 packaging/distro-patches to
> > successfully boot Asus Novago TP3700QL. Similarly other laptops would
> > find this useful, like Lenovo Mixx 630, Lenovo Yoga C630, and HP Envy
> > X2.
> >
> > Signed-off-by: Dimitri John Ledkov <address@hidden>
> 
> LGTM but I would like to hear Leif and/or Alex (CC-ed) opinion here.

This is not my preferred solution to this problem (Dimitri, I'll ping
you offline regarding this).

Also it is fundamentally incompatible with UEFI Secure Boot (see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=927888).

We should probably look into disabling the devicetree command by
default for the UEFI port. I'll revisit that point post release.

Regards,

Leif

> And this is not a release material.
> 
> Daniel
> 
> > ---
> >  util/grub.d/10_linux.in | 15 +++++++++++++++
> >  1 file changed, 15 insertions(+)
> >
> > diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
> > index 4532266be..bb6c8912f 100644
> > --- a/util/grub.d/10_linux.in
> > +++ b/util/grub.d/10_linux.in
> > @@ -153,6 +153,13 @@ EOF
> >      sed "s/^/$submenu_indentation/" << EOF
> >     echo    '$(echo "$message" | grub_quote)'
> >     initrd  $(echo $initrd_path)
> > +EOF
> > +  fi
> > +  if test -n "${dtb}" ; then
> > +    message="$(gettext_printf "Loading device tree blob...")"
> > +    sed "s/^/$submenu_indentation/" << EOF
> > +   echo    '$(echo "$message" | grub_quote)'
> > +   devicetree  ${rel_dirname}/${dtb}
> >  EOF
> >    fi
> >    sed "s/^/$submenu_indentation/" << EOF
> > @@ -236,6 +243,14 @@ while [ "x$list" != "x" ] ; do
> >      gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
> >    fi
> >
> > +  dtb=
> > +  for i in "dtb-${version}" "dtb-${alt_version}" "dtb"; do
> > +    if test -e "${dirname}/${i}" ; then
> > +      dtb="$i"
> > +      break
> > +    fi
> > +  done
> > +
> >    config=
> >    for i in "${dirname}/config-${version}" 
> > "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" 
> > ; do
> >      if test -e "${i}" ; then
> > --
> > 2.20.1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]