Patchwork [U-Boot,3/3] SMDK6400: Fix build error for smdk6400 nand_spl support

login
register
mail settings
Submitter seedshope
Date Jan. 7, 2011, 3:53 p.m.
Message ID <1294415633-21029-3-git-send-email-bocui107@gmail.com>
Download mbox | patch
Permalink /patch/77892/
State Changes Requested
Delegated to: Albert ARIBAUD
Headers show

Comments

seedshope - Jan. 7, 2011, 3:53 p.m.
From: seedshope <bocui107@gmail.com>

Modify u-boot.lds from nand_spl/board/samsung/smdk6400.

start.o: In function `clbss_l':
nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to `coloured_LED_init'
nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to `red_LED_on'
start.o: In function `_rel_dyn_start_ofs':
nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_start'
start.o: In function `_rel_dyn_end_ofs':
nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_end'
start.o: In function `_dynsym_start_ofs':
nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__dynsym_start'

Signed-off-by: seedshope <bocui107@googlemail.com>
Albert ARIBAUD - Jan. 8, 2011, 6:14 a.m.
Hi seedshope,

Le 07/01/2011 16:53, seedshope a écrit :
> From: seedshope<bocui107@gmail.com>
>
> Modify u-boot.lds from nand_spl/board/samsung/smdk6400.

You're also modifying start.S. If you mention files in the patch 
summary, then please mention them all.

> start.o: In function `clbss_l':
> nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to `coloured_LED_init'
> nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to `red_LED_on'
> start.o: In function `_rel_dyn_start_ofs':
> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_start'
> start.o: In function `_rel_dyn_end_ofs':
> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_end'
> start.o: In function `_dynsym_start_ofs':
> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__dynsym_start'
>
> Signed-off-by: seedshope<bocui107@googlemail.com>

Please limit the commit message to a simple explanation of the issue 
fixed, without pasting detailed build messages int it. Here for instance 
you need only indicate that you're removing references to relocation 
symbols and calls to LED functions.

Amicalement,
seedshope - Jan. 8, 2011, 2:57 p.m.
On 01/08/2011 02:14 PM, Albert ARIBAUD wrote:
> Hi seedshope,
>
> Le 07/01/2011 16:53, seedshope a écrit :
>> From: seedshope<bocui107@gmail.com>
>>
>> Modify u-boot.lds from nand_spl/board/samsung/smdk6400.
> You're also modifying start.S. If you mention files in the patch
> summary, then please mention them all.
ok
>> start.o: In function `clbss_l':
>> nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to `coloured_LED_init'
>> nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to `red_LED_on'
>> start.o: In function `_rel_dyn_start_ofs':
>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_start'
>> start.o: In function `_rel_dyn_end_ofs':
>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_end'
>> start.o: In function `_dynsym_start_ofs':
>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__dynsym_start'
>>
>> Signed-off-by: seedshope<bocui107@googlemail.com>
> Please limit the commit message to a simple explanation of the issue
> fixed, without pasting detailed build messages int it. Here for instance
> you need only indicate that you're removing references to relocation
> symbols and calls to LED functions.
ok

Thanks,
seedshope
> Amicalement,
Minkyu Kang - Jan. 8, 2011, 3:15 p.m.
Dear seedshope,

On 8 January 2011 00:53, seedshope <bocui107@gmail.com> wrote:
> From: seedshope <bocui107@gmail.com>
>
> Modify u-boot.lds from nand_spl/board/samsung/smdk6400.
>
> start.o: In function `clbss_l':
> nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to `coloured_LED_init'
> nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to `red_LED_on'
> start.o: In function `_rel_dyn_start_ofs':
> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_start'
> start.o: In function `_rel_dyn_end_ofs':
> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_end'
> start.o: In function `_dynsym_start_ofs':
> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__dynsym_start'
>
> Signed-off-by: seedshope <bocui107@googlemail.com>
>
> diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S
> index 237dcfe..bde0357 100644
> --- a/arch/arm/cpu/arm1176/start.S
> +++ b/arch/arm/cpu/arm1176/start.S
> @@ -353,10 +353,11 @@ clbss_l:str       r2, [r0]                /* clear loop...                    */
>        add     r0, r0, #4
>        cmp     r0, r1
>        bne     clbss_l
> -
> +#ifndef CONFIG_NAND_SPL

CONFIG_PRELOADER is better

