From 56bdd976556b7852aeb1066bc8f614142ee38921 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 18 May 2020 20:16:04 +0530 Subject: [PATCH] genodeSources: increase size limit of loader ROM labels --- packages/genodelabs/binary-limit.patch | 58 ++++++++++++++++++++++++++ packages/genodelabs/default.nix | 2 +- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 packages/genodelabs/binary-limit.patch diff --git a/packages/genodelabs/binary-limit.patch b/packages/genodelabs/binary-limit.patch new file mode 100644 index 0000000..289d229 --- /dev/null +++ b/packages/genodelabs/binary-limit.patch @@ -0,0 +1,58 @@ +commit 5f850f8b3f7261aeaf0dfea8fcb190539677154c +Author: Emery Hemingway +Date: Sun May 17 00:28:28 2020 +0530 + + base: increase binary name limit to 160 bytes + +diff --git a/repos/base/include/base/child.h b/repos/base/include/base/child.h +index 8c7b33a9d9..6b6d0ca6bc 100644 +--- a/repos/base/include/base/child.h ++++ b/repos/base/include/base/child.h +@@ -44,9 +44,9 @@ namespace Genode { + */ + struct Genode::Child_policy + { +- typedef String<64> Name; +- typedef String<64> Binary_name; +- typedef String<64> Linker_name; ++ typedef String<160> Name; ++ typedef String<160> Binary_name; ++ typedef String<160> Linker_name; + + virtual ~Child_policy() { } + +@@ -407,7 +407,7 @@ class Genode::Child : protected Rpc_object, + + Id_space::Id const _client_id; + +- typedef String<64> Label; ++ typedef String<160> Label; + + Args const _args; + +diff --git a/repos/base/include/base/shared_object.h b/repos/base/include/base/shared_object.h +index f4dd1622fe..8f328cec31 100644 +--- a/repos/base/include/base/shared_object.h ++++ b/repos/base/include/base/shared_object.h +@@ -128,7 +128,7 @@ class Genode::Dynamic_linker + struct Object_info + { + /* name of shared library, or "binary" for the main program */ +- typedef String<64> Name; ++ typedef String<160> Name; + Name name; + + Rom_dataspace_capability ds_cap; +diff --git a/repos/os/src/lib/sandbox/child.h b/repos/os/src/lib/sandbox/child.h +index 4dd2803417..c307a86afc 100644 +--- a/repos/os/src/lib/sandbox/child.h ++++ b/repos/os/src/lib/sandbox/child.h +@@ -119,7 +119,7 @@ class Sandbox::Child : Child_policy, Routed_service::Wakeup + throw Missing_name_attribute(); + } + +- typedef String<64> Name; ++ typedef Child_policy::Name Name; + Name const _unique_name { _name_from_xml(_start_node->xml()) }; + + static Binary_name _binary_from_xml(Xml_node start_node, diff --git a/packages/genodelabs/default.nix b/packages/genodelabs/default.nix index d8efec6..c99ea3c 100644 --- a/packages/genodelabs/default.nix +++ b/packages/genodelabs/default.nix @@ -26,7 +26,7 @@ let hash = "sha256-ZY9ND6vDA9u127TAv87uOjPuLzRzBPyp5PzD6iM7uNI="; }; nativeBuildInputs = [ expect gnumake tcl ]; - patches = [ ./LIB.patch ]; + patches = [ ./LIB.patch ./binary-limit.patch ]; configurePhase = '' patchShebangs ./tool substituteInPlace repos/base/etc/tools.conf \