refine product make scripts

- allow enable overlayfs data partiton
- stub to extend product definition
- auto detect GPU
This commit is contained in:
Ziyang Zhou
2021-06-24 15:29:04 +00:00
parent 4ba4ed038b
commit e769af3335
4 changed files with 31 additions and 14 deletions

View File

@@ -1,10 +1,9 @@
on early-init on early-init
mount debugfs debugfs /sys/kernel/debug mode=755
mount none /system/etc /etc bind rec # docker fix mount none /system/etc /etc bind rec # docker fix
mount sysfs sysfs /sys rw remount # ueventd fix mount sysfs sysfs /sys rw remount # ueventd fix
write /data/.empty 0
mount none /data/.empty /proc/vmallocinfo bind # lxcfs?
symlink /system/bin /bin symlink /system/bin /bin
# Mount binderfs # Mount binderfs
@@ -20,16 +19,30 @@ on early-init
chmod 0666 /dev/binderfs/binder chmod 0666 /dev/binderfs/binder
chmod 0666 /dev/binderfs/vndbinder chmod 0666 /dev/binderfs/vndbinder
# fix for WSL2 # inputflinger require this dir
mkdir /dev/input mkdir /dev/input
setprop gralloc.gbm.device /dev/dri/renderD128 exec - root root -- /vendor/bin/gpu_config.sh
# setup overlay data partition
on early-init && property:ro.kernel.redroid.overlay=1
mkdir /data-diff/upper
rmdir /data-diff/work
mkdir /data-diff/work
mount overlay overlay /data lowerdir=/data-base,upperdir=/data-diff/upper,workdir=/data-diff/work
on init on init
write /data/.empty 0
mount none /data/.empty /proc/vmallocinfo bind # lxcfs?
# use updated swiftshader, disable gpu pixel buffer first # use updated swiftshader, disable gpu pixel buffer first
# reenable if use mesa # reenable if use mesa
setprop debug.hwui.use_gpu_pixel_buffers false setprop debug.hwui.use_gpu_pixel_buffers false
on post-fs-data on post-fs-data
# fix for static IP, must after post-fs-data and before netd # fix for static IP, must after post-fs-data and before netd
exec - system system -- /vendor/bin/ipconfigstore v2 exec - system system -- /vendor/bin/ipconfigstore v2

View File

@@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
$(call inherit-product-if-exists, product.mk)
AUDIOSERVER_MULTILIB := first AUDIOSERVER_MULTILIB := first
# ? # ?
@@ -26,16 +28,16 @@ PRODUCT_PACKAGES += \
fs_config fs_config
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
vncserver \ audio.r_submix.default \
hwcomposer.redroid \ hwcomposer.redroid \
gralloc.gbm \ gralloc.gbm \
gralloc.redroid \ gralloc.redroid \
gatekeeper.ranchu \ gatekeeper.ranchu \
libEGL_swiftshader \ libEGL_swiftshader \
libGLESv1_CM_swiftshader \ libGLESv1_CM_swiftshader \
libGLESv2_swiftshader \ libGLESv2_swiftshader \
libGLES_mesa \ libGLES_mesa \
ipconfigstore \ ipconfigstore \
PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_PROPERTY_OVERRIDES += \
ro.kernel.qemu=1 \ ro.kernel.qemu=1 \
@@ -81,8 +83,10 @@ PRODUCT_COPY_FILES += \
frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \ frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \ frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \
frameworks/av/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf \ frameworks/av/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf \
frameworks/native/data/etc/android.hardware.ethernet.xml:/system/etc/permissions/android.hardware.ethernet.xml \ frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:system/etc/r_submix_audio_policy_configuration.xml \
device/generic/goldfish/audio_policy.conf:system/etc/audio_policy.conf frameworks/native/data/etc/android.hardware.ethernet.xml:/system/etc/permissions/android.hardware.ethernet.xml \
device/generic/goldfish/audio_policy.conf:system/etc/audio_policy.conf \
vendor/redroid/gpu_config.sh:$(TARGET_COPY_OUT_VENDOR)/bin/gpu_config.sh \
# Extend heap size we use for dalvik/art runtime # Extend heap size we use for dalvik/art runtime

View File

@@ -9,7 +9,7 @@ MINIMAL_FONT_FOOTPRINT := false
# use seperate vendor partition # use seperate vendor partition
TARGET_COPY_OUT_VENDOR := vendor TARGET_COPY_OUT_VENDOR := vendor
BOARD_GPU_DRIVERS := freedreno lima virgl radeonsi BOARD_GPU_DRIVERS := virgl radeonsi
DEVICE_MANIFEST_FILE := device/redroid/manifest.xml DEVICE_MANIFEST_FILE := device/redroid/manifest.xml
PRODUCT_ENFORCE_VINTF_MANIFEST := true PRODUCT_ENFORCE_VINTF_MANIFEST := true

View File

@@ -9,7 +9,7 @@ MINIMAL_FONT_FOOTPRINT := false
# use seperate vendor partition # use seperate vendor partition
TARGET_COPY_OUT_VENDOR := vendor TARGET_COPY_OUT_VENDOR := vendor
BOARD_GPU_DRIVERS := i915 i965 nouveau kmsro r300g r600g virgl vmwgfx etnaviv iris tegra radeonsi BOARD_GPU_DRIVERS := i915 i965 r300g r600g virgl iris radeonsi
DEVICE_MANIFEST_FILE := device/redroid/manifest.xml DEVICE_MANIFEST_FILE := device/redroid/manifest.xml
PRODUCT_ENFORCE_VINTF_MANIFEST := true PRODUCT_ENFORCE_VINTF_MANIFEST := true