[U-Boot] Add a new command to U-Boot

Subodh Nijsure sunijsur at cisco.com
Thu May 7 17:21:39 CEST 2009


Have you looked at code in common/cmd_date.c?

If you see at the end of the file there is macro U_BOOT_CMD() that adds the
command date, there is function do_date that is invoked, so if you wanted to
implement your own version of date command you will have to implement your
own do_date function.


/Subodh 

> -----Original Message-----
> From: u-boot-bounces at lists.denx.de 
> [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Deepak 
> Gopalakrishnan
> Sent: Thursday, May 07, 2009 7:00 AM
> To: Jerry Van Baren
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] Add a new command to U-Boot
> 
> yes indeed...thanks a lot...
> i can guess that adding a command wont be just a walk in the 
> park.....could you tell me wat all this i will have to take 
> care of if i were supposed to write....say another date 
> function...which would display the date in another format....
> other than adding it into the makefile and placing it in the 
> common folder...wat shud i do..?
> thanks alot...
> 
> Regards,
> Deepak
> 
> 
> 
> Jerry Van Baren <gerald.vanbaren at ge.com>
> 05/07/2009 07:10 PM
> 
> To
> Deepak Gopalakrishnan <Deepak.Gopalakrishnan at Lntemsys.com>
> cc
> u-boot at lists.denx.de
> Subject
> Re: [U-Boot] Add a new command to U-Boot
> 
> 
> 
> 
> 
> 
> Deepak Gopalakrishnan wrote:
> > HI
> > I am working with Freescale MPC8313E-RDB and with it comes 
> their BSP. 
> This
> > provides a u-boot. I want to understand how the u-boot 
> commands work 
> > as
> in
> > where are they defined and in which files.
> > My utlimate goal is to add new u-boot commands and to modify the
> exsisting
> > commands (if needed)
> > Im a total newbie to uboot. and am looking for a hint as to where to
> look
> > for.
> > 
> > thanks a lot...
> > 
> > Deepak
> 
> ls common/cmd*.c
> 
> Best regards,
> gvb
> 
> 



More information about the U-Boot mailing list