fix: podman cross platform - binfmt

This commit is contained in:
Ryan Yin
2025-09-24 11:42:12 +08:00
parent 16c8b893d3
commit e3a33fdf03
4 changed files with 12 additions and 5 deletions

View File

@@ -28,6 +28,10 @@ in
"x86_64-linux" "x86_64-linux"
"riscv64-linux" "riscv64-linux"
]; ];
# This enables the kernel to preload the emulator binaries when the binfmt registrations are added,
# obviating the need to make the emulator binaries available inside chroots and chroot-like sandboxes.
boot.binfmt.preferStaticEmulators = true; # required to work with podman
# supported file systems, so we can mount any removable disks with these filesystems # supported file systems, so we can mount any removable disks with these filesystems
boot.supportedFilesystems = lib.mkForce [ boot.supportedFilesystems = lib.mkForce [
"ext4" "ext4"

View File

@@ -43,6 +43,10 @@
"aarch64-linux" "aarch64-linux"
"riscv64-linux" "riscv64-linux"
]; ];
# This enables the kernel to preload the emulator binaries when the binfmt registrations are added,
# obviating the need to make the emulator binaries available inside chroots and chroot-like sandboxes.
boot.binfmt.preferStaticEmulators = true; # required to work with podman
# supported file systems, so we can mount any removable disks with these filesystems # supported file systems, so we can mount any removable disks with these filesystems
boot.supportedFilesystems = [ boot.supportedFilesystems = [
"ext4" "ext4"

View File

@@ -22,6 +22,10 @@ in {
"aarch64-linux" "aarch64-linux"
"riscv64-linux" "riscv64-linux"
]; ];
# This enables the kernel to preload the emulator binaries when the binfmt registrations are added,
# obviating the need to make the emulator binaries available inside chroots and chroot-like sandboxes.
boot.binfmt.preferStaticEmulators = true; # required to work with podman
# supported file systems, so we can mount any removable disks with these filesystems # supported file systems, so we can mount any removable disks with these filesystems
boot.supportedFilesystems = [ boot.supportedFilesystems = [
"ext4" "ext4"

View File

@@ -33,11 +33,6 @@
]; ];
boot.extraModprobeConfig = "options kvm_amd nested=1"; # for amd cpu boot.extraModprobeConfig = "options kvm_amd nested=1"; # for amd cpu
# Enable binfmt emulation of aarch64-linux, this is required for cross compilation.
boot.binfmt.emulatedSystems = [
"aarch64-linux"
"riscv64-linux"
];
# supported file systems, so we can mount any removable disks with these filesystems # supported file systems, so we can mount any removable disks with these filesystems
boot.supportedFilesystems = [ boot.supportedFilesystems = [
"ext4" "ext4"