1#!/bin/bash 2# Copyright (c) 2022 Huawei Device Co., Ltd. 3# 4# This software is licensed under the terms of the GNU General Public 5# License version 2, as published by the Free Software Foundation, and 6# may be copied, distributed, and modified under those terms. 7# 8# This program is distributed in the hope that it will be useful, 9# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# GNU General Public License for more details. 12 13set -e 14 15OHOS_ROOT_PATH=$1 16SRCDIR=$2 17OUTDIR=$3 18COMPILER_DIR=$4 19 20export KERNEL_VERSION="$5" 21export OHOS_ROOT_PATH 22export COMPILER_PATH_DIR=${COMPILER_DIR}/bin 23 24 25echo "KERNEL_VERSION=${KERNEL_VERSION}" 26echo "OHOS_ROOT_PATH=${OHOS_ROOT_PATH}" 27echo "COMPILER_PATH_DIR=${COMPILER_PATH_DIR}" 28echo "SRCDIR=${SRCDIR}" 29echo "OUTDIR=${OUTDIR}" 30 31 32pushd ${SRCDIR} && make clean && make -j && popd 33mkdir -p ${OUTDIR}; mv ${SRCDIR}/*.ko ${OUTDIR}/; 34pushd ${SRCDIR} && make clean && popd 35