[U-Boot] [PATCH 1/4] sunxi_nand_spl: Rename SPL_NAND_SUNXIto NAND_SUNXI

Olliver Schinagl oliver+list at schinagl.nl
Sat Sep 26 15:01:18 CEST 2015


Hey Hans,

On 20-09-15 15:09, Hans de Goede wrote:
> Hi,
>
> On 09/18/2015 07:43 AM, Olliver Schinagl wrote:
>> Hans de Goede <hdegoede <at> redhat.com> writes:
>>
>> Hey Hans,
>>>
>>> We eventually want to add full nand support, since it makes no sense
>>> to build SPL with nand support and u-boot without, or the other way
>>> around, a single option will suffice.
>>>
>>> Renaming the Kconfig option now makes things easier when we add full
>>> nand support in the future.
>>>
>>> The "obj-$(CONFIG_NAND_SUNXI) += sunxi_nand_spl.o" is moved to an
>>> "ifdef CONFIG_SPL_BUILD" block in the Makefile.
>>>
>>> Signed-off-by: Hans de Goede <hdegoede <at> redhat.com>
>>> ---
>>>   board/sunxi/board.c            |  2 +-
>>>   drivers/mtd/nand/Kconfig       | 18 +++++++++---------
>>>   drivers/mtd/nand/Makefile      |  2 +-
>>>   include/configs/sunxi-common.h |  2 +-
>>>   4 files changed, 12 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
>>> index d411e96..9c855f6 100644
>>> --- a/board/sunxi/board.c
>>> +++ b/board/sunxi/board.c
>>>   <at>  <at>  -108,7 +108,7  <at> <at>  int dram_init(void)
>>>       return 0;
>>>   }
>>>
>>> -#if defined(CONFIG_SPL_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
>>> +#if defined(CONFIG_NAND_SUNXI) && defined(CONFIG_SPL_BUILD)
>>
>> While I agree this being a good way forward, the latest (and probably 
>> this
>> change included) break nand support entirely and cause link errors when
>> enabeling sunxi nand.
>>
>> sunxi-bsp/u-boot-sunxi/drivers/mtd/nand/nand.c:104: undefined 
>> reference to
>> `board_nand_init' (which is from board/sunxi/board.c:144)
>>
>> I think it's wise (for now) to remove the && 
>> defined(CONFIG_SPL_BUILD) and
>> re-add this guard later.
>>
>> By removing we atleast can still build u-boot with nand support (thus
>> opening the option of testing and patches for users) and don't break
>> previously working systems.
>
> I just tried to set CONFIG_NAND_SUNXI=y in q8_a13_tablet_defconfig and
> did a build with the latest master and this works fine for me ...
>
it failed when enabeling nand, but you've been doing some work there so 
should be okay again now.
> Regards,
>
> Hans



More information about the U-Boot mailing list