Fetch the repository succeeded.
【哪吒】是全志在线基于全志科技D1芯片定制的AIoT开发板,是全球首款支持64bit RISC-V指令集并支持Linux系统的可量产开发板。
本文介绍如何在OpenHarmony平台上构建d1固件。
版本说明:
后续开发计划:
安装下面方法获取源码。由于OpenHarmony更新较频繁,为保证稳定,在sunxi_d1.xml中对各仓库指定commit下载。
repo init -u https://gitee.com/allwinnertech-d1/manifest-sunxi-d1.git -b master -m sunxi_d1.xml --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'
源码仓库主要有三个来源:
当前仅支持在OpenHarmony上构建D1内核与rootfs,需要借助D1的Tina环境中的工具链。
参考 https://d1.docs.aw-ol.com/ 下载D1的Tina Linux SDK
假定tina-d1为D1 Tina Linux环境根目录;假定OpenHarmony为D1 OpenHarmony根目录。
至此,OpenHarmony环境下的D1内核与rootfs构建完成,成功的log如下所示。
c targets overlap rate statistics
subsystem files NO. percentage builds NO. percentage overlap rate
third_party 6917 55.7% 7078 56.2% 1.02
aafwk 186 1.5% 186 1.5% 1.00
account 14 0.1% 14 0.1% 1.00
ace 766 6.2% 766 6.1% 1.00
appexecfwk 365 2.9% 365 2.9% 1.00
ccruntime 17 0.1% 17 0.1% 1.00
communication 462 3.7% 462 3.7% 1.00
developtools 77 0.6% 77 0.6% 1.00
distributeddatamgr 314 2.5% 314 2.5% 1.00
distributedhardware 33 0.3% 33 0.3% 1.00
distributedschedule 40 0.3% 40 0.3% 1.00
global 19 0.2% 19 0.2% 1.00
graphic 133 1.1% 133 1.1% 1.00
hdf 44 0.4% 44 0.3% 1.00
hiviewdfx 135 1.1% 135 1.1% 1.00
miscservices 62 0.5% 62 0.5% 1.00
multimedia 279 2.2% 279 2.2% 1.00
multimodalinput 29 0.2% 29 0.2% 1.00
notification 127 1.0% 127 1.0% 1.00
powermgr 50 0.4% 50 0.4% 1.00
security 268 2.2% 268 2.1% 1.00
startup 57 0.5% 57 0.5% 1.00
telephony 225 1.8% 225 1.8% 1.00
utils 211 1.7% 211 1.7% 1.00
wpa_supplicant-2.9 149 1.2% 149 1.2% 1.00
c overall build overlap rate: 1.01
post_process
=====build sunxi_d1 successful.
2021-12-01 15:21:57
++++++++++++++++++++++++++++++++++++++++
在SDK根目录执行: ./device/sunxi/build/pack,生成out/d1-nezha/tina_d1-nezha_uart0.img文件,将此文件烧录到D1开发板即可。
如果打包过程中出现下面这类log,文件超过了分区的大小,修改device/sunxi/config/chips/d1/configs/nezha/sys_partition.fex,调大对应分区的size即可。
ERROR: dl file rootfs.fex size too large
ERROR: filename = rootfs.fex
ERROR: dl_file_size = 254720 sector
ERROR: part_size = 40824 sector
ERROR: update mbr file fail
ERROR: update_mbr failed
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。