📚往期笔录记录🔖:
🔖鸿蒙(HarmonyOS)北向开发知识点记录~
🔖鸿蒙(OpenHarmony)南向开发保姆级知识点汇总~
🔖鸿蒙应用开发与鸿蒙系统开发哪个更有前景?
🔖嵌入式开发适不适合做鸿蒙南向开发?看完这篇你就了解了~
🔖对于大前端开发来说,转鸿蒙开发究竟是福还是祸?
🔖鸿蒙岗位需求突增!移动端、PC端、IoT到底该怎么选?
🔖记录一场鸿蒙开发岗位面试经历~
🔖持续更新中……
获取代码
我们可以通过如下命令来获取代码:
repo init -u [git@gitee.com](mailto:git@gitee.com):openharmony/manifest.git -b OpenHarmony-5.0-Release --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'
./build/prebuilts_download.sh
编译和烧录
默认要编译sdk,因为 //applications/standard/dlp_manager 这个应用需要依赖sdk。
./build.sh --product-name rk3568 --ccache
按常规的烧录流程进行烧录即可。
注意,8G内存的Dayu200开发板,烧录默认的 uboot 镜像会有图像异常的情况如下左图所示,单独烧录这里提供的:https://gitee.com/liangkzgitee/Hihope_Product_Images/tree/master/HiHope_DAYU200 uboot镜像之后可正常显示,版本信息如下右图所示。
内核版本信息是:
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x412fd050]
[ 0.000000] Linux version 5.10.208 (ohos@ohos) (OHOS (dev) clang version 15.0.4 (llvm-project 862f0fa5aca667c0eb786bc145e6d9b72a63b21f), LLD 15.0.4) #1 SMP Sat Aug 3 21:50:57 CST 2024
[ 0.000000] Machine model: rockchip,rk3568-toybrick-dev-linux-x0
[ 0.000000] earlycon: uart8250 at MMIO32 0x00000000fe660000 (options '')
[ 0.000000] printk: bootconsole [uart8250] enabled
尝鲜Linux-6.6内核
烧录和确认Linux-5.10版本内核正常工作之后,想尝鲜体验 Linux-6.6版本内核的话,可以命令行进入代码根目录,删除临时的内核代码和备份Linux-5.10的内核镜像:
rm -fr out/kernel
mv out/rk3568/packages/phone/images/boot_linux.img out/rk3568/packages/phone/images/boot_linux_5.10.208.img
然后修改 //build/ohos/kernel/kernel.gni 文件:
declare_args() {
linux_kernel_version = "linux-6.6" # linux-5.10
}
重新编译,再按常规的烧录流程进行烧录即可。
内核版本信息是:
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x412fd050]
[ 0.000000] Linux version 6.6.22 (ohos@ohos) (OHOS (dev) clang version 15.0.4 (llvm-project 862f0fa5aca667c0eb786bc145e6d9b72a63b21f), LLD 15.0.4) #1 SMP Sun Aug 4 08:51:50 CST 2024
[ 0.000000] KASLR disabled due to lack of seed
[ 0.000000] Machine model: rockchip,rk3568-toybrick-dev-linux-x0
[ 0.000000] earlycon: uart8250 at MMIO32 0x00000000fe660000 (options '')
[ 0.000000] printk: bootconsole [uart8250] enabled