On 2017-08-27, Heinrich Schuchardt wrote:
> On 08/25/2017 05:31 PM, Vagrant Cascadian wrote:
>> On 2017-08-24, Heinrich Schuchardt wrote:
>>> is there really any need to keep /boot/dtbs/VERSION/ if we have 
>>> /boot/dtbs/VERSION/VENDOR/?
>> 
>> Yes, if the u-boot version on the board sets fdtfile to BOARD.dtb.
>> 
>> We have no way of knowing from flash-kernel what the u-boot on the
>> board will set for fdtfile. The fdtfile variable may be
>> VENDOR/BOARD.dtb or it may just be BOARD.dtb. In some boards,
>> depending on which version of u-boot you're using, it could be
>> either one.
>> 
>> Supporting both is the only real way I can think of to handle those
>> two common cases.

Sorry for taking so long... after thinking about this a while, your
following proposal sounds pretty good! Thanks for spelling it out!


> I just want to make sure that we agree on the way we store and handle
> the vendor directory.
>
> In linux-next I found these two files:
> arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
> arch/arm/boot/dts/bcm2837-rpi-3-b.dts
> both with model = "Raspberry Pi 3 Model B".
>
> I suggest to have a single entry in all.db looking like this
>
> Machine: Raspberry Pi 3 Model B
> Kernel-Flavors: arm64 armmp armmp-lpae
> DTB-Id: broadcom/bcm2837-rpi-3-b.dtb
...
> where the vendor directory is encoded in DTB-Id.
>
> On a 64bit system flash-kernel will copy
> /usr/lib/linux-image-4.12.0-1-arm64/broadcom/bcm2837-rpi-3-b.dtb to
> /boot/dtbs/4.12.0-1-arm64/bcm2837-rpi-3-b.dtb.
>
> It creates a link to
> /boot/dtbs/4.12.0-1-arm64/broadcom/bcm2837-rpi-3-b.dtb.
>
> On a 32bit system flash-kernel we copy
> /usr/lib/linux-image-4.12.0-1-armmp/bcm2837-rpi-3-b.dtb to
> /boot/dtbs/4.12.0-1-armmp/bcm2837-rpi-3-b.dtb.
>
> We create a link to
> /boot/dtbs/4.12.0-1-armmp/broadcom/bcm2837-rpi-3-b.dtb
> because all.db has an entry with vendor directory.
>
> For a 32bit only system we will have an entry like
>
> Machine: Wandboard i.MX6 Quad Board
> Kernel-Flavors: armmp
> DTB-Id: imx6q-wandboard.dtb
...
>
> with no vendor directory given.
>
> On a 32bit system flash-kernel we copy
> /usr/lib/linux-image-4.12.0-1-armmp/imx6q-wandboard.dtb to
> /boot/dtbs/4.12.0-1-arm64/imx6q-wandboard.dtb.
>
> We do not create a link to
> /boot/dtbs/4.12.0-1-armmp/freescale/imx6q-wandboard.dtb
> because no vendor directory is provided in all.db.
>
> Does this match your view?

In the kernel, it's consistantly including the vendor subdir, so we can
update the flash-kernel db to always include the subdir for 64-bit arm.
Even with odd cases are the raspberry pi 3, it seems to handle it pretty
well.

My original thought was to detect if the .dtb was found in a subdir, and
then create the corresponding subdir, but your proposal sounds much
simpler.


It wouldn't surprise me if someday the 32-bit arm stuff gets moved into
subdirs anyways... but we'll handle that if that happens.


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature

Reply via email to