[U-Boot] [PATCH][repost] mkimage support ( bin_dep.sh Support)

Prafulla Wadaskar prafulla at marvell.com
Thu Jul 16 04:48:21 CEST 2009


 

> -----Original Message-----
> From: u-boot-bounces at lists.denx.de 
> [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Prafulla Wadaskar
> Sent: Tuesday, July 14, 2009 10:34 PM
> To: Detlev Zundel
> Cc: Ronen Shitrit; Nicolas Pitre; u-boot at lists.denx.de; 
> Ashish Karkare; Prabhanjan Sarnaik; Lennert Buijtenhek; Manas Saksena
> Subject: Re: [U-Boot] [PATCH][repost] bin_dep.sh Support
> 
>  
> 
> > -----Original Message-----
> > From: Detlev Zundel [mailto:dzu at denx.de]
> > Sent: Tuesday, July 14, 2009 5:09 PM
> > To: Prafulla Wadaskar
> > Cc: Wolfgang Denk; Manas Saksena; Ronen Shitrit; Nicolas Pitre; 
> > u-boot at lists.denx.de; Ashish Karkare; Prabhanjan Sarnaik; Lennert 
> > Buijtenhek
> > Subject: Re: [U-Boot] [PATCH][repost] bin_dep.sh Support
> > 
> > Hi Prafulla,
> > 
> > > Then I feel what Jean has suggested is the only way to go
> > ahead with
> > > kirkwood use case I will go ahead with this.
> > >
> > > Ref:
> > >> > we can simply add a new target
> > >> > u-boot.kwd
> > >> > which will do somthing like this
> > >> > 
> > >> > $(obj)u-boot.kwd:	$(obj)u-boot.bin
> > >> > 	$(do_image) $(obj)u-boot.kwd $(obj)u-boot.bin 
> > >> > $(obj)board/$(BOARDDIR)/sdramregs.txt
> > 
> > I think this looks good.
> > 
> > > Second issue:
> > > I will have to add a tool i.e. do_image (to be renamed)
> > which will create u-boot.kwd.
> > > this tool is specific to Kirkwood only, I am going to add this in 
> > > ./tools/ folder (as per Jean's feedback earlier), is this okay?
> > 
> > The plan as such is ok, although you will probably need to 
> rewrite the 
> > latest version of do_image posted to this ML[1] completely. 
>  Starting 
> > out to read the code, I was tempted to post some specific remarks 
> > about the code, but quickly realized that this is not a 
> good attempt 
> > to move further here.
> > 
> > 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.).
Hi Wolfgang
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 have studied mkimage code.
kwimage requirements can be well supported by adding one more type support to the mkimage (i.e. "bootrom").
The bootrom image file generation generic abstraction can be provided with new file ./common/bootrom.c internally supported by Arch specific macros/code.

With this-
1. mkimage can be reused for kwimage generation.
2. Kwimage generation can be supported in a generic way under "bootrom" image type
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?

Regards..
Prafulla . .

> > 
> Dear Detlev
> Thanks for your feedback
> Yes I am doing the same code cleanup.
> I am planning to remove all command line interface and the 
> configuration needed will be provided using CONFIGs. This 
> will make code size smaller and sdramregs.txt a standard c 
> header file.
> What do you think?
> 
> If you have further inputs those are welcomed... :-)
> 
> Thanks and regards..
> Prafulla . . . 
> 
> > 
> > [1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/57251
> > 
> > --
> > Of course my password is the same as my pet's name My 
> macaw's name was 
> > Q47pY!3 and I change it every 90 days
> >                         -- Trevor Linton
> > --
> > DENX Software Engineering GmbH,      MD: Wolfgang Denk & 
> Detlev Zundel
> > HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 
> Groebenzell, Germany
> > Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: 
> dzu at denx.de
> > 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 


More information about the U-Boot mailing list