From 57d8d01e42cb4ae8d2896ec6c01aeac04c1ff4fa Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Fri, 28 Feb 2020 14:42:34 +0100 Subject: [PATCH] Update Genode to 20.02 release --- packages/genodelabs/default.nix | 8 +-- packages/genodelabs/unlabeled-log.patch | 86 ------------------------- 2 files changed, 3 insertions(+), 91 deletions(-) delete mode 100644 packages/genodelabs/unlabeled-log.patch diff --git a/packages/genodelabs/default.nix b/packages/genodelabs/default.nix index 5b8be44..bc2371b 100644 --- a/packages/genodelabs/default.nix +++ b/packages/genodelabs/default.nix @@ -1,6 +1,6 @@ { nixpkgs, apps }: -{ name, targets, arch, kernel ? "hw", board ? "pc", patches ? [], ... }@extraAttrs: +{ name, targets, arch, kernel ? "hw", board ? "pc", ... }@extraAttrs: let sourceForgeToolchain = nixpkgs.buildPackages.callPackage ./../genode/toolchain.nix { }; @@ -8,7 +8,7 @@ let stdenvGcc = let env = nixpkgs.stdenvAdapters.overrideCC nixpkgs.stdenv sourceForgeToolchain; in assert env.cc.isGNU; env; - version = "19.11"; + version = "20.02"; toolPrefix = if arch == "x86_64" then "genode-x86-" else @@ -21,11 +21,9 @@ in stdenvGcc.mkDerivation ({ owner = "genodelabs"; repo = "genode"; rev = version; - sha256 = "0j0wfwqmv8mivfkpra1pb02a8dy1nnsakr3v6l5y964dfkq3737i"; + sha256 = "0idk92ibrasla0y2xkrmyh49dx0nzg96gqkcmn6r3w5r3fdpsfjy"; }; - patches = [ ./unlabeled-log.patch ] ++ patches; - nativeBuildInputs = with nixpkgs.buildPackages; [ binutils tcl which ]; enableParallelBuilding = true; diff --git a/packages/genodelabs/unlabeled-log.patch b/packages/genodelabs/unlabeled-log.patch deleted file mode 100644 index aaef849..0000000 --- a/packages/genodelabs/unlabeled-log.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff --git a/repos/base/src/core/include/log_root.h b/repos/base/src/core/include/log_root.h -index db98ebfc5b..085c6053f9 100644 ---- a/repos/base/src/core/include/log_root.h -+++ b/repos/base/src/core/include/log_root.h -@@ -30,12 +30,7 @@ namespace Genode { - */ - Log_session_component *_create_session(const char *args) override - { -- char label_buf[Log_session_component::LABEL_LEN]; -- -- Arg label_arg = Arg_string::find_arg(args, "label"); -- label_arg.string(label_buf, sizeof(label_buf), ""); -- -- return new (md_alloc()) Log_session_component(label_buf); -+ return new (md_alloc()) Log_session_component(label_from_args(args)); - } - - public: -diff --git a/repos/base/src/core/include/log_session_component.h b/repos/base/src/core/include/log_session_component.h -index 7b6ddab815..29bda822cc 100644 ---- a/repos/base/src/core/include/log_session_component.h -+++ b/repos/base/src/core/include/log_session_component.h -@@ -17,27 +17,32 @@ - #include - #include - #include -+#include - #include - - namespace Genode { - - class Log_session_component : public Rpc_object - { -- public: -- -- enum { LABEL_LEN = 128 }; -- - private: - -- char _label[LABEL_LEN]; -+ Session_label const _label; -+ -+ static Session_label _expand_label(Session_label const &label) -+ { -+ if (label == "init -> unlabeled") -+ return ""; -+ else -+ return Session_label("[", label, "] "); -+ } - - public: - - /** - * Constructor - */ -- Log_session_component(const char *label) { -- strncpy(_label, label, sizeof(_label)); } -+ Log_session_component(Session_label const &label) -+ : _label(_expand_label(label)) { } - - - /***************** -@@ -54,21 +59,17 @@ namespace Genode { - char const *string = string_buf.string(); - size_t len = strlen(string); - -- char buf[string_buf.MAX_SIZE]; - unsigned from_i = 0; -- - for (unsigned i = 0; i < len; i++) { - if (string[i] == '\n') { -- memcpy(buf, string + from_i, i - from_i); -- buf[i - from_i] = 0; -- log("[", Cstring(_label), "] ", Cstring(buf)); -+ log(_label, Cstring(string + from_i, i - from_i)); - from_i = i + 1; - } - } - - /* if last character of string was not a line break, add one */ - if (from_i < len) -- log("[", Cstring(_label), "] ", Cstring(string + from_i)); -+ log(_label, Cstring(string + from_i)); - - return len; - }