forked from jaredmcneill/quartz64_uefi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (36 loc) · 905 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
32
33
34
35
36
37
38
39
40
41
42
.PHONY: all
all: uefi_debug
.PHONY: uefi_release
uefi_release:
@./build.sh RELEASE
.PHONY: uefi_debug
uefi_debug:
@./build.sh DEBUG
.PHONY: sdcard
sdcard: uefi_release
rm -f sdcard.img
fallocate -l 33M sdcard.img
parted -s sdcard.img mklabel gpt
parted -s sdcard.img unit s mkpart loader 64 8MiB
parted -s sdcard.img unit s mkpart uboot 8MiB 16MiB
parted -s sdcard.img unit s mkpart env 16MiB 32MiB
for board in QUARTZ64 SOQUARTZ ROC-RK3566-PC; do \
cp sdcard.img $${board}_EFI.img; \
dd if=idblock.bin of=$${board}_EFI.img \
seek=64 conv=notrunc; \
dd if=$${board}_EFI.itb of=$${board}_EFI.img \
seek=20480 conv=notrunc; \
done
rm -f sdcard.img
.PHONY: release
release: sdcard
rm -f *_EFI.img.gz
gzip *_EFI.img
.PHONY: clean
clean:
rm -rf Build
rm -f bl31_*.bin
rm -f idblock.bin
rm -f *.itb
rm -f .uefitools_done
rm -f *_EFI.img *_EFI.img.gz