busybox modprobe only loads modules listed in a single modules.dep line before attempting to load a module, it doesn't recurse indirect dependencies of kernel modules.
Therefore, currently, trying to boot an Ubuntu kernel results in the following:
[ 1.446410] Run /init as init process
modprobe: module virtio_pci not found in modules.dep
modprobe: module virtio_console not found in modules.dep
[ 1.493994] 9pnet: Installing 9P2000 support
[ 1.503597] fscache: Unknown symbol netfs_stats_show (err -2)
[ 1.519624] fscache: Unknown symbol netfs_stats_show (err -2)
modprobe: can't load module fscache (/lib/modules/5.15.0-73-generic/kernel/fs/fscache/fscache.ko): unknown symbol in module, or unknown parameter
mount: mounting usr on /usr failed: No such device
The module dependency tree is as follows: 9p -> fscache -> netfs.
The modules.dep file generated by fakemachine is as such (9p only depending on fscache and 9pnet):
busybox modprobe
only loads modules listed in a singlemodules.dep
line before attempting to load a module, it doesn't recurse indirect dependencies of kernel modules.See: https://github.com/mirror/busybox/blob/1dd2685dcc735496d7adde87ac60b9434ed4a04c/modutils/modprobe.c#L46-L49
Therefore, currently, trying to boot an Ubuntu kernel results in the following:
The module dependency tree is as follows:
9p -> fscache -> netfs
.The
modules.dep
file generated byfakemachine
is as such (9p only depending onfscache
and9pnet
):Therefore, when
busybox modprobe
tries to load9p
, it doesn't loadnetfs
first, despite it being an indirect dependency.In fact, the
modules.dep
file for this kernel from Ubuntu has the following (we can seenetfs
specified as a dependency of9p
directly):The
modules.dep
file should be generated such that it includes all dependencies for each module (including indirect dependencies).PR incoming.