Skip to content
Snippets Groups Projects

mkinitfs: allow hooks to add modules

Merged Imported Administrator requested to merge mkinitfs-hook-modules into master
  1. Apr 11, 2020
    • Oliver Smith's avatar
      main/postmarketos-mkinitfs: modules from files (!1123) · 23c58a68
      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().
      Unverified
      23c58a68
    • Oliver Smith's avatar
      main/postmarketos-mkinitfs: split mkinitfs funcs (!1123) · 3e760460
      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.
      Unverified
      3e760460
    • Oliver Smith's avatar
      main/postmarketos-mkinitfs: pass shellcheck (!1123) · 74f42ebe
      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.
      Unverified
      74f42ebe
Loading