From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3] BOOT: Add "bootz" command to boot Linux zImage
Date: Mon, 12 Mar 2012 23:08:53 +0100 [thread overview]
Message-ID: <201203122308.54249.marex@denx.de> (raw)
In-Reply-To: <20120312220339.B0D75202F14@gemini.denx.de>
Dear Wolfgang Denk,
> Dear Marek Vasut,
>
> In message <1331588061-21546-1-git-send-email-marex@denx.de> you wrote:
> > This command boots Linux zImage from where the zImage is loaded to.
> > Passing initrd and fdt is supported.
>
> I have but a few formal questions / issues.
I had a dilemma about the image.[ch] indeed. I was quite unsure where to put
those, can you suggest proper location? I didn't want to create new file only
for that matter.
>
> ...
>
> > --- a/common/cmd_bootm.c
> > +++ b/common/cmd_bootm.c
> > @@ -160,35 +160,8 @@ static boot_os_fn *boot_os[] = {
> >
> > bootm_headers_t images; /* pointers to os/initrd/fdt images */
> >
> > -/* Allow for arch specific config before we boot */
> > -void __arch_preboot_os(void)
> > -{
> > - /* please define platform specific arch_preboot_os() */
> > -}
> > -void arch_preboot_os(void) __attribute__((weak,
> > alias("__arch_preboot_os"))); -
> >
> > #define IH_INITRD_ARCH IH_ARCH_DEFAULT
> >
> > -static void bootm_start_lmb(void)
> > -{
>
> ...
>
> Note: this is bootm (or boot*) related code.
>
> > --- a/common/image.c
> > +++ b/common/image.c
> > @@ -3190,3 +3190,28 @@ static int fit_check_ramdisk(const void *fit, int
> > rd_noffset, uint8_t arch,
>
> This is a file that deals with U-Boot images etc. It is in no way
> related to any of the "boot*" commands.
>
> > +#ifdef CONFIG_LMB
> > +void boot_start_lmb(bootm_headers_t *images)
> > +{
> > + ulong mem_start;
> > + phys_size_t mem_size;
> > +
> > + lmb_init(&images->lmb);
> > +
> > + mem_start = getenv_bootm_low();
> > + mem_size = getenv_bootm_size();
> > +
> > + lmb_add(&images->lmb, (phys_addr_t)mem_start, mem_size);
> > +
> > + arch_lmb_reserve(&images->lmb);
> > + board_lmb_reserve(&images->lmb);
> > +}
> > +#endif
> > +
> > +/* Allow for arch specific config before we boot */
> > +void __arch_preboot_os(void)
> > +{
> > + /* please define platform specific arch_preboot_os() */
> > +}
> > +void arch_preboot_os(void) __attribute__((weak,
> > alias("__arch_preboot_os")));
>
> Putting this code here makes no sense. You could chose any othewr
> random file as well.
>
> > diff --git a/include/image.h b/include/image.h
> > index bbf80f0..26b8a20 100644
> > --- a/include/image.h
> > +++ b/include/image.h
> > @@ -486,6 +486,14 @@ void image_multi_getimg(const image_header_t *hdr,
> > ulong idx,
> >
> > void image_print_contents(const void *hdr);
> >
> > +#ifdef CONFIG_LMB
> > +void boot_start_lmb(bootm_headers_t *images);
> > +#else
> > +static inline void boot_start_lmb(bootm_headers_t *image) { }
> > +#endif
> > +
> > +extern void arch_preboot_os(void);
>
> Sorry, no. image.[ch] is definitely not the right place for this
> stuff.
>
> Best regards,
>
> Wolfgang Denk
Best regards,
Marek Vasut
next prev parent reply other threads:[~2012-03-12 22:08 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Message-Id: <1331588061-21546-1-git-send-email-marex@denx.de>
2012-03-12 21:34 ` [U-Boot] [PATCH V3] BOOT: Add "bootz" command to boot Linux zImage Marek Vasut
2012-03-12 22:03 ` Wolfgang Denk
2012-03-12 22:08 ` Marek Vasut [this message]
2012-03-12 22:42 ` Wolfgang Denk
2012-03-13 0:13 ` Marek Vasut
2012-03-13 0:22 ` Graeme Russ
2012-03-13 4:30 ` Wolfgang Denk
2012-03-13 4:46 ` Graeme Russ
2012-03-15 15:03 ` Wolfgang Denk
2012-03-15 17:08 ` Marek Vasut
2012-03-13 4:47 ` Marek Vasut
2012-03-15 15:06 ` Wolfgang Denk
2012-03-15 17:18 ` Marek Vasut
2012-03-13 4:25 ` Wolfgang Denk
2012-03-13 4:50 ` Marek Vasut
2012-03-13 5:32 ` Graeme Russ
2012-03-13 2:03 ` Mike Frysinger
2012-03-14 1:38 ` [U-Boot] [PATCH V4] BOOT: Add "bootz" command to boot Linux zImage on ARM Marek Vasut
2012-03-14 2:03 ` Mike Frysinger
2012-03-14 2:40 ` Marek Vasut
2012-03-14 3:07 ` Mike Frysinger
[not found] <Message-Id: <1331689093-19211-1-git-send-email-marex@denx.de>
2012-03-14 3:47 ` [U-Boot] [PATCH V5] " Marek Vasut
2012-03-14 5:07 ` Mike Frysinger
2012-03-14 5:38 ` Marek Vasut
2012-03-14 18:35 ` Mike Frysinger
2012-03-14 19:27 ` Marek Vasut
2012-03-15 16:09 ` Wolfgang Denk
2012-03-15 17:08 ` Marek Vasut
2012-03-15 17:36 ` Mike Frysinger
2012-03-15 17:40 ` Marek Vasut
2012-03-14 16:45 ` Stephen Warren
2012-03-14 17:23 ` Marek Vasut
[not found] <Message-Id: <1331696876-20903-1-git-send-email-marex@denx.de>
2012-03-15 7:52 ` [U-Boot] [PATCH V6] " Marek Vasut
2012-03-15 18:51 ` Rob Herring
2012-03-15 19:05 ` Marek Vasut
2012-03-15 19:48 ` Rob Herring
2012-03-15 20:29 ` Marek Vasut
2012-03-15 21:10 ` Rob Herring
2012-03-15 22:02 ` Rob Herring
2012-03-16 0:53 ` Marek Vasut
2012-03-16 7:16 ` Wolfgang Denk
2012-03-16 18:20 ` Rob Herring
2012-03-15 20:39 ` Wolfgang Denk
2012-03-30 20:59 ` Wolfgang Denk
2012-03-31 19:10 ` Mike Frysinger
2012-03-31 19:27 ` Marek Vasut
2012-04-01 11:25 ` Graeme Russ
2012-04-01 14:02 ` Marek Vasut
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=201203122308.54249.marex@denx.de \
--to=marex@denx.de \
--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