I'm having the same problem while trying to extend hikey960 device. In my case, I'm getting hit by the hikey960 makefiles (like device/linaro/hikey/mali/bifrost/Android.mk) including conditions like:
ifneq ($(filter hikey960, $(TARGET_DEVICE)),) which fails for different PRODUCT_DEVICE (which it must be to inherit from base hikey960 BoardConfig.mk). In my case, I want to extend / override the HALs in the hikey960 base. To do this I define vendor/<company>/device/hikey960-custom/BoardConfig.mk like: include device/linaro/hikey/hikey960/BoardConfig.mk DEVICE_MANIFEST_FILE += <manifest-fragment> That works well, but the above base project TARGET_PRODUCT checks cause the resulting build to fail (without having to edit the AOSP device/linaro/hikey sources). An alternative is to not use BoardConfig.mk inheritence but use the base board, but replace the device manifest file directly before the base board directives, but this means ignoring the base board conditionals, like: DEVICE_MANIFEST_FILE := device/linaro/hikey/manifest.xml DEVICE_MATRIX_FILE := device/linaro/hikey/compatibility_matrix.xml ifneq ($(TARGET_SENSOR_MEZZANINE),) DEVICE_MANIFEST_FILE += device/linaro/hikey/sensorhal/manifest.xml DEVICE_MANIFEST_FILE += device/linaro/hikey/vr/manifest.xml endif For Hikey960, this is probably OK because TARGET_SENSOR_MEZZANINE is never set in the AOSP sources, but it's still a general issue. In my use case, is the proper way of doing this creating dedicated ODM partition https://source.android.com/devices/bootloader/odm-partitions as it supports custom HALs? Do you expect adding an ODM partition to hikey960 to work (in principle)? Thanks, On Saturday, December 14, 2019 at 4:05:26 AM UTC+11, Pether Pettersson wrote: > > Hi, > > we are running into problems when we try to add our own BoardConfig that > is supposed to include/inherit another config, in this case it is the > cuttlefish emulator, so that we can change and add parameters without > having to edit the aosp source. We've had a device configured to use > cuttlefish for a long time and it works, but would like the ability to > overwrite and add our own parameters in the BoardConfig. > > I've tried two ways of doing it, including one of these two lines in our > config, the difference is explained here: > difference-between-call-inherit-product-and-include-in-aosp-makefiles > <https://stackoverflow.com/questions/36321050/difference-between-call-inherit-product-and-include-in-aosp-makefiles> > > 1. include device/google/cuttlefish/vsoc_x86/BoardConfig.mk > 2. $(call inherit-product, > device/google/cuttlefish/vsoc_x86/BoardConfig.mk) > > When trying to build with the included config we get a lot of the similar > errors with several modules and libraries missing. > error: "hostapd (EXECUTABLES android-x86) missing lib_driver_cmd_simulated > (STATIC_LIBRARIES android-x86)" > > And when trying the inherit-product way we get the following when running > lunch. > error: cannot assign to readonly variable: PRODUCT_NAME > > > > > So the problem occurs when we try to use our own BoardConfig, using; > PRODUCT_DEVICE := "our-own" > instead of using cuttlefish directly, which works fine; > PRODUCT_DEVICE := vsoc_x86 > > How are we supposed to accomplish this, without needing to edit aosp > source code, or creating a copy of the source? > -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/android-porting/639413f3-d0ac-45f4-aaff-5390a6f7bf22%40googlegroups.com.