Merge pull request #5127 from Alex-Carter01/depmod-rootfs

CC use depmod in rootfs builder for kernel modules with docker support
This commit is contained in:
Wainer Moschetta
2022-09-19 09:33:33 -03:00
committed by GitHub
3 changed files with 6 additions and 3 deletions

View File

@@ -273,6 +273,8 @@ copy_kernel_modules()
info "Copy kernel modules from ${KERNEL_MODULES_DIR}"
mkdir -p "${dest_dir}"
cp -a "${KERNEL_MODULES_DIR}" "${dest_dir}/"
local KERNEL_VER=$(ls ${dest_dir})
depmod -b "${rootfs_dir}" ${KERNEL_VER}
OK "Kernel modules copied"
}

View File

@@ -40,7 +40,8 @@ RUN apt-get update && \
pkg-config \
protobuf-compiler \
gettext-base \
umoci
umoci \
kmod
# aarch64 requires this name -- link for all
RUN ln -s /usr/bin/musl-gcc "/usr/bin/$(uname -m)-linux-musl-gcc"

View File

@@ -5,11 +5,11 @@
OS_NAME=ubuntu
# This should be Ubuntu's code name, e.g. "focal" (Focal Fossa) for 20.04
OS_VERSION=${OS_VERSION:-focal}
PACKAGES="chrony iptables"
PACKAGES="chrony iptables kmod"
[ "$AGENT_INIT" = no ] && PACKAGES+=" init"
[ "$KATA_BUILD_CC" = yes ] && PACKAGES+=" cryptsetup-bin e2fsprogs"
[ "$SECCOMP" = yes ] && PACKAGES+=" libseccomp2"
[ "$SKOPEO" = yes ] && PACKAGES+=" libgpgme11"
[ "$SKOPEO" = yes ] && PACKAGES+=" libgpgme11 libdevmapper1.02.1"
REPO_URL=http://ports.ubuntu.com
case "$ARCH" in