目标 'arch/arm64/boot/dts/qcom/msm8917-pmi8937-qrd-sku5.dtb' 的配方失败

recipe for target 'arch/arm64/boot/dts/qcom/msm8917-pmi8937-qrd-sku5.dtb' failed

我在为 lineageos 项目构建恢复时遇到以下异常,需要一些帮助来诊断和解决问题:

ERROR (phandle_references): Reference to non-existent node or label "smb_int_default"

ERROR (phandle_references): Reference to non-existent node or label "gpio_led_off"

ERROR: Input tree has errors, aborting (use -f to force output)
scripts/Makefile.lib:292: recipe for target 'arch/arm64/boot/dts/qcom/msm8917-pmi8937-qrd-sku5.dtb' failed
make[3]: *** [arch/arm64/boot/dts/qcom/msm8917-pmi8937-qrd-sku5.dtb] Error 2
make[3]: *** Waiting for unfinished jobs....
  CC      drivers/media/platform/msm/camera_v2/isp/msm_isp40.o
  CC      drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_hw.o
  CC      drivers/media/radio/radio-iris.o
  LD      drivers/media/platform/msm/camera_v2/msm_vb2/built-in.o
  CC      drivers/media/platform/msm/camera_v2/jpeg_10/msm_jpeg_platform.o
  CC      drivers/media/radio/radio-iris-transport.o
  LD      drivers/media/platform/msm/camera_v2/jpeg_10/built-in.o
  CC      drivers/media/platform/msm/camera_v2/isp/msm_isp.o
/home/lineageos/kernel/lenovo/msm8917/scripts/Makefile.build:402: recipe for target 'arch/arm64/boot/dts/qcom' failed
make[2]: *** [arch/arm64/boot/dts/qcom] Error 2
/home/lineageos/kernel/lenovo/msm8917/arch/arm64/Makefile:92: recipe for target 'dtbs' failed
make[1]: *** [dtbs] Error 2
make[1]: *** Waiting for unfinished jobs....

设备树:= https://github.com/darran-kelinske-fivestars/android_device_lenovo_tb8504f/tree/lineage-15.1

供应商树:= https://github.com/darran-kelinske-fivestars/android_vendor_lenovo_tb8504f/tree/lineage-15.1

内核源码:= https://github.com/darran-kelinske-fivestars/android_kernel_lenovo_tb8504f/tree/lineage-15.1

ROM 来源:= https://github.com/LineageOS/android

命令:source build/envsetup.sh && breakfast tb8504f && repo sync --force-sync -q -j6 && mka recoveryimage -j6 |三通 recovery.log

完整日志:

https://pastebin.com/9V7tQu9G

非常感谢 danlor 的帮助。

我采用了不同的方法来解决这个问题。

我使用的是另一个 rom 构建器推荐的内核 defconfig,我不确定它是否正确,所以我找到了一种从设备内核获取 defconfig 的方法。

  1. 我从设备中提取了 boot.img 文件
  2. 然后我从内核中获取配置

    /usr/src/linux-headers-4.18.0-25-generic/scripts/extract-ikconfig 内核 > lineageos_tb8504f_defconfig

然后我将它上传到内核仓库:

https://github.com/darran-kelinske-fivestars/android_kernel_lenovo_tb8504f/commit/72370bfa987297398662e314a6c6e898dd193ddb

从那里开始,我设置在设备存储库的 make 文件中使用它。

https://github.com/darran-kelinske-fivestars/android_device_lenovo_tb8504f/commit/460d9657ab0572e448be39422b98fc0b23b0c257

  1. 为了获取设备树,我使用了以下工具:

https://github.com/PabloCastellano/extract-dtb

我提取了设备树

./extract-dtb.py ../../../boot.img
  1. 然后我找到了上面引用的树的 dbt 文件并将其转储到一个文件

    fdtdump 26_dtbdump_Qualcomm_Technologies,_Inc._MSM8917-PMI8937_QRD_SKU5.dtb > sku5.txt

然后我将设备树文件更新为转储中的内容:

https://github.com/darran-kelinske-fivestars/android_kernel_lenovo_tb8504f/commit/6ae1722b1906a06bb5d0b6cf8e0d8c7501ff9555

然后我能够成功构建恢复。

[ 99% 1462/1467] Prebuilt:  (/home/lineageos/out/target/product/tb8504f/kernel)
[ 99% 1463/1467] Target boot image: /home/lineageos/out/target/product/tb8504f/boot.img
/home/lineageos/out/target/product/tb8504f/boot.img maxsize=68395008 blocksize=135168 total=27078656 reserve=811008
[ 99% 1464/1467] Copying baseline ramdisk...
Modifying ramdisk contents...
cp: cannot stat '/home/lineageos/out/target/product/tb8504f/root/init.recovery.*.rc': No such file or directory
----- Making uncompressed recovery ramdisk ------
[ 99% 1465/1467] ----- Making compressed recovery ramdisk ------
[ 99% 1466/1467] ----- Making recovery image ------
+/home/lineageos/out/target/product/tb8504f/recovery.img maxsize=68395008 blocksize=135168 total=33243136 reserve=811008
----- Made recovery image: /home/lineageos/out/target/product/tb8504f/recovery.img --------
[100% 1467/1467] build /home/lineageos/out/target/product/tb8504f/system/etc/recovery-resource.dat

#### build completed successfully (04:41 (mm:ss)) ####