wenxue.guo
2023-12-22 d451d07f2ead8cef2134185fd8e5054927921d4f
kernel/build.sh
@@ -52,7 +52,8 @@
function build_kernel()
{
    PATCH_FILE=$PRJ_PATH/patches/$BOARD/linux-imx-$BSP_VER.patch
    defconfig=${BOARD}_defconfig
    patch_file=$PRJ_PATH/patches/$BOARD/linux-imx-$BSP_VER.patch
    cd $PRJ_PATH
@@ -61,19 +62,17 @@
    else
        pr_info "start fetch linux kernel source code"
        git clone $GIT_URL/linux-imx.git -b $BRANCH --depth=1
        if [ -s $PATCH_FILE ] ; then
            pr_warn "do patch for $KER_PATH now..."
            cd $KER_PATH
            patch -p1 < $PATCH_FILE
        fi
    fi
    pr_info "Start build linux kernel source code"
    cd $KER_PATH
    defconfig=${BOARD}_defconfig
    if [ ! -s arch/arm64/configs/$defconfig -a -s $patch_file ] ; then
        pr_warn "do patch for $KER_PATH now..."
        patch -p1 < $patch_file
    fi
    if [ ! -s .config ] ; then
        make ${defconfig}
    fi