7 Star 8 Fork 5

Phytium嵌入式软件/Phytium Android11 Device

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
phytium_env.sh 3.08 KB
一键复制 编辑 原始数据 按行查看 历史
wuao2431 提交于 2024-09-27 08:29 . update phytium_env.sh.
#!/bin/bash
if [ $# != 1 ] ; then
echo -e "\033[31m USAGE: phytium_env.sh ANDROID_PATH_ROOT \033[0m"
echo -e "\033[31m example: ./phytium_env.sh /home/phytium/aosp \033[0m"
exit 1;
fi
ANDROID_PATH=$1
if [ ! -d $ANDROID_PATH ];then
echo -e "\033[31mMake sure the android_path_root exist! \033[0m"
exit 1;
fi
echo -e "\033[32mTHE ANDROID_PATH_ROOT $ANDROID_PATH \033[0m"
echo -e "\033[32m #### sync phytium env start! #### \033[0m"
CURRENTPWD=$(pwd)
#sync system_core
echo -e "\033[32m #### sync system_core #### \033[0m"
rm $ANDROID_PATH/system/core/* -rf
cp system_core/* $ANDROID_PATH/system/core/ -R
echo -e "\033[32m #### sync system_core end #### \033[0m"
#sync device_phytium_ft2004
echo -e "\033[32m #### sync device_phytium_ft2004 #### \033[0m"
mkdir -p $ANDROID_PATH/device/phytium/ft2004
cp device_phytium_ft2004/* $ANDROID_PATH/device/phytium/ft2004/ -R
echo -e "\033[32m #### sync device_phytium_ft2004 end #### \033[0m"
#sync hardware_libaudio
echo -e "\033[32m #### sync hardware_libaudio #### \033[0m"
mkdir -p $ANDROID_PATH/hardware/libaudio
cp hardware_libaudio/* $ANDROID_PATH/hardware/libaudio/ -R
echo -e "\033[32m #### sync hardware_libaudio end #### \033[0m"
#sync hardware_libcamera
echo -e "\033[32m #### sync hardware_libcamera #### \033[0m"
mkdir -p $ANDROID_PATH/hardware/libcamera
cp hardware_libcamera/* $ANDROID_PATH/hardware/libcamera -R
echo -e "\033[32m #### sync hardware_libcamera end #### \033[0m"
#sync hardware_interfaces
echo -e "\033[32m #### sync hardware_interfaces #### \033[0m"
rm $ANDROID_PATH/hardware/interfaces/* -rf
cp hardware_interfaces/* $ANDROID_PATH/hardware/interfaces/ -R
echo -e "\033[32m #### sync hardware_interfaces end #### \033[0m"
#sync external_alsa-lib
echo -e "\033[32m #### sync external_alsa-lib #### \033[0m"
mkdir -p $ANDROID_PATH/external/alsa-lib
cp external_alsa-lib/* $ANDROID_PATH/external/alsa-lib/ -R
echo -e "\033[32m #### sync external_alsa-lib end #### \033[0m"
#sync external_alsa-utils
echo -e "\033[32m #### sync external_alsa-utils #### \033[0m"
mkdir -p $ANDROID_PATH/external/alsa-utils
cp external_alsa-utils/* $ANDROID_PATH/external/alsa-utils/ -R
echo -e "\033[32m #### sync external_alsa-utils end #### \033[0m"
#sync external_shaderc
echo -e "\033[32m #### sync external_shaderc #### \033[0m"
rm $ANDROID_PATH/external/shaderc/* -rf
cp external_shaderc/* $ANDROID_PATH/external/shaderc/ -R
echo -e "\033[32m #### sync external_shaderc end #### \033[0m"
#sync external_toybox
echo -e "\033[32m #### sync external_toybox #### \033[0m"
rm $ANDROID_PATH/external/toybox/* -rf
cp external_toybox/* $ANDROID_PATH/external/toybox/ -R
echo -e "\033[32m #### sync external_toybox end #### \033[0m"
echo -e "\033[32m #### apply patch ####\n \033[0m"
cd $ANDROID_PATH
failed_patches= ;for patch in $CURRENTPWD/phytium_android11_patch/0*.patch; do patch -Np1 -i \
$patch || failed_patches="$failed_patches $patch"; done; \
if [[ -n $failed_patches ]]; then echo "Failed Patches:"$failed_patches; fi;
echo -e "\033[32m #### apply patch end ####\n \033[0m"
echo -e "\033[32m #### sync phytium end! #### \033[0m"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/phytium_embedded/phytium-android11-device.git
git@gitee.com:phytium_embedded/phytium-android11-device.git
phytium_embedded
phytium-android11-device
Phytium Android11 Device
master

搜索帮助