Add MT6797 MD1 CCCI boot/RPC/FS, lpac eSIM, voice audio, and CONSYS Wi-Fi fix
This commit is contained in:
1 parent
1b93479666
commit
92a31539e6
34 files changed
+8556
-117
No files matched your search
@@ -8,6 +8,49 @@ command="/usr/sbin/geminux-ccci-daemon"
|
||||
|
||||
depend() {
|
||||
need localmount
|
||||
after modules
|
||||
after modules geminux-hwinit
|
||||
before modemmanager
|
||||
}
|
||||
|
||||
_mount_nv_part() {
|
||||
local label="$1"
|
||||
local target="$2"
|
||||
local dev="/dev/disk/by-partlabel/${label}"
|
||||
|
||||
mkdir -p "${target}"
|
||||
[ -e "${dev}" ] || return 0
|
||||
if grep -qs " ${target} " /proc/mounts; then
|
||||
return 0
|
||||
fi
|
||||
mount -t ext4 -o rw,noatime,nosuid,nodev "${dev}" "${target}" >/dev/null 2>&1 || \
|
||||
ewarn "geminux-ccci: unable to mount ${dev} on ${target}"
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
mkdir -p /var/lib/geminux/md_nvram /var/log
|
||||
_mount_nv_part nvcfg /mnt/vendor/nvcfg
|
||||
_mount_nv_part nvdata /mnt/vendor/nvdata
|
||||
_mount_nv_part protect1 /mnt/vendor/protect_f
|
||||
_mount_nv_part protect2 /mnt/vendor/protect_s
|
||||
mkdir -p /mnt/vendor/nvdata/md /mnt/vendor/protect_f/md /mnt/vendor/protect_s/md
|
||||
return 0
|
||||
}
|
||||
|
||||
start_post() {
|
||||
[ -f /etc/geminux/ccci-autostart ] || return 0
|
||||
local state_file="/sys/class/mt6797_ccci/md1/state"
|
||||
local i=0
|
||||
while [ "$i" -lt 50 ]; do
|
||||
if [ -r "${state_file}" ]; then
|
||||
local st
|
||||
st="$(cat "${state_file}" 2>/dev/null || echo 0)"
|
||||
if [ "${st}" = "4" ]; then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
sleep 0.2
|
||||
i=$((i + 1))
|
||||
done
|
||||
ewarn "geminux-ccci: MD1 did not reach READY state within 10s"
|
||||
return 0
|
||||
}
|
||||
Reference in new issue
Block a user