main/postmarketos-initramfs-minimal: update to 2.7.1 (MR 5251)

This updates the minimal initramfs to be at the same version that
postmarketos-initramfs was when it was split off. This should have been
done as a part of !5000.

The changelog from git:

- main/postmarketos-initramfs: fix stowaway (MR 5206)
- main/msm-fb-refresher: move cleanup from initramfs into msm-fb-refresher (MR 5191)
- main/postmarketos-mkinitfs-hook-debug-shell: Cleanup debug-shell telnet server (MR 5191)
- main/postmarketos-initramfs: Allow packages to define cleanup hooks (MR 5191)
- main/postmarketos-initramfs: update comment on why we mount /boot (MR 5089)
- main/postmarketos-initramfs: add options for charset to mount vfat /boot (MR 5089)
- main/postmarketos-initramfs: add some sane mount options to /boot (MR 5089)
- main/postmarketos-initramfs: stowaway rootfs (MR 4386)
- main/postmarketos-initramfs: add crc32_generic module for F2FS (MR 4973)
- main/postmarketos-initramfs: add USB booting support (MR 4947)
- main/postmarketos-initramfs: fix starting unudhcpd when no UDC configured (MR 4907)
- postmarketos-initramfs: bigger log image size (MR 4880)
- main/postmarketos-initramfs: allow redirect logs to pmsg device (MR 4800)
This commit is contained in:
Clayton Craft 2024-06-19 11:41:30 -07:00 committed by Caleb Connolly
parent 02ae499d6a
commit eb3c299a61
No known key found for this signature in database
GPG key ID: 0583312B195F64B6
4 changed files with 44 additions and 13 deletions

View file

@ -10,3 +10,4 @@
/sysroot
/tmp
/usr
/hooks-cleanup

View file

