cmd/mkinitfs: allow installing modules in the initramfs-extra archive (MR 32)

fixes: https://gitlab.com/postmarketOS/postmarketos-mkinitfs/-/issues/20
This commit is contained in:
Clayton Craft
2023-02-24 09:01:43 -08:00
parent 4074eada55
commit 790cf47060
2 changed files with 5 additions and 3 deletions

View File

@@ -111,6 +111,8 @@ func main() {
hookfiles.New("/etc/mkinitfs/files-extra"), hookfiles.New("/etc/mkinitfs/files-extra"),
hookscripts.New("/usr/share/mkinitfs/hooks-extra"), hookscripts.New("/usr/share/mkinitfs/hooks-extra"),
hookscripts.New("/etc/mkinitfs/hooks-extra"), hookscripts.New("/etc/mkinitfs/hooks-extra"),
modules.New([]string{}, "/usr/share/mkinitfs/modules-extra"),
modules.New([]string{}, "/etc/mkinitfs/modules-extra"),
osksdl.New(devinfo.MesaDriver), osksdl.New(devinfo.MesaDriver),
}); err != nil { }); err != nil {
log.Println(err) log.Println(err)

View File

@@ -97,11 +97,11 @@ create/manage. mkinitfs reads configuration from */usr/share/mkinitfs* first, an
under */hooks-extra* for the initramfs-extra. under */hooks-extra* for the initramfs-extra.
## /usr/share/mkinitfs/modules, /etc/mkinitfs/modules ## /usr/share/mkinitfs/modules, /etc/mkinitfs/modules
## /usr/share/mkinitfs/modules-extra, /etc/mkinitfs/modules-extra
Files with the *.modules* extention in these directories are lists of Files with the *.modules* extention in these directories are lists of
kernel modules to include in the initramfs. No modules are placed in kernel modules to include in the initramfs. Individual modules and
the initramfs-extra archive. Individual modules and directories can be directories can be listed in the files here. Globbing is also supported.
listed in the files here. Globbing is also supported.
Modules are installed in the initramfs archive under the same path they Modules are installed in the initramfs archive under the same path they
exist on the system where mkinitfs is executed. exist on the system where mkinitfs is executed.