Patchwork [U-Boot] add nand spl boot for qi_lb60 board

login
register
mail settings
Submitter Xiangfu Liu
Date Jan. 5, 2012, 12:24 a.m.
Message ID <4F04EDCC.6080008@openmobilefree.net>
Download mbox | patch
Permalink /patch/134393/
State Superseded
Headers show

Comments

Xiangfu Liu - Jan. 5, 2012, 12:24 a.m.
Hi

yes. I have cpmpared this. but I can't find where is the problem.
attachment is the u-boot.map diff.

after remove those 'extern' the u-boot-nand-spl is exact same. binary file. map file both same.
but the u-boot.bin/map changed.

Please help me take a look.

thanks Scott.
xiangfu

On 01/05/2012 06:12 AM, Scott Wood wrote:
> Or compare the resulting binaries, see what's actually changed.
>
> -Scott
Scott Wood - Jan. 5, 2012, 6:44 p.m.
On 01/04/2012 06:24 PM, Xiangfu Liu wrote:
> Hi
> 
> yes. I have cpmpared this. but I can't find where is the problem.
> attachment is the u-boot.map diff.
> 
> after remove those 'extern' the u-boot-nand-spl is exact same. binary
> file. map file both same.
> but the u-boot.bin/map changed.
> 
> Please help me take a look.

Use "mips-whatever-objdump -dlrsh" on the good and bad u-boot binaries
(or on any .o files you suspect may be relevant), to see more
specifically what's different.

You may also want to try compiling suspect files to assembly and
comparing the differences there.

-Scott
Xiangfu Liu - Jan. 6, 2012, 10:18 a.m.
On 01/06/2012 02:44 AM, Scott Wood wrote:
> Use "mips-whatever-objdump -dlrsh" on the good and bad u-boot binaries
> (or on any .o files you suspect may be relevant), to see more
> specifically what's different.
>
> You may also want to try compiling suspect files to assembly and
> comparing the differences there.
>
> -Scott

thanks Scott. a working patch is coming soon.

forget add CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST to board configure head file.
Scott Wood - Jan. 6, 2012, 7:05 p.m.
On 01/06/2012 04:18 AM, Xiangfu Liu wrote:
> On 01/06/2012 02:44 AM, Scott Wood wrote:
>> Use "mips-whatever-objdump -dlrsh" on the good and bad u-boot binaries
>> (or on any .o files you suspect may be relevant), to see more
>> specifically what's different.
>>
>> You may also want to try compiling suspect files to assembly and
>> comparing the differences there.
>>
>> -Scott
> 
> thanks Scott. a working patch is coming soon.
> 
> forget add CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST to board configure head
> file.

That still doesn't explain how a few duplicate externs changed the
resulting binary...

-Scott
Xiangfu Liu - Jan. 10, 2012, 9:14 a.m.
On 01/07/2012 03:05 AM, Scott Wood wrote:
>> >  forget add CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST to board configure head
>> >  file.
> That still doesn't explain how a few duplicate externs changed the
> resulting binary...

yes. strange. have no idea about this. when I have time I will compare the binary
more. try to understand this.

xiangfu

Patch

--- YES/u-boot.map	2012-01-01 20:41:57.020058001 +0800
+++ NO/u-boot.map	2012-01-01 20:41:13.068058002 +0800
@@ -1058,7 +1058,7 @@ 
                 0x0000000080118b20                __ashrdi3
                 0x0000000080118b60                . = ALIGN (0x4)
 
-.rodata         0x0000000080118b60     0x5550
+.rodata         0x0000000080118b60     0x5558
  *(SORT(.rodata*))
  .rodata        0x0000000080118b60       0xd0 common/libcommon.o
  .rodata        0x0000000080118c30       0x20 lib/libgeneric.o
@@ -1157,102 +1157,102 @@ 
  .rodata.tab_seq
                 0x000000008011e04c        0xc common/libcommon.o
  .rodata.version_string
-                0x000000008011e058       0x38 common/libcommon.o
+                0x000000008011e058       0x40 common/libcommon.o
                 0x000000008011e058                version_string
  .rodata.xyzModem_error
-                0x000000008011e090       0x20 common/libcommon.o
+                0x000000008011e098       0x20 common/libcommon.o
 
-.rel.dyn        0x000000008011e0b0        0x0
+.rel.dyn        0x000000008011e0b8        0x0
  .rel.dyn       0x0000000000000000        0x0 arch/mips/cpu/xburst/start.o
