Skip to content

Commit

Permalink
kata.kata-kernel-uvm: enable dm-init
Browse files Browse the repository at this point in the history
We use this kernel module with `dm-mod.create="dm-verit...` to protect
the image file.
  • Loading branch information
Freax13 committed Aug 2, 2024
1 parent b262921 commit 1bc322d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/by-name/kata/kata-kernel-uvm/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ let
hash = "sha256-SY75Ond2WLkY17Zal22GXgNKB3L1LGIyLKv8H/M0Wbw=";
};

# We don't use an initrd.
postPatch = ''
config=$(find . -regex '.*/config-[0-9.-]+-confidential')
# 1. We don't use an initrd.
# 2. Enable dm-init, so that we can use `dm-mod.create`.
substituteInPlace $config \
--replace-fail 'CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"' 'CONFIG_INITRAMFS_SOURCE=""'
--replace-fail 'CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz"' 'CONFIG_INITRAMFS_SOURCE=""' \
--replace-fail '# CONFIG_DM_INIT is not set' 'CONFIG_DM_INIT=y'
'';

dontBuild = true;
Expand Down

0 comments on commit 1bc322d

Please sign in to comment.