Install kernels modules that go into initramfs with a file instead of a deviceinfo variable
As agreed in #1836 (comment 1293968974)
Initially, I thought this was a good idea, but know implementing it I'm not that sure. There are two things I don't like or I'm not sure how to solve:
-
Packages with different modules for mainline and downstream/edge. It's quite ugly to have 00-pkg.modules_mainline and 00-pkg.modules_downstream, although I guess technically it's not a big deal.Suggestion is to usemodules
ormodules.downstream
andmodules.mainline
files. -
Before, initial porting could be done in a single file. Now, it would not be strange if it needs 2. I've never ported a device, so I'm not sure how big is this one, but it felt bad to me. Please people with experience chime inEverybody seems to agree this is fine!😄
Relates #1836 (closed)
This was done automatically with this script I have bumped the pkgrel instead of the pkgver because it can be done automatically. We don't have a strict policy of pkgvers, and I don't want to have to deal with bumping them, since I did not find a way to do it automatically. If anybody knows, I'm happy to fix that. The same goes on how to substitute "source" adding the new source file in a beautiful way. I know the substitution now sucks, but again, doing this manually is madness.
TODO:
-
Also do the transformation for packages with different variations, like deviceinfo_modules_initfs_mainline
-
Test -
Add CI to make sure it's not re-introduced -
Fix initramfs to not use deviceinfo_modules_initfs
(!4193 (merged)) -
Check for other instances of the variable in other projects: -
Use just modules
as filename -
Create modules
file by default in pmbootstrap with some comment explaining its use: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/patches/42854
After merge:
-
Update deviceinfo reference -
Update porting guide?Didn't find anything in the porting guide, but maybe should add some reference in https://wiki.postmarketos.org/wiki/Device_specific_package - Tag a new mkinitfs release with https://gitlab.com/postmarketOS/postmarketos-mkinitfs/-/merge_requests/38 (doesn't need to be done right now)
EDIT: new script version modules_initfs_fix