-                0x000000008011e0b0                . = ALIGN (0x4)
+                0x000000008011e0b8                . = ALIGN (0x4)
 
-.data           0x000000008011e0b0     0x1978
+.data           0x000000008011e0b8     0x1978
  *(.data*)
- .data.uart     0x000000008011e0b0        0x4 arch/mips/cpu/xburst/libxburst.o
-                0x000000008011e0b0                uart
+ .data.uart     0x000000008011e0b8        0x4 arch/mips/cpu/xburst/libxburst.o
+                0x000000008011e0b8                uart
  .data.rel.init_sequence
-                0x000000008011e0b4       0x28 arch/mips/lib/libmips.o
-                0x000000008011e0b4                init_sequence
+                0x000000008011e0bc       0x28 arch/mips/lib/libmips.o
+                0x000000008011e0bc                init_sequence
  .data.rel.boot_os
-                0x000000008011e0dc       0x4c common/libcommon.o
+                0x000000008011e0e4       0x4c common/libcommon.o
  .data.rel.local.cmd_bootm_sub
-                0x000000008011e128       0x90 common/libcommon.o
- .data.do_echo  0x000000008011e1b8        0x4 common/libcommon.o
+                0x000000008011e130       0x90 common/libcommon.o
+ .data.do_echo  0x000000008011e1c0        0x4 common/libcommon.o
  .data.dp_last_length
-                0x000000008011e1bc        0x4 common/libcommon.o
+                0x000000008011e1c4        0x4 common/libcommon.o
  .data.load_addr
-                0x000000008011e1c0        0x4 common/libcommon.o
-                0x000000008011e1c0                load_addr
+                0x000000008011e1c8        0x4 common/libcommon.o
+                0x000000008011e1c8                load_addr
  .data.rel.cmd_env_sub
-                0x000000008011e1c4       0xc0 common/libcommon.o
- .data.env_id   0x000000008011e284        0x4 common/libcommon.o
+                0x000000008011e1cc       0xc0 common/libcommon.o
+ .data.env_id   0x000000008011e28c        0x4 common/libcommon.o
  .data.trim_threshold
-                0x000000008011e288        0x4 common/libcommon.o
+                0x000000008011e290        0x4 common/libcommon.o
  .data.rel.local.av_
-                0x000000008011e28c      0x408 common/libcommon.o
+                0x000000008011e294      0x408 common/libcommon.o
  .data.sbrk_base
-                0x000000008011e694        0x4 common/libcommon.o
+                0x000000008011e69c        0x4 common/libcommon.o
  .data.rel.local.env_name_spec
-                0x000000008011e698        0x4 common/libcommon.o
-                0x000000008011e698                env_name_spec
+                0x000000008011e6a0        0x4 common/libcommon.o
+                0x000000008011e6a0                env_name_spec
  .data.rel.ro.local.uimage_comp
-                0x000000008011e69c       0x48 common/libcommon.o
+                0x000000008011e6a4       0x48 common/libcommon.o
  .data.rel.ro.local.uimage_type
-                0x000000008011e6e4       0xc0 common/libcommon.o
+                0x000000008011e6ec       0xc0 common/libcommon.o
  .data.rel.ro.local.uimage_arch
-                0x000000008011e7a4       0xf0 common/libcommon.o
+                0x000000008011e7ac       0xf0 common/libcommon.o
  .data.rel.ro.local.uimage_os
-                0x000000008011e894       0x54 common/libcommon.o
+                0x000000008011e89c       0x54 common/libcommon.o
  .data.rel.local.stdio_names
-                0x000000008011e8e8        0xc common/libcommon.o
-                0x000000008011e8e8                stdio_names
+                0x000000008011e8f0        0xc common/libcommon.o
+                0x000000008011e8f0                stdio_names
  .data.nand_curr_device
-                0x000000008011e8f4        0x4 drivers/mtd/nand/libnand.o
-                0x000000008011e8f4                nand_curr_device
+                0x000000008011e8fc        0x4 drivers/mtd/nand/libnand.o
+                0x000000008011e8fc                nand_curr_device
  .data.rel.local.bbt_main_descr
-                0x000000008011e8f8       0x24 drivers/mtd/nand/libnand.o
+                0x000000008011e900       0x24 drivers/mtd/nand/libnand.o
  .data.rel.local.bbt_mirror_descr
-                0x000000008011e91c       0x24 drivers/mtd/nand/libnand.o
+                0x000000008011e924       0x24 drivers/mtd/nand/libnand.o
  .data.rel.local.agand_flashbased
