-
Notifications
You must be signed in to change notification settings - Fork 65
/
Makefile
31 lines (23 loc) · 1011 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
28
29
30
31
export VERSION_MINOR := $(shell git describe --tags --match [0-9]* | cut -c2- | cut -f1 -d- | cut -f2 -d.)
SUBFOLDERS := stage2/arm9 stage2/arm11
BINS := stage2/arm9/arm9.bin stage2/arm11/arm11.bin
OUTFILES := out/boot9stap.firm out/boot9stap_dev.firm out/boot9stap_ntr.firm out/boot9stap_ntr_dev.firm
OUTSHAS := $(foreach f, $(OUTFILES), $(f).sha)
.PHONY: all clean boot9strap b9s_stage2_debug.firm
.PHONY: $(SUBFOLDERS) build_boot9strap_firm.py boot9stap.s
all: boot9strap
boot9strap: build_boot9strap_firm.py boot9strap.s $(SUBFOLDERS)
@mkdir -p "out"
@mkdir -p "build"
@armips boot9strap.s
@python build_boot9strap_firm.py $(VERSION_MINOR)
clean:
@$(foreach dir, $(SUBFOLDERS), $(MAKE) -C $(dir) clean &&) true
@rm -rf out build *.firm
$(SUBFOLDERS):
@$(MAKE) -C $@ all
# For troubleshooting purposes only
# Does not bundle the bootROM exploit
b9s_stage2_debug.firm: $(SUBFOLDERS)
@firmtool build $@ -D stage2/arm11/arm11.elf stage2/arm9/arm9.elf -C XDMA NDMA
@echo built... $(notdir $@)