Skip to contentSkip to conversation

binman: u-boot-dtb vs. filename

DISCUSSION Jan Kiszka 2 participants 3 messages Nov 21, 2020 – Nov 22, 2020

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

Hi,

I stumbled over README.entries claiming

Entry: u-boot-dtb: U-Boot device tree
-------------------------------------

Properties / Entry arguments:
- filename: Filename of u-boot.dtb (default 'u-boot.dtb')

However,

	u-boot-dtb {
		filename = "foo.dtb"
	}

only pulls u-boot.dtb. Tried to fix that but I failed to understand the binman logic. Maybe the documentation (also that of u-boot-dtb-with-ucode) was just not supposed to refer to filename.

Using 'blob' now, like other boards.

Jan

#1 lore raw

Hi Jan,

Quoted 18 lines · Jan Kiszka

Hi,

I stumbled over README.entries claiming

Entry: u-boot-dtb: U-Boot device tree
-------------------------------------

Properties / Entry arguments:
- filename: Filename of u-boot.dtb (default 'u-boot.dtb')

However,

        u-boot-dtb {
                filename = "foo.dtb"
        }
Quoted 5 lines

only pulls u-boot.dtb. Tried to fix that but I failed to understand the binman logic. Maybe the documentation (also that of u-boot-dtb-with-ucode) was just not supposed to refer to filename.

Using 'blob' now, like other boards.

This was by design, since it is trying to pick up a particular .dtb file, but as you point out the docs do not match. I wonder if using 'blob-dtb' as the entry type would work?

The reason is that Entry_u_boot_dtb has a GetDefaultFilename() function and that ignores the filename property.

I suspect that changing it to:

def GetDefaultFilename(self):
return self._filename or 'u-boot.dtb'

might work too. I will have a think about which fix is best and see if I can add a test to ftest.py

Regards,
Simon

author
#2 lore raw
Quoted 25 lines · Simon Glass

Hi Jan,

Quoted 22 lines · Jan Kiszka

Hi,

I stumbled over README.entries claiming

Entry: u-boot-dtb: U-Boot device tree
-------------------------------------

Properties / Entry arguments:
- filename: Filename of u-boot.dtb (default 'u-boot.dtb')

However,

        u-boot-dtb {
                filename = "foo.dtb"
        }

only pulls u-boot.dtb. Tried to fix that but I failed to understand the binman logic. Maybe the documentation (also that of u-boot-dtb-with-ucode) was just not supposed to refer to filename.

Quoted 6 lines
Quoted 1 line

Using 'blob' now, like other boards.

This was by design, since it is trying to pick up a particular .dtb file, but as you point out the docs do not match. I wonder if using 'blob-dtb' as the entry type would work?

blob-dtb talks about its content being "managed by the 'state' module", whatever that is. Thus it refuses to take a filename.

FWIW, here is the configuration I was trying this on:
https://github.com/siemens/u-boot/commit/6b61fbee0ec122ef054e0ee975a20e6888061823#diff-340d17a0f1087ea07fb2e85ae38c1f265d1b4ad2d1ae11a53a8ce0be8ec51c16R27.
Open for any suggestions to express this even better.

Jan

Quoted 14 lines

The reason is that Entry_u_boot_dtb has a GetDefaultFilename() function and that ignores the filename property.

I suspect that changing it to:

def GetDefaultFilename(self):
return self._filename or 'u-boot.dtb'

might work too. I will have a think about which fix is best and see if I can add a test to ftest.py

Regards,
Simon