Compare commits

..

1 commit

Author SHA1 Message Date
ca644734f0
chore: add dbus-broker 2025-02-20 22:27:57 +01:00
2 changed files with 18 additions and 11 deletions

View file

@ -21,9 +21,9 @@
packages = {
default = self.packages.${system}.image;
image = pkgs.writeShellScriptBin "image" ''
set -ex
echo "make UKI..."
echo ${self.packages.${system}.kernel.kernel}/bzImage
mkdir -p patos/efi/boot
${self.packages.${system}.systemd.out}/usr/bin/ukify build \
--linux ${self.packages.${system}.kernel.kernel}/bzImage \

View file

@ -16,15 +16,15 @@ pkgs.writeShellApplication {
in
''
set -ex
# state="/tmp/patos-qemu-$USER"
# rm -rf "$state"
# mkdir -m 700 "$state"
# qemu-img create -f qcow2 -F raw -b "$(readlink -e "$1")" "$state/disk.qcow2" 10G
#
# swtpm socket -d --tpmstate dir="$state" \
# --ctrl type=unixio,path="$state/swtpm-sock" \
# --tpm2 \
# --log level=20
state="/tmp/patos-qemu-$USER"
rm -rf "$state"
mkdir -m 700 "$state"
truncate -s 1G "$state/disk.raw"
swtpm socket -d --tpmstate dir="$state" \
--ctrl type=unixio,path="$state/swtpm-sock" \
--tpm2 \
--log level=20
qemu-system-x86_64 \
-enable-kvm \
@ -34,10 +34,17 @@ pkgs.writeShellApplication {
-m 4G \
-display none \
-nographic \
-chardev "stdio,id=char0,mux=on,logfile=$state/console.log,signal=off" \
-serial chardev:char0 \
-mon chardev=char0 \
-drive "if=pflash,format=raw,unit=0,readonly=on,file=${tpmOVMF.firmware}" \
-drive "if=pflash,format=raw,unit=1,readonly=on,file=${tpmOVMF.variables}" \
-chardev socket,id=chrtpm,path="$state/swtpm-sock" \
-tpmdev emulator,id=tpm0,chardev=chrtpm \
-device tpm-tis,tpmdev=tpm0 \
-netdev id=net00,type=user,hostfwd=tcp::2222-:22 \
-device virtio-net-pci,netdev=net00 \
-drive file=fat:rw:patos/,format=raw
-drive "file=fat:rw:patos/,format=raw" \
-drive "format=raw,file=$state/disk.raw"
'';
}