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# Description: Create a symbolic link for Unified Collection Driver in Linux 5.10 6419b0af8Sopenharmony_ci# 7419b0af8Sopenharmony_ci 8419b0af8Sopenharmony_ciset -e 9419b0af8Sopenharmony_ci 10419b0af8Sopenharmony_ciOHOS_SOURCE_ROOT=$1 11419b0af8Sopenharmony_ciKERNEL_BUILD_ROOT=$2 12419b0af8Sopenharmony_ciPRODUCT_NAME=$3 13419b0af8Sopenharmony_ciKERNEL_VERSION=$4 14419b0af8Sopenharmony_ciUNIFIED_COLLECTION_SOURCE_ROOT=$OHOS_SOURCE_ROOT/kernel/linux/common_modules/ucollection 15419b0af8Sopenharmony_ci 16419b0af8Sopenharmony_cifunction main() 17419b0af8Sopenharmony_ci{ 18419b0af8Sopenharmony_ci pushd . 19419b0af8Sopenharmony_ci 20419b0af8Sopenharmony_ci echo "create link $KERNEL_BUILD_ROOT/drivers/staging/ucollection/" 21419b0af8Sopenharmony_ci if [ ! -d "$KERNEL_BUILD_ROOT/drivers/staging/ucollection" ]; then 22419b0af8Sopenharmony_ci mkdir $KERNEL_BUILD_ROOT/drivers/staging/ucollection 23419b0af8Sopenharmony_ci fi 24419b0af8Sopenharmony_ci 25419b0af8Sopenharmony_ci cd $KERNEL_BUILD_ROOT/drivers/staging/ucollection/ 26419b0af8Sopenharmony_ci ln -s -f $(realpath --relative-to=$KERNEL_BUILD_ROOT/drivers/staging/ucollection/ $UNIFIED_COLLECTION_SOURCE_ROOT)/* ./ 27419b0af8Sopenharmony_ci 28419b0af8Sopenharmony_ci popd 29419b0af8Sopenharmony_ci} 30419b0af8Sopenharmony_ci 31419b0af8Sopenharmony_cimain 32