mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-05-04 12:31:27 +00:00
kernel: Build combined kata-modules-all.img
In addition to per-set module images (kata-modules-mlx5.img, kata-modules-ntfs.img), build a combined image containing all module sets. This reduces the number of virtio-blk devices and dm-mod.create kernel command line entries needed when a user wants all available modules. Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
This commit is contained in:
@@ -660,6 +660,12 @@ build_modules_images() {
|
||||
[[ -d "${modules_tree}/kernel" ]] || die "No modules installed at ${modules_tree}/kernel"
|
||||
info "Modules installed at ${modules_tree}"
|
||||
|
||||
local combined_staging
|
||||
combined_staging=$(mktemp -d)
|
||||
local combined_modules="${combined_staging}/lib/modules/${mod_version}"
|
||||
mkdir -p "${combined_modules}/kernel"
|
||||
local has_any_modules="false"
|
||||
|
||||
for name in "${!module_sets[@]}"; do
|
||||
local paths="${module_sets[${name}]}"
|
||||
local staging
|
||||
@@ -675,6 +681,10 @@ build_modules_images() {
|
||||
mkdir -p "$(dirname "${dst}")"
|
||||
cp -a "${src}" "${dst}"
|
||||
has_modules="true"
|
||||
|
||||
local combined_dst="${combined_modules}/kernel/${subpath}"
|
||||
mkdir -p "$(dirname "${combined_dst}")"
|
||||
cp -a "${src}" "${combined_dst}"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -683,6 +693,7 @@ build_modules_images() {
|
||||
rm -rf "${staging}"
|
||||
continue
|
||||
fi
|
||||
has_any_modules="true"
|
||||
|
||||
for f in modules.order modules.builtin; do
|
||||
[[ -f "${modules_tree}/${f}" ]] && cp "${modules_tree}/${f}" "${staging_modules}/"
|
||||
|
||||
Reference in New Issue
Block a user