| | |
| | | |
| | | 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 |
| | | |
| | |
| | | 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 |