From 567c51ba598fc81e566550f91a75aeb15257f762 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 28 Dec 2020 11:27:16 +0100 Subject: [PATCH] WiP! filter base-* packages by platform --- packages/genodelabs/default.nix | 43 ++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/packages/genodelabs/default.nix b/packages/genodelabs/default.nix index ca2adda..8892bc9 100644 --- a/packages/genodelabs/default.nix +++ b/packages/genodelabs/default.nix @@ -337,22 +337,21 @@ in makePackages // depotPackages // { stdenv = stdenv'; }; - base-hw-pc = buildUpstream { - name = "base-hw-pc"; - outputs = [ "out" "coreObj" "bootstrapObj" ]; - KERNEL = "hw"; - BOARD = "pc"; - targets = [ "bootstrap" "core" "timer" "lib/ld" ]; + base-linux = buildUpstream { + name = "base-linux"; + KERNEL = "linux"; + BOARD = "linux"; + targets = [ "core" "timer" "lib/ld" ]; patches = basePatches; postInstall = '' - mv $out/lib/ld-hw.lib.so $out/lib/ld.lib.so - mv $out/bin/hw_timer_drv $out/bin/timer_drv - install build/bin/core-hw-pc.o $coreObj - install build/bin/bootstrap-hw-pc.o $bootstrapObj + mv $out/lib/ld-linux.lib.so $out/lib/ld.lib.so + mv $out/bin/linux_timer_drv $out/bin/timer_drv ''; - meta.platforms = [ "x86_64-genode" ]; + HOST_INC_DIR = buildPackages.glibc.dev + "/include"; }; +} // lib.optionalAttrs pkgs.hostPlatform.isAarch64 { + base-hw-virt_qemu = buildUpstream { name = "base-hw-virt_qemu"; outputs = [ "out" "coreObj" "bootstrapObj" ]; @@ -369,17 +368,22 @@ in makePackages // depotPackages // { meta.platforms = [ "aarch64-genode" ]; }; - base-linux = buildUpstream { - name = "base-linux"; - KERNEL = "linux"; - BOARD = "linux"; - targets = [ "core" "timer" "lib/ld" ]; +} // lib.optionalAttrs pkgs.hostPlatform.isx86 { + + base-hw-pc = buildUpstream { + name = "base-hw-pc"; + outputs = [ "out" "coreObj" "bootstrapObj" ]; + KERNEL = "hw"; + BOARD = "pc"; + targets = [ "bootstrap" "core" "timer" "lib/ld" ]; patches = basePatches; postInstall = '' - mv $out/lib/ld-linux.lib.so $out/lib/ld.lib.so - mv $out/bin/linux_timer_drv $out/bin/timer_drv + mv $out/lib/ld-hw.lib.so $out/lib/ld.lib.so + mv $out/bin/hw_timer_drv $out/bin/timer_drv + install build/bin/core-hw-pc.o $coreObj + install build/bin/bootstrap-hw-pc.o $bootstrapObj ''; - HOST_INC_DIR = buildPackages.glibc.dev + "/include"; + meta.platforms = [ "x86_64-genode" ]; }; base-nova = buildUpstream { @@ -394,4 +398,5 @@ in makePackages // depotPackages // { install build/bin/core-nova.o $coreObj ''; }; + }