pmaports-a71/main/postmarketos-initramfs/APKBUILD
Caleb Connolly cb8414a20d
postmarketos-initramfs: unify with minimal initramfs (MR 5636)
We previously forked the initramfs into a minimal variant for highly
space constrained devices, to allow the normal variant to gain
additional functionality like the debug-shell (With OSK). Initially the
hope was that only a handful of devices would need the minimal variant,
but in practise this has not been the case.

Trying to maintain two diverging forks of the initramfs is absoutely
unsustainable and (to be frank) a bit silly.

Based on discussion with craftyguy and newbyte, let's re-architect the
initramfs to run in two stages, with the second stage being part of
initramfs-extra. By itself this doesn't make a lot of sense, since
requiring the boot partition be mounted for the debug-shell to be useful
is a major downgrade.

However this can be used in tandem with pending support for a new
deviceinfo_create_initfs_extra variable, this is default false in
mkinitfs which finally gets rid of initramfs-extra entirely for devices
that don't need it.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
2024-10-31 11:54:24 -07:00

115 lines
3.8 KiB
Plaintext

# Maintainer: Caleb Connolly <caleb@postmarketos.org>
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=postmarketos-initramfs
pkgver=3.4.0
pkgrel=0
pkgdesc="Base files for the postmarketOS initramfs / initramfs-extra"
url="https://postmarketos.org"
options="!check" # no tests
provides="postmarketos-ramdisk=$pkgver-r$pkgrel"
provider_priority=10
depends="
blkid
btrfs-progs
buffyboard
busybox-extras
bzip2
cryptsetup
device-mapper
devicepkg-utils>=0.2.0
dosfstools
e2fsprogs
e2fsprogs-extra
f2fs-tools
font-terminus
iskey
kmod
libinput-libs
lz4
multipath-tools
parted
postmarketos-fde-unlocker
postmarketos-mkinitfs>=2.2
udev
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
init_2nd.sh
init_functions_2nd.sh
mdev.conf
unudhcpd.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"/mdev.conf \
-t "$pkgdir"/usr/share/initramfs/
install -Dm644 "$srcdir/init_functions.sh" \
"$pkgdir/usr/share/initramfs/init_functions.sh"
install -Dm644 "$srcdir/init_functions_2nd.sh" \
"$pkgdir/usr/share/initramfs/init_functions_2nd.sh"
install -Dm755 "$builddir/init.sh" \
"$pkgdir/usr/share/initramfs/init.sh"
install -Dm755 "$srcdir/init_2nd.sh" \
"$pkgdir/usr/share/initramfs/init_2nd.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
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="
20bc7a21f4f59548b8179c5cb1fc2b3db64eb355988bce992db3bc4075d65b4135ff9dd7d754215d0402978811494449cce476a26cda6bb2f0f8b53ae8e36bd7 00-default.modules
9c0e8f6f61d5da191e03a1aa9d5d0ceb5baf1eae6dbb9bfb0af59817783525119ac8394b135f303f7b6434a3eab0b49185fb90379e06823db847a4999c75ce33 00-initramfs-base.dirs
c0233d22858a5901db64e1d2fe1f6d39a2e2cfd1b94a10932483f55fed9461e9b8aa2d73b154b9d99a7a8b49ee02abfbddfe917ce0c6d7576601ba2668589c01 00-initramfs-base.files
3db48f5db0e21ce2edb3192cbc8deeedf5f8d2bf2cba55cdb02ac30d5f4d6f640de06902f04eb9850ee08f7e302a750ea6fc0cb1c9118e7ec385858837680932 00-initramfs-extra-base.files
e7f18ea6f5b7a60f07d7d0605a70f8e141dad524893570fa8502049ffa6f9d093fc80563f14be0a7fd64b6de14dede2806591488d08289c5308db8c2b04fa729 init.sh
586517bf1b9c30b77342ba388f0a46beac72bb63b1f79ea6e8b62a6745991d7bdf6551d5f93f8f62eddd102adc0752cef4fd427549e2bb0dd2a9f6c2d65d11d5 init_functions.sh
379cd465a1b18168f83b67c3d0033658f565262607ac34ecf8016ddfae89b644b71f267b04aaa6dea42fec92267af486d7f5ced8e6dfe9309ff00dd4cdb981ad init_2nd.sh
d40d6472df8fd653b9fe2c8b9436fecd7dadf2f0d380c0931f97448bedb1f52c8872fe8fdb6aea45f8b52f5926ca20db97a0f2e99091422aedc1aa0a0b58bb03 init_functions_2nd.sh
675e7d5bee39b2df7d322117f8dcaccc274d61beaf4d50ead19bbf2109446d64b1c0aa0c5b4f9846eb6c1c403418f28f6364eff4537ba41120fbfcbc484b7da7 mdev.conf
ba3275a9af788c7c782322a22a0f144d5e50e3498ea6886486a29331f23ae89cd32d500a3635cfa7cab369afba92edc18aeca64ccbf0cd589061cce23d15b46c unudhcpd.conf
"