![Caleb Connolly](/assets/img/avatar_default.png)
This incorprates the debug-shell functionality directly into the initramfs, so it's no longer necessary to build and boot a custom initramfs in order to debug your device. Additionally, the behaviour of the debug-shell is entirely reworked, It now creates an ACM serial gadget which can be accessed via any normal terminal emulator (picocom, minicom, etc; or PuTTY on windows). Rather than just invoking sh, the debug-shell now creates a respawning getty on both the new virtual console and the active console (this will either be the UART console or tty0/1). It is necessary to spawn these shells via getty since the logging rework means we can no longer assume that stdin/out/err reference a TTY. In addition to the above, it is now possible to trigger a log dump by holding volume up during boot. This can be useful for helping users debug their devices if the issue doesn't result in a failure that can be detected in the initramfs. With these changes, the console-shell and debug-shell hook packages are reduced to only adding the additional tools/features. console-shell is still required for fbkeyboard, and debug-shell for the setup_usb_storage tool. Co-Developed-by: Clayton Craft <craftyguy@postmarketos.org> Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
99 lines
3.2 KiB
Text
99 lines
3.2 KiB
Text
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
|
|
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
|
|
pkgname=postmarketos-initramfs
|
|
pkgver=3.0.0
|
|
pkgrel=0
|
|
pkgdesc="Base files for the postmarketOS initramfs / initramfs-extra"
|
|
url="https://postmarketos.org"
|
|
options="!check" # no tests
|
|
provides="postmarketos-ramdisk"
|
|
provider_priority=10
|
|
depends="
|
|
blkid
|
|
btrfs-progs
|
|
busybox-extras
|
|
bzip2
|
|
cryptsetup
|
|
device-mapper
|
|
devicepkg-utils>=0.2.0
|
|
e2fsprogs
|
|
e2fsprogs-extra
|
|
f2fs-tools
|
|
iskey
|
|
lz4
|
|
mdevd
|
|
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
|
|
0fed7dfdf940f5de15ca2fa636214d44ee8549afe5001b81beb0e337e865eb737916e158bc0ed7a7803adc81176386ae8edfc21150de62bb136fdfcdcb888b8b 00-initramfs-base.files
|
|
8a4adad3785af474b36a09a05f6a3b2c4b4f43aac331a53b903abfa51ea12be1e3d1d807b7a6e66a1346815f3b0044daf8cd62e21e2dc75d2db13ee265a72985 00-initramfs-extra-base.files
|
|
a993c8d3dadf54c7ef942c726f8e238194cf7ad8f9d8d1c43991f1ac9d5f4ec57a72f8005b122ee06bcf5b6fdf22a635cdb234aee2173d073196f7a6f7788ffe init.sh
|
|
817c58403af779401932758d70a7c84d6d76a457b60327c1913e1758b66e6dbb19c4fcea8f0d4268e07f86f1b041e8fba47f9b01543c732c84d7c13cca1ff622 init_functions.sh
|
|
ba3275a9af788c7c782322a22a0f144d5e50e3498ea6886486a29331f23ae89cd32d500a3635cfa7cab369afba92edc18aeca64ccbf0cd589061cce23d15b46c unudhcpd.conf
|
|
675e7d5bee39b2df7d322117f8dcaccc274d61beaf4d50ead19bbf2109446d64b1c0aa0c5b4f9846eb6c1c403418f28f6364eff4537ba41120fbfcbc484b7da7 mdev.conf
|
|
"
|