-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
88 lines (71 loc) · 2.68 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
include mk/common.mk
.PHONY: images
images: $(BUILD)/$(DECRYPTOR_IMG) $(BUILD)/$(ENCRYPTED_BOOTLOADER_IMG)
$(info Images generated successfully)
.PHONY: boot
boot: $(BOOT_IMG) $(BUILD)/$(INITRD) $(BUILD)/$(ENCRYPTED_BOOTLOADER_IMG_KEY_TXT)
qemu-system-aarch64 \
-machine virt,virtualization=on,secure=on \
-nographic \
-cpu cortex-a72 \
-kernel $(BOOT_IMG) \
-initrd $(BUILD)/$(INITRD) \
-serial mon:stdio \
-m 2G \
-smp 1 \
-d in_asm \
-D qemu.log \
$(QEMU_ADDITIONAL_FLAGS)
.PHONY: boot_gdb
boot_gdb: COPTIONS += -D DEBUG
boot_gdb: QEMU_ADDITIONAL_FLAGS=-gdb tcp::6666 -S
boot_gdb: boot
################################################################################
# Pflash
################################################################################
.PHONY: pflash
pflash: $(BUILD)/$(PFLASH_BIN)
$(info Pflash generated successfully)
.PHONY: pflash_encrypted
pflash_encrypted: $(BUILD)/$(ENCRYPTED_PFLASH_BIN)
$(info Encrypted pflash generated successfully)
include mk/pflash.mk
################################################################################
# Thirdparties
################################################################################
.PHONY: thirdparties
thirdparties: $(BUILD)/$(INITRD) $(BUILD)/$(KERNEL)
$(info Thirdparty builds finished !)
include mk/thirdparties.mk
################################################################################
# Crypto
################################################################################
.PHONY: crypto
crypto: $(BUILD)/$(BOOTLADER_DER_KEY) $(BUILD)/$(BOOTLOADER_SIG) $(BUILD)/$(ENCRYPTED_BOOTLOADER_IMG_KEY)
$(info Bootloader public DER, signature and encrypted bootloader image key generated !)
include mk/crypto.mk
################################################################################
# libraries
################################################################################
include mk/lib.mk
################################################################################
# Objects files
################################################################################
include mk/objs.mk
################################################################################
# Clean
################################################################################
.PHONY: clean
clean: cleancrypto cleanpflash
$(RM) -r $(BUILD)/src/
$(info Clean finished !)
.PHONY: clean_clean
clean_clean: clean libclean
$(info Clean-clean finished !)
################################################################################
# Dependences
################################################################################
.PHONY: dependences
dependences:
bash dependences.sh
$(info Dependences installed successfully!)