On Fri, 22 Jul 2011 16:11:22 +0200 Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
Am 22.07.2011 12:54 schrieb Uwe Hermann:
You could use the pattern generator which is already present in flashrom, and write the generated pattern to a file which is supplied for flashing. That way, you can use those patterns for real programmers as well. The current content=/empty= proposal has zero benefits outside dummyflasher, and for that you can use dd or the pattern generator anyway.
i have looked at the pattern generator it does not provide a random pattern yet. the 0xff and 0x00 patterns are spoiled by /* Write block number in the last two bytes of each 256-byte * block, big endian for easier reading of the hexdump.
but besides that it looks like i could easily integrate the pattern generator into my patch. i would add a all 0xff, all 0x00 and random pattern to it and add parsing for the other pattern types (or at least some? which?) to the content= parameter handling. later we may add a special handling for -r/-w/-v so that these test patterns could be used with all programmers not only with dummy. of course this can be done with files too... but it looks very easy to implement directly (i.e. not much additional code), so why not?
I should have sent a man page patch for that last night. No idea why it didn't show up. Let me check and resend.
hm i was working on an update too... will follow up yours then.
btw i was thinking about using some kind of preprocessor to mark features in the man page that are not compiled in the "current" configuration. groff may be even able to handle it itself, but using the cpp seems like an option too. not sure if clang would handle it correctly without printing unwanted output though...
the basic idea is that features that are not compiled in get a note or warning in the man page to make clear that there is such a feature, but that it is currently disabled. what do you think?