Place binaries into $out directories rather than simply as $out
This commit is contained in:
parent
e90c74304b
commit
ba2d96d419
|
@ -88,11 +88,12 @@ in rec {
|
||||||
dhall to-directory-tree --output bootstrap \
|
dhall to-directory-tree --output bootstrap \
|
||||||
<<< "${./compile-boot.dhall} ${bootstrapDhall} \"bootstrap\""
|
<<< "${./compile-boot.dhall} ${bootstrapDhall} \"bootstrap\""
|
||||||
|
|
||||||
|
mkdir -p $out
|
||||||
build_core \
|
build_core \
|
||||||
"${testPkgs.base-hw-pc.bootstrapObj}" \
|
"${testPkgs.base-hw-pc.bootstrapObj}" \
|
||||||
bootstrap/modules_asm \
|
bootstrap/modules_asm \
|
||||||
0x00200000 \
|
0x00200000 \
|
||||||
$out
|
$out/image.elf
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -102,6 +103,8 @@ in rec {
|
||||||
build = compileBoot name env boot;
|
build = compileBoot name env boot;
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
|
mkdir -p $out
|
||||||
|
|
||||||
# compile the boot modules into one object file
|
# compile the boot modules into one object file
|
||||||
$CC -c -x assembler -o "boot_modules.o" "$build/modules_asm"
|
$CC -c -x assembler -o "boot_modules.o" "$build/modules_asm"
|
||||||
|
|
||||||
|
@ -113,7 +116,7 @@ in rec {
|
||||||
-z max-page-size=0x1000 \
|
-z max-page-size=0x1000 \
|
||||||
-Ttext=0x100000 -gc-sections \
|
-Ttext=0x100000 -gc-sections \
|
||||||
"${testPkgs.base-nova.coreObj}" boot_modules.o \
|
"${testPkgs.base-nova.coreObj}" boot_modules.o \
|
||||||
-o $out
|
-o $out/image.elf
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -19,5 +19,5 @@ stdenv.mkDerivation rec {
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
cmakeFlags = [ "-DVERSION=${version}" ];
|
cmakeFlags = [ "-DVERSION=${version}" ];
|
||||||
|
|
||||||
installPhase = "install standalone/bender $out";
|
installPhase = "install -Dt $out standalone/bender";
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,10 +79,10 @@ listToAttrs ((concatLists (map (testsToList) [ linux hw nova ]))) // {
|
||||||
name = "sotest";
|
name = "sotest";
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
mkdir zip; cd zip
|
mkdir zip; cd zip
|
||||||
cp "${testPkgs.bender}" bender
|
cp "${testPkgs.bender}/bender" bender
|
||||||
cp "${testPkgs.NOVA}/hypervisor-x86_64" hypervisor
|
cp "${testPkgs.NOVA}/hypervisor-x86_64" hypervisor
|
||||||
${concatStringsSep "\n"
|
${concatStringsSep "\n"
|
||||||
(map (test: "cp ${test.image} ${test.image.name}") allTests)}
|
(map (test: "cp ${test.image}/image.elf ${test.image.name}") allTests)}
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
${buildPackages.zip}/bin/zip "$out/binaries.zip" *
|
${buildPackages.zip}/bin/zip "$out/binaries.zip" *
|
||||||
cat << EOF > "$out/project.json"
|
cat << EOF > "$out/project.json"
|
||||||
|
|
|
@ -90,12 +90,12 @@ let
|
||||||
|
|
||||||
global env
|
global env
|
||||||
global spawn_id
|
global spawn_id
|
||||||
set TEST_MIB [expr (([file size ${image}] + $env(TEST_RAM)) >> 20) + 24]
|
set TEST_MIB [expr (([file size ${image}/image.elf] + $env(TEST_RAM)) >> 20) + 24]
|
||||||
spawn ${buildPackages.qemu_test}/bin/qemu-system-x86_64 \
|
spawn ${buildPackages.qemu_test}/bin/qemu-system-x86_64 \
|
||||||
-machine q35 -serial mon:stdio -nographic \
|
-machine q35 -serial mon:stdio -nographic \
|
||||||
-m size=$TEST_MIB \
|
-m size=$TEST_MIB \
|
||||||
-kernel "${testPkgs.bender}" \
|
-kernel "${testPkgs.bender}/bender" \
|
||||||
-initrd "${image}" \
|
-initrd "${image}/image.elf" \
|
||||||
${toString qemuArgs}
|
${toString qemuArgs}
|
||||||
wait_for_output $wait_for_re $timeout_value $spawn_id
|
wait_for_output $wait_for_re $timeout_value $spawn_id
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,13 +91,13 @@ let
|
||||||
|
|
||||||
global env
|
global env
|
||||||
global spawn_id
|
global spawn_id
|
||||||
set TEST_MIB [expr (([file size ${image}] + $env(TEST_RAM)) >> 20) + 24]
|
set TEST_MIB [expr (([file size ${image}/image.elf] + $env(TEST_RAM)) >> 20) + 24]
|
||||||
spawn ${buildPackages.qemu_test}/bin/qemu-system-x86_64 \
|
spawn ${buildPackages.qemu_test}/bin/qemu-system-x86_64 \
|
||||||
-machine q35 -cpu phenom -smp 2 \
|
-machine q35 -cpu phenom -smp 2 \
|
||||||
-serial mon:stdio -nographic \
|
-serial mon:stdio -nographic \
|
||||||
-m size=$TEST_MIB \
|
-m size=$TEST_MIB \
|
||||||
-kernel "${testPkgs.bender}" \
|
-kernel "${testPkgs.bender}/bender" \
|
||||||
-initrd "${testPkgs.NOVA}/hypervisor-x86_64 arg=iommu novpid serial,${image}" \
|
-initrd "${testPkgs.NOVA}/hypervisor-x86_64 arg=iommu novpid serial,${image}/image.elf" \
|
||||||
${toString qemuArgs}
|
${toString qemuArgs}
|
||||||
wait_for_output $wait_for_re $timeout_value $spawn_id
|
wait_for_output $wait_for_re $timeout_value $spawn_id
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ boot_items =
|
|
||||||
[ { exec = "bender", load = [ "image.elf" ], name = "Genode base-hw" } ]
|
|
||||||
, extra_dependencies = [ { name = "bender", url = "https://sotest.io/bender" } ]
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{ boot_items =
|
|
||||||
[ { exec = "bender"
|
|
||||||
, load = [ "hypervisor serial novga iommu", "image.elf" ]
|
|
||||||
, name = "NOVA with Genode"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
, extra_dependencies = [ { name = "bender", url = "https://sotest.io/bender" } ]
|
|
||||||
}
|
|
Loading…
Reference in New Issue