-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
executable file
·65 lines (47 loc) · 1.63 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
.PHONY: all clean help
.PHONY: u-boot kernel kernel-config
.PHONY: linux pack
include chosen_board.mk
K_CROSS_COMPILE=$(K_COMPILE_TOOL)/aarch64-linux-gnu-
ROOTFS=$(CURDIR)/rootfs/linux/default_linux_rootfs.tar.gz
Q=
J=$(shell expr `grep ^processor /proc/cpuinfo | wc -l` \* 2)
all: bsp
clean: u-boot-clean kernel-clean
rm -f chosen_board.mk env.sh
distclean: clean
rm -rf SD/
pack: aml-pack
$(Q)scripts/mk_pack.sh
install:
$(Q)scripts/mk_install_sd.sh
u-boot:
$(Q)$(MAKE) -C u-boot-aml $(UBOOT_CONFIG)
$(Q)$(MAKE) -C u-boot-aml
u-boot-clean:
$(Q)$(MAKE) -C u-boot-aml distclean
kernel:
$(Q)$(MAKE) -C linux-aml ARCH=$(ARCH) CROSS_COMPILE=${K_CROSS_COMPILE} $(KERNEL_CONFIG)
$(Q)$(MAKE) -C linux-aml ARCH=$(ARCH) CROSS_COMPILE=${K_CROSS_COMPILE} -j$J
$(Q)$(MAKE) -C linux-aml ARCH=$(ARCH) CROSS_COMPILE=${K_CROSS_COMPILE} -j$J INSTALL_MOD_PATH=output modules_install
$(Q)scripts/install_kernel_headers.sh ${K_CROSS_COMPILE}
kernel-clean:
$(Q)$(MAKE) -C linux-aml ARCH=$(ARCH) -j$J distclean
rm -rf linux-aml/output/
kernel-config: $(K_DOT_CONFIG)
$(Q)$(MAKE) -C linux-aml ARCH=$(ARCH) $(KERNEL_CONFIG)
$(Q)$(MAKE) -C linux-aml ARCH=$(ARCH) -j$J menuconfig
cp linux-aml/.config linux-aml/arch/$(ARCH)/configs/$(KERNEL_CONFIG)
bsp: u-boot kernel
help:
@echo ""
@echo "Usage:"
@echo " make bsp - Default 'make'"
@echo " make pack - pack the images and rootfs to a PhenixCard download image."
@echo " make clean"
@echo ""
@echo "Optional targets:"
@echo " make kernel - Builds linux kernel"
@echo " make kernel-config - Menuconfig"
@echo " make u-boot - Builds u-boot"
@echo ""