public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jerry Van Baren <gvb.uboot@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Testing todays u-boot-fdt
Date: Sun, 22 Apr 2007 20:05:25 -0400	[thread overview]
Message-ID: <462BF845.50109@gmail.com> (raw)
In-Reply-To: <462BC7CF.5000800@freescale.com>

Timur Tabi wrote:
> Jerry Van Baren wrote:
> 
>> The bad version error is because you are running a version 16 blob and 
>> you need a version 17 blob to allow modifications. 
> 
> Why?  U-Boot was able to modify v16 blobs, why can't libfdt do the same?

Hi Timur,

It had very limited capabilities: it "modified" the blob by creating a 
new blob, copying the old stuff to the new blob, and then adding the 
"chosen" node.  For some values, it rewrote values in place but was 
unable to create new properties or nodes.  Switching to libfdt and 
insisting on having a v17 blob (with spare space) totally removes those 
limitations.

libfdt allows modifying the blob in place, but only if it is v17.  I've 
taken advantage of this.  libfdt actually has four sets of capabilities:
1) Read-only
2) Write sequentially (effectively what was done previously)
3) Write in place (modifying pre-existing values - also previous)
4) Full featured write (requires v17 and available space)

I've implemented write/modifies using the full write capabilities 
because it is the simplest for implementing the fdt command and most 
flexible by far (doing a write modifies the value or creates it if it 
doesn't exist).

An improvment to the "set" command would be to do a write in place if 
the full featured write failed (i.e. not a v17 blob or no space left). 
Patches are welcome.  ;-)

Best regards,
gvb

  reply	other threads:[~2007-04-23  0:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-19  8:58 [U-Boot-Users] Testing todays u-boot-fdt Wolfgang Grandegger
2007-04-19 12:08 ` Jerry Van Baren
2007-04-19 13:10   ` Wolfgang Grandegger
2007-04-19 13:19     ` Jerry Van Baren
2007-04-19 15:24   ` Timur Tabi
2007-04-22 20:38   ` Timur Tabi
2007-04-23  0:05     ` Jerry Van Baren [this message]
2007-04-19 13:28 ` Jerry Van Baren
2007-04-19 13:42   ` Wolfgang Grandegger
2007-04-19 15:51   ` Wolfgang Denk
2007-04-19 23:11     ` Jerry Van Baren
2007-04-19 23:19       ` Wolfgang Denk
2007-04-20 16:36       ` Wolfgang Grandegger
2007-04-20 17:11         ` Jerry Van Baren
2007-04-20 20:40           ` Wolfgang Denk
2007-04-20 22:02             ` Jerry Van Baren
2007-04-20  3:38 ` Jerry Van Baren
2007-04-20 13:32   ` Wolfgang Denk
2007-04-20  3:40 ` Jerry Van Baren
     [not found] <4629358C.5050401@cideas.com>
2007-04-20 23:01 ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=462BF845.50109@gmail.com \
    --to=gvb.uboot@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox