[U-Boot-Users] [PATCH] mpc85xx: Update linker scripts for Freescale boards

2008-07-30 Thread Kumar Gala
* Move to using absolute addressing always.  Makes the scripts a bit more
  portable and common
* Moved .bss after the end of the image.  These allows us to have more
  room in the resulting binary image for code and data.
* Removed .text object files that aren't really needed
* Added drivers/bios_emulator/atibios.o so the files are common since we
  do run ATI video cards on some boards

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 board/freescale/mpc8540ads/u-boot.lds |   35 
 board/freescale/mpc8541cds/u-boot.lds |   36 +++--
 board/freescale/mpc8544ds/u-boot.lds  |   33 ++
 board/freescale/mpc8548cds/u-boot.lds |   35 +++-
 board/freescale/mpc8555cds/u-boot.lds |   36 +++--
 board/freescale/mpc8560ads/u-boot.lds |   40 +---
 board/freescale/mpc8568mds/u-boot.lds |   38 +++---
 7 files changed, 100 insertions(+), 153 deletions(-)

diff --git a/board/freescale/mpc8540ads/u-boot.lds 
b/board/freescale/mpc8540ads/u-boot.lds
index f200810..dd7ec5d 100644
--- a/board/freescale/mpc8540ads/u-boot.lds
+++ b/board/freescale/mpc8540ads/u-boot.lds
@@ -2,6 +2,8 @@
  * (C) Copyright 2002,2003, Motorola,Inc.
  * Xianghua Xiao, [EMAIL PROTECTED]
  *
+ * Copyright 2008 Freescale Semiconductor, Inc.
+ *
  * See file CREDITS for list of people who contributed to this
  * project.
  *
