Last active
November 9, 2017 07:17
-
-
Save taktoa/10f3969c2477d6d3bdd8f9db692b961b to your computer and use it in GitHub Desktop.
seL4 Nix expression for Raspberry Pi 3 (may be broken!)
This file contains hidden or 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
with rec { | |
pkgs = import <nixpkgs> {}; | |
inherit (pkgs) stdenv gcc-arm-embedded libxml2 ncurses python27Packages; | |
inherit (pkgs) which fetchFromGitHub; | |
}; | |
stdenv.mkDerivation rec { | |
name = "seL4"; | |
src = fetchFromGitHub { | |
repo = "seL4"; | |
owner = "seL4"; | |
rev = "93f59d4932c5370dfbb5ed38689097813abec08b"; | |
sha256 = "0hkkkjxmb49v8hnjk83l60s0jvchw27sfi5w9haxl6jwsb3v8fi6"; | |
}; | |
patches = [ ./seL4.patch ]; | |
buildInputs = [ | |
gcc-arm-embedded | |
which | |
libxml2 | |
ncurses.out | |
ncurses.dev | |
python27Packages.python | |
python27Packages.six | |
python27Packages.tempita | |
]; | |
buildPhase = '' | |
TOOLPREFIX=arm-none-eabi- ARCH=arm PLAT=bcm2837 ARMV=armv7-a CPU=cortex-a53 make | |
''; | |
installPhase = '' | |
mkdir -p "$out/" | |
cp kernel.elf "$out/" | |
cp kernel.elf.strip "$out/" | |
''; | |
} |
This file contains hidden or 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
diff --git a/Makefile b/Makefile | |
index 79f5bcb..0e95066 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -343,6 +343,9 @@ ifeq ($(PLAT),allwinnerA20) | |
DEFINES += -DALLWINNERA20 | |
endif | |
endif # SEL4_ARCH=aarch32 | |
+ifeq (${CPU},cortex-a53) | |
+DEFINES += -DARM_CORTEX_A53 | |
+endif | |
ifeq (${CPU},cortex-a57) | |
DEFINES += -DARM_CORTEX_A57 | |
endif | |
diff --git a/include/plat/bcm2837/autoconf.h b/include/plat/bcm2837/autoconf.h | |
new file mode 100644 | |
index 0000000..e69de29 | |
diff --git a/tools/changed.sh b/tools/changed.sh | |
index cd3f5f1..e8b9a33 100755 | |
--- a/tools/changed.sh | |
+++ b/tools/changed.sh | |
@@ -1,4 +1,4 @@ | |
-#!/bin/bash | |
+#!/usr/bin/env bash | |
# | |
# Copyright 2014, NICTA | |
# | |
diff --git a/tools/cpp_gen.sh b/tools/cpp_gen.sh | |
index cb26b29..60f229f 100755 | |
--- a/tools/cpp_gen.sh | |
+++ b/tools/cpp_gen.sh | |
@@ -1,4 +1,4 @@ | |
-#!/bin/bash | |
+#!/usr/bin/env bash | |
# | |
# Copyright 2014, NICTA | |
# | |
diff --git a/tools/xmllint.sh b/tools/xmllint.sh | |
index 32de8b6..f4b3df0 100755 | |
--- a/tools/xmllint.sh | |
+++ b/tools/xmllint.sh | |
@@ -1,4 +1,4 @@ | |
-#!/bin/bash | |
+#!/usr/bin/env bash | |
# | |
# Copyright 2014, NICTA | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment