Skip to content

Commit

Permalink
update dependencies and remove some old patches
Browse files Browse the repository at this point in the history
  • Loading branch information
tpwrules committed Aug 6, 2022
1 parent 8b54e3b commit cd203ea
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 43 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
10 changes: 5 additions & 5 deletions docs/uefi-standalone.md
Original file line number Diff line number Diff line change
@@ -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/).
Expand Down
15 changes: 4 additions & 11 deletions nix/m1-support/kernel/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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)
13 changes: 0 additions & 13 deletions nix/m1-support/kernel/randstruct-provide-seed-5.19.patch

This file was deleted.

10 changes: 4 additions & 6 deletions nix/m1-support/m1n1/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}";
Expand Down Expand Up @@ -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
'';
Expand Down
8 changes: 4 additions & 4 deletions nix/m1-support/u-boot/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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" ];
Expand Down
6 changes: 3 additions & 3 deletions nix/pins.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit cd203ea

Please sign in to comment.