-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
112 lines (106 loc) · 2.99 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
include build/main.mk
include ./app/busybox/Makefile
include ./app/uboot/Makefile
include ./lib/alsa/Makefile
include ./lib/libpng/Makefile
include ./lib/zlib/Makefile
include ./app/stella/Makefile
include ./kernel/armbian-linux/Makefile
include ./app/dumper/Makefile
include ./app/dropbear/Makefile
include ./app/sftpserver/Makefile
include ./lib/libump/Makefile
include ./lib/sunxi-mali/Makefile
include ./lib/sdl2/Makefile
all:
@echo "TOP Makefile"
make app/busybox/compile
make app/uboot/compile
make lib/alsa/compile
make lib/zlib/compile
make lib/png/compile
make lib/libump/compile
make lib/sunxi-mali/compile
make lib/sdl2/compile
make app/dropbear/compile
make app/sftpserver/compile
make app/stella/compile
make app/dumper/compile
make lima-memtester
make cpio
make kernel/armbian-linux/compile
make sdcard
clean:
@echo "TOP Makefile clean"
make app/busybox/clean
make app/uboot/clean
make lib/alsa/clean
make lib/zlib/clean
make lib/png/clean
make lib/libump/clean
make lib/sunxi-mali/clean
make lib/sdl2/clean
make app/dropbear/clean
make app/sftpserver/distclean
make app/stella/clean
make app/dumper/clean
make kernel/armbian-linux/clean
distclean:
@echo "TOP Makefile distclean"
make app/busybox/distclean
make app/uboot/distclean
make lib/alsa/distclean
make lib/zlib/distclean
make lib/png/distclean
make lib/libump/distclean
make lib/sunxi-mali/distclean
make lib/sdl2/distclean
make app/stella/distclean
make app/dumper/distclean
make app/dropbear/distclean
make app/sftpserver/distclean
make kernel/armbian-linux/distclean
-rm -rf $(OUTDIR)
install:
make app/busybox/install
make lib/alsa/install
make lib/png/install
make lib/zlib/install
make lib/libump/install
make lib/sunxi-mali/install
make lib/sdl2/install
make app/dropbear/install
make app/sftpserver/install
make app/stella/install
make app/dumper/install
make kernel/armbian-linux/install
cpio:
rm -rf $(OUTDIR)/rootfs.cpio.lzma
cd $(ROOTFSDIR) && \
find . | cpio -H newc -o --owner root:root -F ../rootfs.cpio && \
cd .. && \
lzma rootfs.cpio
lima-memtester:
install -m 0755 bin/lima-memtester $(ROOTFSDIR)/bin
sdcard:
mkdir -p $(OUTDIR)/tmp
rm -rf $(OUTDIR)/sdcard.img
dd if=/dev/zero of=$(OUTDIR)/sdcard.img bs=1M count=80
sudo echo -e "o\nn\np\n1\n\n\nw" | fdisk $(OUTDIR)/sdcard.img
sudo echo -e "t\nc\nw" | fdisk $(OUTDIR)/sdcard.img
sync
sudo dd if=$(OUTDIR)/u-boot-sunxi-with-spl.bin of=$(OUTDIR)/sdcard.img bs=1k seek=8 conv=notrunc
sudo losetup --offset 1048576 /dev/loop7 $(OUTDIR)/sdcard.img
sudo mkfs.msdos /dev/loop7
sudo mount /dev/loop7 $(OUTDIR)/tmp/
sudo cp -rf $(TOPDIR)/rom/* $(OUTDIR)/tmp/
sudo cp $(OUTDIR)/boot.scr $(OUTDIR)/tmp/
sudo cp $(OUTDIR)/script.bin $(OUTDIR)/tmp/
sudo cp $(OUTDIR)/uImage $(OUTDIR)/tmp/
sudo sync
sudo umount -f $(OUTDIR)/tmp/
sudo losetup -d /dev/loop7
for i in 408 480 504; do \
cp $(OUTDIR)/sdcard.img $(OUTDIR)/sdcard-$${i}mhz.bin; \
dd if=bin/uboot-$${i}mhz.bin of=$(OUTDIR)/sdcard-$${i}mhz.bin bs=1k seek=8 conv=notrunc; \
done