>        bl coloured_LED_init
>        bl red_LED_on
>  #endif
> +#endif
>
>  /*

Thanks
Minkyu Kang
seedshope - Jan. 9, 2011, 1:14 a.m.
On 01/08/2011 11:15 PM, Minkyu Kang wrote:
> Dear seedshope,
>
> On 8 January 2011 00:53, seedshope<bocui107@gmail.com>  wrote:
>> From: seedshope<bocui107@gmail.com>
>>
>> Modify u-boot.lds from nand_spl/board/samsung/smdk6400.
>>
>> start.o: In function `clbss_l':
>> nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to `coloured_LED_init'
>> nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to `red_LED_on'
>> start.o: In function `_rel_dyn_start_ofs':
>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_start'
>> start.o: In function `_rel_dyn_end_ofs':
>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__rel_dyn_end'
>> start.o: In function `_dynsym_start_ofs':
>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to `__dynsym_start'
>>
>> Signed-off-by: seedshope<bocui107@googlemail.com>
>>
>> diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S
>> index 237dcfe..bde0357 100644
>> --- a/arch/arm/cpu/arm1176/start.S
>> +++ b/arch/arm/cpu/arm1176/start.S
>> @@ -353,10 +353,11 @@ clbss_l:str       r2, [r0]                /* clear loop...                    */
>>         add     r0, r0, #4
>>         cmp     r0, r1
>>         bne     clbss_l
>> -
>> +#ifndef CONFIG_NAND_SPL
> CONFIG_PRELOADER is better
No, The nand_spl support can't find the define of coloured_LED_init and 
red_LED_on.
It is base on the build error:

make smdk6400_config
make
the error information as following:

nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to `coloured_LED_init'
nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to `red_LED_on'



Thanks,

seedshope


>>         bl coloured_LED_init
>>         bl red_LED_on
>>   #endif
>> +#endif
>>
>>   /*
> Thanks
> Minkyu Kang
Minkyu Kang - Jan. 9, 2011, 7:33 a.m.
Hi

On 9 January 2011 10:14, seedshope <bocui107@gmail.com> wrote:
> On 01/08/2011 11:15 PM, Minkyu Kang wrote:
>>
>> Dear seedshope,
>>
>> On 8 January 2011 00:53, seedshope<bocui107@gmail.com>  wrote:
>>>
>>> From: seedshope<bocui107@gmail.com>
>>>
>>> Modify u-boot.lds from nand_spl/board/samsung/smdk6400.
>>>
>>> start.o: In function `clbss_l':
>>> nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to
>>> `coloured_LED_init'
>>> nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to
>>> `red_LED_on'
>>> start.o: In function `_rel_dyn_start_ofs':
>>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to
>>> `__rel_dyn_start'
>>> start.o: In function `_rel_dyn_end_ofs':
>>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to
>>> `__rel_dyn_end'
>>> start.o: In function `_dynsym_start_ofs':
>>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to
>>> `__dynsym_start'
>>>
>>> Signed-off-by: seedshope<bocui107@googlemail.com>
>>>
>>> diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S
>>> index 237dcfe..bde0357 100644
>>> --- a/arch/arm/cpu/arm1176/start.S
>>> +++ b/arch/arm/cpu/arm1176/start.S
>>> @@ -353,10 +353,11 @@ clbss_l:str       r2, [r0]                /* clear
>>> loop...                    */
>>>        add     r0, r0, #4
>>>        cmp     r0, r1
>>>        bne     clbss_l
>>> -
>>> +#ifndef CONFIG_NAND_SPL
>>
>> CONFIG_PRELOADER is better
>
> No, The nand_spl support can't find the define of coloured_LED_init and
> red_LED_on.
> It is base on the build error:
>
> make smdk6400_config
> make
> the error information as following:
>
> nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to
> `coloured_LED_init'
> nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to
> `red_LED_on'
>

Please add follow define at Makefile.
AFLAGS  += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL
CFLAGS  += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL

