1 Star 0 Fork 164

GongHui/drivers_adapter_khdf_linux

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
patch_hdf.sh 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
yuanbo 提交于 2021-09-13 16:56 . optimize khdf build process
#!/bin/bash
#
# Copyright (c) 2020-2021 Huawei Device Co., Ltd.
#
# This software is licensed under the terms of the GNU General Public
# License version 2, as published by the Free Software Foundation, and
# may be copied, distributed, and modified under those terms.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
set -e
OHOS_SOURCE_ROOT=$1
KERNEL_BUILD_ROOT=$2
HDF_PATCH_FILE=$3
ln_list=(
$OHOS_SOURCE_ROOT/drivers/adapter/khdf/linux drivers/hdf/khdf
$OHOS_SOURCE_ROOT/drivers/framework drivers/hdf/framework
$OHOS_SOURCE_ROOT/drivers/framework/include include/hdf
)
cp_list=(
$OHOS_SOURCE_ROOT/third_party/bounds_checking_function ./
$OHOS_SOURCE_ROOT/device/hisilicon/drivers/wifi drivers/hdf/
$OHOS_SOURCE_ROOT/third_party/FreeBSD/sys/dev/evdev drivers/hdf/
)
function copy_external_compents
{
for ((i=0; i<${#cp_list[*]}; i+=2))
do
cp -arfL ${cp_list[$i]} ${cp_list[`expr $i + 1`]}
done
}
function ln_hdf_repos
{
for ((i=0; i<${#ln_list[*]}; i+=2))
do
ln -sf ${ln_list[$i]} ${ln_list[`expr $i + 1`]}
done
}
function main
{
cd $KERNEL_BUILD_ROOT
patch -p1 < $HDF_PATCH_FILE
ln_hdf_repos
copy_external_compents
cd -
}
main
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gong-hui-89/drivers_adapter_khdf_linux.git
git@gitee.com:gong-hui-89/drivers_adapter_khdf_linux.git
gong-hui-89
drivers_adapter_khdf_linux
drivers_adapter_khdf_linux
master

搜索帮助