Changeset 4646710 in mainline for boot/arch/mips32


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/mips32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • 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               
Note: See TracChangeset for help on using the changeset viewer.