-
Notifications
You must be signed in to change notification settings - Fork 137
/
Makefile
117 lines (96 loc) · 3.45 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
113
114
115
116
117
all: _env_is_setup
@./scripts/create_image.sh
_env_is_setup:
@if test "$(DISTRIBUTION)" -a "$(DISTRIB_RELEASE)" -a "$(DISTRIB_TYPE)" -a "$(DISTRIB_ARCH)" -a "$(KHADAS_BOARD)" -a "$(LINUX)" -a "$(UBOOT)" -a "$(INSTALL_TYPE)"; then \
exit 0; \
else \
echo "You should setup environment first."; \
echo "Run 'source env/setenv.sh' to setup environment."; \
exit 1; \
fi
image: _env_is_setup
@echo "This script requires root privileges, trying to use sudo, please enter your passowrd!"
@sudo -E ./scripts/make_image.sh
kernel: _env_is_setup
@./scripts/build.sh linux
kernel-dtbs: _env_is_setup
@BUILD_LINUX_DTBS_ONLY=yes ./scripts/build.sh linux
kernel-clean: _env_is_setup
@./scripts/build.sh linux-clean
kernel-config: _env_is_setup
@./scripts/build.sh linux-config
kernel-saveconfig: _env_is_setup
@./scripts/build.sh linux-saveconfig
uboot: _env_is_setup
@./scripts/build.sh u-boot
uboot-clean: _env_is_setup
@./scripts/build.sh u-boot-clean
debs: uboot kernel
@./scripts/build.sh debs
uboot-deb: uboot kernel-dtbs
@./scripts/build.sh uboot-deb
uboot-image: uboot kernel-dtbs
@./scripts/build.sh uboot-image
kernel-deb: kernel
@./scripts/build.sh linux-deb
board-deb: _env_is_setup
@./scripts/build.sh board-deb
desktop-deb: _env_is_setup
@./scripts/build.sh desktop-deb
common-deb: _env_is_setup
@./scripts/build.sh common-deb
updater-deb: _env_is_setup
@./scripts/build.sh updater-deb
get-make-params:
@./scripts/param.sh make_params
info:
@echo ""
@echo "Version: ${VERSION}"
@echo "Current environment:"
@echo "==========================================="
@echo
@echo "#KHADAS_BOARD=${KHADAS_BOARD}"
@echo "#VENDOR=${VENDOR}"
@echo "#CHIP=${CHIP}"
@echo "#LINUX=${LINUX}"
@echo "#UBOOT=${UBOOT}"
@echo "#DISTRIBUTION=${DISTRIBUTION}"
@echo "#DISTRIB_RELEASE=${DISTRIB_RELEASE}"
@echo "#DISTRIB_TYPE=${DISTRIB_TYPE}"
@echo "#DISTRIB_ARCH=${DISTRIB_ARCH}"
@echo "#INSTALL_TYPE=${INSTALL_TYPE}"
@echo
@echo "==========================================="
@echo ""
help:
@echo "Fenix scripts help messages:"
@echo " all - Create image according to environment."
@echo " kernel - Build linux kernel."
@echo " kernel-clean - Clean linux source tree."
@echo " kernel-config - Show linux menuconfig."
@echo " kernel-saveconfig - Save linux defconfig."
@echo " uboot - Build u-boot."
@echo " uboot-clean - Clean u-boot source tree."
@echo " uboot-deb - Build u-boot debian package."
@echo " uboot-image - Build minimal image only with u-boot."
@echo " kernel-deb - Build linux debian package."
@echo " board-deb - Build board debian package."
@echo " common-deb - Build common debian package."
@echo " desktop-deb - Build desktop debian package."
@echo " debs - Build all debian packages."
@echo " image - Pack update image."
@echo " clean - Cleanup."
@echo " clean-all - Cleanup all."
@echo " clean-ccache - Cleanup ccache only."
@echo " clean-old - Cleanup old build session only."
@echo " info - Display current environment."
@echo " get-make-params - Get available make parameters."
clean:
./scripts/clean.sh
clean-all:
CLEAN_ALL=1 ./scripts/clean.sh
clean-ccache:
CLEAN_CCACHE_ONLY=1 ./scripts/clean.sh
clean-old:
CLEAN_OLD_ONLY=1 ./scripts/clean.sh
.PHONY: _env_is_setup