[U-Boot] U-Boot: Enhancement request to get flash device specific information
Simon Glass
sjg at chromium.org
Thu Jul 3 18:58:43 CEST 2014
Hi,
On 2 July 2014 10:05, HEERA NAND BHAGTANI <diamond.mbm at gmail.com> wrote:
> Hi U-boot team,
>
> I am looking for u-boot command which can give me flash device specific
> properties. For example, there should be dedicated commands to get the
> flash memory size, sector size, page size etc.
>
> Currently I found there is command "sf probe" for spi flash device which is
> returning device properties into text format as below:
> SF : Detected N25Q128A with page size 256 Bytes, erase size 64 KiB, total
> 16 MiB
>
> Similarly I found there is command "nand info" for nand device which is
> also returning device properties into text format.
>
> These commands ("sf probe" and "nand info") are giving device information
> in form of message. Which does not meet my requirement.
>
> Actually I would like to integrate u-boot with my tool, where tool will run
> u-boot command to get the device information. Based on device information
> tool will react. Here I am looking for some dedicated command which return
> these property separately. It is difficult to parse the message string to
> get individual
>
> Let say we includes following commands:
> "nand info pagesize/sectorsize/size/device"
> "sf info pagesize/sectorsize/size/device"
>
> for example:
> "nand info pagesize" command should return page size ( e.g. *256*)
> "nand info sectorsize" command should return sector size (e.g. *65536*
> which is 64K)
> "nand info size" command should return the total size (e.g. *268435456 *which
> is 16 MB)
>
> Could you please consider this enhancement request in u-boot? Please
> comment.
What kind of tool? Is it a U-Boot script? How does it get access to
the output from U-Boot?
You could use a regular expression to extract the information you
need. For the commands you suggest, it might be better to put the
values in an environment variable.
Regards,
Simon
More information about the U-Boot
mailing list