diff --git a/README.md b/README.md index fe1fb384..c6123eeb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ Attempts to get NixOS up on M1 Macs. -* [UEFI Boot Standalone NixOS (2022-07-21)](docs/uefi-standalone.md) +* [UEFI Boot Standalone NixOS (2022-08-05)](docs/uefi-standalone.md) ## Credits diff --git a/docs/uefi-standalone.md b/docs/uefi-standalone.md index 757e1aa9..7a8bd501 100644 --- a/docs/uefi-standalone.md +++ b/docs/uefi-standalone.md @@ -1,10 +1,10 @@ -# UEFI Boot Standalone NixOS (2022-07-21) +# UEFI Boot Standalone NixOS (2022-08-05) This guide will build and was tested with the following software: -* Asahi Linux kernel, as of 2022-07-20 (5.19.0-rc7-asahi) -* m1n1, as of 2022-07-16 (v1.1.3) -* Asahi Linux's U-Boot, as of 2022-07-11 -* Nixpkgs, as of 2022-07-21 +* Asahi Linux kernel version 5.19.0-asahi +* m1n1 version v1.1.3 +* Asahi Linux's U-Boot version 2022.07_rc100.asahi2 +* Nixpkgs, as of 2022-08-03 * macOS stub 12.3 NOTE: The latest version of this guide will always be [at its home](https://github.com/tpwrules/nixos-m1/blob/main/docs/uefi-standalone.md). For more general information about Linux on Apple Silicon Macs, refer to the [Asahi Linux project](https://asahilinux.org/) and [alpha installer release](https://asahilinux.org/2022/03/asahi-linux-alpha-release/). diff --git a/nix/m1-support/kernel/package.nix b/nix/m1-support/kernel/package.nix index 3d3bd230..9c74c735 100644 --- a/nix/m1-support/kernel/package.nix +++ b/nix/m1-support/kernel/package.nix @@ -23,15 +23,15 @@ linuxKernel.manualConfig rec { inherit stdenv lib; - version = "5.19.0-rc7-asahi"; + version = "5.19.0-asahi"; modDirVersion = version; src = fetchFromGitHub { # tracking branch: https://github.com/AsahiLinux/linux/tree/asahi owner = "AsahiLinux"; repo = "linux"; - rev = "c7d02d6615a5fb4afefd3084fce93d86e5fb184d"; - hash = "sha256-sed405+6L5U7S+Na2DNLGPNTNf3tv96LjK3CimeRjNU="; + rev = "570e5d3a0b4895c1199ecb1aeb1419d63404f087"; + hash = "sha256-Z4q1qjQsNjyWLkkfKODlKSJ4Tfza2zi2prHKoIH1bQw="; }; kernelPatches = [ @@ -56,12 +56,5 @@ extraMeta.branch = "5.19"; } // (args.argsOverride or {}); - linux_asahi = (buildPkgs.callPackage linux_asahi_pkg { }).overrideAttrs (o: { - # use 5.19 suitable randstruct seed patch - # to be removed when https://github.com/NixOS/nixpkgs/pull/180750 is - # accepted and percolates through - patches = (builtins.filter - (v: (pkgs.lib.hasInfix "randstruct" (builtins.path { path = v; })) != true) - o.patches) ++ [ ./randstruct-provide-seed-5.19.patch ]; - }); + linux_asahi = (buildPkgs.callPackage linux_asahi_pkg { }); in buildPkgs.recurseIntoAttrs (buildPkgs.linuxPackagesFor linux_asahi) diff --git a/nix/m1-support/kernel/randstruct-provide-seed-5.19.patch b/nix/m1-support/kernel/randstruct-provide-seed-5.19.patch deleted file mode 100644 index 5ca897a7..00000000 --- a/nix/m1-support/kernel/randstruct-provide-seed-5.19.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/scripts/gen-randstruct-seed.sh b/scripts/gen-randstruct-seed.sh -index 61017b36c464..7bb494dd2e18 100755 ---- a/scripts/gen-randstruct-seed.sh -+++ b/scripts/gen-randstruct-seed.sh -@@ -1,7 +1,7 @@ - #!/bin/sh - # SPDX-License-Identifier: GPL-2.0 - --SEED=$(od -A n -t x8 -N 32 /dev/urandom | tr -d ' \n') -+SEED="NIXOS_RANDSTRUCT_SEED" - echo "$SEED" > "$1" - HASH=$(echo -n "$SEED" | sha256sum | cut -d" " -f1) - echo "#define RANDSTRUCT_HASHED_SEED \"$HASH\"" > "$2" diff --git a/nix/m1-support/m1n1/default.nix b/nix/m1-support/m1n1/default.nix index f7195544..a0799901 100644 --- a/nix/m1-support/m1n1/default.nix +++ b/nix/m1-support/m1n1/default.nix @@ -26,7 +26,7 @@ in stdenv.mkDerivation rec { version = "1.1.3"; src = fetchFromGitHub { - # tracking branch: https://github.com/AsahiLinux/m1n1/tree/main + # tracking: https://github.com/AsahiLinux/PKGBUILDs/blob/main/m1n1/PKGBUILD owner = "AsahiLinux"; repo = "m1n1"; rev = "v${version}"; @@ -71,14 +71,12 @@ EOF done GCC=${pkgsCross.aarch64-multiplatform.buildPackages.gcc} - BINUTILS=${pkgsCross.aarch64-multiplatform.buildPackages.binutils} - REAL_BINUTILS=$(grep -o '/nix/store/[^ ]*binutils[^ ]*' $BINUTILS/nix-support/propagated-user-env-packages) ln -s $GCC/bin/*-gcc $out/toolchain-bin/ ln -s $GCC/bin/*-ld $out/toolchain-bin/ - ln -s $REAL_BINUTILS/bin/*-objcopy $out/toolchain-bin/ - ln -s $REAL_BINUTILS/bin/*-objdump $out/toolchain-bin/ - ln -s $REAL_BINUTILS/bin/*-nm $out/toolchain-bin/ + ln -s $GCC/bin/*-objcopy $out/toolchain-bin/ + ln -s $GCC/bin/*-objdump $out/toolchain-bin/ + ln -s $GCC/bin/*-nm $out/toolchain-bin/ '') + '' runHook postInstall ''; diff --git a/nix/m1-support/u-boot/default.nix b/nix/m1-support/u-boot/default.nix index cee49651..1638120c 100644 --- a/nix/m1-support/u-boot/default.nix +++ b/nix/m1-support/u-boot/default.nix @@ -4,13 +4,13 @@ , m1n1 }: (pkgsCross.aarch64-multiplatform.buildUBoot rec { src = fetchFromGitHub { - # tracking branch: https://github.com/AsahiLinux/u-boot/tree/releng/installer-release + # tracking: https://github.com/AsahiLinux/PKGBUILDs/blob/main/uboot-asahi/PKGBUILD owner = "AsahiLinux"; repo = "u-boot"; - rev = "300817d324f73c30c998a10435d5d830b58df894"; - hash = "sha256-6q4l1gHAlaGM7ktlCBmehb/ZNvmpt1eah6tTdsQJfxM="; + rev = "asahi-v2022.07-2"; + hash = "sha256-VOOkLQdQXnRD/SMUePPNKgHLNXWR815mQx8t3W95m5E="; }; - version = "unstable-2022-07-11"; + version = "2022.07_rc100.asahi2"; defconfig = "apple_m1_defconfig"; extraMeta.platforms = [ "aarch64-linux" ]; diff --git a/nix/pins.nix b/nix/pins.nix index 1e148490..ee4d3860 100644 --- a/nix/pins.nix +++ b/nix/pins.nix @@ -2,9 +2,9 @@ # https://hydra.nixos.org/jobset/mobile-nixos/unstable/evals # these evals have a cross-compiled stdenv available nixpkgs = fetchTarball { - name = "nixpkgs-unstable-2022-07-21"; - url = "https://github.com/NixOS/nixpkgs/archive/614a842b74b7a1497e8cfca7c61bec38f51911b3.tar.gz"; - sha256 = "sha256:0gkpnjdcrh5s4jx0i8dc6679qfkffmz4m719aarzki4jss4l5n5p"; + name = "nixpkgs-unstable-2022-08-03"; + url = "https://github.com/NixOS/nixpkgs/archive/168d1c578909dc143ba52dbed661c36e76b12b36.tar.gz"; + sha256 = "sha256:0iyasn0phr05dh4rwam2draprinh3db5dk83bg48v166v7bhq5qw"; }; rust-overlay = fetchTarball {