Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{ stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, libelf, utillinux, ... } @ args:

buildLinux (args // rec {
version = "4.14.47-139";

# modDirVersion needs to be x.y.z.
modDirVersion = "4.14.47";

# branchVersion needs to be x.y.
extraMeta.branch = "4.14";

src = fetchurl {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use fetchFromGitHub to avoid possibly nondeterministic GitHub tarballs.

Looks good otherwise.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, is nothing sacred!! I assumed GitHub's tarballs at least would be deterministic.

Will fix. Thanks for looking!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhh, sorry about this, can you help me? I've changed it to

  src = fetchFromGitHub {
    owner = "hardkernel";
    repo = "linux";
    rev = version;
    sha256 = "1nxgd29y9wmifm11pjcdpd2y293p0dgi0x5ycis55miy97n0f5zy";
  };

which, as far as I can tell, is roughly the right way to do things. (The hash is wrong, but I was going to try to build it and then fix up the hash when it complained about it.)

However, I get the result that, when I run nixos-rebuild, I get:

these derivations will be built:
  /nix/store/5jcd3rxy9xmql16vvrx8vspinibqxmn2-source.drv
  /nix/store/hq0l73vjjy7py4g7cwrbd79mzzfnqvva-linux-config-4.14.47-139.drv
  /nix/store/kxwdk2f2lks3cannzqsw1iv634c75b8f-linux-4.14.47-139.drv
  /nix/store/phx3p9afjlkr1sl3pd194m4iq9j5n3q1-kernel-modules.drv
  /nix/store/sas9zlmpw0msri87mzx9qg1x9mh4vb3w-firmware.drv
  /nix/store/fa9dm9bbilinl9zkpw83yshvgrpsh7sz-kernel-modules-shrunk.drv
  /nix/store/02360f07416jlzgpkfqbn76zmrpl63z0-stage-1-init.sh.drv
  /nix/store/gigx079yqhiam6m9w7mxqkk1imwy2zwg-etc-nixos.conf.drv
  /nix/store/ic84x39phcwxxk439awdns9bymfyi05w-etc.drv
  /nix/store/lp5hwcwfks7f7iv5mfnjb9dhkswzl6kf-initrd.drv
  /nix/store/kaibkzq676y6alxs2nxwwmiwd3d9nncb-nixos-system-gospel-18.09.git.d6422c6.drv
building '/nix/store/5jcd3rxy9xmql16vvrx8vspinibqxmn2-source.drv'...

trying https://github.com/hardkernel/linux/archive/4.14.47-139.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   129    0   129    0     0    390      0 --:--:-- --:--:-- --:--:--   390

at which point, it hangs forever. No error. That tar.gz path itself is fine:

# wget https://github.com/hardkernel/linux/archive/4.14.47-139.tar.gz
[successful noises]

works fine. However, I'm not sure if this is relevant, but:

# curl https://github.com/hardkernel/linux/archive/4.14.47-139.tar.gz
<html><body>You are being <a href="https://codeload.github.com/hardkernel/linux/tar.gz/4.14.47-139">redirected</a>.</body></html>

Anyway, I expect am making an obvious mistake! Any idea?

url = "https://github.com/hardkernel/linux/archive/${version}.tar.gz";
sha256 = "1n43a3rhpjq851qrn17r1dkibv6sqlmwxvl3hras4qr391x61y6n";
};

} // (args.argsOverride or {}))
12 changes: 12 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13603,6 +13603,13 @@ with pkgs;
];
};

linux_hardkernel_4_14 = callPackage ../os-specific/linux/kernel/linux-hardkernel-4.14.nix {
kernelPatches = [
kernelPatches.bridge_stp_helper
kernelPatches.modinst_arg_list_too_long
];
};

/* Linux kernel modules are inherently tied to a specific kernel. So
rather than provide specific instances of those packages for a
specific kernel, we have a function that builds those packages
Expand Down Expand Up @@ -13826,6 +13833,11 @@ with pkgs;
linuxPackages_samus_latest = linuxPackages_samus_4_12;
linux_samus_latest = linuxPackages_samus_latest.kernel;

# Hardkernel (Odroid) kernels.
linuxPackages_hardkernel_4_14 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_hardkernel_4_14);
linuxPackages_hardkernel_latest = linuxPackages_hardkernel_4_14;
linux_hardkernel_latest = linuxPackages_hardkernel_latest.kernel;

# A function to build a manually-configured kernel
linuxManualConfig = makeOverridable (callPackage ../os-specific/linux/kernel/manual-config.nix {});

Expand Down