Skip to content

Commit 76d085e

Browse files
committed
fix(os): regenerate indexes after merging module stages
1 parent 76ead05 commit 76d085e

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

os/mkosi/build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ build_one() {
2727
rm -rf "$work" "$out"; mkdir -p "$stage" "$kstage" "$out"
2828
"$SELF/scripts/build-components.sh" "${component_cache_args[@]}" \
2929
"$work" "$stage" "$kstage" "$flavor"
30+
# NVIDIA and ZFS are assembled from independent cacheable stage trees.
31+
# Regenerate indexes only after every module tree has been merged.
32+
depmod -b "$kstage" "$KERNEL_VERSION-dstack"
3033
if [[ $flavor == prod ]]; then
3134
# Yocto splits module DWARF into debug packages which are not shipped in
3235
# the production image. Keep BTF and loadable ELF metadata, but do not put

os/mkosi/tests/acceptance.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ grep -q 'build-ovmf.sh' "$D/scripts/build-components.sh"
2525
grep -q 'fbe0805b2091393406952e84724188f8c1941837' "$D/scripts/build-ovmf.sh"
2626
grep -q 'AmdSev/AmdSevX64.dsc' "$D/scripts/build-ovmf.sh"
2727
grep -q 'objcopy --strip-debug' "$D/build.sh"
28+
grep -q 'depmod -b.*KERNEL_VERSION-dstack' "$D/build.sh"
2829
grep -q 'prune-rootfs.sh' "$D/build.sh"
2930
! grep -q '^[[:space:]]*ovmf$' "$D/mkosi.conf"
3031
grep -q '"firmware_sev":"files/ovmf-sev.fd"' "$D/scripts/make-release-artifacts.sh"

0 commit comments

Comments
 (0)