Skip to contentSkip to conversation

Update on the fdt command

U-Boot-Users Jerry Van Baren 2 participants 4 messages Mar 21, 2007

lore
Share & tools
lore
#0 lore raw

Hi Wolfgang, et al.,

I'm getting close to having a functional "fdt" command. For a sneak peek you can look here:
<http://www.cideas.us/cgi-bin/gitweb.cgi?p=u-boot/u-boot-mpc83xx;a=summary>

The new fdt command can be found here:
<http://www.cideas.us/cgi-bin/gitweb.cgi?p=u-boot/u-boot-mpc83xx;a=blob;f=common/cmd_fdt.c;h=8cce35b137f4214a2c6cbab026460b54d72bb6e0;hb=HEAD>
(see line 777 ff. to see the subcommand list). Please critique my subcommands - it will hurt my feelings, but I'll get over it.

Remaining improvements before it is Ready For Consideration[tm]:
* Implement mknod and the rm node/property subcommands
* Fix up the board-specific OF extensions (primarily PCI-related) to use libfdt instead of the current ft_build.c routines
* Add/modify a configuration #define to select between the ft_build.c methodology & support and the new fdt/libfdt methodology & support.
* Remove the auto-OF generation calls from the "bootm" command
- This could be controversial: my proposal is to replace the automagic generation of the "chosen", "u-boot-env", and "bd_t" nodes currently done by the "bootm" command with explicit calls to the new "fdt" command.

My proposal to Wolfgang is that denx.de create a repository for my changes so I can submit them and ultimately he can pull the changes into the master repo. The changes to add David Gibson's libfdt to the source tree will be fairly large (I'm assuming too large to review as an emailed patch). The changes involving the new "fdt" command are more manageable, but still will be non-trivial since the new command is 800++ lines.

Best regards,
gvb

#1 lore raw

Hi,

Quoted 9 lines · in message <[email protected]> you wrote:

I'm getting close to having a functional "fdt" command. For a sneak peek you can look here:
<http://www.cideas.us/cgi-bin/gitweb.cgi?p=u-boot/u-boot-mpc83xx;a=summary>

The new fdt command can be found here:
<http://www.cideas.us/cgi-bin/gitweb.cgi?p=u-boot/u-boot-mpc83xx;a=blob;f=common/cmd_fdt.c;h=8cce35b137f4214a2c6cbab026460b54d72bb6e0;hb=HEAD>
(see line 777 ff. to see the subcommand list). Please critique my subcommands - it will hurt my feelings, but I'll get over it.

Looks fine to me, but I cannot understand this part:

 786         "fdt rm     <path> <prop>           - Delete <property>\n"
 787         "fdt rm     <path> <node>           - Delete the node *NOTE THE SPACE*\n"

NOTE THE SPACE? Which one? And where is the difference?

Quoted 3 lines

My proposal to Wolfgang is that denx.de create a repository for my changes so I can submit them and ultimately he can pull the changes into the master repo. The changes to add David Gibson's libfdt to the source

Is the name u-boot-fdt ok? Can you please send me your public SSH key?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Just think, with VLSI we can have 100 ENIACS on a chip!"
- Alan Perlis
#2 lore raw
Quoted 12 lines · Wolfgang Denk

Hi,

Quoted 8 lines · in message <[email protected]> you wrote:

I'm getting close to having a functional "fdt" command. For a sneak peek you can look here:
<http://www.cideas.us/cgi-bin/gitweb.cgi?p=u-boot/u-boot-mpc83xx;a=summary>

The new fdt command can be found here:
<http://www.cideas.us/cgi-bin/gitweb.cgi?p=u-boot/u-boot-mpc83xx;a=blob;f=common/cmd_fdt.c;h=8cce35b137f4214a2c6cbab026460b54d72bb6e0;hb=HEAD>
(see line 777 ff. to see the subcommand list). Please critique my subcommands - it will hurt my feelings, but I'll get over it.

Quoted 6 lines

Looks fine to me, but I cannot understand this part:

 786         "fdt rm     <path> <prop>           - Delete <property>\n"
 787         "fdt rm     <path> <node>           - Delete the node *NOTE THE SPACE*\n"

NOTE THE SPACE? Which one? And where is the difference?

The space between <path> and <node>... everywhere else, <path> includes the last node and a space delimits the <property>. I propose this to make parsing easier: I would not have to find the last "/" to find the node that was intended to be deleted. The alternative is:

"fdt rm     <path> <prop>     - Delete <property>\n"
"fdt rm     <path>            - Delete the last node in <path>\n"

I have not implemented the rm command yet, so I'm flexible. It also means I have not tried it in real life... I wouldn't be surprised if I find the extra space between <path> and <node> is so annoying that it is worth finding the last '/' (which really isn't that difficult to parse).

The advantage of specifying "<path> <node>" as I see it is that it is harder to screw up and delete major parts of the tree inadvertently
rm /cpus # poof, all gone!
when you really meant to do
rm /cpus PowerPC,8560 at 0
Either way, I would not allow the deletion of the root node. For the <path>-only version
rm /
is valid syntax but would be a problem - would have to test for this as a special case. For the <path> <node>, this becomes invalid syntax and would not be permitted. (Note that, either way, you can delete all the subnodes of the root '/' individually. Deleting the subnodes makes sense, deleting the root node itself does not.)

Quoted 5 lines
Quoted 3 lines

My proposal to Wolfgang is that denx.de create a repository for my changes so I can submit them and ultimately he can pull the changes into the master repo. The changes to add David Gibson's libfdt to the source

Is the name u-boot-fdt ok? Can you please send me your public SSH key?

u-boot-fdt is great. I'll send you my key.

Quoted 3 lines

Best regards,

Wolfgang Denk

Thanks,
gvb

#3 lore raw
Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 6 lines
Quoted 4 lines

My proposal to Wolfgang is that denx.de create a repository for my changes so I can submit them and ultimately he can pull the changes into the master repo. The changes to add David Gibson's libfdt to the source

Is the name u-boot-fdt ok? Can you please send me your public SSH key?

u-boot-fdt is great. I'll send you my key.

Done - see
http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot/u-boot-fdt.git;a=summary

I also got your key, and all should be set up.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Our business is run on trust.  We trust you will pay in advance.