* [U-Boot] RR v3 PATCH: SMDK6400 Fix some build bug
@ 2011-01-13 13:36 seedshope
2011-01-13 13:36 ` [U-Boot] [v3 patch 1/4] SMDK6400: Fix CONFIG_SYS_INIT_SP_ADDR undefined seedshope
` (3 more replies)
0 siblings, 4 replies; 15+ messages in thread
From: seedshope @ 2011-01-13 13:36 UTC (permalink / raw)
To: u-boot
Change from V1:
patch 1:
patch 2: Delete some compile information from commit.
patch 3: Add LED modify information and Delete some compile information from commit.
patch 4: Add new patch for SDRAM init.
Change frome v2:
patch2: Modify Makefile for arch/arm/cpu/arm1176/s3c64xx/cpu_init.s in build error.
It will generat redefine information for "mem_ctrl_asm_init" before the Modify.
patch4: Modify the Sergei Shtylyov comments and change the SDRAM size variable
for PHYS_SDRAM_SIZE_1.
I apply this patch and build ok.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [v3 patch 1/4] SMDK6400: Fix CONFIG_SYS_INIT_SP_ADDR undefined
2011-01-13 13:36 [U-Boot] RR v3 PATCH: SMDK6400 Fix some build bug seedshope
@ 2011-01-13 13:36 ` seedshope
2011-01-13 13:36 ` [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error seedshope
` (2 subsequent siblings)
3 siblings, 0 replies; 15+ messages in thread
From: seedshope @ 2011-01-13 13:36 UTC (permalink / raw)
To: u-boot
Fix CONFIG_SYS_INIT_SP_ADDR undefined issue.
Signed-off-by: seedshope <bocui107@gmail.com>
diff --git a/include/configs/smdk6400.h b/include/configs/smdk6400.h
index 671f2c7..c9acf58 100644
--- a/include/configs/smdk6400.h
+++ b/include/configs/smdk6400.h
@@ -44,6 +44,11 @@
#define CONFIG_PERIPORT_BASE 0x70000000
#define CONFIG_PERIPORT_SIZE 0x13
+#define CONFIG_SYS_IRAM_BASE 0x0c000000 /* Internal SRAM base address */
+#define CONFIG_SYS_IRAM_SIZE 0x2000 /* 8 KB of internal SRAM memory */
+#define CONFIG_SYS_IRAM_END (CONFIG_SYS_IRAM_BASE + CONFIG_SYS_IRAM_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_IRAM_END - GENERATED_GBL_DATA_SIZE)
+
#define CONFIG_SYS_SDRAM_BASE 0x50000000
/* input clock of PLL: SMDK6400 has 12MHz input clock */
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
2011-01-13 13:36 [U-Boot] RR v3 PATCH: SMDK6400 Fix some build bug seedshope
2011-01-13 13:36 ` [U-Boot] [v3 patch 1/4] SMDK6400: Fix CONFIG_SYS_INIT_SP_ADDR undefined seedshope
@ 2011-01-13 13:36 ` seedshope
2011-01-13 18:07 ` Albert ARIBAUD
2011-01-13 13:36 ` [U-Boot] [v3 patch 3/4] SMDK6400: Fix build error for nand_spl support seedshope
2011-01-13 13:36 ` [U-Boot] [v3 patch 4/4] SMDK6400: Fix SMDK6400 SDRAM init seedshope
3 siblings, 1 reply; 15+ messages in thread
From: seedshope @ 2011-01-13 13:36 UTC (permalink / raw)
To: u-boot
Modify Makefile for cpu_init.c and Start.s use some label,this defined
u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script
board/samsung/smdk6400/u-boot-nand.lds. So add some label form u-boot.lds
to u-boot-nand.lds
Signed-off-by: seedshope <bocui107@gmail.com>
diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile b/arch/arm/cpu/arm1176/s3c64xx/Makefile
index 0785b19..f4b9574 100644
--- a/arch/arm/cpu/arm1176/s3c64xx/Makefile
+++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile
@@ -30,12 +30,15 @@ LIB = $(obj)lib$(SOC).o
SOBJS = reset.o
-COBJS-$(CONFIG_S3C6400) += cpu_init.o speed.o
+COBJS-$(CONFIG_S3C6400) += speed.o
COBJS-y += timer.o
+CPUINIT = cpu_init.o
+
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
+CPUINIT := $(addprefix $(obj),$(CPUINIT))
-all: $(obj).depend $(START) $(LIB)
+all: $(obj).depend $(START) $(LIB) $(CPUINIT)
$(LIB): $(OBJS)
$(call cmd_link_o_target, $(OBJS))
diff --git a/board/samsung/smdk6400/u-boot-nand.lds b/board/samsung/smdk6400/u-boot-nand.lds
index 29a4f61..2b87fc6 100644
--- a/board/samsung/smdk6400/u-boot-nand.lds
+++ b/board/samsung/smdk6400/u-boot-nand.lds
@@ -55,8 +55,29 @@ SECTIONS
. = ALIGN(4);
.mmudata : { *(.mmudata) }
- . = 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 = .;
+ }
+
+ /DISCARD/ : { *(.dynstr*) }
+ /DISCARD/ : { *(.dynamic*) }
+ /DISCARD/ : { *(.plt*) }
+ /DISCARD/ : { *(.interp*) }
+ /DISCARD/ : { *(.gnu*) }
}
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [v3 patch 3/4] SMDK6400: Fix build error for nand_spl support
2011-01-13 13:36 [U-Boot] RR v3 PATCH: SMDK6400 Fix some build bug seedshope
2011-01-13 13:36 ` [U-Boot] [v3 patch 1/4] SMDK6400: Fix CONFIG_SYS_INIT_SP_ADDR undefined seedshope
2011-01-13 13:36 ` [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error seedshope
@ 2011-01-13 13:36 ` seedshope
2011-01-13 13:36 ` [U-Boot] [v3 patch 4/4] SMDK6400: Fix SMDK6400 SDRAM init seedshope
3 siblings, 0 replies; 15+ messages in thread
From: seedshope @ 2011-01-13 13:36 UTC (permalink / raw)
To: u-boot
Add some relocation symbols to u-boot.lds and disable LED functions
in start.s to support nand_spl.
Signed-off-by: seedshope <bocui107@gmail.com>
diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S
index 237dcfe..ae3706a 100644
--- a/arch/arm/cpu/arm1176/start.S
+++ b/arch/arm/cpu/arm1176/start.S
@@ -354,9 +354,11 @@ clbss_l:str r2, [r0] /* clear loop... */
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..30b1573 100644
--- a/nand_spl/board/samsung/smdk6400/u-boot.lds
+++ b/nand_spl/board/samsung/smdk6400/u-boot.lds
@@ -55,7 +55,22 @@ SECTIONS
__u_boot_cmd_end = .;
. = ALIGN(4);
+
+ .rel.dyn : {
+ __rel_dyn_start = .;
+ *(.rel*)
+ __rel_dyn_end = .;
+ }
+
+ .dynsym : {
+ __dynsym_start = .;
+ *(.dynsym)
+ }
+
+ .bss __rel_dyn_start (OVERLAY) : {
__bss_start = .;
- .bss : { *(.bss) . = ALIGN(4); }
+ *(.bss)
+ . = ALIGN(4);
_end = .;
+ }
}
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [v3 patch 4/4] SMDK6400: Fix SMDK6400 SDRAM init
2011-01-13 13:36 [U-Boot] RR v3 PATCH: SMDK6400 Fix some build bug seedshope
` (2 preceding siblings ...)
2011-01-13 13:36 ` [U-Boot] [v3 patch 3/4] SMDK6400: Fix build error for nand_spl support seedshope
@ 2011-01-13 13:36 ` seedshope
2011-01-14 0:53 ` Minkyu Kang
3 siblings, 1 reply; 15+ messages in thread
From: seedshope @ 2011-01-13 13:36 UTC (permalink / raw)
To: u-boot
Since SDRAM init function have already change, So the SDRAM
initial function must be change.
Signed-off-by: seedshope <bocui107@gmail.com>
diff --git a/board/samsung/smdk6400/smdk6400.c b/board/samsung/smdk6400/smdk6400.c
index 35aa40b..043d553 100644
--- a/board/samsung/smdk6400/smdk6400.c
+++ b/board/samsung/smdk6400/smdk6400.c
@@ -78,10 +78,18 @@ int board_init(void)
return 0;
}
-int dram_init(void)
+void dram_init_banksize(void)
{
+ DECLARE_GLOBAL_DATA_PTR;
+
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+}
+
+int dram_init(void)
+{
+ gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, \
+ PHYS_SDRAM_1_SIZE);
return 0;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
2011-01-13 13:36 ` [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error seedshope
@ 2011-01-13 18:07 ` Albert ARIBAUD
2011-01-14 15:45 ` seedshope
0 siblings, 1 reply; 15+ messages in thread
From: Albert ARIBAUD @ 2011-01-13 18:07 UTC (permalink / raw)
To: u-boot
Le 13/01/2011 14:36, seedshope a ?crit :
> Modify Makefile for cpu_init.c and Start.s use some label,this defined
> u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script
> board/samsung/smdk6400/u-boot-nand.lds. So add some label form u-boot.lds
> to u-boot-nand.lds
>
> Signed-off-by: seedshope<bocui107@gmail.com>
>
> diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile b/arch/arm/cpu/arm1176/s3c64xx/Makefile
> index 0785b19..f4b9574 100644
> --- a/arch/arm/cpu/arm1176/s3c64xx/Makefile
> +++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile
> @@ -30,12 +30,15 @@ LIB = $(obj)lib$(SOC).o
>
> SOBJS = reset.o
>
> -COBJS-$(CONFIG_S3C6400) += cpu_init.o speed.o
> +COBJS-$(CONFIG_S3C6400) += speed.o
> COBJS-y += timer.o
>
> +CPUINIT = cpu_init.o
> +
> OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
> +CPUINIT := $(addprefix $(obj),$(CPUINIT))
>
> -all: $(obj).depend $(START) $(LIB)
> +all: $(obj).depend $(START) $(LIB) $(CPUINIT)
>
> $(LIB): $(OBJS)
> $(call cmd_link_o_target, $(OBJS))
Not sure I get what's the problem and how exactly this changes solves
it. Can you detail this particular issue?
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [v3 patch 4/4] SMDK6400: Fix SMDK6400 SDRAM init
2011-01-13 13:36 ` [U-Boot] [v3 patch 4/4] SMDK6400: Fix SMDK6400 SDRAM init seedshope
@ 2011-01-14 0:53 ` Minkyu Kang
2011-01-14 15:51 ` seedshope
0 siblings, 1 reply; 15+ messages in thread
From: Minkyu Kang @ 2011-01-14 0:53 UTC (permalink / raw)
To: u-boot
Dear seedshope,
On 13 January 2011 22:36, seedshope <bocui107@gmail.com> wrote:
> Since SDRAM init function have already change, So the SDRAM
> initial function must be change.
>
> Signed-off-by: seedshope <bocui107@gmail.com>
>
> diff --git a/board/samsung/smdk6400/smdk6400.c b/board/samsung/smdk6400/smdk6400.c
> index 35aa40b..043d553 100644
> --- a/board/samsung/smdk6400/smdk6400.c
> +++ b/board/samsung/smdk6400/smdk6400.c
> @@ -78,10 +78,18 @@ int board_init(void)
> ? ? ? ?return 0;
> ?}
>
> -int dram_init(void)
> +void dram_init_banksize(void)
> ?{
> + ? ? ? DECLARE_GLOBAL_DATA_PTR;
Please move it to out of function.
> +
> ? ? ? ?gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
> ? ? ? ?gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
> +}
> +
> +int dram_init(void)
> +{
> + ? ? ? gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, \
Please remove "\".
> + ? ? ? ? ? ? ? ? ? ? ? PHYS_SDRAM_1_SIZE);
>
> ? ? ? ?return 0;
> ?}
> --
> 1.7.1
>
>
Thanks
Minkyu Kang
--
from. prom.
www.promsoft.net
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
2011-01-13 18:07 ` Albert ARIBAUD
@ 2011-01-14 15:45 ` seedshope
2011-01-14 15:59 ` seedshope
2011-01-14 16:39 ` Albert ARIBAUD
0 siblings, 2 replies; 15+ messages in thread
From: seedshope @ 2011-01-14 15:45 UTC (permalink / raw)
To: u-boot
On 01/14/2011 02:07 AM, Albert ARIBAUD wrote:
> Le 13/01/2011 14:36, seedshope a ?crit :
>> Modify Makefile for cpu_init.c and Start.s use some label,this defined
>> u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script
>> board/samsung/smdk6400/u-boot-nand.lds. So add some label form
>> u-boot.lds
>> to u-boot-nand.lds
>>
>> Signed-off-by: seedshope<bocui107@gmail.com>
>>
>> diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile
>> b/arch/arm/cpu/arm1176/s3c64xx/Makefile
>> index 0785b19..f4b9574 100644
>> --- a/arch/arm/cpu/arm1176/s3c64xx/Makefile
>> +++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile
>> @@ -30,12 +30,15 @@ LIB = $(obj)lib$(SOC).o
>>
>> SOBJS = reset.o
>>
>> -COBJS-$(CONFIG_S3C6400) += cpu_init.o speed.o
>> +COBJS-$(CONFIG_S3C6400) += speed.o
>> COBJS-y += timer.o
>>
>> +CPUINIT = cpu_init.o
>> +
>> OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
>> +CPUINIT := $(addprefix $(obj),$(CPUINIT))
>>
>> -all: $(obj).depend $(START) $(LIB)
>> +all: $(obj).depend $(START) $(LIB) $(CPUINIT)
>>
>> $(LIB): $(OBJS)
>> $(call cmd_link_o_target, $(OBJS))
>
> Not sure I get what's the problem and how exactly this changes solves
> it. Can you detail this particular issue?
The issue is mem_ctrl_asm_init redefine in
arch/arm/cpu/arm1176/s3c64xx/cpu_init.s.
At first, the link script file include cpu_init.s in
board/samsung/smd6400/u-boot-nand.s, If I separate the cpu_init.o from
COBJS-$(CONFIG_S3C6400), I guess cmd_link_o_target will deal with
cpu_init.o. So the link script will double link the cpu_init file.
I have two method to solve it.
first: see the patch
second: Modify the link script
But I feel, the first method is safe.
I asked a question. I will RR on next, The patch1 and patch3 have
already ok, Do I only send patch2 and patch4?
>
> Amicalement,
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [v3 patch 4/4] SMDK6400: Fix SMDK6400 SDRAM init
2011-01-14 0:53 ` Minkyu Kang
@ 2011-01-14 15:51 ` seedshope
0 siblings, 0 replies; 15+ messages in thread
From: seedshope @ 2011-01-14 15:51 UTC (permalink / raw)
To: u-boot
On 01/14/2011 08:53 AM, Minkyu Kang wrote:
> Dear seedshope,
>
> On 13 January 2011 22:36, seedshope<bocui107@gmail.com> wrote:
>> Since SDRAM init function have already change, So the SDRAM
>> initial function must be change.
>>
>> Signed-off-by: seedshope<bocui107@gmail.com>
>>
>> diff --git a/board/samsung/smdk6400/smdk6400.c b/board/samsung/smdk6400/smdk6400.c
>> index 35aa40b..043d553 100644
>> --- a/board/samsung/smdk6400/smdk6400.c
>> +++ b/board/samsung/smdk6400/smdk6400.c
>> @@ -78,10 +78,18 @@ int board_init(void)
>> return 0;
>> }
>>
>> -int dram_init(void)
>> +void dram_init_banksize(void)
>> {
>> + DECLARE_GLOBAL_DATA_PTR;
> Please move it to out of function.
I am sorry, DECLARE_GLOBAL_DATA_PTR have already defind in the head of
the file,
I will drop this declare.
>> +
>> gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
>> gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
>> +}
>> +
>> +int dram_init(void)
>> +{
>> + gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, \
> Please remove "\".
>
ok
Thanks,
seedshope
>> + PHYS_SDRAM_1_SIZE);
>>
>> return 0;
>> }
>> --
>> 1.7.1
>>
>>
> Thanks
> Minkyu Kang
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
2011-01-14 15:45 ` seedshope
@ 2011-01-14 15:59 ` seedshope
2011-01-14 16:39 ` Albert ARIBAUD
1 sibling, 0 replies; 15+ messages in thread
From: seedshope @ 2011-01-14 15:59 UTC (permalink / raw)
To: u-boot
On 01/14/2011 11:45 PM, seedshope wrote:
> On 01/14/2011 02:07 AM, Albert ARIBAUD wrote:
>> Le 13/01/2011 14:36, seedshope a ?crit :
>>> Modify Makefile for cpu_init.c and Start.s use some label,this defined
>>> u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script
>>> board/samsung/smdk6400/u-boot-nand.lds. So add some label form
>>> u-boot.lds
>>> to u-boot-nand.lds
>>>
>>> Signed-off-by: seedshope<bocui107@gmail.com>
>>>
>>> diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>> b/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>> index 0785b19..f4b9574 100644
>>> --- a/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>> +++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>> @@ -30,12 +30,15 @@ LIB = $(obj)lib$(SOC).o
>>>
>>> SOBJS = reset.o
>>>
>>> -COBJS-$(CONFIG_S3C6400) += cpu_init.o speed.o
>>> +COBJS-$(CONFIG_S3C6400) += speed.o
>>> COBJS-y += timer.o
>>>
>>> +CPUINIT = cpu_init.o
>>> +
>>> OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
>>> +CPUINIT := $(addprefix $(obj),$(CPUINIT))
>>>
>>> -all: $(obj).depend $(START) $(LIB)
>>> +all: $(obj).depend $(START) $(LIB) $(CPUINIT)
>>>
>>> $(LIB): $(OBJS)
>>> $(call cmd_link_o_target, $(OBJS))
>>
>> Not sure I get what's the problem and how exactly this changes solves
>> it. Can you detail this particular issue?
The part of u-boot-nand.lds as following:
. = ALIGN(4);
.text :
{
arch/arm/cpu/arm1176/start.o (.text)
arch/arm/cpu/arm1176/s3c64xx/cpu_init.o (.text)
*(.text)
}
I reference start.s to get the patch.;-)
Thanks,
seedshope
> The issue is mem_ctrl_asm_init redefine in
> arch/arm/cpu/arm1176/s3c64xx/cpu_init.s.
>
> At first, the link script file include cpu_init.s in
> board/samsung/smd6400/u-boot-nand.s, If I separate the cpu_init.o from
> COBJS-$(CONFIG_S3C6400), I guess cmd_link_o_target will deal with
> cpu_init.o. So the link script will double link the cpu_init file.
>
> I have two method to solve it.
> first: see the patch
> second: Modify the link script
>
> But I feel, the first method is safe.
>
> I asked a question. I will RR on next, The patch1 and patch3 have
> already ok, Do I only send patch2 and patch4?
>>
>> Amicalement,
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
2011-01-14 15:45 ` seedshope
2011-01-14 15:59 ` seedshope
@ 2011-01-14 16:39 ` Albert ARIBAUD
2011-01-14 16:56 ` seedshope
1 sibling, 1 reply; 15+ messages in thread
From: Albert ARIBAUD @ 2011-01-14 16:39 UTC (permalink / raw)
To: u-boot
Hi seedshope,
Le 14/01/2011 16:45, seedshope a ?crit :
> On 01/14/2011 02:07 AM, Albert ARIBAUD wrote:
>> Le 13/01/2011 14:36, seedshope a ?crit :
>>> Modify Makefile for cpu_init.c and Start.s use some label,this defined
>>> u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script
>>> board/samsung/smdk6400/u-boot-nand.lds. So add some label form
>>> u-boot.lds
>>> to u-boot-nand.lds
>>>
>>> Signed-off-by: seedshope<bocui107@gmail.com>
>>>
>>> diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>> b/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>> index 0785b19..f4b9574 100644
>>> --- a/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>> +++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>> @@ -30,12 +30,15 @@ LIB = $(obj)lib$(SOC).o
>>>
>>> SOBJS = reset.o
>>>
>>> -COBJS-$(CONFIG_S3C6400) += cpu_init.o speed.o
>>> +COBJS-$(CONFIG_S3C6400) += speed.o
>>> COBJS-y += timer.o
>>>
>>> +CPUINIT = cpu_init.o
>>> +
>>> OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
>>> +CPUINIT := $(addprefix $(obj),$(CPUINIT))
>>>
>>> -all: $(obj).depend $(START) $(LIB)
>>> +all: $(obj).depend $(START) $(LIB) $(CPUINIT)
>>>
>>> $(LIB): $(OBJS)
>>> $(call cmd_link_o_target, $(OBJS))
>>
>> Not sure I get what's the problem and how exactly this changes solves
>> it. Can you detail this particular issue?
> The issue is mem_ctrl_asm_init redefine in
> arch/arm/cpu/arm1176/s3c64xx/cpu_init.s.
From what follows it seems the problem is rather cpu_init.o being
linked in twice. Correct?
> At first, the link script file include cpu_init.s in
> board/samsung/smd6400/u-boot-nand.s, If I separate the cpu_init.o from
> COBJS-$(CONFIG_S3C6400), I guess cmd_link_o_target will deal with
> cpu_init.o. So the link script will double link the cpu_init file.
Then you should fix the double linking by i) determining why the double
linking happens and ii) properly linking once only.
> I have two method to solve it.
> first: see the patch
> second: Modify the link script
>
> But I feel, the first method is safe.
It may be safe, but IIUC it does not properly address the issue and its
root cause.
> I asked a question. I will RR on next, The patch1 and patch3 have
> already ok, Do I only send patch2 and patch4?
My personal practice is to re-send the whole patchset for each new
version, because i) people can easily see the whole of the changes
without having to go pick parts of previous versions and ii) it makes
clear when a patch is removed or added to the set.
>> Amicalement,
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
2011-01-14 16:39 ` Albert ARIBAUD
@ 2011-01-14 16:56 ` seedshope
2011-01-14 18:15 ` Albert ARIBAUD
0 siblings, 1 reply; 15+ messages in thread
From: seedshope @ 2011-01-14 16:56 UTC (permalink / raw)
To: u-boot
On 01/15/2011 12:39 AM, Albert ARIBAUD wrote:
> Hi seedshope,
>
> Le 14/01/2011 16:45, seedshope a ?crit :
>> On 01/14/2011 02:07 AM, Albert ARIBAUD wrote:
>>> Le 13/01/2011 14:36, seedshope a ?crit :
>>>> Modify Makefile for cpu_init.c and Start.s use some label,this defined
>>>> u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script
>>>> board/samsung/smdk6400/u-boot-nand.lds. So add some label form
>>>> u-boot.lds
>>>> to u-boot-nand.lds
>>>>
>>>> Signed-off-by: seedshope<bocui107@gmail.com>
>>>>
>>>> diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>> b/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>> index 0785b19..f4b9574 100644
>>>> --- a/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>> +++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>> @@ -30,12 +30,15 @@ LIB = $(obj)lib$(SOC).o
>>>>
>>>> SOBJS = reset.o
>>>>
>>>> -COBJS-$(CONFIG_S3C6400) += cpu_init.o speed.o
>>>> +COBJS-$(CONFIG_S3C6400) += speed.o
>>>> COBJS-y += timer.o
>>>>
>>>> +CPUINIT = cpu_init.o
>>>> +
>>>> OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
>>>> +CPUINIT := $(addprefix $(obj),$(CPUINIT))
>>>>
>>>> -all: $(obj).depend $(START) $(LIB)
>>>> +all: $(obj).depend $(START) $(LIB) $(CPUINIT)
>>>>
>>>> $(LIB): $(OBJS)
>>>> $(call cmd_link_o_target, $(OBJS))
>>>
>>> Not sure I get what's the problem and how exactly this changes solves
>>> it. Can you detail this particular issue?
>> The issue is mem_ctrl_asm_init redefine in
>> arch/arm/cpu/arm1176/s3c64xx/cpu_init.s.
>
> From what follows it seems the problem is rather cpu_init.o being
> linked in twice. Correct?
maybe
>
>> At first, the link script file include cpu_init.s in
>> board/samsung/smd6400/u-boot-nand.s, If I separate the cpu_init.o from
>> COBJS-$(CONFIG_S3C6400), I guess cmd_link_o_target will deal with
>> cpu_init.o. So the link script will double link the cpu_init file.
>
> Then you should fix the double linking by i) determining why the
> double linking happens and ii) properly linking once only.
Hi Alvert ARIBAUD,
I see the code for smdk6400. I found this code is very old. Before It
can not add cmd_link_o_target in
Makefile(arch/arm/cpu/arm1176/s3c64xx/Makefile), The file will only to
compile. So the link script is ok.
But, Now, It is not. As far as I know, The linker script can do to link
the first specified file for user.
Since I do not full understand the cmd_link_o_target mechanism. So I
only guess the command do
some link work.
Maybe I am correct.
>
>> I have two method to solve it.
>> first: see the patch
>> second: Modify the link script
>>
>> But I feel, the first method is safe.
>
> It may be safe, but IIUC it does not properly address the issue and
> its root cause.
yes
>
>> I asked a question. I will RR on next, The patch1 and patch3 have
>> already ok, Do I only send patch2 and patch4?
>
> My personal practice is to re-send the whole patchset for each new
> version, because i) people can easily see the whole of the changes
> without having to go pick parts of previous versions and ii) it makes
> clear when a patch is removed or added to the set.
ok
Thanks,
seedshope
>
>>> Amicalement,
>
> Amicalement,
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
2011-01-14 16:56 ` seedshope
@ 2011-01-14 18:15 ` Albert ARIBAUD
2011-01-14 18:45 ` seedshope
2011-01-19 14:25 ` seedshope
0 siblings, 2 replies; 15+ messages in thread
From: Albert ARIBAUD @ 2011-01-14 18:15 UTC (permalink / raw)
To: u-boot
Le 14/01/2011 17:56, seedshope a ?crit :
> On 01/15/2011 12:39 AM, Albert ARIBAUD wrote:
>> Hi seedshope,
>>
>> Le 14/01/2011 16:45, seedshope a ?crit :
>>> On 01/14/2011 02:07 AM, Albert ARIBAUD wrote:
>>>> Le 13/01/2011 14:36, seedshope a ?crit :
>>>>> Modify Makefile for cpu_init.c and Start.s use some label,this defined
>>>>> u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script
>>>>> board/samsung/smdk6400/u-boot-nand.lds. So add some label form
>>>>> u-boot.lds
>>>>> to u-boot-nand.lds
>>>>>
>>>>> Signed-off-by: seedshope<bocui107@gmail.com>
>>>>>
>>>>> diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>>> b/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>>> index 0785b19..f4b9574 100644
>>>>> --- a/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>>> +++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>>> @@ -30,12 +30,15 @@ LIB = $(obj)lib$(SOC).o
>>>>>
>>>>> SOBJS = reset.o
>>>>>
>>>>> -COBJS-$(CONFIG_S3C6400) += cpu_init.o speed.o
>>>>> +COBJS-$(CONFIG_S3C6400) += speed.o
>>>>> COBJS-y += timer.o
>>>>>
>>>>> +CPUINIT = cpu_init.o
>>>>> +
>>>>> OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
>>>>> +CPUINIT := $(addprefix $(obj),$(CPUINIT))
>>>>>
>>>>> -all: $(obj).depend $(START) $(LIB)
>>>>> +all: $(obj).depend $(START) $(LIB) $(CPUINIT)
>>>>>
>>>>> $(LIB): $(OBJS)
>>>>> $(call cmd_link_o_target, $(OBJS))
>>>>
>>>> Not sure I get what's the problem and how exactly this changes solves
>>>> it. Can you detail this particular issue?
>>> The issue is mem_ctrl_asm_init redefine in
>>> arch/arm/cpu/arm1176/s3c64xx/cpu_init.s.
>>
>> From what follows it seems the problem is rather cpu_init.o being
>> linked in twice. Correct?
> maybe
>>
>>> At first, the link script file include cpu_init.s in
>>> board/samsung/smd6400/u-boot-nand.s, If I separate the cpu_init.o from
>>> COBJS-$(CONFIG_S3C6400), I guess cmd_link_o_target will deal with
>>> cpu_init.o. So the link script will double link the cpu_init file.
>>
>> Then you should fix the double linking by i) determining why the
>> double linking happens and ii) properly linking once only.
> Hi Alvert ARIBAUD,
>
> I see the code for smdk6400. I found this code is very old. Before It
> can not add cmd_link_o_target in
> Makefile(arch/arm/cpu/arm1176/s3c64xx/Makefile), The file will only to
> compile. So the link script is ok.
>
> But, Now, It is not. As far as I know, The linker script can do to link
> the first specified file for user.
> Since I do not full understand the cmd_link_o_target mechanism. So I
> only guess the command do
> some link work.
>
> Maybe I am correct.
I don't want to accept this change on the off chance that it might be
correct; before your next patch submission, please try building your
code without this specific patch and positively find why the build fails.
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
2011-01-14 18:15 ` Albert ARIBAUD
@ 2011-01-14 18:45 ` seedshope
2011-01-19 14:25 ` seedshope
1 sibling, 0 replies; 15+ messages in thread
From: seedshope @ 2011-01-14 18:45 UTC (permalink / raw)
To: u-boot
On 01/15/2011 02:15 AM, Albert ARIBAUD wrote:
> Le 14/01/2011 17:56, seedshope a ?crit :
>> On 01/15/2011 12:39 AM, Albert ARIBAUD wrote:
>>> Hi seedshope,
>>>
>>> Le 14/01/2011 16:45, seedshope a ?crit :
>>>> On 01/14/2011 02:07 AM, Albert ARIBAUD wrote:
>>>>> Le 13/01/2011 14:36, seedshope a ?crit :
>>>>>> Modify Makefile for cpu_init.c and Start.s use some label,this
>>>>>> defined
>>>>>> u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script
>>>>>> board/samsung/smdk6400/u-boot-nand.lds. So add some label form
>>>>>> u-boot.lds
>>>>>> to u-boot-nand.lds
>>>>>>
>>>>>> Signed-off-by: seedshope<bocui107@gmail.com>
>>>>>>
>>>>>> diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>>>> b/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>>>> index 0785b19..f4b9574 100644
>>>>>> --- a/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>>>> +++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>>>> @@ -30,12 +30,15 @@ LIB = $(obj)lib$(SOC).o
>>>>>>
>>>>>> SOBJS = reset.o
>>>>>>
>>>>>> -COBJS-$(CONFIG_S3C6400) += cpu_init.o speed.o
>>>>>> +COBJS-$(CONFIG_S3C6400) += speed.o
>>>>>> COBJS-y += timer.o
>>>>>>
>>>>>> +CPUINIT = cpu_init.o
>>>>>> +
>>>>>> OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
>>>>>> +CPUINIT := $(addprefix $(obj),$(CPUINIT))
>>>>>>
>>>>>> -all: $(obj).depend $(START) $(LIB)
>>>>>> +all: $(obj).depend $(START) $(LIB) $(CPUINIT)
>>>>>>
>>>>>> $(LIB): $(OBJS)
>>>>>> $(call cmd_link_o_target, $(OBJS))
>>>>>
>>>>> Not sure I get what's the problem and how exactly this changes solves
>>>>> it. Can you detail this particular issue?
>>>> The issue is mem_ctrl_asm_init redefine in
>>>> arch/arm/cpu/arm1176/s3c64xx/cpu_init.s.
>>>
>>> From what follows it seems the problem is rather cpu_init.o being
>>> linked in twice. Correct?
>> maybe
>>>
>>>> At first, the link script file include cpu_init.s in
>>>> board/samsung/smd6400/u-boot-nand.s, If I separate the cpu_init.o from
>>>> COBJS-$(CONFIG_S3C6400), I guess cmd_link_o_target will deal with
>>>> cpu_init.o. So the link script will double link the cpu_init file.
>>>
>>> Then you should fix the double linking by i) determining why the
>>> double linking happens and ii) properly linking once only.
>> Hi Alvert ARIBAUD,
>>
>> I see the code for smdk6400. I found this code is very old. Before It
>> can not add cmd_link_o_target in
>> Makefile(arch/arm/cpu/arm1176/s3c64xx/Makefile), The file will only to
>> compile. So the link script is ok.
>>
>> But, Now, It is not. As far as I know, The linker script can do to link
>> the first specified file for user.
>> Since I do not full understand the cmd_link_o_target mechanism. So I
>> only guess the command do
>> some link work.
>>
>> Maybe I am correct.
>
> I don't want to accept this change on the off chance that it might be
> correct; before your next patch submission, please try building your
> code without this specific patch and positively find why the build fails.
ok,
Thanks
seedshope
>
> Amicalement,
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
2011-01-14 18:15 ` Albert ARIBAUD
2011-01-14 18:45 ` seedshope
@ 2011-01-19 14:25 ` seedshope
1 sibling, 0 replies; 15+ messages in thread
From: seedshope @ 2011-01-19 14:25 UTC (permalink / raw)
To: u-boot
On 01/15/2011 02:15 AM, Albert ARIBAUD wrote:
> Le 14/01/2011 17:56, seedshope a ?crit :
>> On 01/15/2011 12:39 AM, Albert ARIBAUD wrote:
>>> Hi seedshope,
>>>
>>> Le 14/01/2011 16:45, seedshope a ?crit :
>>>> On 01/14/2011 02:07 AM, Albert ARIBAUD wrote:
>>>>> Le 13/01/2011 14:36, seedshope a ?crit :
>>>>>> Modify Makefile for cpu_init.c and Start.s use some label,this
>>>>>> defined
>>>>>> u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script
>>>>>> board/samsung/smdk6400/u-boot-nand.lds. So add some label form
>>>>>> u-boot.lds
>>>>>> to u-boot-nand.lds
>>>>>>
>>>>>> Signed-off-by: seedshope<bocui107@gmail.com>
>>>>>>
>>>>>> diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>>>> b/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>>>> index 0785b19..f4b9574 100644
>>>>>> --- a/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>>>> +++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile
>>>>>> @@ -30,12 +30,15 @@ LIB = $(obj)lib$(SOC).o
>>>>>>
>>>>>> SOBJS = reset.o
>>>>>>
>>>>>> -COBJS-$(CONFIG_S3C6400) += cpu_init.o speed.o
>>>>>> +COBJS-$(CONFIG_S3C6400) += speed.o
>>>>>> COBJS-y += timer.o
>>>>>>
>>>>>> +CPUINIT = cpu_init.o
>>>>>> +
>>>>>> OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
>>>>>> +CPUINIT := $(addprefix $(obj),$(CPUINIT))
>>>>>>
>>>>>> -all: $(obj).depend $(START) $(LIB)
>>>>>> +all: $(obj).depend $(START) $(LIB) $(CPUINIT)
>>>>>>
>>>>>> $(LIB): $(OBJS)
>>>>>> $(call cmd_link_o_target, $(OBJS))
>>>>>
>>>>> Not sure I get what's the problem and how exactly this changes solves
>>>>> it. Can you detail this particular issue?
>>>> The issue is mem_ctrl_asm_init redefine in
>>>> arch/arm/cpu/arm1176/s3c64xx/cpu_init.s.
>>>
>>> From what follows it seems the problem is rather cpu_init.o being
>>> linked in twice. Correct?
>> maybe
>>>
>>>> At first, the link script file include cpu_init.s in
>>>> board/samsung/smd6400/u-boot-nand.s, If I separate the cpu_init.o from
>>>> COBJS-$(CONFIG_S3C6400), I guess cmd_link_o_target will deal with
>>>> cpu_init.o. So the link script will double link the cpu_init file.
>>>
>>> Then you should fix the double linking by i) determining why the
>>> double linking happens and ii) properly linking once only.
>> Hi Alvert ARIBAUD,
>>
>> I see the code for smdk6400. I found this code is very old. Before It
>> can not add cmd_link_o_target in
>> Makefile(arch/arm/cpu/arm1176/s3c64xx/Makefile), The file will only to
>> compile. So the link script is ok.
>>
>> But, Now, It is not. As far as I know, The linker script can do to link
>> the first specified file for user.
>> Since I do not full understand the cmd_link_o_target mechanism. So I
>> only guess the command do
>> some link work.
>>
>> Maybe I am correct.
>
> I don't want to accept this change on the off chance that it might be
> correct; before your next patch submission, please try building your
> code without this specific patch and positively find why the build fails.
Hi Amicalement
I trace the issue, I find cmd_link_o_target will link the cpu_init.o file.
If I add the file to u-boot-nand.lds file, The file will be link twice.
Now, It is good method to delete the file in u-boot-nand.s. Why? Before I
think Nand Booting for the 4kb, If you don't link the file to the first
4kB, the system
will be generate error. Because the mem initialization function will
can't find.
But , Now , The nand booting will be generate in nand_spl, the generate
u-boot img is limit for 4KB,
So this is ok.
Do you think about?
Thanks,
seedshope
>
> Amicalement,
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2011-01-19 14:25 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-13 13:36 [U-Boot] RR v3 PATCH: SMDK6400 Fix some build bug seedshope
2011-01-13 13:36 ` [U-Boot] [v3 patch 1/4] SMDK6400: Fix CONFIG_SYS_INIT_SP_ADDR undefined seedshope
2011-01-13 13:36 ` [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error seedshope
2011-01-13 18:07 ` Albert ARIBAUD
2011-01-14 15:45 ` seedshope
2011-01-14 15:59 ` seedshope
2011-01-14 16:39 ` Albert ARIBAUD
2011-01-14 16:56 ` seedshope
2011-01-14 18:15 ` Albert ARIBAUD
2011-01-14 18:45 ` seedshope
2011-01-19 14:25 ` seedshope
2011-01-13 13:36 ` [U-Boot] [v3 patch 3/4] SMDK6400: Fix build error for nand_spl support seedshope
2011-01-13 13:36 ` [U-Boot] [v3 patch 4/4] SMDK6400: Fix SMDK6400 SDRAM init seedshope
2011-01-14 0:53 ` Minkyu Kang
2011-01-14 15:51 ` seedshope
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox