All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@nvidia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] image: Implement IH_TYPE_KERNEL_ANYLOAD
Date: Thu, 10 Nov 2011 12:05:58 -0700	[thread overview]
Message-ID: <4EBC2096.905@nvidia.com> (raw)
In-Reply-To: <20111110185341.1828D1404437@gemini.denx.de>

On 11/10/2011 11:53 AM, Wolfgang Denk wrote:
> Dear Stephen Warren,
> 
> In message <4EBBF894.2000409@nvidia.com> you wrote:
>>
>>> I don't like this name.  "ANYLOAD" doesn't really make sense to me; I
>>> would interpet this as "U-Boot is free to load the image to any
>>> address it likes" - which is not what I think you mean.
>>
>> I think ANYLOAD describes the situation correctly:
> 
> Sorry about the nitpicking, but I disagree.

OK, I'll rework the patch based on your desired naming.

However, I do wish to point out that U-Boot's use of the term "load" for
what is really a "copy"/"move" is incorrect according to the typically
accepted meaning of the word "load". The extload/fatload commands use
"load" correctly. I admit relocate is also not a correct phrase to
describe what's happening.

...
>> I deliberately didn't pick ZIMAGE, since I can't say for certain that
>> only zImages are relocatable across all kernel image formats across all
>> architectures. And note that ANYLOAD could well be applicable to
>> non-Linux OSs for all I know; bootm appears to be able to boot a whole
>> variety of other OSs, and I wouldn't be entirely surprised if at least
>> one of them had fully relocatable images like ARM Linux kernel zImages.
> 
> No. "bootm" follows exactly the Linux kernel calling conventions in
> all details from passing specific values in specific registers,
> putting specific data at certain addresses / address ranges, etc.
> "bootm" is to boot Linux.  I am not aware of any other OS that can be
> successfully booted with the "bootm" command (and ifso, it probably
> gould be started with "go" as well).

I didn't want to burden my previous email with details, and I quite
admit I may be wrong here since I'm not familiar with U-Boot's code, but
what about the following in cmd_bootm.c:

static boot_os_fn *boot_os[] = {
#ifdef CONFIG_BOOTM_LINUX
	[IH_OS_LINUX] = do_bootm_linux,
#endif
#ifdef CONFIG_BOOTM_NETBSD
	[IH_OS_NETBSD] = do_bootm_netbsd,
#endif
#ifdef CONFIG_LYNXKDI
	[IH_OS_LYNXOS] = do_bootm_lynxkdi,
#endif
#ifdef CONFIG_BOOTM_RTEMS
	[IH_OS_RTEMS] = do_bootm_rtems,
#endif
#if defined(CONFIG_BOOTM_OSE)
	[IH_OS_OSE] = do_bootm_ose,
#endif
#if defined(CONFIG_CMD_ELF)
	[IH_OS_VXWORKS] = do_bootm_vxworks,
	[IH_OS_QNX] = do_bootm_qnxelf,
#endif
#ifdef CONFIG_INTEGRITY
	[IH_OS_INTEGRITY] = do_bootm_integrity,
#endif
};

Don't they allow the bootm command to boot other OSs? Those functions
certainly appear to be called at the end of cmd_bootm() to do the actual
kernel parameter setup and boot.

-- 
nvpublic

  reply	other threads:[~2011-11-10 19:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09 17:47 [U-Boot] [PATCH 1/2] image: Implement IH_TYPE_KERNEL_ANYLOAD Stephen Warren
2011-11-09 17:47 ` [U-Boot] [PATCH 2/2] image: Don't detect XIP images as overlapping Stephen Warren
2011-11-10  9:58 ` [U-Boot] [PATCH 1/2] image: Implement IH_TYPE_KERNEL_ANYLOAD Marek Vasut
2011-11-10 16:04   ` Stephen Warren
2011-11-10 17:01     ` Marek Vasut
2011-11-10 17:43       ` Stephen Warren
2011-11-10 17:47         ` Marek Vasut
2011-11-10 18:02           ` Stephen Warren
2011-11-10 18:07             ` Marek Vasut
2011-11-10 18:25               ` Stephen Warren
2011-11-10 18:40                 ` Marek Vasut
2011-11-10 19:06                   ` Wolfgang Denk
2011-11-10 20:51                     ` Marek Vasut
2011-11-10 19:10                   ` Stephen Warren
2011-11-10 20:54                     ` Marek Vasut
2011-11-10 18:58               ` Wolfgang Denk
2011-11-10 11:59 ` Wolfgang Denk
2011-11-10 16:15   ` Stephen Warren
2011-11-10 18:53     ` Wolfgang Denk
2011-11-10 19:05       ` Stephen Warren [this message]
2011-11-10 19:27         ` Wolfgang Denk

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=4EBC2096.905@nvidia.com \
    --to=swarren@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.