Skip to content

Commit

Permalink
fix: support kernel userspace module loading
Browse files Browse the repository at this point in the history
Fixes: #7114

Add the `modprobe` binary so that drivers that loads other
drivers using userspace `modprobe` works.

Eg: https://github.com/torvalds/linux/blob/v6.1/drivers/net/ethernet/mellanox/mlx4/main.c#L1094

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed Apr 25, 2023
1 parent 103f0ff commit e296a56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ COPY --from=pkg-util-linux-amd64 /lib/libblkid.* /rootfs/lib/
COPY --from=pkg-util-linux-amd64 /lib/libuuid.* /rootfs/lib/
COPY --from=pkg-util-linux-amd64 /lib/libmount.* /rootfs/lib/
COPY --from=pkg-kmod-amd64 /usr/lib/libkmod.* /rootfs/lib/
COPY --from=pkg-kmod-amd64 /usr/bin/kmod /rootfs/sbin/modprobe
COPY --from=pkg-kernel-amd64 /lib/modules /rootfs/lib/modules
COPY --from=machined-build-amd64 /machined /rootfs/sbin/init
# the orderly_poweroff call by the kernel will call '/sbin/poweroff'
Expand Down Expand Up @@ -529,6 +530,7 @@ COPY --from=pkg-util-linux-arm64 /lib/libblkid.* /rootfs/lib/
COPY --from=pkg-util-linux-arm64 /lib/libuuid.* /rootfs/lib/
COPY --from=pkg-util-linux-arm64 /lib/libmount.* /rootfs/lib/
COPY --from=pkg-kmod-arm64 /usr/lib/libkmod.* /rootfs/lib/
COPY --from=pkg-kmod-arm64 /usr/bin/kmod /rootfs/sbin/modprobe
COPY --from=pkg-kernel-arm64 /lib/modules /rootfs/lib/modules
COPY --from=machined-build-arm64 /machined /rootfs/sbin/init
# the orderly_poweroff call by the kernel will call '/sbin/poweroff'
Expand Down

0 comments on commit e296a56

Please sign in to comment.