@@ -26,16 +28,6 @@ OUTPUT_ARCH(powerpc)
__DYNAMIC = 0;*/
 SECTIONS
 {
-  .resetvec 0xFFFC :
-  {
-*(.resetvec)
-  } = 0x
-
-  .bootpg 0xF000 :
-  {
-cpu/mpc85xx/start.o(.bootpg)
-  } = 0x
-
   /* Read-only sections, merged into text segment: */
   . = + SIZEOF_HEADERS;
   .interp : { *(.interp) }
@@ -63,16 +55,7 @@ SECTIONS
   .text  :
   {
 cpu/mpc85xx/start.o(.text)
-cpu/mpc85xx/traps.o (.text)
-cpu/mpc85xx/interrupts.o (.text)
-cpu/mpc85xx/cpu_init.o (.text)
-cpu/mpc85xx/cpu.o (.text)
-cpu/mpc85xx/speed.o (.text)
-cpu/mpc85xx/pci.o (.text)
-common/dlmalloc.o (.text)
-lib_generic/crc32.o (.text)
-lib_ppc/extable.o (.text)
-lib_generic/zlib.o (.text)
+drivers/bios_emulator/atibios.o (.text)
 *(.text)
 *(.fixup)
 *(.got1)
@@ -134,6 +117,18 @@ SECTIONS
   . = ALIGN(256);
   __init_end = .;

+  .bootpg ADDR(.text) + 0x7f000 :
+  {
+cpu/mpc85xx/start.o(.bootpg)
+  } = 0x
+
+  .resetvec ADDR(.text) + 0x7fffc :
+  {
+*(.resetvec)
+  } = 0x
+
+  . = ADDR(.text) + 0x8;
+
   __bss_start = .;
   .bss (NOLOAD)   :
   {
diff --git a/board/freescale/mpc8541cds/u-boot.lds 
b/board/freescale/mpc8541cds/u-boot.lds
index 5f4dcf0..9fe1a28 100644
--- a/board/freescale/mpc8541cds/u-boot.lds
+++ b/board/freescale/mpc8541cds/u-boot.lds
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004 Freescale Semiconductor.
+ * Copyright 2004, 2008 Freescale Semiconductor.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -25,16 +25,6 @@ OUTPUT_ARCH(powerpc)
__DYNAMIC = 0;*/
 SECTIONS
 {
-  .resetvec 0xFFFC :
-  {
-*(.resetvec)
-  } = 0x
-
-  .bootpg 0xF000 :
-  {
-cpu/mpc85xx/start.o(.bootpg)
-  } = 0x
-
   /* Read-only sections, merged into text segment: */
   . = + SIZEOF_HEADERS;
   .interp : { *(.interp) }
@@ -62,17 +52,7 @@ SECTIONS
   .text  :
   {
 cpu/mpc85xx/start.o(.text)
-cpu/mpc85xx/traps.o (.text)
-cpu/mpc85xx/interrupts.o (.text)
-cpu/mpc85xx/cpu_init.o (.text)
-cpu/mpc85xx/cpu.o (.text)
-drivers/net/tsec.o (.text)
-cpu/mpc85xx/speed.o (.text)
-cpu/mpc85xx/pci.o (.text)
-common/dlmalloc.o (.text)
-lib_generic/crc32.o (.text)
-lib_ppc/extable.o (.text)
-lib_generic/zlib.o (.text)
+drivers/bios_emulator/atibios.o (.text)
 *(.text)
 *(.fixup)
 *(.got1)
@@ -134,6 +114,18 @@ SECTIONS
   . = ALIGN(256);
   __init_end = .;

+  .bootpg ADDR(.text) + 0x7f000 :
+  {
+cpu/mpc85xx/start.o(.bootpg)
+  } = 0x
+
+  .resetvec ADDR(.text) + 0x7fffc :
+  {
+*(.resetvec)
+  } = 0x
+
+  . = ADDR(.text) + 0x8;
+
   __bss_start = .;
   .bss (NOLOAD)   :
   {
diff --git a/board/freescale/mpc8544ds/u-boot.lds 
b/board/freescale/mpc8544ds/u-boot.lds
index c66c69f..fec8ea3 100644
--- a/board/freescale/mpc8544ds/u-boot.lds
+++ b/board/freescale/mpc8544ds/u-boot.lds
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007 Freescale Semiconductor, Inc.
+ * Copyright 2007-2008 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -25,16 +25,6 @@ OUTPUT_ARCH(powerpc)
__DYNAMIC = 0;*/
 SECTIONS
 {
-  .resetvec 0xFFFC :
-  {
-*(.resetvec)
-  } = 0x
-
-  .bootpg 0xF000 :
-  {
-cpu/mpc85xx/start.o(.bootpg)
-  } = 0x
-
   /* Read-only sections, merged into text segment: */
   . = + SIZEOF_HEADERS;
   .interp : { *(.interp) }
@@ 

Re: [U-Boot-Users] [PATCH] mpc85xx: Update linker scripts for Freescale boards

2008-07-30 Thread Wolfgang Denk
In message [EMAIL PROTECTED] you wrote:

.text  :
{
  cpu/mpc85xx/start.o  (.text)
 -cpu/mpc85xx/traps.o (.text)
 -cpu/mpc85xx/interrupts.o (.text)
 -cpu/mpc85xx/cpu_init.o (.text)
 -cpu/mpc85xx/cpu.o (.text)
 -cpu/mpc85xx/speed.o (.text)
 -cpu/mpc85xx/pci.o (.text)
 -common/dlmalloc.o (.text)
 -lib_generic/crc32.o (.text)
 -lib_ppc/extable.o (.text)
 -lib_generic/zlib.o (.text)
 +drivers/bios_emulator/atibios.o (.text)
  *(.text)

When you exclude all the other objects here, then why do you have to
include atibios.o ?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
A door is what a dog is perpetually on the wrong side of.
- Ogden Nash

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] mpc85xx: Update linker scripts for Freescale boards

2008-07-30 Thread Kumar Gala

On Jul 30, 2008, at 11:07 AM, Wolfgang Denk wrote:

 In message [EMAIL PROTECTED]  
 you wrote:

   .text  :
   {
 cpu/mpc85xx/start.o  (.text)
 -cpu/mpc85xx/traps.o (.text)
 -cpu/mpc85xx/interrupts.o (.text)
 -cpu/mpc85xx/cpu_init.o (.text)
 -cpu/mpc85xx/cpu.o (.text)
 -cpu/mpc85xx/speed.o (.text)
 -cpu/mpc85xx/pci.o (.text)
 -common/dlmalloc.o (.text)
 -lib_generic/crc32.o (.text)
 -lib_ppc/extable.o (.text)
 -lib_generic/zlib.o (.text)
 +drivers/bios_emulator/atibios.o (.text)
 *(.text)

 When you exclude all the other objects here, then why do you have to
 include atibios.o ?

I haven't figured that out yet.  I know my boot fails if I dont.

Guess I should go figure that out... I was hoping to blissfully ignore  
this ;)

- k

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] mpc85xx: Update linker scripts for Freescale boards

2008-07-30 Thread Kumar Gala

On Jul 30, 2008, at 11:07 AM, Wolfgang Denk wrote:

 In message [EMAIL PROTECTED]  
 you wrote:

   .text  :
   {
 cpu/mpc85xx/start.o  (.text)
 -cpu/mpc85xx/traps.o (.text)
 -cpu/mpc85xx/interrupts.o (.text)
 -cpu/mpc85xx/cpu_init.o (.text)
 -cpu/mpc85xx/cpu.o (.text)
 -cpu/mpc85xx/speed.o (.text)
 -cpu/mpc85xx/pci.o (.text)
 -common/dlmalloc.o (.text)
 -lib_generic/crc32.o (.text)
 -lib_ppc/extable.o (.text)
 -lib_generic/zlib.o (.text)
 +drivers/bios_emulator/atibios.o (.text)
 *(.text)

 When you exclude all the other objects here, then why do you have to
 include atibios.o ?

Ok, the issue is that the atibios/x86 emu was causing _end not to be 4- 
byte aligned and by putting in earlier it would get aligned for us.   
I've posted a new patch that adds a proper ALIGN for _end and dropped  
the explicit listing of atibios.o and start.o since they aren't needed.

- k

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users