[Letux-kernel] change in DT names

H. Nikolaus Schaller hns at goldelico.com
Fri Mar 24 13:29:46 CET 2017


Hi,
I have upgraded the stable kernel to 4.10.5 [1] and made one small
modification which is very important to know:

	the DTB is renamed to be omap3-gta04a5one.dtb

The reason for this move is that the a2 a3 a4 a5 suffix does not
really denote which RAM/NAND chip is installed, but numbers the GTA04
PCB layout variants, i.e. the wiring of the components and which
components *can* be installed (not which *are* installed).

So differentiating the NAND flash type should not be done by
version number but a specific type indicator. Hence the optional
"one" suffix.

Adding this to U-Boot was very simple [1]. Just a strcat() inside an
#if. This makes the gta04one U-Boot provide for the right suffixed file.

For the kernel DTS it now allows to factor out [3] the basic changes
i.e. WLAN, Bluetooth, IrDA, Headset etc. into omap3-gta04a5.dts.
This now only describes all layout changes compared to omap3-gta04a4.dts
but excludes the NAND type. So it would be for a GTA04A5 board where
we install (maybe by repair) one of the other NAND chips.

The new DTS omap3-gta04a5one.dts just replaces the gmpc setup for
configuring OneNAND.

So the 4.10.5 kernel now has two different device tree files for
the GTA04A5 board...

Installation is slightly tricky since if you don't flash U-Boot
and kernel in parallel, it can happen that the older U-Boot loads
the new omap3-gta04a5.dtb which does no longer configure for OneNAND.
So you end up with no /dev/mtd*.

And even more tricky is to get the right DTB into NAND...

If we boot with the old U-Boot in NAND we do not get it right into
the kernel before we have flashed the new U-Uboot *and* done
a saveenv command by the new U-Boot. This needs another reboot
and reflash sequence...

The simpler solution was to make the ./flash-nand script read out
the fdtfile environment variable from U-Boot and fix it if the nand_cmd
variable tells that we did really boot with OneNand [4].

But that seems to be the biggest problem.

A smaller one can happen if you install the new U-Boot to an SD card
but load the old one from NAND...

A second problem is that if you install an older kernel for comparison,
there is no omap3-gta04a5one.dtb. This can be easily detected and
solved by renaming the DTB once.

So in summary, the new setup is in sync (and tested to boot from µSD
and NAND). But if you mix older and newer components, please be aware
of this subtle effect.

BR,
Nikolaus

[1]: http://git.goldelico.com/?p=gta04-kernel.git;a=shortlog;h=refs/heads/letux-4.10.5
[2]: http://git.goldelico.com/?p=gta04-uboot.git;a=commit;h=9e357b610f85c766c600beb1fcf00a7dca64f8c0
[3]: http://git.goldelico.com/?p=gta04-kernel.git;a=commit;h=2ff0de76e9e921a4685b915207c4af32b5150cb8
[4]: http://git.goldelico.com/?p=gta04-kernel.git;a=commit;h=0fdabadfe2899300e5117718139735322666911f


More information about the Letux-kernel mailing list