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-25 15:24:09 +00:00
parent db84902299
commit 3f7c6bf67c
4 changed files with 24 additions and 9 deletions

View File

@@ -1,10 +1,9 @@
on early-init
mount debugfs debugfs /sys/kernel/debug mode=755
mount none /system/etc /etc bind rec # docker fix
mount sysfs sysfs /sys rw remount # ueventd fix
write /data/.empty 0
mount none /data/.empty /proc/vmallocinfo bind # lxcfs?
# Mount binderfs
mkdir /dev/binderfs
mount binder binder /dev/binderfs stats=global
@@ -18,10 +17,25 @@ on early-init
chmod 0666 /dev/binderfs/binder
chmod 0666 /dev/binderfs/vndbinder
# fix for WSL2
# inputflinger require this dir
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
write /data/.empty 0
mount none /data/.empty /proc/vmallocinfo bind # lxcfs?
on post-fs-data
# fix for static IP, must after post-fs-data and before netd