Replace apps.linux-boot with apps.linux-image
Replace a script that builds a Linux boot image into the current workings directory and boots it with a script that only builds the image.20.02
parent
6540b0e49a
commit
9fc90076d6
|
@ -4,11 +4,11 @@
|
|||
|
||||
rec {
|
||||
|
||||
linux-boot =
|
||||
let drv = import ./linux-boot { inherit nixpkgs dhallApps packages; };
|
||||
linux-image =
|
||||
let drv = import ./linux-image { inherit nixpkgs dhallApps packages; };
|
||||
in {
|
||||
type = "app";
|
||||
program = "${drv}/bin/linux-boot";
|
||||
program = "${drv}/bin/linux-image";
|
||||
};
|
||||
|
||||
nova-image = let
|
||||
|
|
|
@ -2,17 +2,14 @@
|
|||
|
||||
{ nixpkgs, dhallApps, packages }:
|
||||
|
||||
nixpkgs.writeScriptBin "linux-boot" (with nixpkgs.buildPackages; ''
|
||||
nixpkgs.writeScriptBin "linux-image" (with nixpkgs.buildPackages; ''
|
||||
#!${runtimeShell}
|
||||
set -eu
|
||||
if [ -z "$@" ]; then
|
||||
echo "Error: a boot description must be passed as an argument - $0" > /dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
export DHALL_PRELUDE=''${DHALL_PRELUDE:-${packages.dhallPrelude}/package.dhall}
|
||||
export DHALL_GENODE=''${DHALL_GENODE:-${packages.dhallGenode}/package.dhall}
|
||||
export BASE_LINUX_MANIFEST=''${BASE_LINUX_MANIFEST:-${packages.genode.base-linux.manifest}}
|
||||
export OS_MANIFEST=''${OS_MANIFEST:-${packages.genode.os.manifest}}
|
||||
${dhallApps.dhall.program} text <<< "${./script.dhall} ($@)" > boot.sh
|
||||
source boot.sh
|
||||
rm boot.sh
|
||||
'')
|
|
@ -26,5 +26,4 @@ in λ(args : Args)
|
|||
#!/bin/sh
|
||||
${links}
|
||||
echo ${Text/show (Genode.Init.render args.config)} > config
|
||||
exec ./core-linux
|
||||
''
|
|
@ -40,6 +40,7 @@ let
|
|||
env' = {
|
||||
DHALL_PRELUDE = "${testPkgs.dhallPrelude}/package.dhall";
|
||||
DHALL_GENODE = "${testPkgs.dhallGenode}/package.dhall";
|
||||
BASE_MANIFEST = testPkgs.genode.base.manifest;
|
||||
BASE_LINUX_MANIFEST = testPkgs.genode.base-linux.manifest;
|
||||
OS_MANIFEST = testPkgs.genode.os.manifest;
|
||||
} // env;
|
||||
|
@ -66,8 +67,14 @@ let
|
|||
|
||||
global image_dir spawn_id
|
||||
|
||||
spawn ${apps.linux-boot.program} \
|
||||
global env
|
||||
set env(XDG_CACHE_HOME) /tmp
|
||||
|
||||
puts "${apps.linux-image.program} ${./driver-linux-config.dhall} ${testConfig}"
|
||||
exec ${apps.linux-image.program} \
|
||||
${./driver-linux-config.dhall} ${testConfig}
|
||||
|
||||
spawn ./core-linux
|
||||
wait_for_output $wait_for_re $timeout_value $spawn_id
|
||||
}
|
||||
'';
|
||||
|
@ -102,6 +109,11 @@ let
|
|||
./driver-linux-config.dhall
|
||||
} ${testConfig}).config" > $out
|
||||
'';
|
||||
image = hostPkgs.runCommand (name + ".config") env' ''
|
||||
mkdir -p $out
|
||||
pushd $out
|
||||
${apps.linux-image.program} "${./driver-linux-config.dhall} ${testConfig}"
|
||||
'';
|
||||
};
|
||||
|
||||
in {
|
||||
|
|
Loading…
Reference in New Issue