[U-Boot-Users] directly execute linux zImage: cmd_bootz

Hi !
Attached is a patch for armboot that directly calls a Linux zImage. It has been tested on my PXA250 platform.
Prerequisites:
- works only on arm, because it takes stuff from asm_arm/armlinux.c - set CONFIG_KERNEL_RAM_BASE to where the zImage is in Flash
Problems:
- I have no clue if the tag list get's correctly set up, I'm using a kernel 2.4 which doesn't use the tags anyway. - how can I pass the cmdline? - Kernel 2.4. clobbers r2, the pointer to the tag list. In your fixup code you can have
MACHINE_START(...) BOOT_PARAMS(0xa0000100) ... MACHINE_END
but how put I *params to some fixed address?
I guess this is rather ugly, so comments on how to do it better are welcomed :-)

Hello
Holger Schurig wrote:
Hi !
Attached is a patch for armboot that directly calls a Linux zImage. It has been tested on my PXA250 platform.
Prerequisites:
- works only on arm, because it takes stuff from asm_arm/armlinux.c
- set CONFIG_KERNEL_RAM_BASE to where the zImage is in Flash
Problems:
- I have no clue if the tag list get's correctly set up, I'm using a kernel
2.4 which doesn't use the tags anyway.
AFAICS 2.4 uses the tag list if there is one prepared by the bootloader.
- how can I pass the cmdline?
By using the "ATAG_CMDLINE" in the tag list. Make sure you have defined "CONFIG_CMDLINE_TAG" in your u-boot config file.
- Kernel 2.4. clobbers r2, the pointer to the tag list. In your fixup code you
can have
MACHINE_START(...) BOOT_PARAMS(0xa0000100) ... MACHINE_END
but how put I *params to some fixed address?
See http://sourceforge.net/mailarchive/forum.php?thread_id=1531608&forum_id=...
Dave

On Thu, Jan 23, 2003 at 08:58:18AM +0100, "David M?ller (ELSOFT AG)" wrote:
AFAICS 2.4 uses the tag list if there is one prepared by the bootloader.
Nope. You have to pass BOOT_PARAMS(). See recent discussion on arm-linux-kernel.
Robert

AFAICS 2.4 uses the tag list if there is one prepared by the bootloader.
No, it doesn't. See
http://www.arm.linux.org.uk/developer/booting.php
to find out that a boot loader should pass the address of the tag list in r2 to the kernel. It's near the end. And then see
http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2003-January/013126...
to see that 2.4-kernels currently don't use r2 and can't use in order to stay compatible. In fact, a 2.4. kernel trashes r2 right at the start, see
http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2003-January/013140...
However, 2.5-kernels already employ the r2-rule.
I'm not sure, but I think that only Kernels for ARM (and for XScale) use this tagging at all, correct?
See http://sourceforge.net/mailarchive/forum.php?thread_id=1531608&forum_id=... 98
Ahh, here is the trick, use gd->bd->bi_boot_params
Thanks.

Hi
Holger Schurig wrote:
AFAICS 2.4 uses the tag list if there is one prepared by the bootloader.
No, it doesn't. See
I'm not speaking about the pointer to the tag list (which should be passed in r2, Linux 2.4 uses BOOT_PARAMS instead), i'm speacking about the tag list itself. Parameter passing from the bootloader to the kernel via the tag list is working, at least for me (using linux-2.4.19-rmk4 kernel).
Dave
participants (3)
-
"David Müller (ELSOFT AG)"
-
Holger Schurig
-
Robert Schwebel