Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Mar 2019 21:50:48 +0100
From:      Manuel =?ISO-8859-1?Q?St=FChn?= <freebsdnewbie@freenet.de>
To:        Kyle Evans <kevans@freebsd.org>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: efi-loader ignores dtb files?
Message-ID:  <20190328215048.9dccb364c7ccac59f77bb98f@freenet.de>
In-Reply-To: <CACNAnaE4T53nrGPXuJSGPwpe0m_Pdw%2BwxGsCL9Mhu_KA7jKAoQ@mail.gmail.com>
References:  <20190327192320.GA64908@freebsd-t450.fritz.box> <CACNAnaHQxzhmKKWqb4eUQvqdYr1xYYVRYVakQri_YRyvGb8tXA@mail.gmail.com> <20190328190355.1459c85b48211905f8a3e04a@freenet.de> <CACNAnaEFJMbiVRvPQR1FvtSZ6Ee6t2nr11dtoa0QyZwQhuVD2w@mail.gmail.com> <CACNAnaE4T53nrGPXuJSGPwpe0m_Pdw%2BwxGsCL9Mhu_KA7jKAoQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 28 Mar 2019 14:10:27 -0500
Kyle Evans <kevans@freebsd.org> wrote:

> On Thu, Mar 28, 2019 at 1:30 PM Kyle Evans <kevans@freebsd.org> wrote:
> >
> > On Thu, Mar 28, 2019 at 1:06 PM Manuel St=FChn <freebsdnewbie@freenet.d=
e> wrote:
> > >
> > > On Wed, 27 Mar 2019 14:35:26 -0500
> > > Kyle Evans <kevans@freebsd.org> wrote:
> > [... snip ...]
> > > > I'm not sure off-hand why fdt_overlays were not recognized. I would
> > > > drop to loader prompt and double check that it actually ended up in
> > > > the environment, but I don't see any reason off-hand that it wouldn=
't.
> > >
> > > I tried to load the overlays from loader prompt by hand like this:
> > > load -t dtbo sun50i-nanopi-neo2-codec.dtbo
> > > load -t dtbo sun50i-nanopi-neo2-sid.dtbo
> > > load -t dtbo sun50i-nanopi-neo2-ths.dtbo
> > > and they got applied correctly and the corresponding devices appeared=
 in the OS.
> > >
> > > As another test I did was to not load the base dtb file via loader.co=
nf but to use the one provided by u-boot/EFI.
> > > The output looked like this
> > > [...]
> > > Using DTB provided by EFI at 0x47ef8000.
> > > Loading DTB overlays: 'sun50i-nanopi-neo2-codec.dtbo,sun50i-nanopi-ne=
o2-sid,sun50i-nanopi-neo2-ths.dtbo'
> > > /boot/dtb/overlays/sun50i-nanopi-neo2-codec.dtbo size=3D0x11a
> > > /boot/dtb/overlays/sun50i-nanopi-neo2-sid.dtbo size=3D0x1f5
> > > /boot/dtb/overlays/sun50i-nanopi-neo2-ths.dtbo size=3D0x3c5
> > > applying DTB overlay '/boot/dtb/overlays/sun50i-nanopi-neo2-codec.dtb=
o'
> > > applying DTB overlay '/boot/dtb/overlays/sun50i-nanopi-neo2-sid.dtbo'
> > > applying DTB overlay '/boot/dtb/overlays/sun50i-nanopi-neo2-ths.dtbo'
> > > failed to apply overlay: FDT_ERR_NOTFOUND
> > > [...]
> > > In this case the overlays were found and loaded, but did most likely =
not match the u-boot dtb file.
> > >
> > > Is there an issue with loading overlays in conjunction with manually =
loading dtb files via loader.conf?
> > >
> >
> > Yes, I see a problem -- try something like [0] (not even compile
> > tested, but it should work). I'll start working out a more proper
> > solution.
>=20
> I've devised a solution that's a little less hacky at [1]. It
> separates out the loading of overlays from platform_load_dtb into its
> own platform_load_overlays. I've left it as a platform-specific thing
> instead of lifting it into the common fdt bits for two reasons:
>=20
> 1.) We still technically support setting fdt_overlays in the U-Boot
> environment and honoring that, and
> 2.) Not all FDT platforms support overlays as they've not been tested,
> so it's probably best to nop it there for now just in case...
>=20
> If we're ok with dropping #1 (probably not even used, but we don't
> have a way of measuring usage there) and OK with adding untested
> overlay support to powerpc/{ofw,kboot} then this diff drops
> dramatically and the calls to fdt_platform_load_overlays get replaced
> with fdt_load_dtb_overlays calls.
>=20
> > [0] https://people.freebsd.org/~kevans/overlay-hack.diff
>=20
> [1] http://people.freebsd.org/~kevans/overlay-lesshack.diff

Thank you for your patches. I've been trying patch[1] but unfortunately
it seems to not work for me. Due to my lack of knowledge on how to only
build and install /usr/src/stand I've built+installed both
kernel+world, but the described behavior did not change; still no
overlays when defining a dtb file in loader.conf.


--=20
Manuel=20



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190328215048.9dccb364c7ccac59f77bb98f>