Changeset 5077


Ignore:
Timestamp:
Feb 3, 2010, 5:56:37 PM (6 years ago)
Author:
oxygene
Message:

Guards against errors that are hard to track down:

  • if crt0s is empty (eg. because crt0-y is still used), break the build, and say where that behaviour changed
  • if a stage is unusable for cbfstool because it's placed outside the ROM space (linked to 0 is somewhat notorious), warn about it, give some hints and exit instead of crashing.

Signed-off-by: Patrick Georgi <patrick.georgi@…>
Acked-by: Stefan Reinauer <stefan.reinauer@…>

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/arch/i386/Makefile.inc

    r5065 r5077  
    6363# done
    6464
     65# crt0s should be set by now
     66ifeq ($(crt0s),)
     67$(error crt0s are empty. If your board still uses crt0-y and ldscript-y: It shouldn't, we moved away from that in r5065)
     68endif
    6569endif
    6670
  • trunk/util/cbfstool/cbfs-mkstage.c

    r4989 r5077  
    127127        }
    128128
     129        if (data_end <= data_start) {
     130                fprintf(stderr, "E: data ends before it starts. Make sure the ELF file is correct and resides in ROM space.\n");
     131                exit(1);
     132        }
     133
    129134        /* allocate an intermediate buffer for the data */
    130135        buffer = calloc(data_end - data_start, 1);
Note: See TracChangeset for help on using the changeset viewer.