f5d5a9be19
The `msm-fb-refresher` updates the screen for msm based devices. It is not needed for all devices, so we had some extra code in the initramfs, that would only add it when the `deviceinfo_msm_refresher` variable was set. However, we are able now to add files to initramfs hooks, so this hack can be removed and simplify everything. Changes: * Remove `deviceinfo_msm_refresher` from all deviceinfos * Add sanity check for it * Move all `deviceinfo` sanity checks to an extra function * `postmarketos-mkinitfs`: remove code for msm refresher * `msm-fb-refresher`: add initramfs hook
58 lines
1.4 KiB
Bash
58 lines
1.4 KiB
Bash
#!/bin/sh
|
|
# shellcheck disable=SC1091
|
|
. /etc/deviceinfo
|
|
. ./init_functions.sh
|
|
|
|
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
|
/bin/busybox --install -s
|
|
/bin/busybox-extras --install -s
|
|
|
|
# Mount everything, set up logging, modules, mdev
|
|
mount_proc_sys_dev
|
|
setup_log
|
|
# shellcheck disable=SC2154,SC2086
|
|
[ -d /lib/modules ] && modprobe -a ${deviceinfo_modules_initfs} ext4
|
|
setup_mdev
|
|
mount_subpartitions
|
|
|
|
# Fix for framebuffer drivers, which do not have a default mode
|
|
set_framebuffer_mode
|
|
|
|
# Hooks
|
|
for hook in /etc/postmarketos-mkinitfs/hooks/*.sh; do
|
|
[ -e "$hook" ] || continue
|
|
sh "$hook"
|
|
done
|
|
|
|
show_splash /splash-loading.ppm.gz
|
|
|
|
# Always run dhcp daemon/usb networking for now (later this should only
|
|
# be enabled, when having the debug-shell hook installed for debugging,
|
|
# or get activated after the initramfs is done with an OpenRC service).
|
|
setup_usb_network
|
|
start_udhcpd
|
|
|
|
mount_boot_partition
|
|
extract_initramfs_extra @INITRAMFS_EXTRA@
|
|
start_charging_mode
|
|
wait_root_partition
|
|
resize_root_partition
|
|
unlock_root_partition
|
|
resize_root_filesystem
|
|
mount_root_partition
|
|
|
|
# Switch root
|
|
killall telnetd mdev msm-fb-refresher 2>/dev/null
|
|
umount /boot
|
|
umount /proc
|
|
umount /sys
|
|
umount /dev/pts
|
|
umount /dev
|
|
|
|
# shellcheck disable=SC2093
|
|
exec switch_root /sysroot /sbin/init
|
|
|
|
echo "ERROR: switch_root failed!"
|
|
echo "Looping forever. Install and use the debug-shell hook to debug this."
|
|
echo "For more information, see <https://postmarketos.org/debug-shell>"
|
|
loop_forever
|