Skip to content
Snippets Groups Projects
Unverified Commit 4482867a authored by Caleb Connolly's avatar Caleb Connolly :recycle:
Browse files

postmarketos-initramfs-minimal: drop


Drop the fork, nothing depends on it and we can use the new multi-stage
initramfs instead

Signed-off-by: default avatarCaleb Connolly <caleb@postmarketos.org>
[ci:ignore-count]
[ci:skip-vercheck]
parent 568777bd
No related branches found
No related tags found
No related merge requests found
Pipeline #205658 passed
aes
btrfs
crc32_generic
crc32c_generic
dm-crypt
dm_crypt
evdev
ext4
f2fs
kernel/arch/*/crypto/
kernel/crypto/
kernel/fs/overlayfs/
libaes
loop
nls_ascii
nls_cp437
nls_iso8859_1
nls_utf8
usb_f_rndis
usb_f_ncm
usb-storage
vfat
xts
/bin
/boot
/dev
/etc
/lib
/proc
/run
/sbin
/sys
/sysroot
/tmp
/usr
/hooks-cleanup
/bin/busybox
/bin/busybox-extras
/bin/sh
/etc/deviceinfo
/etc/unudhcpd.conf
/lib/mdev/persistent-storage
/sbin/blkid
/usr/bin/unudhcpd
/usr/sbin/kpartx
/usr/share/deviceinfo/deviceinfo
/usr/share/initramfs/init.sh:/init
/usr/share/initramfs/init_functions.sh:/init_functions.sh
/usr/share/initramfs/mdev.conf:/etc/mdev.conf
/usr/share/misc/source_deviceinfo
/usr/lib/libz.so.1
/sbin/btrfs
/sbin/dmsetup
/sbin/e2fsck
/sbin/fsck.vfat
/sbin/switch_root
/usr/sbin/fsck.f2fs
/usr/sbin/parted
/usr/sbin/resize2fs
/usr/sbin/resize.f2fs
# 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.8.0
pkgrel=2
pkgdesc="Deprecated minimal initramfs for space constrained devices"
url="https://postmarketos.org"
options="!check" # no tests
provides="postmarketos-ramdisk=$pkgver-r$pkgrel"
provider_priority=1
depends="
blkid
btrfs-progs
busybox-extras
bzip2
cryptsetup
device-mapper
devicepkg-utils>=0.2.0
dosfstools
e2fsprogs
e2fsprogs-extra
f2fs-tools
lz4
mdev-conf
multipath-tools
parted
postmarketos-fde-unlocker
postmarketos-mkinitfs>=2.2
unudhcpd
util-linux-misc
xz
"
source="
00-default.modules
00-initramfs-base.dirs
00-initramfs-base.files
00-initramfs-extra-base.files
init.sh
init_functions.sh
unudhcpd.conf
mdev.conf
"
arch="noarch"
license="GPL-2.0-or-later"
build() {
mkdir -p "$builddir"
# Replace <<INITRAMFS_PKG_VERSION>> with the actual version
sed "s|<<INITRAMFS_PKG_VERSION>>|$pkgver-r$pkgrel|" \
"$srcdir/init.sh" > "$builddir/init.sh"
}
package() {
install -Dm644 "$srcdir/unudhcpd.conf" \
"$pkgdir/etc/unudhcpd.conf"
install -Dm644 "$srcdir/init_functions.sh" \
"$pkgdir/usr/share/initramfs/init_functions.sh"
install -Dm755 "$builddir/init.sh" \
"$pkgdir/usr/share/initramfs/init.sh"
install -Dm644 "$srcdir"/00-initramfs-base.dirs \
-t "$pkgdir"/usr/share/mkinitfs/dirs/
mkdir -p "$pkgdir"/etc/mkinitfs/dirs
install -Dm644 "$srcdir"/00-default.modules \
-t "$pkgdir"/usr/share/mkinitfs/modules/
mkdir -p "$pkgdir"/etc/mkinitfs/modules
install -Dm644 "$srcdir"/00-initramfs-base.files \
-t "$pkgdir"/usr/share/mkinitfs/files/
mkdir -p "$pkgdir"/etc/mkinitfs/files
install -Dm644 "$srcdir"/00-initramfs-extra-base.files \
-t "$pkgdir"/usr/share/mkinitfs/files-extra/
mkdir -p "$pkgdir"/etc/mkinitfs/files-extra
install -Dm644 "$srcdir"/mdev.conf \
-t "$pkgdir"/usr/share/initramfs/
mkdir -p "$pkgdir"/usr/share/mkinitfs/hooks
mkdir -p "$pkgdir"/usr/share/mkinitfs/hooks-extra
mkdir -p "$pkgdir"/etc/mkinitfs/hooks
mkdir -p "$pkgdir"/etc/mkinitfs/hooks-extra
}
sha512sums="
59be0649ed87a72d93624bd8a2e3f8c99a0f32f7b7a26f99436de782beba55671472c269eeee86440efc87e0d7148a0bb335fa537791092e73878ca21330544a 00-default.modules
9c0e8f6f61d5da191e03a1aa9d5d0ceb5baf1eae6dbb9bfb0af59817783525119ac8394b135f303f7b6434a3eab0b49185fb90379e06823db847a4999c75ce33 00-initramfs-base.dirs
ab41b45b0613f25a61114ed8c8b92bc53c60838f6e2e0ba18c76e5369b2984e6023a0661887692673aca3f647f268c468a468f6b1ac424cfee609017a89481dd 00-initramfs-base.files
986a51f280876509655d91a36c9b323898c64d663cdf000dcf87eb1867c561b6c6a4c0f208bfa0b7e751459a96cd4298d48dadabd3b7a3fe7f8a4d19a726c8b6 00-initramfs-extra-base.files
102cb49a5b44282afee7808945c69e9bb9310677efeefc681d92217f0399a90fcbb37eb9ac7aed89cc27c324780298c7c2de6de2bdb89a77499faad1c312e539 init.sh
3e3cb29eabf9ee4c8dbd7ff2366aa8cea5f44b11b04df060d7841e9b8f25c85f0a2b19838b177a8b651f2b3c8b69135d36603534382c54736596d0bfa429ed87 init_functions.sh
ba3275a9af788c7c782322a22a0f144d5e50e3498ea6886486a29331f23ae89cd32d500a3635cfa7cab369afba92edc18aeca64ccbf0cd589061cce23d15b46c unudhcpd.conf
675e7d5bee39b2df7d322117f8dcaccc274d61beaf4d50ead19bbf2109446d64b1c0aa0c5b4f9846eb6c1c403418f28f6364eff4537ba41120fbfcbc484b7da7 mdev.conf
"
#!/bin/sh
# shellcheck disable=SC1091
IN_CI="false"
[ -e /hooks/10-verbose-initfs.sh ] && set -x
[ -e /hooks/05-ci.sh ] && IN_CI="true"
[ -e /etc/unudhcpd.conf ] && . /etc/unudhcpd.conf
. ./init_functions.sh
. /usr/share/misc/source_deviceinfo
[ -e /etc/os-release ] && . /etc/os-release
# provide a default for os-release's VERSION in case the file doesn't exist
VERSION="${VERSION:-unknown}"
# This is set during packaging and is used when triaging bug reports
INITRAMFS_PKG_VERSION="<<INITRAMFS_PKG_VERSION>>"
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
setup_firmware_path
if [ "$IN_CI" = "false" ]; then
# shellcheck disable=SC2154
load_modules /lib/modules/initramfs.load "libcomposite"
setup_framebuffer
show_splash "Loading..."
setup_mdev
setup_dynamic_partitions "${deviceinfo_super_partitions:=}"
mount_subpartitions
else
# loads all modules
setup_udev
fi
run_hooks /hooks
if [ "$IN_CI" = "true" ]; then
echo "PMOS: CI tests done, disabling console and looping forever"
dmesg -n 1
fail_halt_boot
fi
# 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_unudhcpd
wait_boot_partition
mount_boot_partition /boot
extract_initramfs_extra /boot/initramfs-extra
setup_udev
run_hooks /hooks-extra
# For testing the mass storage gadget log export function. We use a flag
# file on /boot so that we can test it on all devices as modifying the
# kernel cmdline is not always possible.
if [ -e /boot/.pmos_export_logs ]; then
echo "PMOS: Exporting logs via mass storage gadget"
show_splash "Exporting boot logs..."
# Delete the flag so we don't soft-brick the device by always booting
# to the log export mode.
mount -o remount,rw /boot
rm -f /boot/.pmos_export_logs
fail_halt_boot
fi
wait_root_partition
delete_old_install_partition
resize_root_partition
unlock_root_partition
resize_root_filesystem
mount_root_partition
# 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"
init="/sbin/init"
setup_bootchart2
# Switch root
run_hooks /hooks-cleanup
killall mdev udevd 2>/dev/null
# shellcheck disable=SC2093
exec switch_root /sysroot "$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>"
fail_halt_boot
This diff is collapsed.
#
# This is an mdev config for the postmarketOS initramfs
#
# Devices:
# Syntax: %s %d:%d %s
# devices user:group mode
$MODALIAS=.* 0:0 0660 @modprobe -q -b "$MODALIAS"
# null does already exist; therefore ownership has to be changed with command
null 0:0 0666 @chmod 666 $MDEV
zero 0:0 0666
full 0:0 0666
random 0:0 0666
urandom 0:0 0444
hwrandom 0:0 0660
console 0:0 0600
kmem 0:0 0640
mem 0:0 0640
# Set up /dev/disk/by-* symlinks
dasd.* 0:0 0660 */lib/mdev/persistent-storage
mmcblk.* 0:0 0660 */lib/mdev/persistent-storage
nbd.* 0:0 0660 */lib/mdev/persistent-storage
nvme.* 0:0 0660 */lib/mdev/persistent-storage
sd[a-z].* 0:0 0660 */lib/mdev/persistent-storage
sr[0-9]+ 0:0 0660 */lib/mdev/persistent-storage
vd[a-z].* 0:0 0660 */lib/mdev/persistent-storage
xvd[a-z].* 0:0 0660 */lib/mdev/persistent-storage
# This configuration file is used by the initramfs to run unudhcpd.
# It is *not* used directly by unudhcpd!
# Note: The initramfs must be recreated by running the 'mkinitfs' command
# for changes here to be applied/used during boot.
unudhcpd_host_ip=172.16.42.1
unudhcpd_client_ip=172.16.42.2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment