Skip to contentSkip to conversation

cmd, fdt: add subcommand "get" to fdt header

PATCH New Jonas Mark (BT-FIR/ENG1) 2 participants 2 messages Nov 21, 2018 – Nov 29, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 cmd, fdt: add subcommand "get" to fdt header

Hi Heiko,

Quoted 18 lines

store fdt header member with name <member> in U-Boot Environment variable with name <var>.

for example to get the total length of the fdt and store it in filesize, call:

fdt header get filesize totalsize

For membernames look into fdt header definition at scripts/dtc/libfdt/libfdt.h

---

Changes in v3:
- add comments from Marek
simplify for loop, use fdtp[i] -> drop ftdip++

Quoted 5 lines

Changes in v2:
- add obviously missing "static const char *"

 cmd/fdt.c | 40 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

The patch was

and works fine.

Greetings,
Mark

Building Technologies, Panel Software Fire (BT-FIR/ENG1)
Bosch Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY | www.boschsecurity.com

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Tanja Rückert, Andreas Bartz, Thomas Quante, Bernhard Schuster

#1 lore raw

PATCH v3 1/1 cmd, fdt: add subcommand "get" to fdt header

Hi Heiko,

Quoted 18 lines

store fdt header member with name <member> in U-Boot Environment variable with name <var>.

for example to get the total length of the fdt and store it in filesize, call:

fdt header get filesize totalsize

For membernames look into fdt header definition at scripts/dtc/libfdt/libfdt.h

---

Changes in v3:
- add comments from Marek
simplify for loop, use fdtp[i] -> drop ftdip++

Quoted 5 lines

Changes in v2:
- add obviously missing "static const char *"

 cmd/fdt.c | 40 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

The patch was

and works fine.

Greetings,
Mark

Building Technologies, Panel Software Fire (BT-FIR/ENG1) Bosch Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY | www.boschsecurity.com

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118
Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Tanja Rückert, Andreas Bartz, Thomas Quante, Bernhard Schuster

Applied to u-boot-dm/master, thanks!