Skip to contentSkip to conversation

kernel parameters for ARM

U-Boot-Users Robert Schwebel 3 participants 7 messages Jan 15, 2003 – Jan 17, 2003

lore
Share & tools
lore
#0 lore raw

Hi,

I currently have the problem that on my PXA250 based board the kernel command line parameters from the u-boot environment variable "bootargs" are not actually transferred to the kernel.

When looking at the code in lib_arm/armlinux.c:do_bootm_linux() I'm wondering how the code is intended to work: the setup_commandline_tag() function puts some stuff in the 'params' structure, but I cannot see that this information is passed on to the kernel. The kernel call does only transfer the architecture number, and the only other thing which could do the job is cleanup_before_linux() (which doesn't do it).

Robert

Signature · 5 lines
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Braunschweiger Str. 79,  31134 Hildesheim, Germany
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4
#1 lore raw

Hi

Quoted 6 lines · Robert Schwebel

Hi,

I currently have the problem that on my PXA250 based board the kernel command line parameters from the u-boot environment variable "bootargs" are not actually transferred to the kernel.

Quoted 7 lines

When looking at the code in lib_arm/armlinux.c:do_bootm_linux() I'm wondering how the code is intended to work: the setup_commandline_tag() function puts some stuff in the 'params' structure, but I cannot see that this information is passed on to the kernel. The kernel call does only transfer the architecture number, and the only other thing which could do the job is cleanup_before_linux() (which doesn't do it).

take a look a "parse_tags()" in "arch/arm/kernel/setup.c".

Dave

#2 lore raw
Quoted 1 line · David M?ller (ELSOFT AG)

take a look a "parse_tags()" in "arch/arm/kernel/setup.c".

Well, what I do not understand is how the pointer to the tagged list is communicated between the bootloader and the kernel. The theKernel() call does only get the architecture number, whereas $LINUX/Documentation/arm/Booting says that r1 has to hold the machine type and r2 the pointer to the tagged list. Where is the latter one assigned?

Robert

Signature · 5 lines
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Braunschweiger Str. 79,  31134 Hildesheim, Germany
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4
#3 lore raw
Quoted 5 lines · Robert Schwebel
Quoted 1 line · David M?ller (ELSOFT AG)

take a look a "parse_tags()" in "arch/arm/kernel/setup.c".

Quoted 8 lines

Well, what I do not understand is how the pointer to the tagged list is communicated between the bootloader and the kernel. The theKernel() call does only get the architecture number, whereas $LINUX/Documentation/arm/Booting says that r1 has to hold the machine type and r2 the pointer to the tagged list. Where is the latter one assigned?

Robert

The values stored in U-Boot's "gd->bd->bi_boot_params" variable and the "BOOT_PARAMS" macro in the machine specific "arch" file of ARMLinux have to be equal. AFAICS there is not passing in of the pointer to the tag list in r2, at least not in the kernel i'm looking at.

Dave

#4 lore raw
Quoted 5 lines · David M?ller

The values stored in U-Boot's "gd->bd->bi_boot_params" variable and the "BOOT_PARAMS" macro in the machine specific "arch" file of ARMLinux have to be equal. AFAICS there is not passing in of the pointer to the tag list in r2, at least not in the kernel i'm looking at.

Ah, ok, that does work.

Russell, the documentation in Documentation/arm/Booting seems to be missleading. Is the BOOT_PARAMS method the right way to go? If yes, how does the kernel know which address the bootloader uses to store the tagged list?

Robert

Signature · 5 lines
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Braunschweiger Str. 79,  31134 Hildesheim, Germany
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4
#5 lore raw
Quoted 7 lines · Robert Schwebel
Quoted 5 lines · David M?ller

The values stored in U-Boot's "gd->bd->bi_boot_params" variable and the "BOOT_PARAMS" macro in the machine specific "arch" file of ARMLinux have to be equal. AFAICS there is not passing in of the pointer to the tag list in r2, at least not in the kernel i'm looking at.

Quoted 6 lines

Ah, ok, that does work.

Russell, the documentation in Documentation/arm/Booting seems to be missleading. Is the BOOT_PARAMS method the right way to go? If yes, how does the kernel know which address the bootloader uses to store the tagged list?

See my mail from about 5 minutes ago explaining this.

#6 lore raw
In reply to Robert Schwebel
Quoted 7 lines · Robert Schwebel
Quoted 5 lines · David M?ller

The values stored in U-Boot's "gd->bd->bi_boot_params" variable and the "BOOT_PARAMS" macro in the machine specific "arch" file of ARMLinux have to be equal. AFAICS there is not passing in of the pointer to the tag list in r2, at least not in the kernel i'm looking at.

Quoted 6 lines

Ah, ok, that does work.

Russell, the documentation in Documentation/arm/Booting seems to be missleading. Is the BOOT_PARAMS method the right way to go? If yes, how does the kernel know which address the bootloader uses to store the tagged list?

In addition, I've added two links to the mail from

http://www.arm.linux.org.uk/developer/