public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Bartlomiej Sieka <tur@semihalf.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [new uImage] Code available on new-image branch of u-boot-testing repo
Date: Thu, 07 Feb 2008 17:15:31 +0100	[thread overview]
Message-ID: <47AB2EA3.6080203@semihalf.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0802070928180.11755@blarg.am.freescale.net>

Kumar Gala wrote:
> Here is a rough patch to common/cmd_bootm.c that passed load_end down to
> the do_bootm_* commands.  I haven't updated the lib_*/bootm.c at this
> point.
> 
> I think this is useful to help the bootm commands know exactly what memory
> is used and what is freed.  There are situations that I'd like to get
> working with the new code like being able to boot a kernel at 256M and
> have the ramdisk and device tree exist about this 256M base.
> 
> - k
> 
> diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
> index 2ddb191..b36d09e 100644
> --- a/common/cmd_bootm.c
> +++ b/common/cmd_bootm.c
> @@ -90,7 +90,7 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
>  typedef void boot_os_fn (cmd_tbl_t *cmdtp, int flag,
>  			int argc, char *argv[],
>  			image_header_t *hdr,	/* of image to boot */
> -			int verify);		/* getenv("verify")[0] != 'n' */
> +			int verify, ulong load_end);	/* getenv("verify")[0] != 'n' */
> 
>  extern boot_os_fn do_bootm_linux;
>  static boot_os_fn do_bootm_netbsd;
> @@ -234,36 +234,36 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>  #ifdef CONFIG_SILENT_CONSOLE
>  	    fixup_silent_linux();
>  #endif
> -	    do_bootm_linux (cmdtp, flag, argc, argv, hdr, verify);
> +	    do_bootm_linux (cmdtp, flag, argc, argv, hdr, verify, load_end);
>  	    break;

Hi Kumar,

In our development code for the new format we need even more data to be
passed down to do_bootm_* flavors. We are doing this by passing a
pointer to a structure:

-           do_bootm_linux (cmdtp, flag, argc, argv, hdr, verify);
+           do_bootm_linux (cmdtp, flag, argc, argv, &images, verify);


Where images is of type bootm_headers_t, defined like this:

/*
  * Legacy and FIT format headers used by do_bootm() and do_bootm_<os>()
  * routines.
  */
typedef struct bootm_headers {
        /*
         * Legacy os image header, if it is a multi component image
         * then get_ramdisk() and get_fdt() will attempt to get
         * data from second and third component accordingly.
         */
        image_header_t  *legacy_hdr_os;
        ulong           legacy_hdr_valid;

#if defined(CONFIG_FIT)
        void            *fit_hdr_os;    /* os FIT image header */
        char            *fit_uname_os;  /* os subimage node unit name */

        void            *fit_hdr_rd;    /* init ramdisk FIT img header */
        char            *fit_uname_rd;  /* init ramdisk node unit name */

#if defined(CONFIG_PPC)
        void            *fit_hdr_fdt;   /* FDT blob FIT image header */
        char            *fit_uname_fdt; /* FDT blob node unit name */
#endif
#endif
} bootm_headers_t;


Perhaps it would be a good idea to add your load_end to bootm_headers?
In any case, let's get back to this once the above mentioned code is 
posted to the ML.


Regards,
Bartlomiej

  reply	other threads:[~2008-02-07 16:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-07 12:05 [U-Boot-Users] [new uImage] Code available on new-image branch of u-boot-testing repo Bartlomiej Sieka
2008-02-07 15:30 ` Kumar Gala
2008-02-07 16:15   ` Bartlomiej Sieka [this message]
2008-02-07 16:29     ` Kumar Gala
2008-02-12 17:17       ` Kumar Gala
2008-02-12 22:59         ` Wolfgang Denk
2008-02-13  0:45           ` Kumar Gala
2008-02-13 22:24             ` Wolfgang Denk
2008-02-13  9:24         ` Bartlomiej Sieka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47AB2EA3.6080203@semihalf.com \
    --to=tur@semihalf.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox