main/devicepkg-dev: automatically package modules into initramfs (MR 4193)

To simplify the future removal of deviceinfo_modules_initfs
This commit is contained in:
Pablo Correa Gómez 2023-06-09 20:55:52 +02:00 committed by Clayton Craft
parent 53ea67b177
commit 65be0d7e81
No known key found for this signature in database
GPG key ID: 4A4CED6D7EDF950A
3 changed files with 14 additions and 4 deletions

View file

@ -23,6 +23,11 @@ install -Dm644 "$srcdir/deviceinfo" \
# Get the kernel type ("downstream", "mainline")
kernel=$(echo "$subpkgname" | sed -n "s/.*-kernel-\(.*\)/\1/p" | tr - _)
if [ -f "$srcdir/modules.$kernel" ]; then
install -Dm644 "$srcdir/modules.$kernel" \
"$subpkgdir/usr/share/mkinitfs/modules/00-$pkgname.modules"
fi
# Iterate over deviceinfo variables that have the kernel type as suffix
# var looks like: deviceinfo_kernel_cmdline, ...
grep -E "(.+)_$kernel=.*" "$subpkgdir/etc/deviceinfo" | \