Skip to content

Commit

Permalink
init: allow force loading of extra modules via the kernel command-line
Browse files Browse the repository at this point in the history
  • Loading branch information
nmeum committed Sep 26, 2022
1 parent cb1e997 commit 4a31eb7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/manpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ Some parts of booster boot functionality can be modified with kernel boot parame
If debug level is enabled then kmsg throttling gets disabled automatically.
* `booster.debug` an obsolete option that is equivalent to `booster.log=debug,console`.
* `quiet` Set booster init verbosity to minimum. This option is ignored if `booster.debug` or `booster.log` is set.
* `modules` a comma-separated list of extra kernel modules which should be force loaded.
* `init=$PATH` path to user-space init binary. If not specified then default value `/sbin/init` is used.

## NOTES
Expand Down
6 changes: 6 additions & 0 deletions init/cmdline.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,13 @@ func parseParams(params string) error {
if err != nil {
return fmt.Errorf("root=%s: %v", value, err)
}
case "modules":
if (value == "") {
break
}

modules := strings.Split(value, ",")
config.ModulesForceLoad = append(config.ModulesForceLoad, modules...)
case "resume":
var err error
cmdResume, err = parseDeviceRef(value)
Expand Down

0 comments on commit 4a31eb7

Please sign in to comment.