android-info.txt: do not output 'board=' if no board_name

If no board name, output nothing to the android-info.txt.
Currently the output of 'board=' might trigger some parsing error
on some clients.

Bug: 189990989
Test: make out/target/product/generic_arm64/android-info.txt
Change-Id: Ia9aab6c092c07349aa57f0e73f8c69b6e05874c1
This commit is contained in:
Bowgo Tsai
2021-06-03 17:54:31 +08:00
parent 041770b553
commit 9346c4e2ad

View File

@@ -24,8 +24,10 @@ $(INSTALLED_ANDROID_INFO_TXT_TARGET): $(board_info_txt) build/make/tools/check_r
$(call pretty,"Generated: ($@)")
ifdef board_info_txt
$(hide) grep -v '#' $< > $@
else
else ifdef TARGET_BOOTLOADER_BOARD_NAME
$(hide) echo "board=$(TARGET_BOOTLOADER_BOARD_NAME)" > $@
else
$(hide) echo "" > $@
endif
# Copy compatibility metadata to the device.