RE: [U-Boot-Users] ARM, bootm and bootargs

Curt Brune wrote something slightly offtopic and may the gods forgive me for answering here, but hopefully this answer will prevent further similiar questions:
I'm trying to pass command line arguments from u-boot to the kernel for an ARM-based board. Following the README I'm setting the environment variable "bootargs" to the command line I want and booting with the "bootm" command.
When the kernel boots it prints it's command line, which is still the default command line. I was expecting to the see the command line I stored in the "bootargs" variable.
I poked around in u-boot/lib_arm/armlinux.c and it looks like I needed to have CONFIG_CMDLINE_TAG defined in my config, which I did.
Is there anything else I need to do? Something I'm missing?
Assuming you are trying to boot uClinux and the 2.4.x kernel, then you need to modify uClinux-dist/linux-2.4.x/arch/armnommu/kernel/arch.c
There you'll find MACHINE_START(NETARM, "NET+ARM). Within the MACHINE_START and MACHINE_END sequence you need to add BOOT_PARAMS(<value>) (no semicolon at the end please). And the value you have to enter is whatever is set in file: u-boot/board/xxxx(modnet50?)/xxxx(modnet50?).c function: int board_init (void) variable: gd->bd->bi_boot_params=<value>
If compiled with bdinfo support, you can also type bdinfo at the u-boot command prompt. boot_params is the currently set <value>.
The default value for the modnet50 board is f.e. 0x800. You just have to make sure that it is indeed a valid ram address for your custom board (and that of course it doesn't get overwritten when you boot linux).
Best regards, Lars Friedrich
participants (1)
-
Friedrich, Lars