[U-Boot-Users] [PATCH] 2/4: bootz command

Hi,
Some time ago Holger Schurig has sent a command to boot normal zImages. Here's the patch against current CVS.
Robert

In message 20030614163157.GC26793@pengutronix.de you wrote:
Some time ago Holger Schurig has sent a command to boot normal zImages. Here's the patch against current CVS.
This needs to be cleaned up first.
And please, submit as a single patch!
--- u-boot/include/cmd_bootz.h 1970-01-01 01:00:00.000000000 +0100 +++ u-boot-ptx/include/cmd_bootz.h 2003-06-14 16:43:44.000000000 +0200
...
- ulong addr = 0x40000;
Please do not use any magic hardwired constants.
Can we use existent logic again, i. e. load_addr ?
- ulong initrd_start = 0;
- ulong initrd_end = 0;
- ulong data;
- void (*theKernel)(int zero, int arch, struct tag *params);
- bd_t *bd = gd->bd;
+#ifdef CONFIG_CMDLINE_TAG
- char *commandline = getenv("bootargs");
+#endif
- addr = simple_strtoul(argv[1], NULL, 16);
- theKernel = (void (*)(int, int, struct tag*))addr;
- SHOW_BOOT_PROGRESS (14);
+#ifdef DEBUG
- printf ("## Transferring control to Linux (at address %08lx) ...\n",
(ulong)theKernel);
+#endif
+#if defined (CONFIG_SETUP_MEMORY_TAGS) || \
- defined (CONFIG_CMDLINE_TAG) || \
- defined (CONFIG_INITRD_TAG) || \
- defined (CONFIG_VFD)
- setup_start_tag(bd);
+#ifdef CONFIG_SETUP_MEMORY_TAGS
- setup_memory_tags(bd);
+#endif +#ifdef CONFIG_CMDLINE_TAG
- setup_commandline_tag(bd, commandline);
+#endif +#ifdef CONFIG_INITRD_TAG
- setup_initrd_tag(bd, initrd_start, initrd_end);
+#endif +#if 0
- setup_ramdisk_tag(bd);
+#endif +#if defined (CONFIG_VFD)
- setup_videolfb_tag(gd);
+#endif
- setup_end_tag(bd);
+#endif
- /* we assume that the kernel is in place */
- printf("\nStarting kernel ...\n\n");
- cleanup_before_linux();
Did this really compile for any PowerPC or MIPS board?
On PowerPC, there is neither a header file "tag.h" nor a cleanup_before_linux() function...
Please don't submit untested code!
Also, all of this is just dead code, as you don't add an entry to the commands table.
And you don't add the files to any Makefile, either.
Sorry, but I can only reject this.
Best regards,
Wolfgang Denk

- ulong addr = 0x40000;
Please do not use any magic hardwired constants. Can we use existent logic again, i. e. load_addr ?
You can blame me for this. I did not run over load_addr so far.
Did this really compile for any PowerPC or MIPS board?
No idea. I will not go and install various cross-compilers for board I don't have and where I don't even have the URL for the cross-compiler to download from. For now, it's an arm-only patch as long as no one from the PPC/MIPS/Whatever community needs it.
After all, there is already arm-only code in u-boot, e.g. the code from arm_lib/* that I used.
On PowerPC, there is neither a header file "tag.h" nor a cleanup_before_linux() function...
The tag.h is a file that I made. Wasn't it part of my original patch?

In message 200306200925.01556.h.schurig@mn-logistik.de you wrote:
- ulong addr = 0x40000;
Please do not use any magic hardwired constants. Can we use existent logic again, i. e. load_addr ?
You can blame me for this. I did not run over load_addr so far.
I don;t blame anybody for anything. My only interest is to get working code.
Did this really compile for any PowerPC or MIPS board?
No idea. I will not go and install various cross-compilers for board I don't have and where I don't even have the URL for the cross-compiler to download
You can download the ELDK (for ARM, PowerPC and MIPS) from ftp://ftp.leo.org/pub/eldk/
from. For now, it's an arm-only patch as long as no one from the PPC/MIPS/Whatever community needs it.
Robert submitted it as a standard patch, hooking into the common command code, without any indication that this might be ARM only. Also, there is no need to make this ARM only - I don't see any inherent dependency on the platform.
After all, there is already arm-only code in u-boot, e.g. the code from arm_lib/* that I used.
But this is a different issue.
On PowerPC, there is neither a header file "tag.h" nor a cleanup_before_linux() function...
The tag.h is a file that I made. Wasn't it part of my original patch?
I am not aware of your original patch. I just know what Robert sent.
Best regards,
Wolfgang Denk
participants (3)
-
Holger Schurig
-
Robert Schwebel
-
Wolfgang Denk