diff options
author | Lana Black <lana@illuminati.industries> | 2022-08-11 17:11:54 +0000 |
---|---|---|
committer | ehmry <ehmry@posteo.net> | 2022-08-11 13:48:05 -0500 |
commit | 44ef78759ebedf06ddb9d1266acc6a04656e83dd (patch) | |
tree | daa65dfa540a061dc47f116e0b1044e8a2be2acb /pkgs/os-specific/solo5 | |
parent | 26a5727935cc63b746dbb96921ee39e8ea8a08cb (diff) |
solo5: 0.6.9 -> 0.7.3
Diffstat (limited to 'pkgs/os-specific/solo5')
-rw-r--r-- | pkgs/os-specific/solo5/default.nix | 18 | ||||
-rw-r--r-- | pkgs/os-specific/solo5/test_sleep.patch | 22 |
2 files changed, 28 insertions, 12 deletions
diff --git a/pkgs/os-specific/solo5/default.nix b/pkgs/os-specific/solo5/default.nix index d51219e69ae94..d781f1c503a6b 100644 --- a/pkgs/os-specific/solo5/default.nix +++ b/pkgs/os-specific/solo5/default.nix @@ -2,7 +2,7 @@ , pkg-config, qemu, syslinux, util-linux }: let - version = "0.6.9"; + version = "0.7.3"; # list of all theoretically available targets targets = [ "genode" @@ -21,14 +21,16 @@ in stdenv.mkDerivation { src = fetchurl { url = "https://github.com/Solo5/solo5/releases/download/v${version}/solo5-v${version}.tar.gz"; - sha256 = "03lvk9mab3yxrmi73wrvvhykqcydjrsda0wj6aasnjm5lx9jycpr"; + sha256 = "sha256-8LftT22XzmmWxgYez+BAHDX4HOyl5DrwrpuO2+bqqcY="; }; + patches = [ ./test_sleep.patch ]; + hardeningEnable = [ "pie" ]; configurePhase = '' runHook preConfigure - sh configure.sh + sh configure.sh --prefix=/ runHook postConfigure ''; @@ -38,15 +40,7 @@ in stdenv.mkDerivation { runHook preInstall export DESTDIR=$out export PREFIX=$out - make install-tools - - # get CONFIG_* vars from Makeconf which also parse in sh - grep '^CONFIG_' Makeconf > nix_tmp_targetconf - source nix_tmp_targetconf - # install opam / pkg-config files for all enabled targets - ${lib.concatMapStrings (bind: '' - [ -n "$CONFIG_${lib.toUpper bind}" ] && make install-opam-${bind} - '') targets} + make install substituteInPlace $out/bin/solo5-virtio-mkimage \ --replace "/usr/lib/syslinux" "${syslinux}/share/syslinux" \ diff --git a/pkgs/os-specific/solo5/test_sleep.patch b/pkgs/os-specific/solo5/test_sleep.patch new file mode 100644 index 0000000000000..f86a83d09dec4 --- /dev/null +++ b/pkgs/os-specific/solo5/test_sleep.patch @@ -0,0 +1,22 @@ +diff --git a/tests/test_time/test_time.c b/tests/test_time/test_time.c +index 931500b..cde64ad 100644 +--- a/tests/test_time/test_time.c ++++ b/tests/test_time/test_time.c +@@ -110,7 +110,8 @@ int solo5_app_main(const struct solo5_start_info *si __attribute__((unused))) + /* + * Verify that we did not sleep less than requested (see above). + */ +- if (delta < NSEC_PER_SEC) { ++ const solo5_time_t slack = 100000000ULL; ++ if (delta < NSEC_PER_SEC - slack) { + printf("[%d] ERROR: slept too little (expected at least %llu ns)\n", + iters, (unsigned long long)NSEC_PER_SEC); + failed = true; +@@ -120,7 +121,6 @@ int solo5_app_main(const struct solo5_start_info *si __attribute__((unused))) + * Verify that we did not sleep more than requested, within reason + * (scheduling delays, general inaccuracy of the current timing code). + */ +- const solo5_time_t slack = 100000000ULL; + if (delta > (NSEC_PER_SEC + slack)) { + printf("[%d] ERROR: slept too much (expected at most %llu ns)\n", + iters, (unsigned long long)slack); |