blob: 3546f5d3a486092e8e7682cc231cab55b2162873 [file] [log] [blame]
Shad Ansari2f7f9be2017-06-07 13:34:53 -07001# WRX-specific rules
2
3ifeq ("$(SUBSYSTEM)", "host")
4 # Build linux kernel if not done yet
5
6wrx_linux_kernel:
7 if [ ! -d $(BOARD_DIR) ]; then\
8 $(BOLD_PRINT) "ERROR: $(BOARD_DIR) directory doesn't not exist" ; \
9 exit -1; \
10 fi;\
11 if [ -f $(KERNEL_OUTDIR)/vmlinux ] ; then \
12 $(BOLD_PRINT) "found compiled $(BOARD) kernel in $(KERNEL_OUTDIR)" ;\
13 exit 0;\
14 fi;\
15 if [ ! -f $(BOARD_DIR)/linux/$(KERNEL_BRCM_VER)/$(KERNEL_TAR_NAME) ]; then\
16 $(BOLD_PRINT) "ERROR: Kernel tar file doesn't exist. Please get the latest version of $(BOARD_DIR)/linux/$(KERNEL_BRCM_VER)/$(KERNEL_TAR_NAME) ";\
17 exit -1;\
18 fi;\
19 if [ ! -f $(BOARD_DIR)/linux/$(KERNEL_BRCM_VER)/$(LIBS_TAR_NAME) ]; then \
20 $(BOLD_PRINT) "ERROR: Kernel Libraries tar file not exists. Please get latest version of $(BOARD_DIR)/linux/$(KERNEL_BRCM_VER)/$(LIBS_TAR_NAME) ";\
21 exit -1;\
22 fi;\
23 $(BOLD_PRINT) "Building wrx kernel";\
24 cd $(BOARD_DIR); $(MAKE)
25
26endif