@ -1,8 +1,8 @@
# WARNING: this package is deprecated and currently unmaintained. It should
# only be used on devices that do not have space for the full size ramdisk.
pkgname=postmarketos-initramfs-minimal
pkgver=2.5.6
pkgrel=1
pkgver=2.7.1
pkgrel=0
pkgdesc="Deprecated minimal initramfs for space constrained devices"
url="https://postmarketos.org"
options="!check" # no tests
@ -87,11 +87,11 @@ package() {
sha512sums="
59be0649ed87a72d93624bd8a2e3f8c99a0f32f7b7a26f99436de782beba55671472c269eeee86440efc87e0d7148a0bb335fa537791092e73878ca21330544a 00-default.modules
5b364300f31c91fd0591eb0715f67cbf5383f45246a5fb9f34b79f7cb2e3b15768b2130e5f32f816cc169950f988c1beabc879ba31645c58ce131a288dbc071d 00-initramfs-base.dirs
9c0e8f6f61d5da191e03a1aa9d5d0ceb5baf1eae6dbb9bfb0af59817783525119ac8394b135f303f7b6434a3eab0b49185fb90379e06823db847a4999c75ce33 00-initramfs-base.dirs
ab41b45b0613f25a61114ed8c8b92bc53c60838f6e2e0ba18c76e5369b2984e6023a0661887692673aca3f647f268c468a468f6b1ac424cfee609017a89481dd 00-initramfs-base.files
8a4adad3785af474b36a09a05f6a3b2c4b4f43aac331a53b903abfa51ea12be1e3d1d807b7a6e66a1346815f3b0044daf8cd62e21e2dc75d2db13ee265a72985 00-initramfs-extra-base.files
b1462989633c65a102e7ae7ced9c41a00673b4c7434cd3fe16c229c39bb870d7e850b0d317487191b7d7ca32c75b2eed1561b1facf405bd4d876d32c71badcf3 init.sh
8ff684e8245217cc9461297bce55dd8b417f0478ef38cdbddf7662f9ecc4324ca09e75978261084e00f5a1f2e36cc3b25a609a9bdca4addc5a60d3c370cbdb90 init_functions.sh
102cb49a5b44282afee7808945c69e9bb9310677efeefc681d92217f0399a90fcbb37eb9ac7aed89cc27c324780298c7c2de6de2bdb89a77499faad1c312e539 init.sh
091cb54268a8b5a0f2793c64e3eb633d5f6aee084ab2b6fcdb39c56404c97e1256294d48cd991e39e067a5b4defc4c20a82005c74a470e97577cbe8339a5348d init_functions.sh
ba3275a9af788c7c782322a22a0f144d5e50e3498ea6886486a29331f23ae89cd32d500a3635cfa7cab369afba92edc18aeca64ccbf0cd589061cce23d15b46c unudhcpd.conf
675e7d5bee39b2df7d322117f8dcaccc274d61beaf4d50ead19bbf2109446d64b1c0aa0c5b4f9846eb6c1c403418f28f6364eff4537ba41120fbfcbc484b7da7 mdev.conf
"

View file

@ -78,7 +78,8 @@ unlock_root_partition
resize_root_filesystem
mount_root_partition
# Mount boot partition into sysroot, so OpenRC doesn't need to do it (#664)
# Mount boot partition into sysroot, so we do not depend on /etc/fstab, as
# not all old installations have a proper /etc/fstab file. See #2800
umount /boot
mount_boot_partition /sysroot/boot "rw"
@ -86,7 +87,8 @@ init="/sbin/init"
setup_bootchart2
# Switch root
killall telnetd mdev udevd msm-fb-refresher 2>/dev/null
run_hooks /hooks-cleanup
killall mdev udevd 2>/dev/null
# shellcheck disable=SC2093
exec switch_root /sysroot "$init"

View file

@ -248,7 +248,17 @@ find_root_partition() {
find_boot_partition() {
[ -n "$PMOS_BOOT" ] && echo "$PMOS_BOOT" && return
# First check for pmos_boot_uuid on the cmdline
# Before doing anything else check if we are using a stowaway
if grep -q "pmos.stowaway" /proc/cmdline; then
mount_root_partition
PMOS_BOOT="/sysroot/boot"
mount --bind /sysroot/boot /boot
echo "$PMOS_BOOT"
return
fi
# Then check for pmos_boot_uuid on the cmdline
# this should be set on all new installs.
# shellcheck disable=SC2013
for x in $(cat /proc/cmdline); do
@ -312,13 +322,18 @@ get_partition_type() {
# /sysroot/boot (rw), after root has been mounted at /sysroot, so we can
# switch_root to /sysroot and have the boot partition properly mounted.
mount_boot_partition() {
partition=$(find_boot_partition)
partition="$(find_boot_partition)"
local mount_opts="-o nodev,nosuid,noexec"
# We dont need to do this when using stowaways
if grep -q "pmos.stowaway" /proc/cmdline; then
return
fi
if [ "$2" = "rw" ]; then
mount_opts=""
echo "Mount boot partition ($partition) to $1 (read-write)"
else
mount_opts="-o ro"
mount_opts="$mount_opts,ro"
echo "Mount boot partition ($partition) to $1 (read-only)"
fi
@ -333,7 +348,7 @@ mount_boot_partition() {
vfat)
echo "Detected vfat filesystem"
modprobe vfat
mount_opts="-t vfat $mount_opts"
mount_opts="-t vfat $mount_opts,umask=0077,nosymfollow,codepage=437,iocharset=ascii"
;;
*) echo "WARNING: Detected unsupported '$type' filesystem ($partition)." ;;
esac
@ -513,6 +528,11 @@ resize_root_filesystem() {
}
mount_root_partition() {
# Don't mount root if it is already mounted
if mountpoint -q /sysroot; then
return
fi
partition="$(find_root_partition)"
rootfsopts=""
@ -542,7 +562,15 @@ mount_root_partition() {
fail_halt_boot
fi
if ! [ -e /sysroot/usr ]; then
if [ -e /sysroot/.stowaways/pmos/etc/os-release ]; then
umount /sysroot
mkdir /stowaway
mount -t "$type" -o rw"$rootfsopts" "$partition" /stowaway
mount --bind /stowaway/.stowaways/pmos/ /sysroot
fi
if ! [ -e /sysroot/etc/os-release ]; then
echo "ERROR: root partition appeared to mount but does not contain a root filesystem!"
show_splash "ERROR: root partition does not contain a root filesystem\\nhttps://postmarketos.org/troubleshooting"
fail_halt_boot