forked from len0rd/rockbox
mkimxboot: make cross compiler for dualboot stubs overridable
Change-Id: I90d2048f622b355eae7091e536b940b2ac828583
This commit is contained in:
parent
94b23da3c4
commit
b40ad7d269
1 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
CC=gcc
|
||||
LD=ld
|
||||
OC=objcopy
|
||||
CROSS_PREFIX=arm-elf-eabi-
|
||||
PREFIX?=arm-elf-eabi-
|
||||
REGS_PATH=../../../firmware/target/arm/imx233/regs
|
||||
CFLAGS=-mcpu=arm926ej-s -std=gnu99 -I. -I$(REGS_PATH) -nostdlib -ffreestanding -fomit-frame-pointer -O
|
||||
# Edit the following variables when adding a new target.
|
||||
|
@ -27,16 +27,16 @@ all: ../dualboot.h ../dualboot.c $(BOOTELFS)
|
|||
# Dualboot bootloaders
|
||||
|
||||
dualboot_%.o: dualboot.c
|
||||
$(CROSS_PREFIX)$(CC) $(CFLAGS) $(OPT_$(@:dualboot_%.o=%)) -c -o $@ $^
|
||||
$(PREFIX)$(CC) $(CFLAGS) $(OPT_$(@:dualboot_%.o=%)) -c -o $@ $^
|
||||
|
||||
dualboot_%.arm-elf: dualboot_%.o
|
||||
$(CROSS_PREFIX)$(LD) $(LDFLAGS) -Tdualboot.lds -o $@ $<
|
||||
$(PREFIX)$(LD) $(LDFLAGS) -Tdualboot.lds -o $@ $<
|
||||
|
||||
# Rules for the ARM code embedded in mkamsboot - assemble, link, then extract
|
||||
# the binary code and finally convert to .h for building in mkamsboot
|
||||
|
||||
%.arm-bin: %.arm-elf
|
||||
$(CROSS_PREFIX)$(OC) -O binary $< $@
|
||||
$(PREFIX)$(OC) -O binary $< $@
|
||||
|
||||
../dualboot.c ../dualboot.h: $(BOOTBINS) bin2c
|
||||
./bin2c ../dualboot $(BOOTBINS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue