2026-11-09 22:50:51 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
# Make sure the out-of-tree camera driver, the cover-panel spidev driver and
|
|
|
|
|
# the spi-mux modules are loaded even when the boot-runlevel "modules" service
|
|
|
|
|
# could not process /etc/modules (it needs /bin/sed, which was missing on some
|
|
|
|
|
# rootfs builds).
|
2026-11-11 14:20:42 +02:00
|
|
|
HW_MODS="msm8905-cam"
|
|
|
|
|
if [ "$(cat /usr/share/bananarchy/lid-profile 2>/dev/null)" = "flip" ]; then
|
|
|
|
|
HW_MODS="$HW_MODS spidev mux-core mux-gpio spi-mux"
|
|
|
|
|
fi
|
|
|
|
|
for mod in $HW_MODS; do
|
2026-11-09 22:50:51 +02:00
|
|
|
i=0
|
|
|
|
|
while [ "$i" -lt 5 ]; do
|
|
|
|
|
/sbin/modprobe -q "$mod" && break
|
|
|
|
|
i=$((i + 1))
|
|
|
|
|
sleep 1
|
|
|
|
|
done
|
|
|
|
|
done
|