-                0x000000008011e940       0x24 drivers/mtd/nand/libnand.o
+                0x000000008011e948       0x24 drivers/mtd/nand/libnand.o
  .data.rel.local.largepage_flashbased
-                0x000000008011e964       0x24 drivers/mtd/nand/libnand.o
+                0x000000008011e96c       0x24 drivers/mtd/nand/libnand.o
  .data.rel.local.smallpage_flashbased
-                0x000000008011e988       0x24 drivers/mtd/nand/libnand.o
+                0x000000008011e990       0x24 drivers/mtd/nand/libnand.o
  .data.rel.local.largepage_memorybased
-                0x000000008011e9ac       0x24 drivers/mtd/nand/libnand.o
+                0x000000008011e9b4       0x24 drivers/mtd/nand/libnand.o
  .data.rel.local.smallpage_memorybased
-                0x000000008011e9d0       0x24 drivers/mtd/nand/libnand.o
+                0x000000008011e9d8       0x24 drivers/mtd/nand/libnand.o
  .data.bbt_pattern
-                0x000000008011e9f4        0x4 drivers/mtd/nand/libnand.o
+                0x000000008011e9fc        0x4 drivers/mtd/nand/libnand.o
  .data.mirror_pattern
-                0x000000008011e9f8        0x4 drivers/mtd/nand/libnand.o
+                0x000000008011ea00        0x4 drivers/mtd/nand/libnand.o
  .data.scan_agand_pattern
-                0x000000008011e9fc        0x8 drivers/mtd/nand/libnand.o
+                0x000000008011ea04        0x8 drivers/mtd/nand/libnand.o
  .data.scan_ff_pattern
-                0x000000008011ea04        0x4 drivers/mtd/nand/libnand.o
+                0x000000008011ea0c        0x4 drivers/mtd/nand/libnand.o
  .data.rel.ro.local.nand_flash_ids
-                0x000000008011ea08      0x468 drivers/mtd/nand/libnand.o
-                0x000000008011ea08                nand_flash_ids
+                0x000000008011ea10      0x468 drivers/mtd/nand/libnand.o
+                0x000000008011ea10                nand_flash_ids
  .data.rel.ro.local.nand_manuf_ids
-                0x000000008011ee70       0x50 drivers/mtd/nand/libnand.o
-                0x000000008011ee70                nand_manuf_ids
+                0x000000008011ee78       0x50 drivers/mtd/nand/libnand.o
+                0x000000008011ee78                nand_manuf_ids
  .data.nand_oob_8
-                0x000000008011eec0      0x248 drivers/mtd/nand/libnand.o
+                0x000000008011eec8      0x248 drivers/mtd/nand/libnand.o
  .data.nand_oob_16
-                0x000000008011f108      0x248 drivers/mtd/nand/libnand.o
+                0x000000008011f110      0x248 drivers/mtd/nand/libnand.o
  .data.nand_oob_64
-                0x000000008011f350      0x248 drivers/mtd/nand/libnand.o
+                0x000000008011f358      0x248 drivers/mtd/nand/libnand.o
  .data.nand_oob_128
-                0x000000008011f598      0x248 drivers/mtd/nand/libnand.o
+                0x000000008011f5a0      0x248 drivers/mtd/nand/libnand.o
  .data.qi_lb60_ecclayout_2gb
-                0x000000008011f7e0      0x248 drivers/mtd/nand/libnand.o
+                0x000000008011f7e8      0x248 drivers/mtd/nand/libnand.o
 
-.got.plt        0x000000008011fa28        0x0
+.got.plt        0x000000008011fa30        0x0
  .got.plt       0x0000000000000000        0x0 arch/mips/cpu/xburst/start.o
-                0x000000008011fa28                . = .
+                0x000000008011fa30                . = .
                 0x0000000080127a20                _gp = (ALIGN (0x10) + 0x7ff0)
-                0x000000008011fa28                __got_start = .
+                0x000000008011fa30                __got_start = .
 
 .got            0x000000008011fa30      0x3f8
  *(.got)
@@ -1301,7 +1301,7 @@ 
                 0x0000000080120110                __u_boot_cmd_version
                 0x0000000080120128                __u_boot_cmd_end = .
                 0x0000000080120128                uboot_end_data = .
-                0x0000000000000100                num_got_entries = ((__got_end - __got_start) >> 0x2)
+                0x00000000000000fe                num_got_entries = ((__got_end - __got_start) >> 0x2)
                 0x0000000080120128                . = ALIGN (0x4)
 
 .sbss