mkinitfs: allow hooks to add modules
- Apr 11, 2020
-
-
Oliver Smith authored
Read kernel module names from files in /etc/postmarketos-mkinitfs/modules and print out which modules are required by which of these files as the initramfs gets generated. Put the default modules into a new 00-default.modules. This allows mkinitfs hooks to add modules to the initramfs. Parse the modules from a file similar to modules-load.d, with commented lines and empty lines ignored. Add a simple test script for that and run it in check().
-
Oliver Smith authored
Split mkinitfs.sh into two files, so the functions (now in mkinitfs_functions.sh) can be sourced in a test. Such a test will be added in the next commit. Move $BINARIES_EXTRA into the get_binaries_extra() function, so its $(find...) does not get executed when sourcing the functions file. Move $BINARIES into get_binaries() too for consistency.
-
Oliver Smith authored
Make it pass shellcheck by fixing obvious mistakes like '==' instead of '='. Add "shellcheck disable" lines for things that are intentionally done or would be a bit more complicated to rewrite. It would be nice to refactor some things like '${outfile/initramfs-/uImage-}', but this should be done in a separate change (patches welcome). Remove unused variable "modules_path". While at it, add two new fatal error messages instead of just "exit 1" without any comment and remove redundant mkdir in APKBUILD.
-