RR v5 PATCH: SMDK6400 Fix some build bug
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 from 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.
Change from v3:
Add new patch 3: I discuss with Amicalement, I find the mutiple-link issue:
The first, the cpu_init.o have already been link for cmd_link_o_target atfer compile. But, The link script re-link the point file. So the link machine will generate multiple definition error information.
The second, Since the first 4kB of nand boot featue code move to nand_spl, So It is not necessary to force the cpu_init.o in non-nand boot.
Delete the cpu_init.o from u-boot-nand.lds is safe.
patch 4: patch 4 and patch 5 is split from v2 patch4. patch 6: Modify according Minkyu Kang comment
Change from v4
1. Modify Signed-off-by for all the patch
2. Modify patch6 for the Sergei, Minkyu and Thomas comments.
PATCH v5 1/6 SMDK6400: Fix CONFIG_SYS_INIT_SP_ADDR undefined
Fix CONFIG_SYS_INIT_SP_ADDR undefined issue.
include/configs/smdk6400.h +5 -0
@@ -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 */
Signature · 1 line
1.7.1
PATCH v5 1/6 SMDK6400: Fix CONFIG_SYS_INIT_SP_ADDR undefined
Quoted 4 lines · seedshope
Fix
CONFIG_SYS_INIT_SP_ADDRundefined issue.Signed-off-by Zhong Hongbo <[email protected]>
applied to u-boot-samsung
Thanks
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net
PATCH v5 2/6 SMDK6400: Fix some label undefined in build error
In reply to seedshopeModify 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
board/samsung/smdk6400/u-boot-nand.lds +24 -3
@@ -56,7 +56,28 @@ SECTIONS .mmudata : { *(.mmudata) } . = ALIGN(4); - __bss_start = .; - .bss : { *(.bss) . = ALIGN(4); } - _end = .; + + .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*) } }
Signature · 1 line
1.7.1
PATCH v5 2/6 SMDK6400: Fix some label undefined in build error
Quoted 7 lines · seedshope
Modify
Makefileforcpu_init.cand Start.s use some label,this definedu-boot.ldsofarch/arm/cpu/arm1176. But SMDK6400 use the link scriptboard/samsung/smdk6400/u-boot-nand.lds. So add some label formu-boot.ldstou-boot-nand.ldsSigned-off-by Zhong Hongbo <[email protected]>
applied to u-boot-samsung
Thanks
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net
PATCH v5 3/6 SMDK6400: Fix the mutiple link error
In reply to seedshopeThe first, the cpu_init.o have already been link for cmd_link_o_target atfer compile, But, The link script re-link the point file. So the link machine will generate multiple definition error information.
The second, Since the first 4kB of nand boot featue code move to nand_spl, So It is not necessary to force the cpu_init.o in non-nand boot.
board/samsung/smdk6400/u-boot-nand.lds +0 -1
@@ -35,7 +35,6 @@ SECTIONS .text : { arch/arm/cpu/arm1176/start.o (.text) - arch/arm/cpu/arm1176/s3c64xx/cpu_init.o (.text) *(.text) }
Signature · 1 line
1.7.1
PATCH v5 3/6 SMDK6400: Fix the mutiple link error
Quoted 9 lines · seedshope
The first, the cpu_init.o have already been link for
cmd_link_o_targetatfer compile, But, The link script re-link the point file. So the link machine will generate multiple definition error information.The second, Since the first 4kB of nand boot featue code move to
nand_spl, So It is not necessary to force the cpu_init.o in non-nand boot.Signed-off-by Zhong Hongbo <[email protected]>
applied to u-boot-samsung
Thanks
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net
PATCH v5 4/6 SMDK6400: Add some labels to u-boot.lds to support nand_spl
In reply to seedshopeIn the nand_spl feature of SMDK6400. Add some relocation symbols to nand_spl/board/samsung/smdk6400/u-boot.lds to fix the compile error.
nand_spl/board/samsung/smdk6400/u-boot.lds +16 -1
@@ -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 = .; + } }
Signature · 1 line
1.7.1
PATCH v5 4/6 SMDK6400: Add some labels to u-boot.lds to support nand_spl
Quoted 5 lines · seedshope
In the
nand_splfeature of SMDK6400. Add some relocation symbols tonand_spl/board/samsung/smdk6400/u-boot.ldsto fix the compile error.Signed-off-by Zhong Hongbo <[email protected]>
applied to u-boot-samsung
Thanks
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net
PATCH v5 5/6 SMDK6400: Disable LED function in start.s on the nand booting
In reply to seedshopeSince nand boot have some limit for the first 4KB, We only disable the LED function to reduce the code space. At the same time, Fix the compile error for LED function undefined in the compile time of nand_spl.
arch/arm/cpu/arm1176/start.S +2 -0
@@ -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
Signature · 1 line
1.7.1
PATCH v5 5/6 SMDK6400: Disable LED function in start.s on the nand booting
Quoted 7 lines · seedshope
Since nand boot have some limit for the first 4KB, We only disable the LED function to reduce the code space. At the same time, Fix the compile error for LED function undefined in the compile time of
nand_spl.Signed-off-by Zhong Hongbo <[email protected]>
applied to u-boot-samsung
Thanks
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net
PATCH v5 6/6 SMDK6400: Fixup dram_init for relocation support
In reply to seedshopeboard/samsung/smdk6400/smdk6400.c +7 -1
@@ -78,10 +78,16 @@ int board_init(void)return 0 ; } -int dram_init (void ) +void dram_init_banksize (void ) { 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 ; }
Signature · 1 line
1.7.1
PATCH v5 6/6 SMDK6400: Fixup dram_init for relocation support
board/samsung/smdk6400/smdk6400.c
Quoted 3 lines · seedshope
Signed-off-by Zhong Hongbo <[email protected]>board/samsung/smdk6400/smdk6400.c +0
-0
applied to u-boot-samsung
Thanks
Minkyu Kang
Signature · 2 lines
from. prom. www.promsoft.net