Thanks
Minkyu Kang
seedshope - Jan. 9, 2011, 12:27 p.m.
On 01/09/2011 03:33 PM, Minkyu Kang wrote:
> Hi
>
> On 9 January 2011 10:14, seedshope<bocui107@gmail.com>  wrote:
>> On 01/08/2011 11:15 PM, Minkyu Kang wrote:
>>> Dear seedshope,
>>>
>>> On 8 January 2011 00:53, seedshope<bocui107@gmail.com>    wrote:
>>>> From: seedshope<bocui107@gmail.com>
>>>>
>>>> Modify u-boot.lds from nand_spl/board/samsung/smdk6400.
>>>>
>>>> start.o: In function `clbss_l':
>>>> nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to
>>>> `coloured_LED_init'
>>>> nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to
>>>> `red_LED_on'
>>>> start.o: In function `_rel_dyn_start_ofs':
>>>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to
>>>> `__rel_dyn_start'
>>>> start.o: In function `_rel_dyn_end_ofs':
>>>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to
>>>> `__rel_dyn_end'
>>>> start.o: In function `_dynsym_start_ofs':
>>>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to
>>>> `__dynsym_start'
>>>>
>>>> Signed-off-by: seedshope<bocui107@googlemail.com>
>>>>
>>>> diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S
>>>> index 237dcfe..bde0357 100644
>>>> --- a/arch/arm/cpu/arm1176/start.S
>>>> +++ b/arch/arm/cpu/arm1176/start.S
>>>> @@ -353,10 +353,11 @@ clbss_l:str       r2, [r0]                /* clear
>>>> loop...                    */
>>>>         add     r0, r0, #4
>>>>         cmp     r0, r1
>>>>         bne     clbss_l
>>>> -
>>>> +#ifndef CONFIG_NAND_SPL
>>> CONFIG_PRELOADER is better
>> No, The nand_spl support can't find the define of coloured_LED_init and
>> red_LED_on.
>> It is base on the build error:
>>
>> make smdk6400_config
>> make
>> the error information as following:
>>
>> nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to
>> `coloured_LED_init'
>> nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to
>> `red_LED_on'
>>
> Please add follow define at Makefile.
> AFLAGS  += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL
> CFLAGS  += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL
ok, It may be a good method.

But I worried other people will be difficult  to see the process of the 
code running.
So, if add #ifdef  CONFIG_NAND_SPL, It is very clear. What do you think 
about it?

Thanks,
seedshope
> Thanks
> Minkyu Kang
Minkyu Kang - Jan. 9, 2011, 2:12 p.m.
Hello,

On 9 January 2011 21:27, seedshope <bocui107@gmail.com> wrote:
> On 01/09/2011 03:33 PM, Minkyu Kang wrote:
>>
>> Hi
>>
>> On 9 January 2011 10:14, seedshope<bocui107@gmail.com>  wrote:
>>>
>>> On 01/08/2011 11:15 PM, Minkyu Kang wrote:
>>>>
>>>> Dear seedshope,
>>>>
>>>> On 8 January 2011 00:53, seedshope<bocui107@gmail.com>    wrote:
>>>>>
>>>>> From: seedshope<bocui107@gmail.com>
>>>>>
>>>>> Modify u-boot.lds from nand_spl/board/samsung/smdk6400.
>>>>>
>>>>> start.o: In function `clbss_l':
>>>>> nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to
>>>>> `coloured_LED_init'
>>>>> nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to
>>>>> `red_LED_on'
>>>>> start.o: In function `_rel_dyn_start_ofs':
>>>>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to
>>>>> `__rel_dyn_start'
>>>>> start.o: In function `_rel_dyn_end_ofs':
>>>>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to
>>>>> `__rel_dyn_end'
>>>>> start.o: In function `_dynsym_start_ofs':
>>>>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to
>>>>> `__dynsym_start'
>>>>>
>>>>> Signed-off-by: seedshope<bocui107@googlemail.com>
>>>>>
>>>>> diff --git a/arch/arm/cpu/arm1176/start.S
>>>>> b/arch/arm/cpu/arm1176/start.S
>>>>> index 237dcfe..bde0357 100644
>>>>> --- a/arch/arm/cpu/arm1176/start.S
>>>>> +++ b/arch/arm/cpu/arm1176/start.S
>>>>> @@ -353,10 +353,11 @@ clbss_l:str       r2, [r0]                /*
>>>>> clear
>>>>> loop...                    */
>>>>>        add     r0, r0, #4
>>>>>        cmp     r0, r1
>>>>>        bne     clbss_l
>>>>> -
>>>>> +#ifndef CONFIG_NAND_SPL
>>>>
>>>> CONFIG_PRELOADER is better
>>>
>>> No, The nand_spl support can't find the define of coloured_LED_init and
>>> red_LED_on.
>>> It is base on the build error:
>>>
>>> make smdk6400_config
>>> make
>>> the error information as following:
>>>
>>> nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to
>>> `coloured_LED_init'
>>> nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to
>>> `red_LED_on'
>>>
>> Please add follow define at Makefile.
>> AFLAGS  += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL
>> CFLAGS  += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL
>
> ok, It may be a good method.
>
> But I worried other people will be difficult  to see the process of the code
> running.
> So, if add #ifdef  CONFIG_NAND_SPL, It is very clear. What do you think
> about it?
>

Ah, already used CONFIG_NAND_SPL at start.S.
OK, we can do this work (change from CONFIG_NAND_SPL to
CONFIG_PRELOADER) at another patch.

Thanks
Minkyu Kang
seedshope - Jan. 9, 2011, 2:52 p.m.
On 01/09/2011 10:12 PM, Minkyu Kang wrote:
> Hello,
>
> On 9 January 2011 21:27, seedshope<bocui107@gmail.com>  wrote:
>> On 01/09/2011 03:33 PM, Minkyu Kang wrote:
>>> Hi
>>>
>>> On 9 January 2011 10:14, seedshope<bocui107@gmail.com>    wrote:
>>>> On 01/08/2011 11:15 PM, Minkyu Kang wrote:
>>>>> Dear seedshope,
>>>>>
>>>>> On 8 January 2011 00:53, seedshope<bocui107@gmail.com>      wrote:
>>>>>> From: seedshope<bocui107@gmail.com>
>>>>>>
>>>>>> Modify u-boot.lds from nand_spl/board/samsung/smdk6400.
>>>>>>
>>>>>> start.o: In function `clbss_l':
>>>>>> nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to
>>>>>> `coloured_LED_init'
>>>>>> nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to
>>>>>> `red_LED_on'
>>>>>> start.o: In function `_rel_dyn_start_ofs':
>>>>>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to
>>>>>> `__rel_dyn_start'
>>>>>> start.o: In function `_rel_dyn_end_ofs':
>>>>>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to
>>>>>> `__rel_dyn_end'
>>>>>> start.o: In function `_dynsym_start_ofs':
>>>>>> nand_spl/board/samsung/smdk6400/start.S:366: undefined reference to
>>>>>> `__dynsym_start'
>>>>>>
>>>>>> Signed-off-by: seedshope<bocui107@googlemail.com>
>>>>>>
>>>>>> diff --git a/arch/arm/cpu/arm1176/start.S
>>>>>> b/arch/arm/cpu/arm1176/start.S
>>>>>> index 237dcfe..bde0357 100644
>>>>>> --- a/arch/arm/cpu/arm1176/start.S
>>>>>> +++ b/arch/arm/cpu/arm1176/start.S
>>>>>> @@ -353,10 +353,11 @@ clbss_l:str       r2, [r0]                /*
>>>>>> clear
>>>>>> loop...                    */
>>>>>>         add     r0, r0, #4
>>>>>>         cmp     r0, r1
>>>>>>         bne     clbss_l
>>>>>> -
>>>>>> +#ifndef CONFIG_NAND_SPL
>>>>> CONFIG_PRELOADER is better
>>>> No, The nand_spl support can't find the define of coloured_LED_init and
>>>> red_LED_on.
>>>> It is base on the build error:
>>>>
>>>> make smdk6400_config
>>>> make
>>>> the error information as following:
>>>>
>>>> nand_spl/board/samsung/smdk6400/start.S:357: undefined reference to
>>>> `coloured_LED_init'
>>>> nand_spl/board/samsung/smdk6400/start.S:358: undefined reference to
>>>> `red_LED_on'
>>>>
>>> Please add follow define at Makefile.
>>> AFLAGS  += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL
>>> CFLAGS  += -DCONFIG_PRELOADER -DCONFIG_NAND_SPL
>> ok, It may be a good method.
>>
>> But I worried other people will be difficult  to see the process of the code
>> running.
>> So, if add #ifdef  CONFIG_NAND_SPL, It is very clear. What do you think
>> about it?
>>
> Ah, already used CONFIG_NAND_SPL at start.S.
> OK, we can do this work (change from CONFIG_NAND_SPL to
> CONFIG_PRELOADER) at another patch.
Ok, I will send RR2 for SMDK6400 relate patch.

Thanks,
seedshope
> Thanks
> Minkyu Kang

Patch

diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S
index 237dcfe..bde0357 100644
--- a/arch/arm/cpu/arm1176/start.S
+++ b/arch/arm/cpu/arm1176/start.S
@@ -353,10 +353,11 @@  clbss_l:str	r2, [r0]		/* clear loop...		    */
 	add	r0, r0, #4
 	cmp	r0, r1
 	bne	clbss_l
-
+#ifndef CONFIG_NAND_SPL
 	bl coloured_LED_init
 	bl red_LED_on
 #endif
+#endif
 
 /*
  * We are done. Do not return, instead branch to second part of board
diff --git a/nand_spl/board/samsung/smdk6400/u-boot.lds b/nand_spl/board/samsung/smdk6400/u-boot.lds
index 3ac6aa1..c179db3 100644
--- a/nand_spl/board/samsung/smdk6400/u-boot.lds
+++ b/nand_spl/board/samsung/smdk6400/u-boot.lds
@@ -54,8 +54,23 @@  SECTIONS
 	.u_boot_cmd : { *(.u_boot_cmd) }
 	__u_boot_cmd_end = .;
 
-	. = ALIGN(4);
-	__bss_start = .;
-	.bss : { *(.bss) . = ALIGN(4); }
-	_end = .;
+    . = ALIGN(4);
+
+    .rel.dyn : {
+    __rel_dyn_start = .;
+    *(.rel*)
+    __rel_dyn_end = .;
+    }
+
+    .dynsym : {
+    __dynsym_start = .;
+    *(.dynsym)
+    }
+
+    .bss __rel_dyn_start (OVERLAY) : {
+    __bss_start = .;
+    *(.bss)
+    . = ALIGN(4);
+    _end = .;
+    }
 }