Changeset 4646710 in mainline for boot/arch


Ignore:
Timestamp:
2017-06-07T15:39:23Z (8 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
239e32b8
Parents:
22299ed
Message:

replace objcopy with mkarray.py
(objcopy is notoriously problematic due to the uncontrolable way how it generates the object files, with what flags, etc.)

Location:
boot/arch
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/arm32/Makefile.inc

    r22299ed r4646710  
    9696        arch/$(BARCH)/src/mm.c \
    9797        arch/$(BARCH)/src/putchar.c \
    98         $(COMPS_C) \
     98        $(COMPS).s \
     99        $(COMPS)_desc.c \
    99100        genarch/src/division.c \
    100101        generic/src/memstr.c \
     
    105106        generic/src/version.c \
    106107        generic/src/inflate.c
     108
     109PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c
  • boot/arch/arm32/_link.ld.in

    r22299ed r4646710  
    2323                *(.bss);        /* uninitialized static variables */
    2424                *(COMMON);      /* global variables */
    25 [[COMPONENTS]]
     25                *(.components);
    2626        }
    2727        bdata_end = .;
  • boot/arch/arm32/src/main.c

    r22299ed r4646710  
    3737#include <arch/asm.h>
    3838#include <arch/mm.h>
    39 #include <arch/_components.h>
    4039#include <halt.h>
    4140#include <printf.h>
     
    4948#include <inflate.h>
    5049#include <arch/cp15.h>
     50#include "../../components.h"
    5151
    5252#define TOP2ADDR(top)  (((void *) PA2KA(BOOT_OFFSET)) + (top))
     
    9999       
    100100        for (size_t i = 0; i < COMPONENTS; i++) {
    101                 printf(" %p|%p: %s image (%u/%u bytes)\n", components[i].start,
    102                     components[i].start, components[i].name, components[i].inflated,
     101                printf(" %p|%p: %s image (%u/%u bytes)\n", components[i].addr,
     102                    components[i].addr, components[i].name, components[i].inflated,
    103103                    components[i].size);
    104104        }
     
    129129       
    130130        for (size_t i = cnt; i > 0; i--) {
    131                 void *tail = components[i - 1].start + components[i - 1].size;
     131                void *tail = components[i - 1].addr + components[i - 1].size;
    132132                if (tail >= dest[i - 1]) {
    133133                        printf("\n%s: Image too large to fit (%p >= %p), halting.\n",
     
    138138                printf("%s ", components[i - 1].name);
    139139               
    140                 int err = inflate(components[i - 1].start, components[i - 1].size,
     140                int err = inflate(components[i - 1].addr, components[i - 1].size,
    141141                    dest[i - 1], components[i - 1].inflated);
    142142                if (err != EOK) {
  • boot/arch/ia64/Makefile.inc

    r22299ed r4646710  
    4848        arch/$(BARCH)/src/pal_asm.S \
    4949        arch/$(BARCH)/src/putchar.c \
    50         $(COMPS_C) \
     50        $(COMPS).s \
     51        $(COMPS)_desc.c \
    5152        genarch/src/efi.c \
    5253        genarch/src/division.c \
     
    8889        bus/isa
    8990
     91PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c
  • boot/arch/ia64/_link.ld.in

    r22299ed r4646710  
    1616                *(.bss);                /* uninitialized static variables */
    1717                *(COMMON);
    18 [[COMPONENTS]]
     18                *(.components);
    1919        }
    20 
     20       
    2121        /DISCARD/ : {
    2222                *(.*);
  • boot/arch/ia64/src/main.c

    r22299ed r4646710  
    3333#include <arch/arch.h>
    3434#include <arch/asm.h>
    35 #include <arch/_components.h>
    3635#include <genarch/efi.h>
    3736#include <arch/sal.h>
     
    4645#include <errno.h>
    4746#include <inflate.h>
     47#include "../../components.h"
    4848
    4949#define DEFAULT_MEMORY_BASE             0x4000000ULL
     
    7878                memmap[items].size = DEFAULT_LEGACY_IO_SIZE;
    7979                memmap[items].type = MEMMAP_IO_PORTS;
    80                 items++;                 
     80                items++;
    8181        } else {
    8282                char *cur, *mm_base = (char *) bootpar->efi_memmap;
     
    159159        size_t i;
    160160        for (i = 0; i < COMPONENTS; i++)
    161                 printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].start,
    162                     components[i].start, components[i].name,
     161                printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].addr,
     162                    components[i].addr, components[i].name,
    163163                    components[i].inflated, components[i].size);
    164164       
     
    202202                 * overlap with the destination for inflate().
    203203                 */
    204                 memmove((void *) top, components[i - 1].start, components[i - 1].size);
     204                memmove((void *) top, components[i - 1].addr, components[i - 1].size);
    205205               
    206206                int err = inflate((void *) top, components[i - 1].size,
  • boot/arch/mips32/Makefile.inc

    r22299ed r4646710  
    3030BITS = 32
    3131EXTRA_CFLAGS = -msoft-float -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mabi=32
     32AS_PROLOG = .module softfloat;
    3233
    3334ifeq ($(MACHINE),msim)
     
    7475        arch/$(BARCH)/src/main.c \
    7576        arch/$(BARCH)/src/putchar.c \
    76         $(COMPS_C) \
     77        $(COMPS).s \
     78        $(COMPS)_desc.c \
    7779        genarch/src/division.c \
    7880        genarch/src/multiplication.c \
     
    8486        generic/src/version.c \
    8587        generic/src/inflate.c
     88
     89PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c
  • boot/arch/mips32/_link.ld.in

    r22299ed r4646710  
    2121                *(.bss);        /* uninitialized static variables */
    2222                *(COMMON);      /* global variables */
    23 [[COMPONENTS]]
     23                *(.components);
    2424        }
    2525       
  • boot/arch/mips32/src/main.c

    r22299ed r4646710  
    3030#include <arch/arch.h>
    3131#include <arch/asm.h>
    32 #include <arch/_components.h>
    3332#include <halt.h>
    3433#include <printf.h>
     
    4039#include <errno.h>
    4140#include <inflate.h>
     41#include "../../components.h"
    4242
    4343#define TOP2ADDR(top)  (((void *) PA2KA(BOOT_OFFSET)) + (top))
     
    6464        size_t i;
    6565        for (i = 0; i < COMPONENTS; i++)
    66                 printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].start,
    67                     (uintptr_t) components[i].start >= PA2KSEG(0) ?
    68                     (void *) KSEG2PA(components[i].start) :
    69                     (void *) KA2PA(components[i].start),
     66                printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].addr,
     67                    (uintptr_t) components[i].addr >= PA2KSEG(0) ?
     68                    (void *) KSEG2PA(components[i].addr) :
     69                    (void *) KA2PA(components[i].addr),
    7070                    components[i].name, components[i].inflated,
    7171                    components[i].size);
     
    107107                printf("%s ", components[i - 1].name);
    108108               
    109                 int err = inflate(components[i - 1].start, components[i - 1].size,
     109                int err = inflate(components[i - 1].addr, components[i - 1].size,
    110110                    dest[i - 1], components[i - 1].inflated);
    111111               
  • boot/arch/ppc32/Makefile.inc

    r22299ed r4646710  
    5757        arch/$(BARCH)/src/main.c \
    5858        arch/$(BARCH)/src/ofw.c \
    59         $(COMPS_C) \
     59        $(COMPS).s \
     60        $(COMPS)_desc.c \
    6061        genarch/src/ofw.c \
    6162        genarch/src/ofw_tree.c \
     
    7071        generic/src/version.c \
    7172        generic/src/inflate.c
     73
     74PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c
  • boot/arch/ppc32/_link.ld.in

    r22299ed r4646710  
    1818                *(.bss);        /* uninitialized static variables */
    1919                *(COMMON);      /* global variables */
    20 [[COMPONENTS]]
     20                *(.components);
    2121        }
    2222       
  • boot/arch/ppc32/src/main.c

    r22299ed r4646710  
    3030#include <arch/arch.h>
    3131#include <arch/asm.h>
    32 #include <arch/_components.h>
    3332#include <genarch/ofw.h>
    3433#include <genarch/ofw_tree.h>
     
    4241#include <errno.h>
    4342#include <inflate.h>
     43#include "../../components.h"
    4444
    4545#define BALLOC_MAX_SIZE  131072
     
    7575        size_t i;
    7676        for (i = 0; i < COMPONENTS; i++)
    77                 printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].start,
    78                     ofw_translate(components[i].start), components[i].name,
     77                printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].addr,
     78                    ofw_translate(components[i].addr), components[i].name,
    7979                    components[i].inflated, components[i].size);
    8080       
     
    139139                printf("%s ", components[i - 1].name);
    140140               
    141                 int err = inflate(components[i - 1].start, components[i - 1].size,
     141                int err = inflate(components[i - 1].addr, components[i - 1].size,
    142142                    inflate_base + dest[i - 1], components[i - 1].inflated);
    143143               
  • boot/arch/riscv64/_link.ld.in

    r22299ed r4646710  
    1717                *(.bss);        /* uninitialized static variables */
    1818                *(COMMON);      /* global variables */
    19 [[COMPONENTS]]
    2019        }
    2120       
  • boot/arch/sparc64/Makefile.inc

    r22299ed r4646710  
    5757        arch/$(BARCH)/src/main.c \
    5858        arch/$(BARCH)/src/ofw.c \
    59         $(COMPS_C) \
     59        $(COMPS).s \
     60        $(COMPS)_desc.c \
    6061        genarch/src/ofw.c \
    6162        genarch/src/ofw_tree.c \
     
    6869        generic/src/version.c \
    6970        generic/src/inflate.c
     71
     72PRE_DEPEND = $(COMPS).s $(COMPS).h $(COMPS)_desc.c
  • boot/arch/sparc64/_link.ld.in

    r22299ed r4646710  
    1515                *(.bss);        /* uninitialized static variables */
    1616                *(COMMON);      /* global variables */
    17 [[COMPONENTS]]
     17                *(.components);
    1818        }
    1919       
  • boot/arch/sparc64/src/main.c

    r22299ed r4646710  
    3232#include <arch/asm.h>
    3333#include <arch/ofw.h>
    34 #include <arch/_components.h>
    3534#include <genarch/ofw.h>
    3635#include <genarch/ofw_tree.h>
     
    4443#include <errno.h>
    4544#include <inflate.h>
     45#include "../../components.h"
    4646
    4747/* The lowest ID (read from the VER register) of some US3 CPU model */
     
    220220        size_t i;
    221221        for (i = 0; i < COMPONENTS; i++)
    222                 printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].start,
    223                     ofw_translate(components[i].start), components[i].name,
     222                printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].addr,
     223                    ofw_translate(components[i].addr), components[i].name,
    224224                    components[i].inflated, components[i].size);
    225225       
     
    267267                    ALIGN_UP(components[i - 1].inflated, PAGE_SIZE), -1);
    268268               
    269                 int err = inflate(components[i - 1].start, components[i - 1].size,
     269                int err = inflate(components[i - 1].addr, components[i - 1].size,
    270270                    dest[i - 1], components[i - 1].inflated);
    271271               
Note: See TracChangeset for help on using the changeset viewer.