
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.