[U-Boot] [PATCH 04/15] fdt: added the ability to set initrd start/end via chosen command

Wolfgang Denk wd at denx.de
Tue Aug 19 01:04:09 CEST 2008


Dear Kumar Gala,

In message <1218806685-3615-4-git-send-email-galak at kernel.crashing.org> you wrote:
> Signed-off-by: Kumar Gala <galak at kernel.crashing.org>
> ---
>  common/cmd_fdt.c |   21 +++++++++++++++++----
>  1 files changed, 17 insertions(+), 4 deletions(-)
> 
> diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
> index d3b19dd..436fec9 100644
> --- a/common/cmd_fdt.c
> +++ b/common/cmd_fdt.c
> @@ -417,9 +417,21 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
>  		ft_board_setup(working_fdt, gd->bd);
>  #endif
>  	/* Create a chosen node */
> -	else if (argv[1][0] == 'c')
> -		fdt_chosen(working_fdt, 0, 0, 1);
> -	else {
> +	else if (argv[1][0] == 'c') {
> +		unsigned long initrd_start = 0, initrd_end = 0;

I guess we should use phys_addr_t here.

> +		if ((argc != 2) && (argc != 4)) {
> +			printf ("Usage:\n%s\n", cmdtp->usage);
> +			return 1;
> +		}
> +
> +		if (argc == 4) {
> +			initrd_start = simple_strtoul(argv[2], NULL, 16);
> +			initrd_end = simple_strtoul(argv[3], NULL, 16);

Ah - do we have some "simple_strtouphys" yet? I think we don't. This
might be a sleeping dog in a lot af places in the code, actually...


Hm... what do you think?

[Except from that it's fine with me.]

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: wd at denx.de
A supercomputer is a machine that runs an endless loop in 2 seconds.



More information about the U-Boot mailing list