• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

修訂ed44183bc9c4a141aa5d53ee2c54d849eece6308 (tree)
時間2016-09-23 18:59:47
作者Chih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

init: set default value of ro.hardware to the target name

People usually forget to set the value of androidboot.hardware to
the target name in kernel cmdline which results in boot failure.

The change tries to reduce such an error in the future. The target
name is hardcoded to the image. This eliminates the necessity of
androidboot.hardware.

Change Summary

差異

--- a/init/Android.mk
+++ b/init/Android.mk
@@ -38,6 +38,7 @@ include $(BUILD_STATIC_LIBRARY)
3838
3939 include $(CLEAR_VARS)
4040 LOCAL_CPPFLAGS := $(init_cflags)
41+LOCAL_CPPFLAGS += -DTARGET_PRODUCT=\"$(TARGET_PRODUCT)\"
4142 LOCAL_SRC_FILES:= \
4243 bootchart.cpp \
4344 builtins.cpp \
--- a/init/init.cpp
+++ b/init/init.cpp
@@ -804,7 +804,7 @@ static void export_kernel_boot_props() {
804804 { "ro.boot.mode", "ro.bootmode", "unknown", },
805805 { "ro.boot.baseband", "ro.baseband", "unknown", },
806806 { "ro.boot.bootloader", "ro.bootloader", "unknown", },
807- { "ro.boot.hardware", "ro.hardware", "unknown", },
807+ { "ro.boot.hardware", "ro.hardware", TARGET_PRODUCT, },
808808 { "ro.boot.revision", "ro.revision", "0", },
809809 };
810810 for (size_t i = 0; i < ARRAY_SIZE(prop_map); i++) {