From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jon Loeliger Subject: Re: [PATCH v6 1/2] Add fdtget utility to read property values from a device tree Date: Sat, 21 Jan 2012 15:26:30 -0600 Message-ID: References: <1327169688-7569-2-git-send-email-sjg@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-reply-to: <1327169688-7569-2-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Simon Glass Cc: Devicetree Discuss List-Id: devicetree@vger.kernel.org > This simply utility makes it easy for scripts to read values from the device > tree. It is written in C and uses the same libfdt as the rest of the dtc > package. > > What is it for: > - Reading fdt values from scripts > - Extracting fdt information within build systems > - Looking at particular values without having to dump the entire tree > > To use it, specify the fdt binary file on command line followed by a list of > node, property pairs. The utility then looks up each node, finds the property > and displays the value. > > Each value is printed on a new line. > > fdtget tries to guess the type of each property based on its contents. This > is not always reliable, so you can use the -t option to force fdtget to decode > the value as a string, or byte, etc. > > To read from stdin, use - as the file. > > Usage: > fdtget
[ ]... > Options: > -t Type of data > -h Print this help > > s=string, i=int, u=unsigned, x=hex > Optional modifier prefix: > hh or b=byte, h=2 byte, l=4 byte (default) > > Signed-off-by: Simon Glass Applied. jdl