1#!/bin/bash 2 3# Copyright (c) 2022 Unionman Technology Co., Ltd. 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15 16echo "Build kernel..." 17set -e 18export PATH=$(realpath ${4}/../../../../)/prebuilts/clang/ohos/linux-x86_64/llvm/bin/:$PATH 19export PRODUCT_COMPANY=unionman 20export DEVICE_NAME=unionpi_tiger 21export KERNEL_OBJ_PATH=$2 22export IMAGES_PATH=$3 23export DEVICE_PATH=$4 24export PRODUCT_PATH=$5 25export RAMDISK_ENABLE=$6 26export KBUILD_OUTPUT=${2}/kernel/OBJ/linux-5.10 27mkdir -p ${2}/kernel/OBJ/linux-5.10 28mkdir -p ${3} 29make -f ${4}/kernel/build/kernel.mk 30 31if [ -f ${2}/kernel/OBJ/linux-5.10/arch/arm64/boot/Image.gz ]; then 32 mkdir -p ${2}/kernel/src_tmp/linux-5.10/unionpi_tiger 33 cp -rf ${2}/kernel/OBJ/linux-5.10/arch/arm64/boot/Image.gz ${2}/kernel/src_tmp/linux-5.10/unionpi_tiger/ 34fi 35 36