FreeBSD-10-STABLE hangs when booting from BeagleBone Black eMMC
Ian Lepore
ian at FreeBSD.org
Fri May 2 13:27:36 UTC 2014
On Fri, 2014-05-02 at 12:01 +0300, Sulev-Madis Silber (ketas) wrote:
> On 2014-04-29 18:22, Ian Lepore wrote:
> > This may be the problem -- ubldr's behavior for finding and using dtb
> > files is more complex than it used to be. It may be that it used to
> > claim to find and use the u-boot dtb, but it was really using a static
> > dtb compiled into the kernel. Now if u-boot provides a valid dtb it'll
> > actually get used, even if kernel has a static dtb compiled in.
> >
> > If you remove the u-boot env var 'fdtaddr' then it will fall back to
> > using a compiled-in dtb file instead of a loaded one.
> >
> > What I've been doing these days is installing my dtb files
> > in /boot/modules or /boot/kernel and then setting the dtb file name in a
> > u-boot env var named fdtfile. That makes ubldr find and load the named
> > file in the place it finds the kernel.
> >
> > -- Ian
>
>
> Nice, good suggestion. Now I have this "hack" in bb-uenv.txt:
>
>
> ------------------------------------------------------
> uenvcmd=echo "[environment] delete fdtaddr"; env delete fdtaddr; setenv
> loadfdt ''; setenv fdtfile "/boot/kernel/${fdtfile}"; echo
> "[environment] loadfdt=${loadfdt}"; echo "[environment] fdtfile=${fdtfile}"
> ------------------------------------------------------
>
Just use the plain filename, not /boot/kernel/filename. ubldr knows
where to look for them.
>
> Not sure where FDT file should go? First I though maybe /boot/fdt...
> then /boot/kernel seemed good place...
>
Right now it searches for dtb files the same way as for modules, so it
will look in /boot/kernel and /boot/modules. There's been some talk of
adding a /boot/dtb directory as the first place to search, and having
the build system never automatically install anything to there. That
gives users somewhere to put a customized dtb file that won't get wiped
out every time a new kernel is installed.
>
> Also, maybe we should use this way of loading FDT in every platform it's
> possible? No static FDT in kernel too. Ruins NFS boot, however...
Yeah, when I started down this path my vision was a single IMX6 image
that could boot on any imx6-based system because it comes with a
collection of dtb files. The user just has to choose the right dtb file
on the first boot by setting an env var. That would also require a
pretty flexible u-boot, which may or may not be possible.
-- Ian
More information about the freebsd-arm
mailing list