luckfox-pico-sdk/sysdrv/drv_ko/kmpp/Makefile
luckfox-eng29 8f34c2760d project:build.sh: Added fastboot support; custom modifications to U-Boot and kernel implemented using patches.
project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between
the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door
for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more
usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp:
Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for
compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem.
sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device
tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately.
sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick
boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades.
sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for
fastboot.

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
2024-10-14 09:47:04 +08:00

74 lines
2.0 KiB
Makefile

SHELL = /bin/bash
ifeq ($(SYSDRV_PARAM), )
SYSDRV_PARAM:=../../Makefile.param
include $(SYSDRV_PARAM)
endif
KMPP_CURRENT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
ifeq ($(RK_PROJECT_OUTPUT),)
-include $(KMPP_CURRENT_DIR)/../../../.BoardConfig.mk
endif
ifneq ($(SYSDRV_KERNEL_OBJS_OUTPUT_DIR),)
__ROCKIT_BUILD_OBJ_DIR__=$(SYSDRV_KERNEL_OBJS_OUTPUT_DIR)/drivers/kmpp
else
__ROCKIT_BUILD_OBJ_DIR__=$(ROCKIT_CURRENT_DIR)/kmpp
endif
ifeq ($(ARCH), arm)
MPP_KO=ko_32_rel
RELEASE_KO=arm
endif
ifeq ($(ARCH), arm64)
MPP_KO=ko_64_rel
RELEASE_KO=arm64
endif
PKG_NAME_KMPP := kmpp
PKG_OUT := out
TOP_DRV_KO_OUT := $(KMPP_CURRENT_DIR)/../out
PKG_TARGET:=kmpp-build
ifeq ($(RK_ENABLE_FASTBOOT),y)
PKG_TARGET:=
endif
all: $(PKG_TARGET)
kmpp-build: kmpp_release
@test ! -d $(KMPP_CURRENT_DIR)/$(PKG_NAME_KMPP) || (\
rm -rf $(KMPP_CURRENT_DIR)/$(PKG_OUT); \
mkdir -p $(KMPP_CURRENT_DIR)/$(PKG_OUT); \
pushd $(KMPP_CURRENT_DIR)/$(PKG_NAME_KMPP)/; \
make -j$(SYSDRV_JOBS) || exit $$?; \
make linux_release; \
popd; \
cp $(KMPP_CURRENT_DIR)/$(PKG_NAME_KMPP)/prebuild/$(MPP_KO)/*.ko $(KMPP_CURRENT_DIR)/$(PKG_OUT); \
);
@mkdir -p $(TOP_DRV_KO_OUT) && \
cp -fra $(PKG_OUT)/* $(TOP_DRV_KO_OUT) ;
@echo "build $(PKG_NAME_KMPP) done"
kmpp_release:
$(call MAROC_PKG_CHECK_PREBUILT, $(KMPP_CURRENT_DIR),$(PKG_NAME_KMPP),$(PKG_OUT))
clean:
@test ! -d $(KMPP_CURRENT_DIR)/$(PKG_NAME_KMPP) || (\
cd $(KMPP_CURRENT_DIR)/$(PKG_NAME_KMPP) ; \
make clean; \
);
@rm -rf $(PKG_OUT)
@echo "$(PKG_NAME_KMPP) clean done"
################################################################################
__RELEASE__: # DO NOT RUN THIS TARGET
ifeq ($(RK_ENABLE_FASTBOOT),y)
ifneq ($(SYSDRV_KERNEL_OBJS_OUTPUT_DIR),)
$(call MAROC_PKG_RELEASE_ASM_NEW, $(KMPP_CURRENT_DIR),$(PKG_NAME_KMPP), $(__ROCKIT_BUILD_OBJ_DIR__))
else
$(call MAROC_PKG_RELEASE_ASM, $(KMPP_CURRENT_DIR),$(PKG_NAME_KMPP))
endif
else
$(call MAROC_PKG_RELEASE, $(KMPP_CURRENT_DIR),$(PKG_NAME_KMPP),$(PKG_OUT))
endif