
Sascha,
-----Original Message----- From: Sascha Hauer [mailto:s.hauer@pengutronix.de] Sent: Friday, May 09, 2008 2:45 AM To: Menon, Nishanth Cc: u-boot-users@lists.sourceforge.net Subject: Re: [Patch] U-Boot-V2: Introduce CONFIG_ARCH_HAS_INIT_LOWLEVEL
This won't work out. The user is prompted for a question he cannot answer. The wrong answer will result in a linker error if he says 'yes' here and the architecture does not have a lowlevel init function. Other possibility would be that the user ends up with a unusable U-Boot if he answers 'no' here while the architecture has (and probably needs) a lowlevel init function. Another problem is that for example powerpc users will be prompted for this option which effectively does nothing.
Moving this to the config system is generally a good idea, but ARCH_HAS_INIT_LOWLEVEL should be an invisible option which gets selected by architectures that actually need it.
Yes. Accepted. Here is try 2 of the patch.
Signed-off-by: Nishanth Menon x0nishan@ti.com
Index: u-boot-v2.git/arch/arm/cpu/start-arm.S =================================================================== --- u-boot-v2.git.orig/arch/arm/cpu/start-arm.S 2008-05-08 18:02:47.000000000 -0500 +++ u-boot-v2.git/arch/arm/cpu/start-arm.S 2008-05-09 06:40:11.000000000 -0500 @@ -131,7 +131,7 @@ orr r0,r0,#0xd3 msr cpsr,r0
-#ifdef ARCH_HAS_INIT_LOWLEVEL +#ifdef CONFIG_ARCH_HAS_INIT_LOWLEVEL bl arch_init_lowlevel #endif /* Index: u-boot-v2.git/arch/m68k/cpu/start-mcfv4e.S =================================================================== --- u-boot-v2.git.orig/arch/m68k/cpu/start-mcfv4e.S 2008-05-08 18:02:47.000000000 -0500 +++ u-boot-v2.git/arch/m68k/cpu/start-mcfv4e.S 2008-05-09 06:40:11.000000000 -0500 @@ -406,7 +406,7 @@ * standard reset vector file, but also do some special things * required only on their specific CPU. */ -#ifdef ARCH_HAS_INIT_LOWLEVEL +#ifdef CONFIG_ARCH_HAS_INIT_LOWLEVEL bsr.l arch_init_lowlevel nop #endif Index: u-boot-v2.git/common/Kconfig =================================================================== --- u-boot-v2.git.orig/common/Kconfig 2008-05-08 18:02:47.000000000 -0500 +++ u-boot-v2.git/common/Kconfig 2008-05-09 06:44:11.000000000 -0500 @@ -65,6 +65,9 @@ allowing it to relocate to the end of the available RAM. This way you have the whole memory in a single piece.
+config ARCH_HAS_INIT_LOWLEVEL + bool + config PROMPT string prompt "U-Boot command prompt"