linux-hardkernel: Init at 4.14.47-139#41782
Conversation
|
If you're interested, I had a similar-ish config that also automatically splits version numbers: And, thanks for submitting this PR! I've also been running NixOS on a ODROID HC2 for a couple months now with no trouble, but never got around to submitting a PR for kernel support - much appreciated 😀 |
|
@andrew-d, no problem! :) I saw there are such tricks in the other kernel .nix files as well. But, is it a little bit overkill? It doesn't really provide much useful abstracting power in this case, and I think it does make something simple harder to read. But I guess it's only small. I'm happy to change it if feelings are strong. |
No strong feelings, no - just mentioning it if you were interested! 👍 |
|
Awesome, thanks! |
|
Cc: @dezgeg, possibly. |
pkgs/top-level/all-packages.nix
Outdated
There was a problem hiding this comment.
Another thing I just noticed; do you want callPackages here, or callPackage (no s) like the other kernels?
There was a problem hiding this comment.
Ugh, you're totally right. Thanks! Fixed.
| # branchVersion needs to be x.y. | ||
| extraMeta.branch = "4.14"; | ||
|
|
||
| src = fetchurl { |
There was a problem hiding this comment.
This should use fetchFromGitHub to avoid possibly nondeterministic GitHub tarballs.
Looks good otherwise.
There was a problem hiding this comment.
Ugh, is nothing sacred!! I assumed GitHub's tarballs at least would be deterministic.
Will fix. Thanks for looking!
There was a problem hiding this comment.
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?
|
Alright, done. It wasn't hanging after all, just taking ages. Seems to work for me. |
|
Please restrict the build to aarch64. It breaks my nix-review for kernel modules, because nix is trying to build it on x86_64. |
|
@Mic92, sorry for the delay here. What is the most appropriate way to do this? I see other kernel expressions using |
|
I assume: would do the trick then. |
|
Also something like |
|
done in 995d005 |
(cherry picked from commit 07e8402)
Motivation for this change
This introduces a build for the hardkernel vendor kernel tree, to support hardkernel hardware (e.g. the odroid series of SBCs).
Things done
I have built and tested this kernel on my Odroid HC1, using
kernelPackages = pkgs.linuxPackages_hardkernel_latest. No problems encountered, but no further devices tested.I just looked at existing linux kernel instances and duplicated the simplest I saw with the minimum novelty I could think of. I might definitely have missed something. Design advice is welcome.
sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)