forked from 96boards-hikey/l-loader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
27 lines (22 loc) · 706 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
CROSS_COMPILE?=arm-linux-gnueabihf-
CC=$(CROSS_COMPILE)gcc
CFLAGS=-march=armv7-a
LD=$(CROSS_COMPILE)ld
OBJCOPY=$(CROSS_COMPILE)objcopy
BL1=bl1.bin
PTABLE_LST:=aosp-4g aosp-8g linux-4g linux-8g
all: l-loader.bin ptable.img
%.o: %.S $(DEPS)
$(CC) $(CFLAGS) -c -o $@ $<
l-loader.bin: start.o $(BL1)
$(LD) -Bstatic -Tl-loader.lds -Ttext 0xf9800800 start.o -o loader
$(OBJCOPY) -O binary loader temp
python gen_loader.py -o $@ --img_loader=temp --img_bl1=$(BL1)
rm -f loader temp
ptable.img:
for ptable in $(PTABLE_LST); do \
PTABLE=$${ptable} bash -x generate_ptable.sh;\
python gen_loader.py -o ptable-$${ptable}.img --img_prm_ptable=prm_ptable.img;\
done
clean:
rm -f *.o *.img l-loader.bin