-
Notifications
You must be signed in to change notification settings - Fork 29
/
Makefile
executable file
·143 lines (121 loc) · 4.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
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# (c) Texas Instruments
include Rules.make
include $(BASE_DIR)/COMMON_HEADER.MK
exe:
make depend
make libs
make -fMAKEFILE.MK -C$(BASE_DIR)/../application/test exe
#ifeq ($(SYSTEM), IPNC)
make -fMAKEFILE.MK -C$(BASE_DIR)/../application/ipnc/av_server exe
#endif
make install
@echo "------------------------------------------------------------------------------------------------------------------"
@echo "Please run < make lsp > if you have changed anything in csl/drv kernel modules and use the new built image!!!!"
@echo
@echo "Build Completed for $(HARDWARE) $(SYSTEM)"
@echo "------------------------------------------------------------------------------------------------------------------"
libs:
make -fMAKEFILE.MK -C$(BASE_DIR)/../framework $(MAKE_TARGET)
make -fMAKEFILE.MK -C$(BASE_DIR)/../application/test $(MAKE_TARGET)
#ifeq ($(SYSTEM), IPNC)
make -fMAKEFILE.MK -C$(BASE_DIR)/../application/ipnc $(MAKE_TARGET)
#endif
all:
make clean
make exe
clean:
make libs MAKE_TARGET=clean
-rm -f $(EXE_BASE_DIR)/$(CONFIG)/*.out
-rm -f $(TARGET_FS_DIR)/*.out
depend:
-mkdir -p $(EXE_BASE_DIR)
-mkdir -p $(TARGET_FS_DIR)
make libs MAKE_TARGET=depend
install:
make libs MAKE_TARGET=install
cp $(EXE_BASE_DIR)/*.sh $(TARGET_FS_DIR)
cp $(LINUXUTILS_INSTALL_DIR)/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.ko $(TARGET_FS_DIR)
cp $(LINUXUTILS_INSTALL_DIR)/packages/ti/sdo/linuxutils/edma/src/module/edmak.ko $(TARGET_FS_DIR)
cp $(LINUXUTILS_INSTALL_DIR)/packages/ti/sdo/linuxutils/irq/src/module/irqk.ko $(TARGET_FS_DIR)
cp $(DVSDK_BASE_DIR)/dm365mm/module/dm365mmap.ko $(TARGET_FS_DIR)
cp $(EXE_BASE_DIR)/$(CONFIG)/av_server.out $(TARGET_FS_DIR)
cp $(EXE_BASE_DIR)/$(CONFIG)/i2crw.out $(TARGET_FS_DIR)
cp $(EXE_BASE_DIR)/$(CONFIG)/regrw.out $(TARGET_FS_DIR)
cp $(KERNELDIR)/block/sbull/sbull.ko $(TARGET_FS_DIR)
cp $(KERNELDIR)/drivers/usb/gadget/g_file_storage.ko $(TARGET_FS_DIR)
# cp $(EXE_BASE_DIR)/$(CONFIG)/moduletest.out $(TARGET_FS_DIR)
cp $(EXE_BASE_DIR)/$(CONFIG)/av_server.out $(TARGET_FS_DIR)/../../sys_app/ipcam/
dvsdkbuild:
make -C$(DVSDK_BASE_DIR) $(DVSDK_TARGET)
dvsdk:
make dvsdkbuild DVSDK_TARGET=
# make dvsdkbuild DVSDK_TARGET=install
dvsdkclean:
make dvsdkbuild DVSDK_TARGET=clean
dvsdkall:
make dvsdkclean
make dvsdk
lspbuild:
make -C$(KERNELDIR) ARCH=arm CROSS_COMPILE=$(MVTOOL_PREFIX) $(MAKE_TARGET)
lspcfg:
ifeq ($(SYSTEM), IPNC)
ifeq ($(HARDWARE), DM365)
make lspbuild MAKE_TARGET=davinci_dm365_ipnc_defconfig
endif
ifeq ($(HARDWARE), DM368)
make lspbuild MAKE_TARGET=davinci_dm368_ipnc_defconfig
endif
endif
ifeq ($(SYSTEM), EVM)
make lspbuild MAKE_TARGET=davinci_dm365_defconfig
endif
ifeq ($(SYSTEM), DVR)
make lspbuild MAKE_TARGET=davinci_dm365_dvr_defconfig
endif
make lspbuild MAKE_TARGET=checksetconfig
lsp:
make lspcfg
make lspbuild MAKE_TARGET=uImage
ifeq ($(SYSTEM), IPNC)
make lspbuild MAKE_TARGET=modules
cp $(KERNELDIR)/arch/arm/boot/uImage $(TFTP_HOME)/uImage_ipnc_$(HARDWARE)
-cp $(KERNELDIR)/arch/arm/boot/uImage /home/jiangjx/UbuntuShare/tftpboot/
find $(KERNELDIR) -name "*.ko" -exec cp '{}' $(TARGET_FS_DIR)/modules \;
rm $(TARGET_FS_DIR)/modules/ltt*.ko
endif
ifeq ($(SYSTEM), EVM)
make lspbuild MAKE_TARGET=modules
cp $(KERNELDIR)/arch/arm/boot/uImage $(TFTP_HOME)/uImage_ipnc_$(HARDWARE)_EVM
find $(KERNELDIR) -name "*.ko" -exec cp '{}' $(TARGET_FS_DIR)/modules \;
rm $(TARGET_FS_DIR)/modules/ltt*.ko
endif
ifeq ($(SYSTEM), DVR)
cp $(KERNELDIR)/arch/arm/boot/uImage $(TFTP_HOME)/uImage_$(HARDWARE)_DVR
endif
lspall:
make lspclean
make lsp
lspclean:
make lspbuild MAKE_TARGET=distclean
rm -f $(TARGET_FS_DIR)/modules/*.ko
nfsreset:
sudo /usr/sbin/exportfs -av
sudo /sbin/service nfs restart
sysall:
make dvsdkall
make all
make lspall
make
sysclean:
make lspclean
make dvsdkclean
make clean
sys:
make lsp
make dvsdk
make
cramfs:
sudo mkfs.cramfs $(TARGET_FS)/ cramfsImage_ipnc_$(HARDWARE)
# mv cramfsImage_ipnc_$(HARDWARE) $(TFTP_HOME)
mv cramfsImage_ipnc_$(HARDWARE) /home/jiangjx/UbuntuShare/tftpboot/rootfs.cramfs
.PHONY : exe libs all clean depend install dvsdkbuild dvsdk dvsdkclean dvsdkall lspbuild lspcfg lsp lspall lspclean nfsreset sysall sysclean sys ipnc ipncbuild ipncclean ipncall ramdisk