1419b0af8Sopenharmony_ci#!/bin/bash
2419b0af8Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
3419b0af8Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
4419b0af8Sopenharmony_ci#
5419b0af8Sopenharmony_ci
6419b0af8Sopenharmony_ciset -e
7419b0af8Sopenharmony_ci
8419b0af8Sopenharmony_ciOHOS_SOURCE_ROOT=$1
9419b0af8Sopenharmony_ciKERNEL_BUILD_ROOT=$2
10419b0af8Sopenharmony_ciPRODUCT_NAME=$3
11419b0af8Sopenharmony_ciKERNEL_VERSION=$4
12419b0af8Sopenharmony_ciQOS_AUTH_SOURCE_ROOT=$OHOS_SOURCE_ROOT/kernel/linux/common_modules/qos_auth
13419b0af8Sopenharmony_ci
14419b0af8Sopenharmony_cifunction main()
15419b0af8Sopenharmony_ci{
16419b0af8Sopenharmony_ci	pushd .
17419b0af8Sopenharmony_ci
18419b0af8Sopenharmony_ci	cd $KERNEL_BUILD_ROOT/include/linux/sched
19419b0af8Sopenharmony_ci	ln -sf $(realpath --relative-to=$KERNEL_BUILD_ROOT/include/linux/sched  $QOS_AUTH_SOURCE_ROOT/include)/*.h ./
20419b0af8Sopenharmony_ci
21419b0af8Sopenharmony_ci	if [ ! -d "$KERNEL_BUILD_ROOT/drivers/auth_ctl" ]; then
22419b0af8Sopenharmony_ci		mkdir $KERNEL_BUILD_ROOT/drivers/auth_ctl
23419b0af8Sopenharmony_ci	fi
24419b0af8Sopenharmony_ci
25419b0af8Sopenharmony_ci	cd $KERNEL_BUILD_ROOT/drivers/auth_ctl
26419b0af8Sopenharmony_ci	ln -sf $(realpath --relative-to=$KERNEL_BUILD_ROOT/drivers/auth_ctl  $QOS_AUTH_SOURCE_ROOT/auth_ctl)/* ./
27419b0af8Sopenharmony_ci
28419b0af8Sopenharmony_ci	popd
29419b0af8Sopenharmony_ci}
30419b0af8Sopenharmony_ci
31419b0af8Sopenharmony_cimain
32