]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sh: Fix build errors for generic board
authorSimon Glass <sjg@chromium.org>
Sun, 15 May 2016 00:49:29 +0000 (18:49 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 27 May 2016 19:39:51 +0000 (15:39 -0400)
This includes the following fixes:
- Define needed __init_end symbol - see initr_reloc_global_data()
- Drop SH-specific struct bd_info
- Add an empty relocate_code() function

This prevents build errors with generic board, but the code will still need
work. Perhaps this is a better alternative than deleting the code.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sh/cpu/sh2/cpu.c
arch/sh/cpu/sh2/start.S
arch/sh/cpu/sh3/cpu.c
arch/sh/cpu/sh3/start.S
arch/sh/cpu/sh4/cpu.c
arch/sh/cpu/sh4/start.S
arch/sh/cpu/u-boot.lds
arch/sh/include/asm/u-boot.h
board/renesas/sh7752evb/u-boot.lds
board/renesas/sh7753evb/u-boot.lds
board/renesas/sh7757lcr/u-boot.lds

index a2f856f4594510f5aaeaa366894f03c1de2249a8..9a93cf573fe8203c9b5fec230c1c8b8bd5f36175 100644 (file)
@@ -83,3 +83,9 @@ int dcache_status(void)
 {
        return 0;
 }
+
+void relocate_code(ulong start_addr_sp, gd_t *new_gd, ulong relocaaddr)
+{
+       /* TODO(sh maintainer): Implement this */
+       while (1);
+}
index ebf731a3abf8b489ad06129de705be27a92cb1c8..6171edcce294b0f85352dd1463bcb0a91fb974e3 100644 (file)
@@ -46,8 +46,9 @@ _init:
        mov.l   ._gd_init, r13          /* global data */
        mov.l   ._stack_init, r15       /* stack */
 
-       mov.l   ._sh_generic_init, r0
-       jsr     @r0
+       #TODO(sh maintainer): Fix this up to call the correct code
+       #mov.l  ._sh_generic_init, r0
+       #jsr    @r0
        nop
 
 loop:
@@ -62,4 +63,4 @@ loop:
 ._bss_end:             .long   bss_end
 ._gd_init:             .long   (_sh_start - GENERATED_GBL_DATA_SIZE)
 ._stack_init:  .long   (_sh_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
-._sh_generic_init:     .long   sh_generic_init
+#._sh_generic_init:    .long   sh_generic_init
index ea0006a6505247365e73c0b65a597b709b72bdd8..494f908f64e158d9721b6ad68384a387820f2d7d 100644 (file)
@@ -66,3 +66,9 @@ int dcache_status(void)
 {
        return 0;
 }
+
+void relocate_code(ulong start_addr_sp, gd_t *new_gd, ulong relocaaddr)
+{
+       /* TODO(sh maintainer): Implement this */
+       while (1);
+}
index 7a934e24d4077b2423094cb440b803d7d2cf445f..9ed7198f2b632a0c0d66572366ce32fa0b424da6 100644 (file)
@@ -45,8 +45,9 @@ _sh_start:
        mov.l   ._gd_init, r13          /* global data */
        mov.l   ._stack_init, r15       /* stack */
 
-       mov.l   ._sh_generic_init, r0
-       jsr     @r0
+       #TODO(sh maintainer): Fix this up to call the correct code
+       #mov.l  ._sh_generic_init, r0
+       #jsr    @r0
        nop
 
 loop:
@@ -61,4 +62,4 @@ loop:
 ._bss_end:             .long   bss_end
 ._gd_init:             .long   (_sh_start - GENERATED_GBL_DATA_SIZE)
 ._stack_init:  .long   (_sh_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
-._sh_generic_init:     .long   sh_generic_init
+#._sh_generic_init:    .long   sh_generic_init
index e8ee0a45ab93cd9f42c48110cc381a90724001ae..de90ca777f783b18f25ef0c69489f685443a73d5 100644 (file)
@@ -75,3 +75,9 @@ int cpu_eth_init(bd_t *bis)
 #endif
        return 0;
 }
+
+void relocate_code(ulong start_addr_sp, gd_t *new_gd, ulong relocaaddr)
+{
+       /* TODO(sh maintainer): Implement this */
+       while (1);
+}
index 21644b5e679b5cff14f2a04ce9bfd5659e895cdc..77fc221aa50581f9d5208fc5abeb47fcf358c9f1 100644 (file)
@@ -42,8 +42,9 @@ _sh_start:
        mov.l   ._gd_init, r13          /* global data */
        mov.l   ._stack_init, r15       /* stack */
 
-       mov.l   ._sh_generic_init, r0
-       jsr     @r0
+       #TODO(sh maintainer): Fix this up to call the correct code
+       #mov.l  ._sh_generic_init, r0
+       #jsr    @r0
        nop
 
 loop:
@@ -58,4 +59,4 @@ loop:
 ._bss_end:             .long   bss_end
 ._gd_init:             .long   (_sh_start - GENERATED_GBL_DATA_SIZE)
 ._stack_init:          .long   (_sh_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
-._sh_generic_init:     .long   sh_generic_init
+#._sh_generic_init:    .long   sh_generic_init
index 30c7a9d3f8b86277377c6e1869d9799e83e7bb2b..78611c21e67dd1b741a232caafa9184f2f612990 100644 (file)
@@ -67,6 +67,7 @@ SECTIONS
                KEEP(*(SORT(.u_boot_list*)));
        }
 
+       PROVIDE (__init_end = .);
        PROVIDE (reloc_dst_end = .);
        /* _reloc_dst_end = .; */
 
index ea37c2449704ecb4f415a43193cd2b0ef21fe27f..716d8e9f2dcd75121f6201ecb62d65bff5dde2fd 100644 (file)
 #ifndef __ASM_SH_U_BOOT_H_
 #define __ASM_SH_U_BOOT_H_
 
-typedef struct bd_info {
-       unsigned long   bi_memstart;    /* start of DRAM memory */
-       phys_size_t     bi_memsize;     /* size  of DRAM memory in bytes */
-       unsigned long   bi_flashstart;  /* start of FLASH memory */
-       unsigned long   bi_flashsize;   /* size  of FLASH memory */
-       unsigned long   bi_flashoffset; /* reserved area for startup monitor */
-       unsigned long   bi_sramstart;   /* start of SRAM memory */
-       unsigned long   bi_sramsize;    /* size  of SRAM memory */
-       unsigned long   bi_boot_params; /* where this board expects params */
-} bd_t;
+/* Use the generic board which requires a unified bd_info */
+#include <asm-generic/u-boot.h>
 
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_SH
index 053df642ea9b41fa84e7239300631317499fd3cc..6cd4056bc00ca6104d70566b48ca703e7be7bdab 100644 (file)
@@ -65,6 +65,7 @@ SECTIONS
                KEEP(*(SORT(.u_boot_list*)));
        }
 
+       PROVIDE (__init_end = .);
        PROVIDE (reloc_dst_end = .);
        /* _reloc_dst_end = .; */
 
index 053df642ea9b41fa84e7239300631317499fd3cc..6cd4056bc00ca6104d70566b48ca703e7be7bdab 100644 (file)
@@ -65,6 +65,7 @@ SECTIONS
                KEEP(*(SORT(.u_boot_list*)));
        }
 
+       PROVIDE (__init_end = .);
        PROVIDE (reloc_dst_end = .);
        /* _reloc_dst_end = .; */
 
index 4027fe3af5e2392f76861516913ee356eae21581..d701367603b62f67bbfae511f40a86c5bee94957 100644 (file)
@@ -66,6 +66,7 @@ SECTIONS
                KEEP(*(SORT(.u_boot_list*)));
        }
 
+       PROVIDE (__init_end = .);
        PROVIDE (reloc_dst_end = .);
        /* _reloc_dst_end = .; */