blob: 3546f5d3a486092e8e7682cc231cab55b2162873 [file] [log] [blame]
# WRX-specific rules
ifeq ("$(SUBSYSTEM)", "host")
# Build linux kernel if not done yet
wrx_linux_kernel:
if [ ! -d $(BOARD_DIR) ]; then\
$(BOLD_PRINT) "ERROR: $(BOARD_DIR) directory doesn't not exist" ; \
exit -1; \
fi;\
if [ -f $(KERNEL_OUTDIR)/vmlinux ] ; then \
$(BOLD_PRINT) "found compiled $(BOARD) kernel in $(KERNEL_OUTDIR)" ;\
exit 0;\
fi;\
if [ ! -f $(BOARD_DIR)/linux/$(KERNEL_BRCM_VER)/$(KERNEL_TAR_NAME) ]; then\
$(BOLD_PRINT) "ERROR: Kernel tar file doesn't exist. Please get the latest version of $(BOARD_DIR)/linux/$(KERNEL_BRCM_VER)/$(KERNEL_TAR_NAME) ";\
exit -1;\
fi;\
if [ ! -f $(BOARD_DIR)/linux/$(KERNEL_BRCM_VER)/$(LIBS_TAR_NAME) ]; then \
$(BOLD_PRINT) "ERROR: Kernel Libraries tar file not exists. Please get latest version of $(BOARD_DIR)/linux/$(KERNEL_BRCM_VER)/$(LIBS_TAR_NAME) ";\
exit -1;\
fi;\
$(BOLD_PRINT) "Building wrx kernel";\
cd $(BOARD_DIR); $(MAKE)
endif