Add a script to generate various build variants
This commit is contained in:
parent
1cbdf550d8
commit
cdf726b0fd
@ -1,2 +0,0 @@
|
||||
PRODUCT_MAKEFILES := \
|
||||
$(LOCAL_DIR)/treble_arm64_ag.mk
|
2
base.mk
2
base.mk
@ -11,3 +11,5 @@ BOARD_PLAT_PRIVATE_SEPOLICY_DIR += device/phh/treble/sepolicy
|
||||
DEVICE_PACKAGE_OVERLAYS += device/phh/treble/overlay
|
||||
|
||||
$(call inherit-product, vendor/hardware_overlay/overlay.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
|
||||
|
43
generate.sh
Normal file
43
generate.sh
Normal file
@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo 'PRODUCT_MAKEFILES := \' > AndroidProducts.mk
|
||||
|
||||
for part in a ab;do
|
||||
for apps in vanilla gapps foss;do
|
||||
for arch in arm64;do
|
||||
apps_suffix=""
|
||||
apps_script=""
|
||||
apps_name=""
|
||||
if [ "$apps" == "gapps" ];then
|
||||
apps_suffix="g"
|
||||
apps_script='$(call inherit-product, device/phh/treble/gapps.mk)'
|
||||
apps_name="with GApps"
|
||||
fi
|
||||
if [ "$apps" == "foss" ];then
|
||||
apps_suffix="f"
|
||||
apps_script='$(call inherit-product, vendor/foss/foss.mk)'
|
||||
apps_name="with FOSS apps"
|
||||
fi
|
||||
if [ "$apps" == "vanilla" ];then
|
||||
apps_suffix="v"
|
||||
apps_script=''
|
||||
apps_name="vanilla"
|
||||
fi
|
||||
|
||||
target="treble_${arch}_${part}${apps_suffix}"
|
||||
|
||||
cat > ${target}.mk << EOF
|
||||
include build/make/target/product/treble_common.mk
|
||||
\$(call inherit-product, device/phh/treble/base.mk)
|
||||
$apps_script
|
||||
|
||||
PRODUCT_NAME := $target
|
||||
PRODUCT_DEVICE := generic_arm64_$part
|
||||
PRODUCT_BRAND := Android
|
||||
PRODUCT_MODEL := Phh-Treble $apps_name
|
||||
EOF
|
||||
echo -e '\t$(LOCAL_DIR)/'$target.mk '\' >> AndroidProducts.mk
|
||||
done
|
||||
done
|
||||
done
|
||||
echo >> AndroidProducts.mk
|
@ -1,15 +0,0 @@
|
||||
include build/make/target/product/treble_common.mk
|
||||
|
||||
#Need to be called first to be able to override later rules,
|
||||
#but after treble_common which would override PRODUCT_PACKAGES
|
||||
$(call inherit-product, device/phh/treble/base.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
|
||||
|
||||
$(call inherit-product, vendor/hardware_overlay/overlay.mk)
|
||||
$(call inherit-product, device/phh/treble/gapps.mk)
|
||||
|
||||
PRODUCT_NAME := treble_arm64_ag
|
||||
PRODUCT_DEVICE := generic_arm64_a
|
||||
PRODUCT_BRAND := Android
|
||||
PRODUCT_MODEL := Phh-Treble
|
Loading…
Reference in New Issue
Block a user