git.iko.soy/typeable/nixpkgs
on master help sign in
U-Boot: 2017.03 -> 2017.11

Also move patches from sd-image-aarch64.nix, they might be useful for the older raspberries as well.

commit931aa5f9e2fc73a95f6145bf5237e68dfc56d36b authorTuomas Tynkkynen <tuomas@tuxera.com> dateTue 7 Nov 2017, 01:56 (9 years ago) parentbd47e17
2 files changed+24−17
nixos/modules/installer/cd-dvd/sd-image-aarch64.nix+1−11 pkgs/misc/uboot/default.nix+23−6
nixos/modules/installer/cd-dvd/sd-image-aarch64.nix+1−11
@@ -40,16 +40,6 @@ in
4040
4141 sdImage = {
4242 populateBootCommands = let
43− # Contains a couple of fixes for booting a Linux kernel, will hopefully appear upstream soon.
44− patchedUboot = pkgs.ubootRaspberryPi3_64bit.overrideAttrs (oldAttrs: {
45− src = pkgs.fetchFromGitHub {
46− owner = "dezgeg";
47− repo = "u-boot";
48− rev = "baab53ec244fe44def01948a0f10e67342d401e6";
49− sha256 = "0r5j2pc42ws3w3im0a9c6bh01czz5kapqrqp0ik9ra823cw73lxr";
50− };
51− });
52−
5343 configTxt = pkgs.writeText "config.txt" ''
5444 kernel=u-boot-rpi3.bin
5545 arm_control=0x200
@@ -57,7 +47,7 @@ in
5747 '';
5848 in ''
5949 (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/boot/)
60− cp ${patchedUboot}/u-boot.bin boot/u-boot-rpi3.bin
50+ cp ${pkgs.ubootRaspberryPi3_64bit}/u-boot.bin boot/u-boot-rpi3.bin
6151 cp ${configTxt} boot/config.txt
6252 ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./boot
6353 '';
pkgs/misc/uboot/default.nix+23−6
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, bc, dtc, python2
1+{ stdenv, fetchurl, fetchpatch, bc, dtc, python2
22, hostPlatform
33}:
44
@@ -12,21 +12,38 @@ let
1212 stdenv.mkDerivation (rec {
1313
1414 name = "uboot-${defconfig}-${version}";
15− version = "2017.03";
15+ version = "2017.11";
1616
1717 src = fetchurl {
1818 url = "ftp://ftp.denx.de/pub/u-boot/u-boot-${version}.tar.bz2";
19− sha256 = "0gqihplap05dlpwdb971wsqyv01nz2vabwq5g5649gr5jczsyjzm";
19+ sha256 = "01bcsah5imy6m3fbjwhqywxg0pfk5fl8ks9ylb7kv3zmrb9qy0ba";
2020 };
2121
22− nativeBuildInputs = [ bc dtc python2 ];
23−
24− hardeningDisable = [ "all" ];
22+ patches = [
23+ (fetchpatch {
24+ url = https://github.com/dezgeg/u-boot/commit/rpi-2017-11-patch1.patch;
25+ sha256 = "067yq55vv1slv4xy346px7h329pi14abdn04chg6s1s6hmf6c1x9";
26+ })
27+ (fetchpatch {
28+ url = https://github.com/dezgeg/u-boot/commit/rpi-2017-11-patch2.patch;
29+ sha256 = "0bbw0q027xvzvdxxvpzjajg4rm30a8mb7z74b6ma9q0l7y7bi0c4";
30+ })
31+ (fetchpatch {
32+ url = https://github.com/dezgeg/u-boot/commit/pythonpath-2017-11.patch;
33+ sha256 = "162b2lglp307pzxsf9m7nnmzwxqd7xkwp5j85bm6bg1a38ngpl9v";
34+ })
35+ ];
2536
2637 postPatch = ''
2738 patchShebangs tools
2839 '';
2940
41+ nativeBuildInputs = [ bc dtc python2 ];
42+
43+ hardeningDisable = [ "all" ];
44+
45+ makeFlags = [ "DTC=dtc" ];
46+
3047 configurePhase = ''
3148 make ${defconfig}
3249 '';