[U-Boot] U-Boot: Enhancement request to get flash device specific information
HEERA NAND BHAGTANI
diamond.mbm at gmail.com
Thu Jul 10 08:38:24 CEST 2014
Hi Simon,
This tool is basically using u-boot technology to communicating to remote
board. This tool is developed such a way that it can load u-boot elf on
remote processor (available on remote board). This tool communicates with
processor using u-boot commands. It can send the u-boot command, and can
read the u-boot output message.
I am avoiding to use regular expression to extract the information. It has
two reasons,
1) In future realise of u-boot if string format is changed, my regular
expression will fail. So I need to track the format change in this message.
2) It is possible that current message does not carry all informations of
Flash device. For example,this message does not specify the kind of spi
flash it is (dual or single). So we may need to enhance message to provide
flash type. So for any new property, we need to change this message and as
a result it would break scripts/tools for those people who have been used
regular expression on this message.
So here I am suggesting to have a dedicated flag in u-boot command for each
property of flash device. In future any new property would be needed, we
only need to add a new tag and it would work without breaking any existing
stuff for users.
As per my current requirement, I can make the changes in my local u-boot
source code and can bring these new flags which will work for me. Here I am
suggesting, if we can provide this is generic solution for everyone. I
believe, it would be quite helpful for those guys who would like to
integrate u-boot in their tools or scripts.
Regards,
Heera
On Thu, Jul 3, 2014 at 10:28 PM, Simon Glass <sjg at chromium.org> wrote:
> 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