public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 03/19] x86: zboot update
Date: Mon, 04 Oct 2010 13:54:27 +0400	[thread overview]
Message-ID: <4CA9A453.3080609@mvista.com> (raw)
In-Reply-To: <1286163483-21697-4-git-send-email-graeme.russ@gmail.com>

Hello.

On 04-10-2010 7:37, Graeme Russ wrote:

> The header of recent Linux Kernels includes the size of the image, and
> therefore is not needed to be passed to zboot. Still process the third
> parameter (size of image) in the event that an older kernel is being loaded

> Signed-off-by: Graeme Russ<graeme.russ@gmail.com>
[...]

> diff --git a/arch/i386/lib/zimage.c b/arch/i386/lib/zimage.c
> index 89fe015..f279b43 100644
> --- a/arch/i386/lib/zimage.c
> +++ b/arch/i386/lib/zimage.c
[...]
> @@ -256,10 +257,17 @@ int do_zboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>   	/* Setup board for maximum PC/AT Compatibility */
>   	setup_pcat_compatibility();
>
> -	/* argv[1] holds the address of the bzImage */
> -	bzImage_addr = (void *)simple_strtoul(argv[1], NULL, 16);
> +	if (argc>= 2) {
> +		/* argv[1] holds the address of the bzImage */
> +		bzImage_addr = (void *)simple_strtoul(argv[1], NULL, 16);
> +	} else {
> +		s = getenv("fileaddr");
> +		if (s)
> +			bzImage_addr = (void *)simple_strtoul(s, NULL, 16);
> +	}

    Why not:

+	if (argc >= 2)
+		/* argv[1] holds the address of the bzImage */
+		s = argv[1];
+	else
+		s = getenv("fileaddr");
+
+	if (s)
+		bzImage_addr = (void *)simple_strtoul(s, NULL, 16);

WBR, Sergei

  reply	other threads:[~2010-10-04  9:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-04  3:37 [U-Boot] [PATCH 00/19] x86: Create fully relocatable U-Boot image Graeme Russ
2010-10-04  3:37 ` [U-Boot] [PATCH 01/19] x86: Make CONFIG_RELOC_FIXUP_WORKS generic for all x86 boards Graeme Russ
2010-10-04  3:37 ` [U-Boot] [PATCH 02/19] x86: Use TEXT_BASE in linker scripts Graeme Russ
2010-10-04  3:37 ` [U-Boot] [PATCH 03/19] x86: zboot update Graeme Russ
2010-10-04  9:54   ` Sergei Shtylyov [this message]
2010-10-04 10:00     ` Graeme Russ
2010-10-04  3:37 ` [U-Boot] [PATCH 04/19] x86: use gc sections to reduce image size Graeme Russ
2010-10-04  3:37 ` [U-Boot] [PATCH 05/19] x86: Move loading of GTD to C code Graeme Russ
2010-10-04  3:37 ` [U-Boot] [PATCH 06/19] x86: Coding Style Cleanup Graeme Russ
2010-10-04  3:37 ` [U-Boot] [PATCH 07/19] x86: Change compiler options Graeme Russ
2010-10-04  3:37 ` [U-Boot] [PATCH 08/19] x86: Fix %ss and %esp in register structure for interrupts Graeme Russ
2010-10-04  3:37 ` [U-Boot] [PATCH 09/19] x86: Remove progress indication in low-level init Graeme Russ
2010-10-04  3:37 ` [U-Boot] [PATCH 10/19] x86: Move ECC initialisation outside RAM initialisation Graeme Russ
2010-10-04  9:59   ` Sergei Shtylyov
2010-10-04 10:06     ` Graeme Russ
2010-10-04 10:21       ` Wolfgang Denk
2010-10-04 21:49         ` Graeme Russ
2010-10-04  3:37 ` [U-Boot] [PATCH 11/19] x86: Remove usage of %ebp as a return pointer Graeme Russ
2010-10-04  3:37 ` [U-Boot] [PATCH 12/19] x86: Don't clobber %ebx Graeme Russ
2010-10-04  3:37 ` [U-Boot] [PATCH 13/19] x86: Dont clobber %eax after getting memory size Graeme Russ
2010-10-04  3:37 ` [U-Boot] [PATCH 14/19] x86: Place global data below stack before entering C Graeme Russ
2010-10-04  3:37 ` [U-Boot] [PATCH 15/19] x86: Set cold/warm boot flag Graeme Russ
2010-10-04  3:38 ` [U-Boot] [PATCH 16/19] x86: Rename linker script symbols Graeme Russ
2010-10-04  3:38 ` [U-Boot] [PATCH 17/19] x86: Rearrange linker script Graeme Russ
2010-10-04  3:38 ` [U-Boot] [PATCH 18/19] x86: Use loops instead of memcpy/memset in board_init_f Graeme Russ
2010-10-04  3:38 ` [U-Boot] [PATCH 19/19] x86: Implement fully relocatable image Graeme Russ

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=4CA9A453.3080609@mvista.com \
    --to=sshtylyov@mvista.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