2a0fab1a77
Before this change the script assumed that the device has only one UDC. However it is possible for a device to have multiple UDCs, in which case the deviceinfo is the appropriate place to specify which one should be used. This change adds an optional deviceinfo variable `deviceinfo_usb_network_udc` to specify the UDC that should be used. Also, before this change the script assumed the USB network interface name is "usb0". But other gadget drivers like `g_cdc` can claim USB interfaces before the initramfs script gets around to creating one for USB networking, so the interface might be "usb1" or something else. The configfs gadget itself can provide the actual interface name, so this change makes the script use that.
94 lines
3.2 KiB
Text
94 lines
3.2 KiB
Text
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
|
|
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
|
|
pkgname=postmarketos-initramfs
|
|
pkgver=2.5.0
|
|
pkgrel=0
|
|
pkgdesc="Base files for the postmarketOS initramfs / initramfs-extra"
|
|
url="https://postmarketos.org"
|
|
options="!check" # no tests
|
|
depends="
|
|
blkid
|
|
btrfs-progs
|
|
busybox-extras
|
|
bzip2
|
|
cryptsetup
|
|
device-mapper
|
|
devicepkg-utils>=0.2.0
|
|
e2fsprogs
|
|
e2fsprogs-extra
|
|
f2fs-tools
|
|
lz4
|
|
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="
|
|
0f8e57dd6e5169ffc3579d85ee64447d0f89b727db05bd72d31457fd40268aad672ce650b860c3a9e25be4b0705d49101e1df7346b08bd477b6b285710a4b7d1 00-default.modules
|
|
5b364300f31c91fd0591eb0715f67cbf5383f45246a5fb9f34b79f7cb2e3b15768b2130e5f32f816cc169950f988c1beabc879ba31645c58ce131a288dbc071d 00-initramfs-base.dirs
|
|
ab41b45b0613f25a61114ed8c8b92bc53c60838f6e2e0ba18c76e5369b2984e6023a0661887692673aca3f647f268c468a468f6b1ac424cfee609017a89481dd 00-initramfs-base.files
|
|
8a4adad3785af474b36a09a05f6a3b2c4b4f43aac331a53b903abfa51ea12be1e3d1d807b7a6e66a1346815f3b0044daf8cd62e21e2dc75d2db13ee265a72985 00-initramfs-extra-base.files
|
|
4bfcb41b2d5ccd577a6203a9479e5bdf056064d20f02f9120f1a074c7c280c0231cf380ed6be7c80733ed4ae101385c14f123a8a41780bbb7d0851387cd9c613 init.sh
|
|
87602909fa9f233385528e41e5395cce076a4d22df858b56b333457815c6978f1b9ca918f0c9ec56f4424ed6c2624d0c6054eaf6e687d60175952cc35c010098 init_functions.sh
|
|
ba3275a9af788c7c782322a22a0f144d5e50e3498ea6886486a29331f23ae89cd32d500a3635cfa7cab369afba92edc18aeca64ccbf0cd589061cce23d15b46c unudhcpd.conf
|
|
675e7d5bee39b2df7d322117f8dcaccc274d61beaf4d50ead19bbf2109446d64b1c0aa0c5b4f9846eb6c1c403418f28f6364eff4537ba41120fbfcbc484b7da7 mdev.conf
|
|
"
|