Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into staging
- Loading branch information
Showing
35 changed files
with
330 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# To build, use: | ||
# nix-build nixos -I nixos-config=nixos/modules/installer/cd-dvd/sd-image-aarch64.nix -A config.system.build.sdImage | ||
{ config, lib, pkgs, ... }: | ||
|
||
let | ||
extlinux-conf-builder = | ||
import ../../system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.nix { | ||
inherit pkgs; | ||
}; | ||
in | ||
{ | ||
imports = [ | ||
../../profiles/minimal.nix | ||
../../profiles/installation-device.nix | ||
./sd-image.nix | ||
]; | ||
|
||
assertions = lib.singleton { | ||
assertion = pkgs.stdenv.system == "aarch64-linux"; | ||
message = "sd-image-aarch64.nix can be only built natively on Aarch64 / ARM64; " + | ||
"it cannot be cross compiled"; | ||
}; | ||
|
||
# Needed by RPi firmware | ||
nixpkgs.config.allowUnfree = true; | ||
|
||
boot.loader.grub.enable = false; | ||
boot.loader.generic-extlinux-compatible.enable = true; | ||
|
||
boot.kernelPackages = pkgs.linuxPackages_latest; | ||
boot.kernelParams = ["console=ttyS0,115200n8" "console=tty0"]; | ||
boot.consoleLogLevel = 7; | ||
|
||
# FIXME: this probably should be in installation-device.nix | ||
users.extraUsers.root.initialHashedPassword = ""; | ||
|
||
sdImage = { | ||
populateBootCommands = let | ||
# Contains a couple of fixes for booting a Linux kernel, will hopefully appear upstream soon. | ||
patchedUboot = pkgs.ubootRaspberryPi3_64bit.overrideAttrs (oldAttrs: { | ||
src = pkgs.fetchFromGitHub { | ||
owner = "dezgeg"; | ||
repo = "u-boot"; | ||
rev = "baab53ec244fe44def01948a0f10e67342d401e6"; | ||
sha256 = "0r5j2pc42ws3w3im0a9c6bh01czz5kapqrqp0ik9ra823cw73lxr"; | ||
}; | ||
}); | ||
|
||
configTxt = pkgs.writeText "config.txt" '' | ||
kernel=u-boot-rpi3.bin | ||
arm_control=0x200 | ||
enable_uart=1 | ||
''; | ||
in '' | ||
for f in bootcode.bin fixup.dat start.elf; do | ||
cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/$f boot/ | ||
done | ||
cp ${patchedUboot}/u-boot.bin boot/u-boot-rpi3.bin | ||
cp ${configTxt} boot/config.txt | ||
${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./boot | ||
''; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
pkgs/build-support/setup-hooks/update-autotools-gnu-config-scripts.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
preConfigurePhases+=" updateAutotoolsGnuConfigScriptsPhase" | ||
|
||
updateAutotoolsGnuConfigScriptsPhase() { | ||
if [ -n "$dontUpdateAutotoolsGnuConfigScripts" ]; then return; fi | ||
|
||
for script in config.sub config.guess; do | ||
for f in $(find . -name "$script"); do | ||
echo "Updating Autotools / GNU config script to a newer upstream version: $f" | ||
cp -f "@gnu_config@/$script" "$f" | ||
done | ||
done | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
pkgs/development/interpreters/spidermonkey/aarch64-double-conversion.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff -ru mozjs17.0.0-orig/mfbt/double-conversion/utils.h mozjs17.0.0/mfbt/double-conversion/utils.h | ||
--- mozjs17.0.0-orig/mfbt/double-conversion/utils.h 2013-02-11 17:33:28.000000000 -0500 | ||
+++ mozjs17.0.0/mfbt/double-conversion/utils.h 2016-12-03 20:39:07.915042988 -0500 | ||
@@ -58,7 +58,8 @@ | ||
defined(__mips__) || defined(__powerpc__) || \ | ||
defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ | ||
defined(__SH4__) || defined(__alpha__) || \ | ||
- defined(_MIPS_ARCH_MIPS32R2) | ||
+ defined(_MIPS_ARCH_MIPS32R2) || \ | ||
+ defined(__AARCH64EL__) | ||
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 | ||
#elif defined(_M_IX86) || defined(__i386__) || defined(__i386) | ||
#if defined(_WIN32) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ stdenv, fetchurl }: | ||
|
||
let | ||
rev = "6a82322dd05cdc57b4cd9f7effdf1e2fd6f7482b"; | ||
|
||
# Don't use fetchgit as this is needed during Aarch64 bootstrapping | ||
configGuess = fetchurl { | ||
url = "http://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=${rev}"; | ||
sha256 = "1yj9yi94h7z4z6jzickddv64ksz1aq5kj0c7krgzjn8xf8p3avmh"; | ||
}; | ||
configSub = fetchurl { | ||
url = "http://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=${rev}"; | ||
sha256 = "1qsqdpla6icbzskkk7v3zxrpzlpqlc94ny9hyy5wh5lm5rwwfvb7"; | ||
}; | ||
in | ||
stdenv.mkDerivation rec { | ||
name = "gnu-config-${version}"; | ||
version = "2016-12-31"; | ||
|
||
buildCommand = '' | ||
mkdir -p $out | ||
cp ${configGuess} $out/config.guess | ||
cp ${configSub} $out/config.sub | ||
''; | ||
|
||
meta = with stdenv.lib; { | ||
description = "Attempt to guess a canonical system name"; | ||
homepage = http://savannah.gnu.org/projects/config; | ||
license = licenses.gpl3; | ||
# In addition to GPLv3: | ||
# As a special exception to the GNU General Public License, if you | ||
# distribute this file as part of a program that contains a | ||
# configuration script generated by Autoconf, you may include it under | ||
# the same distribution terms that you use for the rest of that | ||
# program. | ||
maintainers = [ maintainers.dezgeg ]; | ||
platforms = platforms.all; | ||
}; | ||
} |
13 changes: 13 additions & 0 deletions
13
pkgs/development/libraries/gnu-efi/aarch64-fix-discarded-qualifier.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff -ru gnu-efi-3.0.4-orig/lib/aarch64/initplat.c gnu-efi-3.0.4/lib/aarch64/initplat.c | ||
--- gnu-efi-3.0.4-orig/lib/aarch64/initplat.c 2016-03-17 09:53:14.000000000 -0400 | ||
+++ gnu-efi-3.0.4/lib/aarch64/initplat.c 2016-12-03 17:53:57.166575974 -0500 | ||
@@ -41,7 +41,8 @@ | ||
|
||
void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n) | ||
{ | ||
- unsigned char *p = dest, *q = src; | ||
+ unsigned char *p = dest; | ||
+ const unsigned char *q = src; | ||
|
||
while (n--) | ||
*p++ = *q++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/configure b/configure | ||
index 6c4e868..0298e19 100755 | ||
--- a/configure | ||
+++ b/configure | ||
@@ -14501,6 +14501,7 @@ else | ||
|
||
case "$host_cpu" in | ||
a29k | \ | ||
+ aarch64* | \ | ||
alpha* | \ | ||
arc | \ | ||
arm* | strongarm* | xscale* | \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.