Questions about BBB/BBG dtb names vs. content
Oleksandr Tymoshenko
gonzo at bluezbox.com
Sat Feb 11 20:11:43 UTC 2017
Tony Hain (tony at tndh.net) wrote:
> > -----Original Message-----
> > From: Oleksandr Tymoshenko [mailto:gonzo at bluezbox.com]
> > Sent: Friday, February 10, 2017 5:53 PM
> > To: Tony Hain
> > Cc: freebsd-arm at freebsd.org
> > Subject: Re: Questions about BBB/BBG dtb names vs. content
> >
> > Tony Hain (tony at tndh.net) wrote:
> > > When I built 12 current the other day, I found some confusing dtb file
> > > names.
> > > First there were identical files :
> > > am335x-bone.dtb beaglebone.dtb
> > > am335x-boneblack.dtb beaglebone-black.dtb
> > >
> > > But there was not a matching one for green. Is that intentional?
> > > am335x-bonegreen.dtb
> > >
> > > Then the content didn't match the names:
> > > am335x-boneblack.dtb --
> > > compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
> > >
> > > am335x-bonegreen.dtb --
> > > compatible = "ti,am335x-bone-green", "ti,am335x-bone-black",
> > > "ti,am335x-bone", "ti,am33xx";
> > >
> > > Aren't the strings in the compatible line supposed to match the file
> names?
> > > Is there a reason there are identical files in the dtb path rather
> > > than a link?
> > > Is the fdt_file="" line required in loader.conf if the am335x file
> > > name exists?
> > >
> > > I have the BBB running with fdt_file="beaglebone-black.dtb", and the
> > > changes to it for turning on uart1. Should I have made the changes to
> > > the am335x file instead, or should I create the beaglebone-green.dtb
> file
> > for the BBG?
> >
> > beaglebone*dtb is FreeBSD-specific DTB names, dts files for them were
> > created in early days of FDT support. am335x-*dtb are upstream names,
> > Linux and U-Boot use them as standard names.
> >
> > U-Boot can detect type of board in run-time and set fdt_file env variable
> > based on that type. Until recently we had sysutils/u-boot-beaglebone port
> > with custom FreeBSD-specific patch where this autodetect logic used
> > beaglebone*dtb names. Recently it was converted to being slave port to
> > sysutils/u-boot-master as a part of U-Boot ports unification effort.
> During this
> > conversion aforementioned patch was deleted so now u-boot operates with
> > am335x-*.dtb names. To be backward-compatible with previously built
> > systems, that still refer to old-style names, we now create links,
> > beaglebone.dtb is a link to am335x-bone.dtb and beaglebone-black.dtb is a
> > link to am335x-boneblack.dtb. There was no FreeBSD-specific DTS for
> > beaglebone green previously, so am335x-bonegreen.dtb does not have
> > beaglebone* counterpart.
>
> Thanks for the background. I had seen comments about a transition, but not
> enough detail to figure out old vs. new.
>
> >
> > At the moment any changes toboot/fdt/dts/arm/beagebone-*.dts are not
> > going affect beagebone-*.dtb because these dtbs created as links, not
> > generated. I have patch in review that fixes it and brings back old-style
> DTBs
> > along with some fixes that are in upstream but haven't been merged to
> > FreeBSD tree yet: https://reviews.freebsd.org/D9432
>
> That may be the intent, but as of FreeBSD 12.0-CURRENT #0 r313411: Wed Feb
> 8 00:04:14 PST 2017 they were separate files, not links:
> root at tic:~ # ls -l /boot/dtb
> total 248
> -r--r--r-- 2 root wheel 33017 Feb 8 00:07 am335x-bone.dtb
> -r--r--r-- 2 root wheel 33801 Feb 8 00:07 am335x-boneblack.dtb
> -r--r--r-- 1 root wheel 33305 Feb 8 00:07 am335x-bonegreen.dtb
> -r--r--r-- 2 root wheel 33801 Feb 8 00:07 beaglebone-black.dtb
> -r--r--r-- 2 root wheel 33017 Feb 8 00:07 beaglebone.dtb
> -r--r--r-- 1 root wheel 31483 Feb 8 00:07 ufw.dtb
>
> Links are what I expected, and is why I asked for clarification.
They are hardlinks, not symlinks
% ls -ali am335x-bone.dtb beaglebone.dtb am335x-boneblack.dtb beaglebone-black.d
tb
4251661 -r--r--r-- 2 root wheel 33017 Feb 11 11:48 am335x-bone.dtb
4251662 -r--r--r-- 2 root wheel 33801 Feb 11 11:48 am335x-boneblack.dtb
4251662 -r--r--r-- 2 root wheel 33801 Feb 11 11:48 beaglebone-black.dtb
4251661 -r--r--r-- 2 root wheel 33017 Feb 11 11:48 beaglebone.dtb
inode number (first column) is the same respective dtbs.
--
gonzo
More information about the freebsd-arm
mailing list