1#!/bin/bash 2# SPDX-License-Identifier: GPL-2.0 3# Copyright (c) 2023 Huawei Device Co., Ltd. 4# 5 6set -e 7 8OHOS_SOURCE_ROOT=$1 9KERNEL_BUILD_ROOT=$2 10PRODUCT_NAME=$3 11KERNEL_VERSION=$4 12QOS_AUTH_SOURCE_ROOT=$OHOS_SOURCE_ROOT/kernel/linux/common_modules/qos_auth 13 14function main() 15{ 16 pushd . 17 18 cd $KERNEL_BUILD_ROOT/include/linux/sched 19 ln -sf $(realpath --relative-to=$KERNEL_BUILD_ROOT/include/linux/sched $QOS_AUTH_SOURCE_ROOT/include)/*.h ./ 20 21 if [ ! -d "$KERNEL_BUILD_ROOT/drivers/auth_ctl" ]; then 22 mkdir $KERNEL_BUILD_ROOT/drivers/auth_ctl 23 fi 24 25 cd $KERNEL_BUILD_ROOT/drivers/auth_ctl 26 ln -sf $(realpath --relative-to=$KERNEL_BUILD_ROOT/drivers/auth_ctl $QOS_AUTH_SOURCE_ROOT/auth_ctl)/* ./ 27 28 popd 29} 30 31main 32