一、下载与编译
源码下载:
$ repo init -u git@gitee.com:openharmony/manifest.git -b refs/tags/OpenHarmony-v4.0-Beta1 --no-repo-verify
$ repo sync -c
$ repo forall -c 'git lfs pull'
编译工具链下载:
$ bash build/prebuilts_download.sh
编译:
$ ./build.sh --product-name dayu210
二、编译过程遇到的问题
2.1 kernel 补丁无法打入
[OHOS ERROR] patching file drivers/usb/host/xhci-pci.c
[OHOS ERROR] Hunk #2 FAILED at 57.
[OHOS ERROR] Hunk #3 succeeded at 148 (offset 1 line).
[OHOS ERROR] Hunk #4 FAILED at 236.
[OHOS ERROR] Hunk #5 succeeded at 253 (offset 2 lines).
[OHOS ERROR] Hunk #6 succeeded at 285 (offset 2 lines).
[OHOS ERROR] Hunk #7 succeeded at 319 (offset 2 lines).
[OHOS ERROR] 2 out of 7 hunks FAILED -- saving rejects to file drivers/usb/host/xhci-pci.c.rej
...
[OHOS ERROR] patching file drivers/usb/serial/option.c
[OHOS ERROR] Hunk #4 FAILED at 246.
[OHOS ERROR] Hunk #5 succeeded at 435 (offset 1 line).
[OHOS ERROR] Hunk #6 succeeded at 570 (offset 1 line).
[OHOS ERROR] Hunk #7 succeeded at 1068