-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
executable file
·71 lines (64 loc) · 2 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
all:
ifeq ($(and $(DISTRIBUTION),$(DISTRIB_RELEASE),$(DISTRIB_TYPE),$(FIRE_BOARD),$(LINUX),$(UBOOT),$(INSTALL_TYPE)),)
$(call help_message)
else
@./scripts/create_image.sh
endif
define help_message
@echo "You should setup environment first."
@echo "Run 'source env/setenv.sh' to setup environment."
endef
kernel:
ifeq ($(and $(DISTRIBUTION),$(DISTRIB_RELEASE),$(DISTRIB_TYPE),$(FIRE_BOARD),$(LINUX),$(UBOOT),$(INSTALL_TYPE)),)
$(call help_message)
else
@./scripts/build.sh linux
endif
uboot:
ifeq ($(and $(DISTRIBUTION),$(DISTRIB_RELEASE),$(DISTRIB_TYPE),$(FIRE_BOARD),$(LINUX),$(UBOOT),$(INSTALL_TYPE)),)
$(call help_message)
else
@./scripts/build.sh u-boot
endif
kernel-deb:
ifeq ($(and $(DISTRIBUTION),$(DISTRIB_RELEASE),$(DISTRIB_TYPE),$(FIRE_BOARD),$(LINUX),$(UBOOT),$(INSTALL_TYPE)),)
$(call help_message)
else
@./scripts/build.sh linux-deb
endif
tfa:
ifeq ($(and $(DISTRIBUTION),$(DISTRIB_RELEASE),$(DISTRIB_TYPE),$(DISTRIB_ARCH),$(FIRE_BOARD),$(LINUX),$(UBOOT),$(INSTALL_TYPE)),)
$(call help_message)
else
@./scripts/build.sh tfa
endif
info:
@echo ""
@echo "Current environment:"
@echo "==========================================="
@echo
@echo "#FIRE_BOARD=${FIRE_BOARD}"
@echo "#LINUX=${LINUX}"
@echo "#UBOOT=${UBOOT}"
@echo "#DISTRIBUTION=${DISTRIBUTION}"
@echo "#DISTRIB_RELEASE=${DISTRIB_RELEASE}"
@echo "#DISTRIB_TYPE=${DISTRIB_TYPE}"
@echo "#INSTALL_TYPE=${INSTALL_TYPE}"
@echo
@echo "==========================================="
@echo ""
help:
@echo ""
@echo "fire scripts help messages:"
@echo ""
@echo "TARGET:"
@echo " info - Display current environment."
@echo " all - Create image according to environment."
@echo " uboot - Build u-boot."
@echo " kernel - Build linux kernel."
@echo " kernel-deb - Build linux kernel."
@echo ""
@echo "OPTIONS:"
@echo " DOWNLOAD_MIRROR=china - Improve download speed for Chinese users."
@echo " FORCE_UPDATE=enable - Force everything to recompile."
@echo ""