m68k: add architecture-specific u-boot.lds
PATCH 1/1 m68k: add architecture-specific u-boot.lds
Add architecture-specific u-boot.lds and remove all board-specific u-boot.lds.
All the .text customization that was board-specific have been moved inside the related include/configs, inside a LDS_BOARD_TEXT define.
--- arch/m68k/cpu/u-boot.lds | 91 ++++++++++++++++++++++++++++++++++++ board/BuS/eb_cpu5282/u-boot.lds | 82 -------------------------------- board/astro/mcf5373l/u-boot.lds | 86 ---------------------------------- board/cobra5272/u-boot.lds | 85 --------------------------------- board/freescale/m5208evbe/u-boot.lds | 86 ---------------------------------- board/freescale/m52277evb/u-boot.lds | 85 --------------------------------- board/freescale/m5235evb/u-boot.lds | 85 --------------------------------- board/freescale/m5249evb/u-boot.lds | 85 --------------------------------- board/freescale/m5253demo/u-boot.lds | 86 ---------------------------------- board/freescale/m5253evbe/u-boot.lds | 85 --------------------------------- board/freescale/m5272c3/u-boot.lds | 85 --------------------------------- board/freescale/m5275evb/u-boot.lds | 85 --------------------------------- board/freescale/m5282evb/u-boot.lds | 85 --------------------------------- board/freescale/m53017evb/u-boot.lds | 86 ---------------------------------- board/freescale/m5329evb/u-boot.lds | 86 ---------------------------------- board/freescale/m5373evb/u-boot.lds | 86 ---------------------------------- board/freescale/m54418twr/u-boot.lds | 83 -------------------------------- board/freescale/m54451evb/u-boot.lds | 83 -------------------------------- board/freescale/m54455evb/u-boot.lds | 83 -------------------------------- board/freescale/m547xevb/u-boot.lds | 83 -------------------------------- board/freescale/m548xevb/u-boot.lds | 83 -------------------------------- board/sysam/amcore/u-boot.lds | 87 ---------------------------------- include/configs/M5208EVBE.h | 4 ++ include/configs/M52277EVB.h | 4 ++ include/configs/M5235EVB.h | 5 ++ include/configs/M5249EVB.h | 5 ++ include/configs/M5253DEMO.h | 4 ++ include/configs/M5253EVBE.h | 5 ++ include/configs/M5272C3.h | 4 ++ include/configs/M5275EVB.h | 4 ++ include/configs/M5282EVB.h | 4 ++ include/configs/M53017EVB.h | 4 ++ include/configs/M5329EVB.h | 4 ++ include/configs/M5373EVB.h | 4 ++ include/configs/amcore.h | 4 ++ include/configs/astro_mcf5373l.h | 4 ++ include/configs/cobra5272.h | 3 ++ 37 files changed, 153 insertions(+), 1780 deletions(-) create mode 100644 arch/m68k/cpu/u-boot.lds delete mode 100644 board/BuS/eb_cpu5282/u-boot.lds delete mode 100644 board/astro/mcf5373l/u-boot.lds delete mode 100644 board/cobra5272/u-boot.lds delete mode 100644 board/freescale/m5208evbe/u-boot.lds delete mode 100644 board/freescale/m52277evb/u-boot.lds delete mode 100644 board/freescale/m5235evb/u-boot.lds delete mode 100644 board/freescale/m5249evb/u-boot.lds delete mode 100644 board/freescale/m5253demo/u-boot.lds delete mode 100644 board/freescale/m5253evbe/u-boot.lds delete mode 100644 board/freescale/m5272c3/u-boot.lds delete mode 100644 board/freescale/m5275evb/u-boot.lds delete mode 100644 board/freescale/m5282evb/u-boot.lds delete mode 100644 board/freescale/m53017evb/u-boot.lds delete mode 100644 board/freescale/m5329evb/u-boot.lds delete mode 100644 board/freescale/m5373evb/u-boot.lds delete mode 100644 board/freescale/m54418twr/u-boot.lds delete mode 100644 board/freescale/m54451evb/u-boot.lds delete mode 100644 board/freescale/m54455evb/u-boot.lds delete mode 100644 board/freescale/m547xevb/u-boot.lds delete mode 100644 board/freescale/m548xevb/u-boot.lds delete mode 100644 board/sysam/amcore/u-boot.lds
arch/m68k/cpu/u-boot.lds new file +91 -0
@@ -0,0 +1,91 @@ +/* + * (C) Copyright 2000 + * Wolfgang Denk, DENX Software Engineering, wd at denx.de. + * (C) Copyright 2015 + * Angelo Dureghello, Sysam Firmware, angelo at sysam.it + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <config.h> + +OUTPUT_ARCH(m68k) + +#ifndef LDS_BOARD_TEXT +#define LDS_BOARD_TEXT +#endif + +SECTIONS +{ + .text : + { + CPUDIR/start.o (.text*) + LDS_BOARD_TEXT + + *(.text*) + } + _etext = .; + PROVIDE (etext = .); + .rodata : + { + *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) + } + + /* Read-write section, merged into data segment: */ + . = (. + 0x00FF) & 0xFFFFFF00; + _erotext = .; + PROVIDE (erotext = .); + + .reloc : + { + __got_start = .; + KEEP(*(.got)) + __got_end = .; + _GOT2_TABLE_ = .; + KEEP(*(.got2)) + _FIXUP_TABLE_ = .; + KEEP(*(.fixup)) + } + __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2; + __fixup_entries = (. - _FIXUP_TABLE_)>>2; + + .data : + { + *(.data*) + *(.sdata*) + } + _edata = .; + PROVIDE (edata = .); + + . = .; + + . = ALIGN(4); + .u_boot_list : { + KEEP(*(SORT(.u_boot_list*))); + } + + . = .; + __start___ex_table = .; + __ex_table : { *(__ex_table) } + __stop___ex_table = .; + + . = ALIGN(256); + __init_begin = .; + .text.init : { *(.text.init) } + .data.init : { *(.data.init) } + . = ALIGN(256); + __init_end = .; + + __bss_start = .; + .bss (NOLOAD) : + { + _sbss = .; + *(.bss*) + *(.sbss*) + *(COMMON) + . = ALIGN(4); + _ebss = .; + } + __bss_end = . ; + PROVIDE (end = .); +}
board/BuS/eb_cpu5282/u-boot.lds deleted +0 -82
82 lines not on this page · raw message
board/astro/mcf5373l/u-boot.lds deleted +0 -86
86 lines not on this page · raw message
board/cobra5272/u-boot.lds deleted +0 -85
85 lines not on this page · raw message
board/freescale/m5208evbe/u-boot.lds deleted +0 -86
86 lines not on this page · raw message
board/freescale/m52277evb/u-boot.lds deleted +0 -85
85 lines not on this page · raw message
board/freescale/m5235evb/u-boot.lds deleted +0 -85
85 lines not on this page · raw message
board/freescale/m5249evb/u-boot.lds deleted +0 -85
85 lines not on this page · raw message
board/freescale/m5253demo/u-boot.lds deleted +0 -86
86 lines not on this page · raw message
board/freescale/m5253evbe/u-boot.lds deleted +0 -85
85 lines not on this page · raw message
board/freescale/m5272c3/u-boot.lds deleted +0 -85
85 lines not on this page · raw message
board/freescale/m5275evb/u-boot.lds deleted +0 -85
85 lines not on this page · raw message
board/freescale/m5282evb/u-boot.lds deleted +0 -85
85 lines not on this page · raw message
board/freescale/m53017evb/u-boot.lds deleted +0 -86
86 lines not on this page · raw message
board/freescale/m5329evb/u-boot.lds deleted +0 -86
86 lines not on this page · raw message
board/freescale/m5373evb/u-boot.lds deleted +0 -86
86 lines not on this page · raw message
board/freescale/m54418twr/u-boot.lds deleted +0 -83
83 lines not on this page · raw message
board/freescale/m54451evb/u-boot.lds deleted +0 -83
83 lines not on this page · raw message
board/freescale/m54455evb/u-boot.lds deleted +0 -83
83 lines not on this page · raw message
board/freescale/m547xevb/u-boot.lds deleted +0 -83
83 lines not on this page · raw message
board/freescale/m548xevb/u-boot.lds deleted +0 -83
83 lines not on this page · raw message
board/sysam/amcore/u-boot.lds deleted +0 -87
87 lines not on this page · raw message
include/configs/M5208EVBE.h +4 -0
@@ -180,6 +180,10 @@#define CONFIG_ENV_SECT_SIZE 0x2000#define CONFIG_ENV_IS_IN_FLASH 1 +#define LDS_BOARD_TEXT \ + . = DEFINED(env_offset) ? env_offset : .; \ + common/env_embedded.o (.text*); +/* Cache Configuration */ #define CONFIG_SYS_CACHELINE_SIZE 16
include/configs/M52277EVB.h +4 -0
@@ -267,6 +267,10 @@# define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_CS0_BASE }#endif +#define LDS_BOARD_TEXT \ + arch/m68k/cpu/mcf5227x/built-in.o (.text*) \ + arch/m68k/lib/built-in.o (.text*) +/* * This is setting for JFFS2 support in u-boot. * NOTE: Enable CONFIG_CMD_JFFS2 for JFFS2 support.
include/configs/M5235EVB.h +5 -0
@@ -199,6 +199,11 @@* Environment is embedded in u-boot in the second sector of the flash */ #define CONFIG_ENV_IS_IN_FLASH 1 + +#define LDS_BOARD_TEXT \ + . = DEFINED(env_offset) ? env_offset : .; \ + common/env_embedded.o (.text); +#ifdef NORFLASH_PS32BIT # define CONFIG_ENV_OFFSET (0x8000)# define CONFIG_ENV_SIZE 0x4000
include/configs/M5249EVB.h +5 -0
@@ -91,6 +91,11 @@#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET#define CONFIG_ENV_IS_IN_FLASH 1 + +#define LDS_BOARD_TEXT \ + . = DEFINED(env_offset) ? env_offset : .; \ + common/env_embedded.o (.text); +#define CONFIG_ENV_OFFSET 0x4000/* Address of Environment Sector*/ #define CONFIG_ENV_SIZE 0x2000/* Total Size of Environment Sector */ #define CONFIG_ENV_SECT_SIZE 0x2000/* see README - env sector total size */
include/configs/M5253DEMO.h +4 -0
@@ -32,6 +32,10 @@# define CONFIG_ENV_IS_IN_FLASH 1#endif +#define LDS_BOARD_TEXT \ + . = DEFINED(env_offset) ? env_offset : .; \ + common/env_embedded.o (.text*); +/* * Command line configuration. */
include/configs/M5253EVBE.h +5 -0
@@ -33,6 +33,11 @@#define CONFIG_ENV_IS_IN_FLASH 1#endif +#define LDS_BOARD_TEXT \ + . = DEFINED(env_offset) ? env_offset : .; \ + common/env_embedded.o (.text) + +/* * BOOTP options */
include/configs/M5272C3.h +4 -0
@@ -41,6 +41,10 @@#define CONFIG_ENV_IS_IN_FLASH 1#endif +#define LDS_BOARD_TEXT \ + . = DEFINED(env_offset) ? env_offset : .; \ + common/env_embedded.o (.text); +/* * BOOTP options */
include/configs/M5275EVB.h +4 -0
@@ -42,6 +42,10 @@#define CONFIG_ENV_IS_IN_FLASH 1#endif +#define LDS_BOARD_TEXT \ + . = DEFINED(env_offset) ? env_offset : .; \ + common/env_embedded.o (.text); +/* * BOOTP options */
include/configs/M5282EVB.h +4 -0
@@ -32,6 +32,10 @@#define CONFIG_ENV_SIZE 0x2000#define CONFIG_ENV_IS_IN_FLASH 1 +#define LDS_BOARD_TEXT \ + . = DEFINED(env_offset) ? env_offset : .; \ + common/env_embedded.o (.text*); +/* * BOOTP options */
include/configs/M53017EVB.h +4 -0
@@ -205,6 +205,10 @@#define CONFIG_ENV_SECT_SIZE 0x8000#define CONFIG_ENV_IS_IN_FLASH 1 +#define LDS_BOARD_TEXT \ + . = DEFINED(env_offset) ? env_offset : .; \ + common/env_embedded.o (.text*) +/*----------------------------------------------------------------------- * Cache Configuration */
include/configs/M5329EVB.h +4 -0
@@ -209,6 +209,10 @@#define CONFIG_ENV_SECT_SIZE 0x2000#define CONFIG_ENV_IS_IN_FLASH 1 +#define LDS_BOARD_TEXT \ + . = DEFINED(env_offset) ? env_offset : .; \ + common/env_embedded.o (.text*); +/*----------------------------------------------------------------------- * Cache Configuration */
include/configs/M5373EVB.h +4 -0
@@ -209,6 +209,10 @@#define CONFIG_ENV_SECT_SIZE 0x2000#define CONFIG_ENV_IS_IN_FLASH 1 +#define LDS_BOARD_TEXT \ + . = DEFINED(env_offset) ? env_offset : .; \ + common/env_embedded.o (.text*); +/*----------------------------------------------------------------------- * Cache Configuration */
include/configs/amcore.h +4 -0
@@ -98,6 +98,10 @@#define CONFIG_ENV_SIZE 0x1000#define CONFIG_ENV_SECT_SIZE 0x1000 +#define LDS_BOARD_TEXT \ + . = DEFINED(env_offset) ? env_offset : .; \ + common/env_embedded.o (.text*); +/* memory map space for linux boot data */ #define CONFIG_SYS_BOOTMAPSZ (8 << 20)
include/configs/astro_mcf5373l.h +4 -0
@@ -343,6 +343,10 @@#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1#define CONFIG_SYS_FLASH_CFI_NONBLOCK 1 +#define LDS_BOARD_TEXT \ + . = DEFINED(env_offset) ? env_offset : .; \ + common/env_embedded.o (.text*) +#if ENABLE_JFFS /* JFFS Partition offset set */ #define CONFIG_SYS_JFFS2_FIRST_BANK 0
include/configs/cobra5272.h +3 -0
@@ -104,6 +104,9 @@#define CONFIG_ENV_IS_IN_FLASH 1#endif +#define LDS_BOARD_TEXT \ + . = DEFINED(env_offset) ? env_offset : .; \ + common/env_embedded.o (.text);/* * BOOTP options
Signature · 1 line
2.1.4
Quoted 8 lines · angelo at sysam.it
Add architecture-specific
u-boot.ldsand remove all board-specificu-boot.lds.All the .text customization that was board-specific have been moved inside the related
include/configs, inside aLDS_BOARD_TEXTdefine.Signed-off-by Angelo Dureghello <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150423/eb987de3/attachment.sig>