组织介绍

1 NanoPi M1 Plus 移植Openharmony项目源码下载

mkdir ~/nanopim1plus
cd ~/nanopim1plus
mkdir openharmony
cd openharmony

通过repo获取
方式一(推荐)
通过repo + ssh 下载(需注册公钥,请参考码云帮助中心)。

repo init -u git@gitee.com:ohos_nanopi_m1_plus/manifest.git -m devboard_nanopim1plus_tag.xml -b master --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'

方式二

通过repo + https 下载。

repo init -u https://gitee.com/ohos_nanopi_m1_plus/manifest.git -m devboard_nanopim1plus_tag.xml -b master --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'

2 执行prebuilts

在源码根目录下执行脚本,安装编译器及二进制工具。

bash build/prebuilts_download.sh

3 打入补丁解压toolchain

在源码根目录下执行

python3 projectpatch/patch.py
cp ohos/drivers/peripheral/camera/hal/adapter/chipset/gni/camera.rpi3.gni ohos/drivers/peripheral/camera/hal/adapter/chipset/gni/camera.nanopim1plus.gni
tar xvf toolchain/arm-cortexa9-linux-gnueabihf-4.9.3-20160512.tar.xz -C toolchain/

4 编译指令

在源码根目录下执行

export PATH="$PATH:$(pwd)/toolchain/4.9.3/bin"
export GCC_COLORS=auto
python3 build-nanopim1plus.py build

5 合成SD卡烧录档案

在源码根目录下执行拷贝system.img、vendor.img 、userdata.img、boot.img的动作,然后进入device/allwinner/allwinnerh3/oh-sd-fuse_h3/执行生成烧录档案。

cp -f out/ohos-arm-release/packages/phone/images/system.img device/allwinner/allwinnerh3/oh-sd-fuse_h3/friendlycore-focal_4.14_armhf/
cp -f out/ohos-arm-release/packages/phone/images/vendor.img device/allwinner/allwinnerh3/oh-sd-fuse_h3/friendlycore-focal_4.14_armhf/
cp -f out/ohos-arm-release/packages/phone/images/userdata.img device/allwinner/allwinnerh3/oh-sd-fuse_h3/friendlycore-focal_4.14_armhf/
cp -f out/ohos-arm-release/packages/phone/images/boot.img device/allwinner/allwinnerh3/oh-sd-fuse_h3/friendlycore-focal_4.14_armhf/
cd device/allwinner/allwinnerh3/oh-sd-fuse_h3/
sudo ./device/allwinner/allwinnerh3/oh-sd-fuse_h3/mk-sd-image.sh friendlycore-focal_4.14_armhf h3-sd-friendlycore.img

会在device/allwinner/allwinnerh3/oh-sd-fuse_h3/out生成可以烧录到SD 卡的h3-sd-friendlycore.img

成就
1
Star
12
Fork
成员(1)
Soon_L

搜索帮助