20231224解决outcommit_id.xml1 parser error Document is empty的问题
2023/12/24 18:13
在开发RK3399的Android10的时候,出现:
rootroot@rootroot-X99-Turbo:~/3TB/Rockchip_Android10.0_SDK_Release$ make installclean
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=rk3399_Android10
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a15
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.0-91-generic-x86_64-Ubuntu-20.04.6-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QQ2A.200305.004.A1
OUT_DIR=out
============================================
16:51:00 Deleted images and staging directories.
#### build completed successfully (14 seconds) ####
rootroot@rootroot-X99-Turbo:~/3TB/Rockchip_Android10.0_SDK_Release$ ll
total 249120
drwxrwxr-x 38 rootroot rootroot 4096 12月 24 16:43 ./
drwxrwxrwx 10 rootroot rootroot 4096 12月 24 07:30 ../
drwxrwxr-x 26 rootroot rootroot 4096 12月 24 16:09 10u-boot/
drwxrwxr-x 27 rootroot rootroot 4096 12月 20 19:18 61u-boot/
lrwxrwxrwx 1 rootroot rootroot 19 12月 20 15:06 Android.bp -> build/soong/root.bp
drwxrwxr-x 31 rootroot rootroot 4096 12月 20 15:06 art/
drwxrwxr-x 13 rootroot rootroot 4096 12月 20 15:06 bionic/
drwxrwxr-x 3 rootroot rootroot 4096 12月 20 15:06 bootable/
lrwxrwxrwx 1 rootroot rootroot 26 12月 20 15:06 bootstrap.bash -> build/soong/bootstrap.bash*
drwxrwxr-x 6 rootroot rootroot 4096 12月 20 15:06 build/
-r-xr-xr-x 1 rootroot rootroot 6914 12月 20 15:06 build.sh*
-r-xr-xr-x 1 rootroot rootroot 14109 12月 20 15:06 .classpath*
drwxrwxr-x 12 rootroot rootroot 4096 12月 20 15:06 cts/
drwxrwxr-x 10 rootroot rootroot 4096 12月 20 15:06 dalvik/
drwxrwxr-x 5 rootroot rootroot 4096 12月 20 15:06 developers/
drwxrwxr-x 20 rootroot rootroot 4096 12月 20 15:06 development/
drwxrwxr-x 4 rootroot rootroot 4096 12月 20 15:06 device/
drwxrwxr-x 306 rootroot rootroot 12288 12月 20 15:08 external/
drwxrwxr-x 15 rootroot rootroot 4096 12月 20 15:10 frameworks/
drwxrwxr-x 13 rootroot rootroot 4096 12月 20 15:10 hardware/
-r--r--r-- 1 rootroot rootroot 162 12月 20 15:06 javaenv.sh
drwxrwxr-x 30 rootroot rootroot 4096 12月 22 20:47 kernel/
-rwx------ 1 rootroot rootroot 214721754 12月 20 08:23 kernel72.tgz*
drwxrwxr-x 19 rootroot rootroot 4096 12月 20 15:11 libcore/
drwxrwxr-x 8 rootroot rootroot 4096 12月 20 15:11 libnativehelper/
-r--r--r-- 1 rootroot rootroot 92 12月 20 15:06 Makefile
-r-xr-xr-x 1 rootroot rootroot 10370 12月 20 15:06 mkimage.sh*
drwxrwxr-x 11 rootroot rootroot 4096 12月 24 16:51 out/
drwxrwxr-x 9 rootroot rootroot 4096 12月 20 15:11 packages/
drwxrwxr-x 6 rootroot rootroot 4096 12月 20 15:11 pdk/
drwxrwxr-x 3 rootroot rootroot 4096 12月 20 15:11 platform/
drwxrwxr-x 10 rootroot rootroot 4096 12月 20 15:12 platform_testing/
drwxrwxr-x 28 rootroot rootroot 4096 12月 20 15:24 prebuilts/
drwxrwxr-x 7 rootroot rootroot 4096 5月 22 2020 .repo/
-r-xr-xr-x 1 rootroot rootroot 519 12月 20 15:24 restore_patches.sh*
drwxrwxr-x 9 rootroot rootroot 4096 12月 24 16:03 rkbin/
drwxrwxr-x 9 rootroot rootroot 4096 12月 20 15:06 RKDocs/
drwxrwxr-x 5 rootroot rootroot 4096 12月 20 15:24 rkst/
drwxrwxr-x 5 rootroot rootroot 4096 12月 20 15:06 RKTools/
drwxrwxr-x 7 rootroot rootroot 4096 12月 24 16:45 rockdev/
drwxrwxr-x 24 rootroot rootroot 4096 12月 20 15:24 sdk/
drwxrwxr-x 38 rootroot rootroot 4096 12月 20 15:24 system/
drwxrwxr-x 9 rootroot rootroot 4096 12月 20 15:24 test/
drwxrwxr-x 4 rootroot rootroot 4096 12月 20 15:24 toolchain/
drwxrwxr-x 19 rootroot rootroot 4096 12月 20 15:25 tools/
drwxrwxr-x 22 rootroot rootroot 4096 12月 24 16:44 u-boot/
-rwx------ 1 rootroot rootroot 22333991 12月 24 16:39 u-boot81.tgz*
-rwx------ 1 rootroot rootroot 17818883 12月 14 19:21 u-boot81在firefly.tgz*
drwxrwxr-x 5 rootroot rootroot 4096 12月 22 19:45 vendor/
rootroot@rootroot-X99-Turbo:~/3TB/Rockchip_Android10.0_SDK_Release$
rootroot@rootroot-X99-Turbo:~/3TB/Rockchip_Android10.0_SDK_Release$
rootroot@rootroot-X99-Turbo:~/3TB/Rockchip_Android10.0_SDK_Release$ make -j36
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=rk3399_Android10
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a15
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.0-91-generic-x86_64-Ubuntu-20.04.6-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QQ2A.200305.004.A1
OUT_DIR=out
============================================
$(shell find kernel/drivers/net/wireless/rockchip_wlan -name ""*.ko"" -type f | sed -E "s:(kernel/drivers/net/wireless/rockchip_wlan/?(.*)):\\1\\:/recovery/root/pcba/lib/modules/\\2:" | sed "s://:/:g") was changed, regenerating...
$(shell find kernel/drivers/net/wireless/rockchip_wlan -name ""*.ko"" -type f | sed -E "s:(kernel/drivers/net/wireless/rockchip_wlan/?(.*)):\\1\\:/recovery/root/pcba/lib/modules/\\2:" | sed "s://:/:g") was changed, regenerating...
[100% 449/449] initializing build system ...
device/rockchip/common/prebuild.mk:2: warning: Generating manifest snapshot at out/commit_id.xml...
device/rockchip/common/prebuild.mk:3: warning: You can disable this by removing this and setting BOARD_RECORD_COMMIT_ID := false in BoardConfig.mk
Traceback (most recent call last):
File "/home/rootroot/3TB/Rockchip_Android10.0_SDK_Release/.repo/repo/main.py", line 531, in <module>
_Main(sys.argv[1:])
File "/home/rootroot/3TB/Rockchip_Android10.0_SDK_Release/.repo/repo/main.py", line 507, in _Main
result = repo._Run(argv) or 0
File "/home/rootroot/3TB/Rockchip_Android10.0_SDK_Release/.repo/repo/main.py", line 180, in _Run
result = cmd.Execute(copts, cargs)
File "/home/rootroot/3TB/Rockchip_Android10.0_SDK_Release/.repo/repo/subcmds/manifest.py", line 80, in Execute
self._Output(opt)
File "/home/rootroot/3TB/Rockchip_Android10.0_SDK_Release/.repo/repo/subcmds/manifest.py", line 70, in _Output
peg_rev_upstream = opt.peg_rev_upstream)
File "/home/rootroot/3TB/Rockchip_Android10.0_SDK_Release/.repo/repo/manifest_xml.py", line 327, in Save
output_projects(None, root, list(sorted(projects)))
File "/home/rootroot/3TB/Rockchip_Android10.0_SDK_Release/.repo/repo/manifest_xml.py", line 241, in output_projects
output_project(parent, parent_node, project)
File "/home/rootroot/3TB/Rockchip_Android10.0_SDK_Release/.repo/repo/manifest_xml.py", line 268, in output_project
value = p.work_git.rev_parse(HEAD + '^0')
File "/home/rootroot/3TB/Rockchip_Android10.0_SDK_Release/.repo/repo/project.py", line 2747, in runner
(self._project.name, name, p.stderr))
error.GitError: rk/u-boot rev-parse: fatal: not a git repository (or any parent up to mount point /home/rootroot)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
[ 46% 454/971] including build/make/target/board/Android.mk ...
build fstab file with device/rockchip/rk3399/rk3399_Android10/fstab.in....
rebuilding dtbo image with device/rockchip/rk3399/rk3399_Android10/dt-overlay.in....
[ 72% 704/971] including hardware/rockchip/omx_il/Android.mk ...
tools/hooks .git/hooks
[ 20% 1490/7172] Building dtbo img file out/target/product/rk3399_Android10/obj/FAKE/rockchip_dtbo_intermediates/rebuild-dtbo.img.
out/target/product/rk3399_Android10/obj/FAKE/rockchip_dtbo_intermediates/device-dtbo.dtb: Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg property
out/target/product/rk3399_Android10/obj/FAKE/rockchip_dtbo_intermediates/device-dtbo.dtb: Warning (unit_address_vs_reg): Node /fragment@1 has a unit name, but no reg property
create image file: out/target/product/rk3399_Android10/obj/FAKE/rockchip_dtbo_intermediates/rebuild-dtbo.img...
Total 1 entries.
[ 20% 1494/7172] Target buildinfo: out/target/product/rk3399_Android10/obj/ETC/system_build_prop_intermediates/build.prop
Target buildinfo from: device/rockchip/rk3399/rk3399_Android10/system.prop
[ 77% 5581/7172] Copy xml: out/target/product/rk3399_Android10/vendor/commit_id.xml
FAILED: out/target/product/rk3399_Android10/vendor/commit_id.xml
/bin/bash -c "(out/soong/host/linux-x86/bin/xmllint out/commit_id.xml >/dev/null ) && (mkdir -p out/target/product/rk3399_Android10/vendor/ ) && (rm -f out/target/product/rk3399_Android10/vendor/commit_id.xml ) && (cp \"out/commit_id.xml\" \"out/target/product/rk3399_Android10/vendor/commit_id.xml\" )"
out/commit_id.xml:1: parser error : Document is empty
^
[ 78% 5607/7172] build out/target/product/rk3399_Android10/system/etc/event-log-tags
packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/EventLogTags.logtags:6: warning: tag "lock_screen_type" (90200) duplicated in packages/apps/Settings/src/com/android/settings/EventLogTags.logtags:6
packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/EventLogTags.logtags:9: warning: tag "exp_det_device_admin_activated_by_user" (90201) duplicated in packages/apps/Settings/src/com/android/settings/EventLogTags.logtags:9
packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/EventLogTags.logtags:12: warning: tag "exp_det_device_admin_declined_by_user" (90202) duplicated in packages/apps/Settings/src/com/android/settings/EventLogTags.logtags:12
packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/EventLogTags.logtags:15: warning: tag "exp_det_device_admin_uninstalled_by_user" (90203) duplicated in packages/apps/Settings/src/com/android/settings/EventLogTags.logtags:15
packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/EventLogTags.logtags:18: warning: tag "settings_latency" (90204) duplicated in packages/apps/Settings/src/com/android/settings/EventLogTags.logtags:18
16:56:10 ninja failed with: exit status 1
#### failed to build some targets (04:54 (mm:ss)) ####
rootroot@rootroot-X99-Turbo:~/3TB/Rockchip_Android10.0_SDK_Release$
百度搜索:out/commit_id.xml:1: parser error : Document is empty
https://blog.csdn.net/u010823818/article/details/132233861
commit_id.xml:1: parser error : Document is empty
SoulKuyan
已于 2023-10-24 09:45:58 修改
修改device/rockchip/common/BoardConfig.mk
将BOARD_RECORD_COMMIT_ID 改为false
BOARD_RECORD_COMMIT_ID ?= false
或者
SYSTEM_WITH_MANIFEST ?= true 修改成 false 即可
Z:\3TB\Rockchip_Android10.0_SDK_Release\device\rockchip\common\BoardConfig.mk
Z:\3TB\61Android11.0\device\rockchip\common\BoardConfig.mk
# ethernet
BOARD_HS_ETHERNET ?= false
# Save commit id into firmware
BOARD_RECORD_COMMIT_ID ?= false
# no battery
BUILD_WITHOUT_BATTERY ?= false