2021-03-04 02:19:24 +09:00
|
|
|
CROSS_COMPILE:=arm-linux-gnueabihf-
|
2021-03-04 02:15:40 +09:00
|
|
|
AS:=$(CROSS_COMPILE)as
|
2021-03-04 06:15:54 +09:00
|
|
|
CC:=$(CROSS_COMPILE)gcc
|
2021-03-04 02:15:40 +09:00
|
|
|
|
|
|
|
.PHONY:
|
2021-03-04 06:15:54 +09:00
|
|
|
all: return.bin mrc.bin c/main.bin
|
|
|
|
|
|
|
|
.PHONY:
|
|
|
|
clean:
|
2021-03-05 22:07:56 +09:00
|
|
|
@rm -f *.bin spray/*.bin c/*.bin
|
2021-03-04 02:15:40 +09:00
|
|
|
|
|
|
|
%.bin: %.S
|
|
|
|
@$(AS) $<
|
|
|
|
@./extract.py a.out $@
|
|
|
|
@rm -f a.out
|
2021-03-04 06:15:54 +09:00
|
|
|
|
|
|
|
c/main.bin:
|
|
|
|
@$(CC) -nostdlib -static -fPIC -mcpu=cortex-a7 c/start.S c/main.c
|
|
|
|
@./extract.py a.out $@
|
2021-03-05 22:07:56 +09:00
|
|
|
@rm -f a.out
|
|
|
|
|
|
|
|
spray/main.bin:
|
|
|
|
@$(AS) spray/top.S
|
|
|
|
@./extract.py -p a.out spray/top.bin
|
|
|
|
@$(AS) spray/bottom.S
|
|
|
|
@./extract.py -p a.out spray/bottom.bin
|
|
|
|
@./append_nop.py 15728640 spray/top.bin spray/bottom.bin spray/main.bin
|
|
|
|
@rm -f a.out
|