Hi Luc,

On Sat, Sep 20, 2014 at 12:38 AM, Julian Calaby <julian.cal...@gmail.com> wrote:
> Hi Luc,
>
> On Sat, Sep 20, 2014 at 12:13 AM, Luc Verhaegen <l...@skynet.be> wrote:
>> On Sat, Sep 20, 2014 at 12:04:10AM +1000, Julian Calaby wrote:
>>> Hi Luc,
>>>
>>> The original goal was to have it be part of an online tool that
>>> unskilled users could upload memdumps to and it'd turn them into well
>>> formed patches.
>>>
>>> I'll see what I can do about making it more generally useful.
>>>
>>> Thanks,
>>
>> Ah, such a tool would be rather undesirable today. We need a full device
>> page on top of fex and meminfo.
>
> Fair enough.
>
>> A bash/python/perl/whatever rewrite that users could run during NDH
>> would be the ideal solution. If not, you will be required to run this
>> tool every once in a while. Heck, if even i, after looking, managed to
>> overlook this one.
>
> I'll try to make that happen.

Challenge accepted.

Attached is a first attempt at this. It:
1. Finds all the dram files
2. Rips out the parameters
3. Converts any hexadecimal numbers to decimal
4. Concatenates them into a line per file
5. Runs uniq over them
6. Prints out a list of sets of identical dram files.

I tend to use a lot of piping and a "while read" pattern when writing
bash scripts so some might find it's formatting a little weird.

It expects to be run in the top level of a u-boot source tree or
somewhere above that. (E.g. top level of sunxi-bsp's tree) and expects
find, sed, grep, sort and uniq to be available.

It assumes that all files have the same set of parameters (i.e. we
never omit any parameters which are 0) and is robust enough to cope
with any new parameters we might add, providing that all files are
updated to have them. I could update it to remove this assumption. I
could also add some code to make and git-add any changes required to
remove the duplicates it finds.

I'm not sure which tree this should end up in, so I haven't prepared a
patch yet.

Thanks,

-- 
Julian Calaby

Email: julian.cal...@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: find_identical_sunxi_drams.sh
Description: Bourne shell script

Reply via email to