Dear Prafulla Wadaskar, In message <73173d32e9439e4abb5151606c3e19e202ddf26...@sc-vexch1.marvell.com> you wrote: > > > > The code really needs to be rewritten in a clean fashion using common > > > programming metaphors, style and library functions (i.e. use > > > getopt(3), etc.). > > During restructuring activity for this utility, > I found that most of the code and algorithm is common between mkimage and > kwimage (old name doimage).
I'm not really surprised. > I have studied mkimage code. > kwimage requirements can be well supported by adding one more type support to > the mkimage (i.e. "bootrom"). "bootrom" is a way to generic name. You have a specific data format in mind, so please use a more specific name. > The bootrom image file generation generic abstraction can be provided with > new file ./common/bootrom.c internally supported by Arch specific macros/code. Hm... I guess this would make it even more complicated to separate the mkimage tool from the rest of the U-Boot code. There have been repeated requests to make it more independent or even integrate in into the Linux kernel code tree. We should keep this in mind. Note that this is not an argument against your proposal - just a note that we should keep this aspect in mind when implementing and reviewing the new code. > With this- > 1. mkimage can be reused for kwimage generation. Sounds good to me. > 2. Kwimage generation can be supported in a generic way under "bootrom" image > type This doesn't sound such a good idea to me. As mentioned above, "bootrom" is a very generic name which can be anything - but if you assign this name to a specific format, it should be exactly _one_ speific format. > 3. In future the same interface can be used by other Marvell and non Marvell > socs for similar kind of requirements. > > Shall I go ahead with this approach? > or I should not disturb mkimage at all? > What is your opinion? I think this is a pretty good plan. Please go ahead. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de After a heated argument on some trivial matter Nancy [Astor] . . . shouted, ``If I were your wife I would put poison in your coffee!'' Whereupon Winston Churchill with equal heat and sincerity answered, ``And if I were your husband I would drink it.'' _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot