diff --git a/pkgs/bundle-image/builder.sh b/pkgs/bundle-image/builder.sh index 1e816416..ebed7b05 100644 --- a/pkgs/bundle-image/builder.sh +++ b/pkgs/bundle-image/builder.sh @@ -33,7 +33,7 @@ cp "${env["upgrade-maps"]}/recommend-upgrade.json" $root/etc/nixmodules/recommen cp "${env["active-modules"]}" $root/etc/nixmodules/active-modules.json cp -a --reflink=auto "${env[registry]}" "$root/etc/nixmodules/modules.json" -diskImage=disk.raw +diskImage=$out/disk.raw # Compute required space in filesystem blocks diskUsage=$(find . ! -type d -print0 | du --files0-from=- --apparent-size --block-size "${env[blockSize]}" | cut -f1 | sum_lines) @@ -69,8 +69,6 @@ echo "copying to image..." cptofs -p \ -t ext4 \ -i "$diskImage" \ + --owner 11000 --group 11000 \ "$root"/* / || (echo >&2 "ERROR: cptofs failed. diskSize might be too small for closure."; exit 1) - -echo "moving image to out..." -mv "$diskImage" "$out/disk.raw" diff --git a/pkgs/bundle-image/default.nix b/pkgs/bundle-image/default.nix index a2347e94..81f3270b 100644 --- a/pkgs/bundle-image/default.nix +++ b/pkgs/bundle-image/default.nix @@ -11,15 +11,21 @@ , jq , upgrade-maps , active-modules -, +, fetchFromGitHub }: let - label = "nixmodules-${revstring}"; - registry = ../../modules.json; - + # wating for upstream to include our patch: https://github.com/lkl/linux/pull/532 and https://github.com/lkl/linux/pull/534 + lkl' = lkl.overrideAttrs (oldAttrs: { + src = fetchFromGitHub { + owner = "numtide"; + repo = "linux-lkl"; + rev = "2cbcbd26044f72e47740588cfa21bf0e7b698262"; + sha256 = "sha256-i7uc69bF84kkS7MahpgJ2EnWZLNah+Ees2oRGMzIee0="; + }; + }); in derivation { @@ -34,7 +40,7 @@ derivation { PATH = lib.makeBinPath [ coreutils findutils - lkl + lkl' e2fsprogs jq ];