Sfoglia il codice sorgente

genodeSources: 20.05 -> 20.08

nim
Emery Hemingway 11 mesi fa
parent
commit
c3385aedd0

+ 4
- 4
compositions/pc-drivers.dhall Vedi File

@@ -30,7 +30,7 @@ let drivers =
30 30
         , ServiceRoute.child "Block" "dynamic"
31 31
         , ServiceRoute.child "Usb" "usb_drv"
32 32
         , ServiceRoute.child "Platform" "platform_drv"
33
-        , ServiceRoute.child "Input" "input_filter"
33
+        , ServiceRoute.child "Input" "event_filter"
34 34
         ]
35 35
       , children = toMap
36 36
           { rom_reporter =
@@ -169,10 +169,10 @@ let drivers =
169 169
                 , provides = [ "Input" ]
170 170
                 , routes = [ ServiceRoute.child "Platform" "platform_drv" ]
171 171
                 }
172
-          , input_filter =
172
+          , event_filter =
173 173
               Child.flat
174 174
                 Child.Attributes::{
175
-                , binary = "input_filter"
175
+                , binary = "event_filter"
176 176
                 , priority = 1
177 177
                 , resources = Resources::{ ram = Genode.units.MiB 2 }
178 178
                 , provides = [ "Input" ]
@@ -180,7 +180,7 @@ let drivers =
180 180
                   [ ServiceRoute.parentLabel
181 181
                       "ROM"
182 182
                       (Some "config")
183
-                      (Some "input_filter.config")
183
+                      (Some "event_filter.config")
184 184
                   , ServiceRoute.childLabel
185 185
                       "Input"
186 186
                       "ps2_drv"

+ 1
- 81
flake.nix Vedi File

@@ -136,31 +136,7 @@
136 136
       checks =
137 137
         # Checks for continous testing
138 138
         forAllCrossSystems ({ system, localSystem, crossSystem }:
139
-          let
140
-            nixos = nixpkgs.lib.nixosSystem {
141
-              system = localSystem;
142
-              modules = [
143
-                self.nixosModules.genodeHost
144
-                ({ modulesPath, ... }: {
145
-                  imports = [ "${modulesPath}/virtualisation/qemu-vm.nix" ];
146
-                  boot.loader.grub.extraEntriesBeforeNixOS = true;
147
-                  virtualisation = {
148
-                    cores = 2;
149
-                    memorySize = 1024;
150
-                    useBootLoader = true;
151
-                    qemu = {
152
-                      options =
153
-                        [ "-machine q35" "-cpu phenom" "-serial mon:stdio" ];
154
-                      networkingOptions = [
155
-                        "-net nic,netdev=user.0,model=e1000"
156
-                        "-netdev user,id=user.0\${QEMU_NET_OPTS:+,$QEMU_NET_OPTS}"
157
-                      ];
158
-                    };
159
-                  };
160
-                })
161
-              ];
162
-            };
163
-          in import ./tests {
139
+          import ./tests {
164 140
             inherit self;
165 141
             apps = self.apps.${system};
166 142
             localPackages = nixpkgsFor.${localSystem};
@@ -176,62 +152,6 @@
176 152
                 self.packages.${system}.genodeSources.ports);
177 153
             };
178 154
 
179
-            nixosModule = nixos.config.system.build.vm;
180
-            nixosXML = nixos.config.system.build.genode.xml;
181
-
182
-            nixosGuest = let
183
-              nixos = nixpkgs.lib.nixosSystem {
184
-                system = localSystem;
185
-                modules = [
186
-                  self.nixosModules.genodeHost
187
-                  ({ modulesPath, ... }: {
188
-                    imports = [ "${modulesPath}/virtualisation/qemu-vm.nix" ];
189
-                    boot.loader.grub.extraEntriesBeforeNixOS = true;
190
-                    virtualisation = {
191
-                      cores = 2;
192
-                      memorySize = 1024;
193
-                      useBootLoader = true;
194
-                      qemu = {
195
-                        options =
196
-                          [ "-machine q35" "-cpu phenom" "-serial mon:stdio" ];
197
-                        networkingOptions = [
198
-                          "-net nic,netdev=user.0,model=e1000"
199
-                          "-netdev user,id=user.0\${QEMU_NET_OPTS:+,$QEMU_NET_OPTS}"
200
-                        ];
201
-                      };
202
-                    };
203
-                    genode.guests = {
204
-                      flakeCheck = {
205
-                        config = { config, lib, pkgs, ... }: {
206
-                          networking.firewall.allowedTCPPorts = [ 80 ];
207
-                          services.mingetty.autologinUser =
208
-                            lib.mkDefault "root";
209
-                          services.nginx.enable = true;
210
-                          services.openssh.permitRootLogin =
211
-                            lib.mkDefault "yes";
212
-                          services.sshd.enable = true;
213
-                          users.users.root.password = "nixos";
214
-                          virtualbox.memorySize = 128;
215
-                        };
216
-                      };
217
-                      azimuth = {
218
-                        bootFormat = "vdi";
219
-                        config = { config, lib, pkgs, ... }: {
220
-                          services.cage = {
221
-                            enable = true;
222
-                            program = "${pkgs.azimuth}/bin/tor-azimuth";
223
-                          };
224
-                          users.users.demo.isNormalUser = true;
225
-                          virtualbox.memorySize = 1024;
226
-                        };
227
-                      };
228
-                    };
229
-
230
-                  })
231
-                ];
232
-              };
233
-            in nixos.config.system.build.vm;
234
-
235 155
           });
236 156
 
237 157
     };

+ 5
- 5
nixos-modules/default.nix Vedi File

@@ -99,23 +99,23 @@
99 99
 
100 100
       bootDescription = buildBootDescription {
101 101
         inherit initConfig;
102
-        imageInputs = [ legacyPackages'.bash pkgs'.show_input ]
103
-          ++ map pkgs'.genodeSources.depot ([
102
+        imageInputs = [ legacyPackages'.bash ] ++ map pkgs'.genodeSources.depot
103
+          ([
104 104
             "acpi_drv"
105 105
             "ahci_drv"
106 106
             "cached_fs_rom"
107 107
             "chroot"
108 108
             "decorator"
109
+            "event_filter"
109 110
             "fs_log"
111
+            "gui_fb"
110 112
             "init"
111
-            "input_filter"
112 113
             "ipxe_nic_drv"
113 114
             "libc"
114 115
             "libiconv"
115 116
             "log_core"
116
-            "nit_fb"
117
-            "nitpicker"
118 117
             "nic_router"
118
+            "nitpicker"
119 119
             "part_block"
120 120
             "platform_drv"
121 121
             "posix"

+ 17
- 18
nixos-modules/dhall/console.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Genode = env:DHALL_GENODE
3 2
 
4 3
 let Prelude = Genode.Prelude
@@ -13,8 +12,8 @@ let Resources = Init.Resources
13 12
 
14 13
 let ServiceRoute = Init.ServiceRoute
15 14
 
16
-in    λ(params : { bash : Text, coreutils : Text, path : Text })
17
-     let init =
15
+in  λ(params : { bash : Text, coreutils : Text, path : Text })
16
+      let init =
18 17
             Init::{
19 18
             , verbose = True
20 19
             , routes =
@@ -22,12 +21,12 @@ in    λ(params : { bash : Text, coreutils : Text, path : Text })
22 21
                   Text
23 22
                   Init.ServiceRoute.Type
24 23
                   Init.ServiceRoute.parent
25
-                  [ "Nitpicker", "Rtc", "Timer" ]
24
+                  [ "Gui", "Rtc", "Timer" ]
26 25
             , children = toMap
27
-                { nit_fb =
26
+                { gui_fb =
28 27
                     Child.flat
29 28
                       Child.Attributes::{
30
-                      , binary = "nit_fb"
29
+                      , binary = "gui_fb"
31 30
                       , config = Init.Config::{
32 31
                         , attributes = toMap
33 32
                             { xpos = "10"
@@ -71,8 +70,8 @@ in    λ(params : { bash : Text, coreutils : Text, path : Text })
71 70
                         , ram = Genode.units.MiB 4
72 71
                         }
73 72
                       , routes =
74
-                        [ ServiceRoute.child "Framebuffer" "nit_fb"
75
-                        , ServiceRoute.child "Input" "nit_fb"
73
+                        [ ServiceRoute.child "Framebuffer" "gui_fb"
74
+                        , ServiceRoute.child "Input" "gui_fb"
76 75
                         , ServiceRoute.parent "File_system"
77 76
                         ]
78 77
                       }
@@ -141,8 +140,8 @@ in    λ(params : { bash : Text, coreutils : Text, path : Text })
141 140
                             # Prelude.List.map
142 141
                                 Text
143 142
                                 XML.Type
144
-                                (   λ(x : Text)
145
-                                   XML.leaf
143
+                                ( λ(x : Text)
144
+                                    XML.leaf
146 145
                                       { name = "arg"
147 146
                                       , attributes = toMap { value = x }
148 147
                                       }
@@ -157,13 +156,13 @@ in    λ(params : { bash : Text, coreutils : Text, path : Text })
157 156
                       , routes =
158 157
                         [ Init.ServiceRoute.child "File_system" "vfs"
159 158
                         , { service =
160
-                              { name = "ROM"
161
-                              , label =
162
-                                  Init.LabelSelector.Type.Partial
163
-                                    { prefix = Some "/nix/store/"
164
-                                    , suffix = None Text
165
-                                    }
166
-                              }
159
+                            { name = "ROM"
160
+                            , label =
161
+                                Init.LabelSelector.Type.Partial
162
+                                  { prefix = Some "/nix/store/"
163
+                                  , suffix = None Text
164
+                                  }
165
+                            }
167 166
                           , route =
168 167
                               Init.Route.Type.Child
169 168
                                 { name = "store_rom"
@@ -181,7 +180,7 @@ in    λ(params : { bash : Text, coreutils : Text, path : Text })
181 180
             Init.Attributes::{
182 181
             , routes =
183 182
               [ ServiceRoute.parent "File_system"
184
-              , ServiceRoute.parent "Nitpicker"
183
+              , ServiceRoute.parent "Gui"
185 184
               , ServiceRoute.parent "Rtc"
186 185
               , ServiceRoute.parent "Timer"
187 186
               ]

+ 0
- 1
nixos-modules/dhall/fs-log.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Genode = env:DHALL_GENODE
3 2
 
4 3
 let Init = Genode.Init

+ 5
- 6
nixos-modules/dhall/graphical-log.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Genode = env:DHALL_GENODE
3 2
 
4 3
 let Prelude = Genode.Prelude
@@ -23,12 +22,12 @@ in  Init::{
23 22
           Text
24 23
           Init.ServiceRoute.Type
25 24
           Init.ServiceRoute.parent
26
-          [ "Nitpicker", "Rtc", "Timer" ]
25
+          [ "Gui", "Rtc", "Timer" ]
27 26
     , children = toMap
28
-        { nit_fb =
27
+        { gui_fb =
29 28
             Child.flat
30 29
               Child.Attributes::{
31
-              , binary = "nit_fb"
30
+              , binary = "gui_fb"
32 31
               , config = Init.Config::{
33 32
                 , attributes = toMap
34 33
                     { initial_width = "600", initial_height = "600" }
@@ -64,8 +63,8 @@ in  Init::{
64 63
               , provides = [ "Terminal" ]
65 64
               , resources = Resources::{ caps = 256, ram = Genode.units.MiB 4 }
66 65
               , routes =
67
-                [ ServiceRoute.child "Framebuffer" "nit_fb"
68
-                , ServiceRoute.child "Input" "nit_fb"
66
+                [ ServiceRoute.child "Framebuffer" "gui_fb"
67
+                , ServiceRoute.child "Input" "gui_fb"
69 68
                 , ServiceRoute.parent "File_system"
70 69
                 ]
71 70
               }

+ 8
- 8
nixos-modules/dhall/qwerty.chargen.dhall Vedi File

@@ -20,18 +20,18 @@ let Map =
20 20
 let boolToAttr = λ(_ : Bool) → if _ then "yes" else "no"
21 21
 
22 22
 let keyToXML =
23
-        λ(x : Prelude.Map.Entry Text Key)
24
-       XML.leaf
23
+      λ(x : Prelude.Map.Entry Text Key)
24
+        XML.leaf
25 25
           { name = "key"
26 26
           , attributes =
27 27
             [ merge
28 28
                 { Ascii =
29
-                      λ(_ : Natural)
30
-                     { mapKey = "ascii", mapValue = Prelude.Natural.show _ }
29
+                    λ(_ : Natural)
30
+                      { mapKey = "ascii", mapValue = Prelude.Natural.show _ }
31 31
                 , Char = λ(_ : Text) → { mapKey = "char", mapValue = _ }
32 32
                 , Code =
33
-                      λ(_ : Natural)
34
-                     { mapKey = "code", mapValue = Prelude.Natural.show _ }
33
+                    λ(_ : Natural)
34
+                      { mapKey = "code", mapValue = Prelude.Natural.show _ }
35 35
                 }
36 36
                 x.mapValue
37 37
             , { mapKey = "name", mapValue = x.mapKey }
@@ -39,8 +39,8 @@ let keyToXML =
39 39
           }
40 40
 
41 41
 let mapToXML =
42
-        λ(map : Map.Type)
43
-       XML.element
42
+      λ(map : Map.Type)
43
+        XML.element
44 44
           { name = "map"
45 45
           , attributes = toMap
46 46
               { mod1 = boolToAttr map.mod1

+ 45
- 47
nixos-modules/dhall/root.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Genode = env:DHALL_GENODE
3 2
 
4 3
 let Prelude = Genode.Prelude
@@ -20,22 +19,22 @@ let DefaultPolicy = Init.Config.DefaultPolicy
20 19
 let LabelSelector = Init.LabelSelector
21 20
 
22 21
 let label =
23
-        λ(label : Text)
24
-       { local = label, route = label } : Child.Attributes.Label
22
+      λ(label : Text)
23
+        { local = label, route = label } : Child.Attributes.Label
25 24
 
26 25
 let rootInit =
27
-        λ ( params
28
-          : { fbDriver : Init.Child.Type
29
-            , guests : Init.Children.Type
30
-            , inputFilterChargens : List XML.Type
31
-            , partitionType : Text
32
-            , wm : Init.Type
33
-            , graphical-log : Init.Type
34
-            , fs-log : Init.Type
35
-            , systemLabel : Text
36
-            }
37
-          )
38
-       Init::{
26
+      λ ( params
27
+        : { fbDriver : Init.Child.Type
28
+          , guests : Init.Children.Type
29
+          , inputFilterChargens : List XML.Type
30
+          , partitionType : Text
31
+          , wm : Init.Type
32
+          , graphical-log : Init.Type
33
+          , fs-log : Init.Type
34
+          , systemLabel : Text
35
+          }
36
+        )
37
+        Init::{
39 38
         , children = toMap
40 39
             { timer =
41 40
                 Child.flat
@@ -113,8 +112,8 @@ let rootInit =
113 112
                             # Prelude.List.map
114 113
                                 PciPolicy/Type
115 114
                                 XML.Type
116
-                                (   λ(policy : PciPolicy/Type)
117
-                                   XML.element
115
+                                ( λ(policy : PciPolicy/Type)
116
+                                    XML.element
118 117
                                       { name = "policy"
119 118
                                       , attributes = toMap
120 119
                                           { label_suffix = policy.labelSuffix }
@@ -141,24 +140,22 @@ let rootInit =
141 140
                     }
142 141
                   }
143 142
             , framebuffer = params.fbDriver
144
-            , input_filter =
143
+            , event_filter =
145 144
                 Child.flat
146 145
                   Child.Attributes::{
147
-                  , binary = "input_filter"
146
+                  , binary = "event_filter"
148 147
                   , config =
149 148
                       let key =
150
-                              λ(name : Text)
151
-                            → XML.leaf
152
-                                { name = "key"
153
-                                , attributes = toMap { name = name }
154
-                                }
149
+                            λ(name : Text) →
150
+                              XML.leaf
151
+                                { name = "key", attributes = toMap { name } }
155 152
 
156 153
                       let remap =
157
-                              λ(name : Text)
158
-                            λ(to : Text)
159
-                             XML.leaf
154
+                            λ(name : Text)
155
+                            λ(to : Text)
156
+                              XML.leaf
160 157
                                 { name = "key"
161
-                                , attributes = toMap { name = name, to = to }
158
+                                , attributes = toMap { name, to }
162 159
                                 }
163 160
 
164 161
                       in  Init.Config::{
@@ -243,7 +240,7 @@ let rootInit =
243 240
                     [ ServiceRoute.parentLabel
244 241
                         "ROM"
245 242
                         (Some "config")
246
-                        (Some "config -> input_filter.config")
243
+                        (Some "config -> event_filter.config")
247 244
                     , ServiceRoute.childLabel
248 245
                         "Input"
249 246
                         "ps2_drv"
@@ -254,6 +251,7 @@ let rootInit =
254 251
                         "usb_drv"
255 252
                         (Some "usb")
256 253
                         (None Text)
254
+                    , ServiceRoute.child "Capture" "nitpicker"
257 255
                     ]
258 256
                   }
259 257
             , ps2_drv =
@@ -303,11 +301,11 @@ let rootInit =
303 301
                 Init.toChild
304 302
                   params.wm
305 303
                   Init.Attributes::{
306
-                  , provides = [ "Nitpicker", "Report", "ROM" ]
304
+                  , provides = [ "Capture", "Event", "Gui", "Report", "ROM" ]
307 305
                   , romReports = [ label "clipboard", label "shape" ]
308 306
                   , routes =
309 307
                     [ ServiceRoute.child "Framebuffer" "framebuffer"
310
-                    , ServiceRoute.child "Input" "input_filter"
308
+                    , ServiceRoute.child "Input" "event_filter"
311 309
                     ]
312 310
                   }
313 311
             , fonts_fs =
@@ -408,7 +406,7 @@ let rootInit =
408 406
                   params.graphical-log
409 407
                   Init.Attributes::{
410 408
                   , routes =
411
-                    [ ServiceRoute.child "Nitpicker" "wm"
409
+                    [ ServiceRoute.child "Gui" "wm"
412 410
                     , ServiceRoute.child "File_system" "fonts_fs"
413 411
                     ]
414 412
                   }
@@ -474,8 +472,8 @@ let rootInit =
474 472
                           Prelude.List.map
475 473
                             Natural
476 474
                             XML.Type
477
-                            (   λ(i : Natural)
478
-                               XML.leaf
475
+                            ( λ(i : Natural)
476
+                                XML.leaf
479 477
                                   { name = "policy"
480 478
                                   , attributes =
481 479
                                       let partition =
@@ -483,7 +481,7 @@ let rootInit =
483 481
 
484 482
                                       in  toMap
485 483
                                             { label_suffix = " ${partition}"
486
-                                            , partition = partition
484
+                                            , partition
487 485
                                             , writeable = "yes"
488 486
                                             }
489 487
                                   }
@@ -663,8 +661,8 @@ let rootInit =
663 661
                               # Prelude.List.map
664 662
                                   Text
665 663
                                   XML.Type
666
-                                  (   λ(proto : Text)
667
-                                     XML.element
664
+                                  ( λ(proto : Text)
665
+                                      XML.element
668 666
                                         { name = proto
669 667
                                         , attributes = toMap
670 668
                                             { dst = "0.0.0.0/0"
@@ -696,11 +694,11 @@ let rootInit =
696 694
                   Init.Attributes::{
697 695
                   , routes =
698 696
                     [ ServiceRoute.parent "VM"
699
-                    , ServiceRoute.child "Nitpicker" "wm"
697
+                    , ServiceRoute.child "Gui" "wm"
700 698
                     , { service =
701
-                          { name = "File_system"
702
-                          , label = LabelSelector.last "fonts"
703
-                          }
699
+                        { name = "File_system"
700
+                        , label = LabelSelector.last "fonts"
701
+                        }
704 702
                       , route =
705 703
                           Init.Route.Type.Child
706 704
                             { name = "fonts_fs"
@@ -709,9 +707,9 @@ let rootInit =
709 707
                             }
710 708
                       }
711 709
                     , { service =
712
-                          { name = "File_system"
713
-                          , label = LabelSelector.suffix "nix/store"
714
-                          }
710
+                        { name = "File_system"
711
+                        , label = LabelSelector.suffix "nix/store"
712
+                        }
715 713
                       , route =
716 714
                           Init.Route.Type.Child
717 715
                             { name = "file_system"
@@ -720,9 +718,9 @@ let rootInit =
720 718
                             }
721 719
                       }
722 720
                     , { service =
723
-                          { name = "File_system"
724
-                          , label = LabelSelector.prefix "console"
725
-                          }
721
+                        { name = "File_system"
722
+                        , label = LabelSelector.prefix "console"
723
+                        }
726 724
                       , route =
727 725
                           Init.Route.Type.Child
728 726
                             { name = "file_system"

+ 1
- 2
nixos-modules/dhall/show_input.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Genode = env:DHALL_GENODE
3 2
 
4 3
 let Prelude = Genode.Prelude
@@ -38,5 +37,5 @@ in  Child.flat
38 37
         }
39 38
       , resources = Resources::{ ram = Genode.units.MiB 32 }
40 39
       , routes =
41
-        [ ServiceRoute.parent "File_system", ServiceRoute.parent "Nitpicker" ]
40
+        [ ServiceRoute.parent "File_system", ServiceRoute.parent "Gui" ]
42 41
       }

+ 10
- 13
nixos-modules/dhall/vbox-guest.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Genode = env:DHALL_GENODE
3 2
 
4 3
 let Prelude = Genode.Prelude
@@ -14,11 +13,11 @@ let Resources = Init.Resources
14 13
 let ServiceRoute = Init.ServiceRoute
15 14
 
16 15
 let Vfs/inline =
17
-        λ(name : Text)
18
-      λ(body : Text)
19
-       XML.element
16
+      λ(name : Text)
17
+      λ(body : Text)
18
+        XML.element
20 19
           { name = "inline"
21
-          , attributes = toMap { name = name }
20
+          , attributes = toMap { name }
22 21
           , content = [ XML.text body ]
23 22
           }
24 23
 
@@ -35,8 +34,8 @@ let Params
35 34
       }
36 35
 
37 36
 let toVbox =
38
-        λ(params : Params)
39
-       let vboxConfig =
37
+      λ(params : Params)
38
+        let vboxConfig =
40 39
               let hardDisks =
41 40
                     merge
42 41
                       { ISO = XML.text ""
@@ -158,11 +157,9 @@ let toVbox =
158 157
                       , attributes = XML.emptyAttributes
159 158
                       , content =
160 159
                           let tag =
161
-                                  λ(name : Text)
162
-                                → XML.leaf
163
-                                    { name = name
164
-                                    , attributes = XML.emptyAttributes
165
-                                    }
160
+                                λ(name : Text) →
161
+                                  XML.leaf
162
+                                    { name, attributes = XML.emptyAttributes }
166 163
 
167 164
                           let mutableVfs =
168 165
                                 let fsNode =
@@ -224,7 +221,7 @@ let toVbox =
224 221
               , routes =
225 222
                 [ ServiceRoute.parent "File_system"
226 223
                 , ServiceRoute.parent "Nic"
227
-                , ServiceRoute.parent "Nitpicker"
224
+                , ServiceRoute.parent "Gui"
228 225
                 , ServiceRoute.parent "Rtc"
229 226
                 , ServiceRoute.parent "Timer"
230 227
                 , ServiceRoute.parent "VM"

+ 14
- 13
nixos-modules/dhall/wm.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Genode = env:DHALL_GENODE
3 2
 
4 3
 let Prelude = Genode.Prelude
@@ -20,8 +19,8 @@ let DefaultPolicy = Init.Config.DefaultPolicy
20 19
 let LabelSelector = Init.LabelSelector
21 20
 
22 21
 let label =
23
-        λ(label : Text)
24
-       { local = label, route = label } : Child.Attributes.Label
22
+      λ(label : Text)
23
+        { local = label, route = label } : Child.Attributes.Label
25 24
 
26 25
 in  Init::{
27 26
     , children = toMap
@@ -64,7 +63,7 @@ in  Init::{
64 63
                   , attributes = toMap { domain = "default" }
65 64
                   }
66 65
                 }
67
-              , provides = [ "Nitpicker" ]
66
+              , provides = [ "Gui", "Capture", "Event" ]
68 67
               , resources = Resources::{ caps = 256, ram = Genode.units.MiB 64 }
69 68
               , routes =
70 69
                 [ ServiceRoute.parent "Framebuffer"
@@ -75,7 +74,7 @@ in  Init::{
75 74
             Child.flat
76 75
               Child.Attributes::{
77 76
               , binary = "pointer"
78
-              , routes = [ ServiceRoute.child "Nitpicker" "nitpicker" ]
77
+              , routes = [ ServiceRoute.child "Gui" "nitpicker" ]
79 78
               }
80 79
         , wm =
81 80
             Child.flat
@@ -94,7 +93,7 @@ in  Init::{
94 93
                   ]
95 94
                 , defaultPolicy = Some DefaultPolicy::{=}
96 95
                 }
97
-              , provides = [ "Nitpicker", "Report", "ROM" ]
96
+              , provides = [ "Gui", "Report", "ROM" ]
98 97
               , reportRoms = [ label "focus", label "resize_request" ]
99 98
               , romReports =
100 99
                 [ label "focus_request"
@@ -108,11 +107,11 @@ in  Init::{
108 107
                 }
109 108
               , routes =
110 109
                 [ ServiceRoute.childLabel
111
-                    "Nitpicker"
110
+                    "Gui"
112 111
                     "nitpicker"
113 112
                     (Some "")
114 113
                     (Some "focus")
115
-                , ServiceRoute.child "Nitpicker" "nitpicker"
114
+                , ServiceRoute.child "Gui" "nitpicker"
116 115
                 , ServiceRoute.parentLabel
117 116
                     "Report"
118 117
                     (Some "clipboard")
@@ -175,7 +174,7 @@ in  Init::{
175 174
                       ''
176 175
                   ]
177 176
                 }
178
-              , provides = [ "Nitpicker", "Report", "ROM" ]
177
+              , provides = [ "Gui", "Report", "ROM" ]
179 178
               , romReports =
180 179
                 [ label "focus"
181 180
                 , label "resize_request"
@@ -194,7 +193,7 @@ in  Init::{
194 193
                 , caps = 256
195 194
                 , ram = Genode.units.MiB 8
196 195
                 }
197
-              , routes = [ ServiceRoute.child "Nitpicker" "wm" ]
196
+              , routes = [ ServiceRoute.child "Gui" "wm" ]
198 197
               }
199 198
         , decorator =
200 199
             Child.flat
@@ -217,20 +216,22 @@ in  Init::{
217 216
                   ]
218 217
                 , defaultPolicy = Some DefaultPolicy::{=}
219 218
                 }
220
-              , provides = [ "Nitpicker", "Report", "ROM" ]
219
+              , provides = [ "Gui", "Report", "ROM" ]
221 220
               , reportRoms = [ label "window_layout", label "pointer" ]
222 221
               , romReports = [ label "decorator_margins", label "hover" ]
223 222
               , resources = Init.Resources::{
224 223
                 , caps = 128
225 224
                 , ram = Genode.units.MiB 12
226 225
                 }
227
-              , routes = [ ServiceRoute.child "Nitpicker" "wm" ]
226
+              , routes = [ ServiceRoute.child "Gui" "wm" ]
228 227
               }
229 228
         }
230 229
     , routes = [ ServiceRoute.parent "Timer" ]
231 230
     , services =
232
-      [ ServiceRoute.child "Nitpicker" "wm"
231
+      [ ServiceRoute.child "Gui" "wm"
233 232
       , ServiceRoute.child "Report" "wm"
234 233
       , ServiceRoute.child "ROM" "wm"
234
+      , ServiceRoute.child "Event" "Nitpicker"
235
+      , ServiceRoute.child "Capture" "Nitpicker"
235 236
       ]
236 237
     }

+ 8
- 8
nixos-modules/dhall/workman.chargen.dhall Vedi File

@@ -20,18 +20,18 @@ let Map =
20 20
 let boolToAttr = λ(_ : Bool) → if _ then "yes" else "no"
21 21
 
22 22
 let keyToXML =
23
-        λ(x : Prelude.Map.Entry Text Key)
24
-       XML.leaf
23
+      λ(x : Prelude.Map.Entry Text Key)
24
+        XML.leaf
25 25
           { name = "key"
26 26
           , attributes =
27 27
             [ merge
28 28
                 { Ascii =
29
-                      λ(_ : Natural)
30
-                     { mapKey = "ascii", mapValue = Prelude.Natural.show _ }
29
+                    λ(_ : Natural)
30
+                      { mapKey = "ascii", mapValue = Prelude.Natural.show _ }
31 31
                 , Char = λ(_ : Text) → { mapKey = "char", mapValue = _ }
32 32
                 , Code =
33
-                      λ(_ : Natural)
34
-                     { mapKey = "code", mapValue = Prelude.Natural.show _ }
33
+                    λ(_ : Natural)
34
+                      { mapKey = "code", mapValue = Prelude.Natural.show _ }
35 35
                 }
36 36
                 x.mapValue
37 37
             , { mapKey = "name", mapValue = x.mapKey }
@@ -39,8 +39,8 @@ let keyToXML =
39 39
           }
40 40
 
41 41
 let mapToXML =
42
-        λ(map : Map.Type)
43
-       XML.element
42
+      λ(map : Map.Type)
43
+        XML.element
44 44
           { name = "map"
45 45
           , attributes = toMap
46 46
               { mod1 = boolToAttr map.mod1

+ 24
- 11
packages/genodelabs/LIB.patch Vedi File

@@ -1,6 +1,6 @@
1
-commit 2db637f21b83701d21aa66295cd35c737649ecdc
1
+commit b7d219220e10699dedb2c90e2d4010cbfab74a86
2 2
 Author: Emery Hemingway <ehmry@posteo.net>
3
-Date:   Tue May 5 21:39:21 2020 +0530
3
+Date:   Sun Aug 30 10:47:51 2020 +0200
4 4
 
5 5
     Produce libraries with conventional names
6 6
 
@@ -33,10 +33,10 @@ index 190dd92aa1..6611d05d2a 100644
33 33
  	  echo "endif") >> $(LIB_DEP_FILE)
34 34
  #
35 35
 diff --git a/repos/base/mk/generic.mk b/repos/base/mk/generic.mk
36
-index d551ac205b..e23fade62f 100644
36
+index 0531c08d58..4eefc6822c 100644
37 37
 --- a/repos/base/mk/generic.mk
38 38
 +++ b/repos/base/mk/generic.mk
39
-@@ -129,7 +129,7 @@ binary_%.o: %
39
+@@ -139,7 +139,7 @@ binary_%.o: %
40 40
  # This is a problem in situations where the undefined symbol is resolved by an
41 41
  # archive rather than the target. I.e., when linking posix.lib.a (which
42 42
  # provides 'Libc::Component::construct'), the 'construct' function is merely
@@ -45,7 +45,7 @@ index d551ac205b..e23fade62f 100644
45 45
  # reference apparently does not suffice to keep the posix.lib.a's symbol. By
46 46
  # adding a hard dependency, we force the linker to resolve the symbol and don't
47 47
  # drop posix.lib.a.
48
-@@ -164,12 +164,17 @@ endif
48
+@@ -174,12 +174,17 @@ endif
49 49
  # time a user of the library is linked, the ABI stub should be used instead of
50 50
  # the library.
51 51
  #
@@ -67,10 +67,23 @@ index d551ac205b..e23fade62f 100644
67 67
 -	$(VERBOSE)ln -sf $(call select_so,$@) $@
68 68
 +	$(VERBOSE)ln -sf $(call select_so,$@) $(patsubst liblib%,lib%,$@)
69 69
 diff --git a/repos/base/mk/lib.mk b/repos/base/mk/lib.mk
70
-index bfee2c7420..fac49c7298 100644
70
+index c8ac049563..776aea82aa 100644
71 71
 --- a/repos/base/mk/lib.mk
72 72
 +++ b/repos/base/mk/lib.mk
73
-@@ -123,14 +123,20 @@ message:
73
+@@ -95,7 +95,12 @@ endif
74
+ #
75
+ ifneq ($(SYMBOLS),)
76
+ ABI_SO := $(addsuffix .abi.so,$(LIB))
77
++ifeq ($(LIB),ld)
78
+ ABI_SONAME := $(addsuffix .lib.so,$(LIB))
79
++else
80
++ABI_SONAME := $(addsuffix .so,$(addprefix lib,$(patsubst lib%,%,$(LIB))))
81
++endif
82
++
83
+ 
84
+ $(LIB).symbols:
85
+ 	$(VERBOSE)ln -sf $(SYMBOLS) $@
86
+@@ -124,14 +129,20 @@ message:
74 87
  include $(BASE_DIR)/mk/generic.mk
75 88
  
76 89
  #
@@ -93,7 +106,7 @@ index bfee2c7420..fac49c7298 100644
93 106
    INSTALL_SO := $(INSTALL_DIR)/$(LIB_SO)
94 107
    DEBUG_SO   := $(DEBUG_DIR)/$(LIB_SO)
95 108
   endif
96
-@@ -150,7 +156,7 @@ ifneq ($(LIB_SO),)
109
+@@ -151,7 +162,7 @@ ifneq ($(LIB_SO),)
97 110
  endif
98 111
  
99 112
  #
@@ -102,7 +115,7 @@ index bfee2c7420..fac49c7298 100644
102 115
  #
103 116
  LIB_TAG := $(addsuffix .lib.tag,$(LIB))
104 117
  all: $(LIB_TAG)
105
-@@ -203,7 +209,7 @@ STATIC_LIBS       := $(sort $(foreach l,$(ARCHIVES:.lib.a=),$(LIB_CACHE_DIR)/$l/
118
+@@ -204,7 +215,7 @@ STATIC_LIBS       := $(sort $(foreach l,$(ARCHIVES:.lib.a=),$(LIB_CACHE_DIR)/$l/
106 119
  STATIC_LIBS_BRIEF := $(subst $(LIB_CACHE_DIR),$$libs,$(STATIC_LIBS))
107 120
  
108 121
  #
@@ -162,10 +175,10 @@ index 73fd407db7..554d943763 100644
162 175
  
163 176
  
164 177
 diff --git a/repos/libports/src/lib/libc/kernel.cc b/repos/libports/src/lib/libc/kernel.cc
165
-index 5dd4b2a2d6..430295e7d5 100644
178
+index b1bca7c80f..a4bebaeae1 100644
166 179
 --- a/repos/libports/src/lib/libc/kernel.cc
167 180
 +++ b/repos/libports/src/lib/libc/kernel.cc
168
-@@ -308,10 +308,10 @@ void Libc::Kernel::_clone_state_from_parent()
181
+@@ -418,10 +418,10 @@ void Libc::Kernel::_clone_state_from_parent()
169 182
  			 * regular startup of the child.
170 183
  			 */
171 184
  			bool const blacklisted = (name == "ld.lib.so")

+ 2
- 2
packages/genodelabs/default.nix Vedi File

@@ -1,7 +1,7 @@
1 1
 { buildPackages, targetPackages }:
2 2
 
3 3
 let
4
-  version = "20.05";
4
+  version = "20.08";
5 5
   # Update ./port-versions.nix bumping the version and updateing the sources.
6 6
 
7 7
   platform = targetPackages.targetPlatform;
@@ -32,7 +32,7 @@ let
32 32
       inherit version;
33 33
       src = fetchurl {
34 34
         url = "https://github.com/genodelabs/genode/archive/${version}.tar.gz";
35
-        hash = "sha256-5Fd8ywGbDtQF+9yDZ5xAQ7l1Vzh1jQAQeqVj+EtO1us=";
35
+        hash = "sha256-tFuLVuaN5F9lAEtn0lpd0MgPQpOcFixOtOsQ/z4TwPI=";
36 36
       };
37 37
       nativeBuildInputs = [ expect gnumake tcl ];
38 38
       patches = [ ./LIB.patch ./binary-labels.patch ];

packages/genodelabs/input_filter.patch → packages/genodelabs/event_filter.patch Vedi File

@@ -6,11 +6,11 @@ Date:   Wed Apr 29 03:34:15 2020 +0530
6 6
 
7 7
 diff --git a/repos/os/src/server/input_filter/chargen_source.h b/repos/os/src/server/input_filter/chargen_source.h
8 8
 index 06fc657c25..3525fd6f34 100644
9
---- a/repos/os/src/server/input_filter/chargen_source.h
10
-+++ b/repos/os/src/server/input_filter/chargen_source.h
9
+--- a/repos/os/src/server/event_filter/chargen_source.h
10
++++ b/repos/os/src/server/event_filter/chargen_source.h
11 11
 @@ -684,9 +684,10 @@ class Input_filter::Chargen_source : public Source, Source::Sink
12 12
  			node.for_each_sub_node("key", [&] (Xml_node key_node) {
13
- 
13
+
14 14
  				Key_name const name = key_node.attribute_value("name", Key_name());
15 15
 -				Input::Keycode const key = key_code_by_name(name);
16 16
 -
@@ -20,5 +20,5 @@ index 06fc657c25..3525fd6f34 100644
20 20
 +					new (_alloc) Modifier(_modifiers, id, key);
21 21
 +				} catch (Unknown_key) { warning("unrecognized key name ", name); }
22 22
  			});
23
- 
23
+
24 24
  			node.for_each_sub_node("rom", [&] (Xml_node rom_node) {

+ 0
- 27
packages/genodelabs/libc.patch Vedi File

@@ -85,30 +85,3 @@ index 150640ddf3..e511897600 100644
85 85
  DUMMY(int   , -1, getpriority, (int, int))
86 86
  DUMMY(int   , -1, getrusage, (int, rusage *))
87 87
  DUMMY_SILENT(uid_t ,  0, getuid, (void))
88
-commit c3d87d0a79f9e30aebdf26d3b684c6b1b2214c51
89
-Author: Emery Hemingway <ehmry@posteo.net>
90
-Date:   Wed Jun 10 20:15:44 2020 +0530
91
-
92
-    libc: add newlocale and freelocale dummies
93
-    
94
-    Fix #3777
95
-
96
-diff --git a/repos/libports/src/lib/libc/nolocale.cc b/repos/libports/src/lib/libc/nolocale.cc
97
-index 9d43c35acb..ec37b81336 100644
98
---- a/repos/libports/src/lib/libc/nolocale.cc
99
-+++ b/repos/libports/src/lib/libc/nolocale.cc
100
-@@ -64,4 +64,14 @@ char *setlocale(int, const char *)
101
- 	return (char*)"C";
102
- }
103
- 
104
-+
105
-+locale_t newlocale(int, const char *locale, locale_t)
106
-+{
107
-+	Genode::warning("cannot set \"", locale, "\" locale, not implemented");
108
-+	return NULL;
109
-+}
110
-+
111
-+
112
-+void freelocale(locale_t) { }
113
-+
114
- }

+ 9
- 13
packages/genodelabs/port-versions.nix Vedi File

@@ -1,8 +1,7 @@
1 1
 # The file is generated by the "genodeSources" derivation.
2 2
 {
3 3
   acpica = "5c1c54";
4
-  ada-runtime = "db8987";
5
-  arora = "e8f003";
4
+  ada-runtime = "fabce1";
6 5
   bash = "02edac";
7 6
   bbl = "b9358c";
8 7
   binutils = "62d309";
@@ -14,7 +13,6 @@
14 13
   dde_ipxe = "b68f4e";
15 14
   dde_linux = "173719";
16 15
   dde_rump = "9afe56";
17
-  dde_zircon = "49e3d9";
18 16
   diffutils = "ee502a";
19 17
   drm = "01858a";
20 18
   e2fsprogs = "2a09cd";
@@ -31,23 +29,22 @@
31 29
   gcc = "20345a";
32 30
   gcov = "a6f852";
33 31
   gdb = "8eddf0";
34
-  getdns = "030233";
35 32
   gmp = "855680";
36 33
   gnupg = "c784d4";
37 34
   grep = "b96a88";
38
-  grub2 = "8cf62c";
35
+  grub2 = "856f99";
39 36
   icu = "62f13b";
40 37
   jbig2dec = "682269";
41 38
   jitterentropy = "6017e1";
42 39
   jpeg = "5effdd";
43 40
   less = "e7a42c";
44 41
   libarchive = "7ce310";
45
-  libc = "2e544d";
42
+  libc = "771dcc";
46 43
   libdrm = "c1cce0";
47 44
   libgcrypt = "37159a";
48 45
   libiconv = "3f5ca3";
49 46
   libpng = "ac05f3";
50
-  libsparkcrypto = "d479dc";
47
+  libsparkcrypto = "924de3";
51 48
   libssh = "a475cc";
52 49
   libusb = "633358";
53 50
   libyaml = "1cde80";
@@ -74,23 +71,22 @@
74 71
   pistachio = "68c8c3";
75 72
   qemu-usb = "2ff18f";
76 73
   qoost = "014d68";
77
-  qt5 = "084385";
78
-  qt5-host = "ad5edc";
74
+  qt5 = "1b1c56";
75
+  qt5-host = "21e078";
79 76
   readline = "a0bfb0";
80
-  sanitizer = "181889";
77
+  sanitizer = "3ac05b";
81 78
   sed = "459979";
82 79
   sel4 = "793548";
83 80
   sel4_tools = "4ee1b9";
84 81
   seoul = "e8d696";
85
-  solo5 = "55dd4f";
86 82
   stb = "ab8f50";
87
-  stdcxx = "79ad88";
83
+  stdcxx = "722e94";
88 84
   tar = "19aea4";
89 85
   tcl = "842b1a";
90 86
   ttf-bitstream-vera = "cd3684";
91 87
   uboot = "f3fd6b";
92 88
   vim = "53caaa";
93
-  virtualbox5 = "e93407";
89
+  virtualbox5 = "e60d97";
94 90
   which = "91c953";
95 91
   x86emu = "8a1c3a";
96 92
   xz = "45203f";

+ 4
- 4
packages/genodelabs/ports.nix Vedi File

@@ -4,7 +4,7 @@
4 4
 { buildPackages }:
5 5
 with buildPackages; {
6 6
   binutils = {
7
-    hash = "sha256-gTYP9YNx+x6KVfIMjTD+UAReWwUg93TCkJIWwAau9eA=";
7
+    hash = "sha256-Y6EwEb2uFNzJ/6Q+7Jia7LZu5iRt1XkzkogUxiC93t8=";
8 8
     nativeBuildInputs = [ autoconf ];
9 9
   };
10 10
   dde_bsd.hash = "sha256-Z2piyoOrNmXyEEp+kX5w/q4JTylYdSOocUrFeqjz13A=";
@@ -26,7 +26,7 @@ with buildPackages; {
26 26
   jitterentropy.hash = "sha256-6KS732GxtUMz0xPYKtshdn039DgdJq11vTDQesZn4Ds=";
27 27
   jpeg.hash = "sha256-RLVnlrnYGrhqr3Feikoi/BNditCaKN0u3t9/UDpl2wQ=";
28 28
   libc = {
29
-    hash = "sha256-ONmUhqY7rVtH6Z+K7VCY0OMLNi1SF1XCHFjiVY3MW3c=";
29
+    hash = "sha256-bD0Kqho7ABMHxFYOAkQlvJgzSIsomy5OTtpKE+JAVUY=";
30 30
     nativeBuildInputs = [ buildPackages.gcc ];
31 31
   };
32 32
   libiconv.hash = "sha256-25YcW5zo1fE33ZolGQroR+KZO8wHEdN1QXa7+MhwS78=";
@@ -44,9 +44,9 @@ with buildPackages; {
44 44
   openssl.hash = "sha256-epRL3SobYQ7xf8qwp6D5xu/Ms2T/LhUjjs273ywWRWg=";
45 45
   qemu-usb.hash = "sha256-F4ZXeH5sx3FOcD42zFOxKFMsqGookKdav1NJ7YgVw98=";
46 46
   stb.hash = "sha256-9LSH1i8jcEvjRAmTvgtK+Axy9hO7uiSzmSgBvs0zkTc=";
47
-  stdcxx.hash = "sha256-iiE009fL1yE3XJ7HkaJakOiS++m7qONwwGrdJjBXQ7k=";
47
+  stdcxx.hash = "sha256-4Gn/TyA/q83kyO8f5Wr+gv8fNYR5YPDNZIk7+Ty5fn4=";
48 48
   virtualbox5 = {
49
-    hash = "sha256-HLga/0pHQkjdMH7mU194B7pTFJoOoww69Yii4Ixmkxo=";
49
+    hash = "sha256-ERI+j2thvyMj+TJSHDdA9sOQdIxrXfNfMNJIa8VRE0M=";
50 50
     nativeBuildInputs = [ iasl libxslt unzip yasm ];
51 51
   };
52 52
   x86emu.hash = "sha256-QY6OL+cDVjQ67JItP1rS4ufPRGZf43AZtWxwza/0q0w=";

+ 1
- 4
packages/genodelabs/targets.nix Vedi File

@@ -11,13 +11,10 @@ let
11 11
 
12 12
   vbox5' = {
13 13
     nativeBuildInputs = with buildPackages; [ iasl yasm ];
14
-    patches = [ ./vbox-framebuffer-fail-on-fail.patch ];
15 14
     portInputs = [ libc libiconv qemu-usb stdcxx virtualbox5 ];
16 15
   };
17 16
 in {
18 17
 
19
-  cached_fs_rom.patches = [ ./cached_fs_rom.patch ];
20
-
21 18
   fb_sdl = with buildPackages; {
22 19
     nativeBuildInputs = [ pkgconfig ];
23 20
     buildInputs = [ SDL ];
@@ -28,7 +25,7 @@ in {
28 25
 
29 26
   init.patches = [ ./sandbox.patch ];
30 27
 
31
-  input_filter.patches = [ ./input_filter.patch ];
28
+  event_filter.patches = [ ./event_filter.patch ];
32 29
 
33 30
   intel_fb_drv = {
34 31
     BOARD = "pc";

+ 0
- 126
packages/genodelabs/vbox-framebuffer-fail-on-fail.patch Vedi File

@@ -1,126 +0,0 @@
1
-commit d2a28a33f6a2bda7000ce201d52ff99714895640
2
-Author: Emery Hemingway <ehmry@posteo.net>
3
-Date:   Fri May 15 11:28:10 2020 +0530
4
-
5
-    vbox: use Nitpicker mode for initial resolution
6
-
7
-diff --git a/repos/ports/src/virtualbox5/frontend/fb.h b/repos/ports/src/virtualbox5/frontend/fb.h
8
-index 95a7db8602..bf2d65d7c1 100644
9
---- a/repos/ports/src/virtualbox5/frontend/fb.h
10
-+++ b/repos/ports/src/virtualbox5/frontend/fb.h
11
-@@ -40,7 +40,7 @@ class Genodefb :
12
- 		Nitpicker::Connection &_nitpicker;
13
- 		Fb_Genode::Session    &_fb { *_nitpicker.framebuffer() };
14
- 		View_handle            _view;
15
--		Fb_Genode::Mode        _fb_mode { 1024, 768, Fb_Genode::Mode::RGB565 };
16
-+		Fb_Genode::Mode        _fb_mode { _nitpicker.mode() };
17
- 
18
- 		/*
19
- 		 * The mode currently used by the VM. Can be smaller than the
20
-
21
-commit b6bf91067a4c1c6d5b3508aedd949c8e1a7fe4b3
22
-Author: Emery Hemingway <ehmry@posteo.net>
23
-Date:   Fri May 15 11:20:47 2020 +0530
24
-
25
-    vbox: fail on invalid framebuffer dataspace
26
-    
27
-    VirtualBox can hang during initialization if Nitpicker returns an
28
-    invalid dataspace due to insufficient server-side resources. Make
29
-    an invalid dataspace a critical rather than silent error.
30
-
31
-diff --git a/repos/ports/src/virtualbox5/frontend/fb.h b/repos/ports/src/virtualbox5/frontend/fb.h
32
-index dce00fe4eb..95a7db8602 100644
33
---- a/repos/ports/src/virtualbox5/frontend/fb.h
34
-+++ b/repos/ports/src/virtualbox5/frontend/fb.h
35
-@@ -21,6 +21,9 @@
36
- #include <os/texture_rgb888.h>
37
- #include <os/dither_painter.h>
38
- 
39
-+#include <base/attached_dataspace.h>
40
-+#include <util/reconstructible.h>
41
-+
42
- /* VirtualBox includes */
43
- 
44
- #include "Global.h"
45
-@@ -35,7 +38,7 @@ class Genodefb :
46
- 
47
- 		Genode::Env           &_env;
48
- 		Nitpicker::Connection &_nitpicker;
49
--		Fb_Genode::Session    &_fb;
50
-+		Fb_Genode::Session    &_fb { *_nitpicker.framebuffer() };
51
- 		View_handle            _view;
52
- 		Fb_Genode::Mode        _fb_mode { 1024, 768, Fb_Genode::Mode::RGB565 };
53
- 
54
-@@ -43,18 +46,18 @@ class Genodefb :
55
- 		 * The mode currently used by the VM. Can be smaller than the
56
- 		 * framebuffer mode.
57
- 		 */
58
--		Fb_Genode::Mode        _virtual_fb_mode;
59
-+		Fb_Genode::Mode        _virtual_fb_mode { _initial_setup() };
60
-+
61
-+		Genode::Reconstructible<Genode::Attached_dataspace>
62
-+		                       _fb_dataspace { _env.rm(), _fb.dataspace() };
63
- 
64
--		void                  *_fb_base;
65
- 		RTCRITSECT             _fb_lock;
66
- 
67
- 		void _clear_screen()
68
- 		{
69
--			if (!_fb_base) return;
70
--
71
- 			size_t const max_h = Genode::min(_fb_mode.height(), _virtual_fb_mode.height());
72
- 			size_t const num_pixels = _fb_mode.width() * max_h;
73
--			memset(_fb_base, 0, num_pixels * _fb_mode.bytes_per_pixel());
74
-+			memset(_fb_dataspace->local_addr<char>(), 0, num_pixels * _fb_mode.bytes_per_pixel());
75
- 			_fb.refresh(0, 0, _virtual_fb_mode.width(), _virtual_fb_mode.height());
76
- 		}
77
- 
78
-@@ -91,10 +94,7 @@ class Genodefb :
79
- 		Genodefb (Genode::Env &env, Nitpicker::Connection &nitpicker)
80
- 		:
81
- 			_env(env),
82
--			_nitpicker(nitpicker),
83
--			_fb(*nitpicker.framebuffer()),
84
--			_virtual_fb_mode(_initial_setup()),
85
--			_fb_base(env.rm().attach(_fb.dataspace()))
86
-+			_nitpicker(nitpicker)
87
- 		{
88
- 			int rc = RTCritSectInit(&_fb_lock);
89
- 			Assert(rc == VINF_SUCCESS);
90
-@@ -109,16 +109,11 @@ class Genodefb :
91
- 
92
- 			_fb_mode = mode;
93
- 
94
--			if (_fb_base)
95
--				_env.rm().detach(_fb_base);
96
-+			_fb_dataspace.destruct();
97
- 
98
- 			_adjust_buffer();
99
- 
100
--			try {
101
--				_fb_base = _env.rm().attach(_fb.dataspace());
102
--			} catch (...) {
103
--				_fb_base = nullptr;
104
--			}
105
-+			_fb_dataspace.construct(_env.rm(), _fb.dataspace());
106
- 
107
- 			Unlock();
108
- 		}
109
-@@ -201,8 +196,6 @@ class Genodefb :
110
- 		                               PRUint32 imageSize,
111
- 		                               PRUint8 *image) override
112
- 		{
113
--			if (!_fb_base) return S_OK;
114
--
115
- 			Lock();
116
- 
117
- 			Nitpicker::Area const area_fb = Nitpicker::Area(_fb_mode.width(),
118
-@@ -215,7 +208,7 @@ class Genodefb :
119
- 			typedef Pixel_rgb565 Pixel_dst;
120
- 
121
- 			Texture<Pixel_src> texture((Pixel_src *)image, nullptr, area_vm);
122
--			Surface<Pixel_dst> surface((Pixel_dst *)_fb_base, area_fb);
123
-+			Surface<Pixel_dst> surface(_fb_dataspace->local_addr<Pixel_dst>(), area_fb);
124
- 
125
- 			Dither_painter::paint(surface, texture, Surface_base::Point(o_x, o_y));
126
- 

+ 0
- 153
tests/driver_manager.dhall Vedi File

@@ -1,153 +0,0 @@
1
-
2
-let Test = ./test.dhall ? env:DHALL_GENODE_TEST
3
-
4
-let drivers = env:drivers ? ../compositions/pc-drivers.dhall
5
-
6
-let Genode = Test.Genode
7
-
8
-let Init = Genode.Init
9
-
10
-let Child = Init.Child
11
-
12
-let Resources = Init.Resources
13
-
14
-let ServiceRoute = Init.ServiceRoute
15
-
16
-let parentRomRoute =
17
-        λ(from : Text)
18
-      → λ(to : Text)
19
-      → ServiceRoute.parentLabel "ROM" (Some from) (Some to)
20
-
21
-let childRomRoute =
22
-        λ(child : Text)
23
-      → λ(from : Text)
24
-      → ServiceRoute.childLabel "ROM" child (Some from) (None Text)
25
-
26
-let label = λ(_ : Text) → { local = _, route = _ }
27
-
28
-let init =
29
-      Init::{
30
-      , verbose = True
31
-      , routes = [ ServiceRoute.parent "Timer" ]
32
-      , children = toMap
33
-          { drivers =
34
-              Init.toChild
35
-                drivers
36
-                Init.Attributes::{
37
-                , provides = [ "Block", "Framebuffer", "Input" ]
38
-                , resources = Init.Resources::{ ram = Genode.units.MiB 4 }
39
-                , romReports = [ label "block_devices" ]
40
-                , routes =
41
-                  [ parentRomRoute "managed/input_filter" "input_filter.config"
42
-                  , parentRomRoute " numlock_remap" "numlock_remap.config"
43
-                  , childRomRoute "dynamic_rom" "capslock"
44
-                  , childRomRoute "dynamic_rom" "numlock"
45
-                  , childRomRoute "dynamic_rom" "system"
46
-                  , ServiceRoute.child "Report" "_report_rom"
47
-                  , ServiceRoute.parent "IRQ"
48
-                  , ServiceRoute.parent "IO_MEM"
49
-                  , ServiceRoute.parent "IO_PORT"
50
-                  , ServiceRoute.parent "Timer"
51
-                  ]
52
-                }
53
-          , dynamic_rom =
54
-              Child.flat
55
-                Child.Attributes::{
56
-                , binary = "dynamic_rom"
57
-                , resources = Resources::{ ram = Genode.units.MiB 4 }
58
-                , provides = [ "ROM" ]
59
-                , config = Genode.Init.Config::{
60
-                  , content =
61
-                    [ Genode.Prelude.XML.text
62
-                        ''
63
-                        <rom name="system">
64
-                          <inline>
65
-                            <system state=""/>
66
-                          </inline>
67
-                          <sleep milliseconds="10000"/>
68
-                        </rom>
69
-                        ''
70
-                    ]
71
-                  }
72
-                }
73
-          , test-driver_manager =
74
-              Child.flat
75
-                Child.Attributes::{
76
-                , binary = "test-driver_manager"
77
-                , config = Init.Config::{
78
-                  , content =
79
-                    [ Genode.Prelude.XML.text
80
-                        ''
81
-                        <check_ahci_block_device label="ahci-1" block_count="65536" block_size="512" model="QEMU HARDDISK"/>
82
-                        <check_input/>
83
-                        <check_framebuffer/>
84
-                        ''
85
-                    ]
86
-                  }
87
-                , reportRoms = [ label "block_devices" ]
88
-                , routes =
89
-                  [ ServiceRoute.child "Block" "drivers"
90
-                  , ServiceRoute.child "Framebuffer" "drivers"
91
-                  , ServiceRoute.child "Input" "drivers"
92
-                  ]
93
-                }
94
-          }
95
-      }
96
-
97
-let rom =
98
-      Genode.Boot.toRomTexts
99
-        (   toMap
100
-              { capslock = "<feature_creep/>"
101
-              , numlock = "<feature_creep/>"
102
-              , usb_policy = "<usb/>"
103
-              }
104
-          # [ { mapKey = "fb_drv.config"
105
-              , mapValue =
106
-                  ''
107
-                  <config width="1024" height="768" buffered="yes"/>
108
-                  	<report connectors="yes"/>
109
-                  </config>
110
-                  ''
111
-              }
112
-            , { mapKey = "input_filter.config"
113
-              , mapValue =
114
-                  ''
115
-                  <config>
116
-                  	<input label="ps2"/>
117
-                  	<input label="usb"/>
118
-                  	<output>
119
-                  		<chargen>
120
-                  			<remap>
121
-                  				<key name="KEY_F11"      to="KEY_RESTART"/>
122
-                  				<key name="KEY_F12"      to="KEY_DASHBOARD"/>
123
-                  				<key name="KEY_LEFTMETA" to="KEY_SCREEN"/>
124
-                  				<merge>
125
-                  					<accelerate max="50" sensitivity_percent="1000" curve="127">
126
-                  						<button-scroll>
127
-                  							<input name="ps2"/>
128
-                  							<vertical   button="BTN_MIDDLE" speed_percent="-10"/>
129
-                  							<horizontal button="BTN_MIDDLE" speed_percent="-10"/>
130
-                  						</button-scroll>
131
-                  					</accelerate>
132
-                  					<input name="usb"/>
133
-                  				</merge>
134
-                  			</remap>
135
-                  			<mod1>
136
-                  				<key name="KEY_LEFTSHIFT"/> <key name="KEY_RIGHTSHIFT"/>
137
-                  			</mod1>
138
-                  			<mod2>
139
-                  				<key name="KEY_LEFTCTRL"/> <key name="KEY_RIGHTCTRL"/>
140
-                  			</mod2>
141
-                  			<mod3>
142
-                  				<key name="KEY_RIGHTALT"/> <!-- AltGr -->
143
-                  			</mod3>
144
-                  			<repeat delay_ms="230" rate_ms="40"/>
145
-                  		</chargen>
146
-                  	</output>
147
-                  </config>
148
-                  ''
149
-              }
150
-            ]
151
-        )
152
-
153
-in  Test::{ children = Test.initToChildren init, rom = rom }

+ 0
- 1
tests/log.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Test = ./test.dhall ? env:DHALL_GENODE_TEST
3 2
 
4 3
 let Genode = Test.Genode

+ 11
- 12
tests/posix.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Test = ./test.dhall ? env:DHALL_GENODE_TEST
3 2
 
4 3
 let Genode = Test.Genode
@@ -11,8 +10,8 @@ let Init = Genode.Init
11 10
 
12 11
 let Child = Init.Child
13 12
 
14
-in    λ(params : { bash : Text, coreutils : Text, script : Text })
15
-     let init =
13
+in  λ(params : { bash : Text, coreutils : Text, script : Text })
14
+      let init =
16 15
             Init::{
17 16
             , verbose = True
18 17
             , routes =
@@ -83,8 +82,8 @@ in    λ(params : { bash : Text, coreutils : Text, script : Text })
83 82
                             # Prelude.List.map
84 83
                                 Text
85 84
                                 XML.Type
86
-                                (   λ(x : Text)
87
-                                   XML.leaf
85
+                                ( λ(x : Text)
86
+                                    XML.leaf
88 87
                                       { name = "arg"
89 88
                                       , attributes = toMap { value = x }
90 89
                                       }
@@ -99,13 +98,13 @@ in    λ(params : { bash : Text, coreutils : Text, script : Text })
99 98
                       , routes =
100 99
                         [ Init.ServiceRoute.child "File_system" "vfs"
101 100
                         , { service =
102
-                              { name = "ROM"
103
-                              , label =
104
-                                  Init.LabelSelector.Type.Partial
105
-                                    { prefix = Some "/nix/store/"
106
-                                    , suffix = None Text
107
-                                    }
108
-                              }
101
+                            { name = "ROM"
102
+                            , label =
103
+                                Init.LabelSelector.Type.Partial
104
+                                  { prefix = Some "/nix/store/"
105
+                                  , suffix = None Text
106
+                                  }
107
+                            }
109 108
                           , route =
110 109
                               Init.Route.Type.Child
111 110
                                 { name = "store_rom"

+ 17
- 4
tests/solo5/blk.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Genode = env:DHALL_GENODE
3 2
 
4 3
 let Init = Genode.Init
@@ -25,11 +24,25 @@ let init =
25 24
           , block =
26 25
               Child.flat
27 26
                 Child.Attributes::{
28
-                , binary = "ram_block"
27
+                , binary = "vfs_block"
29 28
                 , provides = [ "Block" ]
30
-                , resources = Init.Resources::{ ram = Genode.units.MiB 9 }
29
+                , resources = Init.Resources::{ ram = Genode.units.MiB 12 }
31 30
                 , config = Init.Config::{
32
-                  , attributes = toMap { size = "8M", block_size = "4096" }
31
+                  , content =
32
+                    [ Genode.Prelude.XML.text
33
+                        ''
34
+                        <vfs>
35
+                          <ram/>
36
+                          <import>
37
+                            <zero name="block.raw" size="8M"/>
38
+                          </import>
39
+                        </vfs>
40
+                        ''
41
+                    ]
42
+                  , defaultPolicy = Some Init.Config.DefaultPolicy::{
43
+                    , attributes = toMap
44
+                        { file = "block.raw", writeable = "yes" }
45
+                    }
33 46
                   }
34 47
                 }
35 48
           }

+ 2
- 1
tests/solo5/default.nix Vedi File

@@ -21,10 +21,11 @@ in map solo5Test [
21 21
           if pkgs.stdenv.hostPlatform.isAarch64 then "True" else "False"
22 22
         } }";
23 23
       inputs = map genodeMake [ "app/ping" ] ++ (map genodeDepot [
24
-        "ram_block"
25 24
         "nic_bridge"
26 25
         "nic_loopback"
27 26
         "sequence"
27
+        "vfs_block"
28
+        "vfs_import"
28 29
       ]);
29 30
     };
30 31
   }

+ 0
- 1
tests/solo5/net.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Genode = env:DHALL_GENODE
3 2
 
4 3
 let Init = Genode.Init

+ 0
- 1
tests/solo5/net_2if.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Genode = env:DHALL_GENODE
3 2
 
4 3
 let Init = Genode.Init

+ 5
- 8
tests/solo5/solo5.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Test = ../test.dhall ? env:DHALL_GENODE_TEST
3 2
 
4 3
 let Genode = Test.Genode
@@ -12,8 +11,8 @@ let Child = Init.Child
12 11
 let Config = Init.Config
13 12
 
14 13
 let toSimple =
15
-        λ(testName : Text)
16
-       Child.flat
14
+      λ(testName : Text)
15
+        Child.flat
17 16
           Child.Attributes::{
18 17
           , binary = "solo5-test_${testName}"
19 18
           , resources = Init.Resources::{ caps = 256, ram = Genode.units.MiB 3 }
@@ -28,8 +27,8 @@ let toSimple =
28 27
             }
29 28
           }
30 29
 
31
-in    λ(params : { isAarch64 : Bool })
32
-     let tests
30
+in  λ(params : { isAarch64 : Bool })
31
+      let tests
33 32
           : Prelude.Map.Type Text Child.Type
34 33
           =   toMap
35 34
                 { quiet = toSimple "quiet"
@@ -40,10 +39,8 @@ in    λ(params : { isAarch64 : Bool })
40 39
                 , net = ./net.dhall
41 40
                 , net_2if = ./net_2if.dhall
42 41
                 }
43
-            # (       if params.isAarch64
44
-
42
+            # ( if    params.isAarch64
45 43
                 then  Prelude.Map.empty Text Child.Type
46
-
47 44
                 else  toMap { fpu = toSimple "fpu" }
48 45
               )
49 46
 

+ 0
- 1
tests/solo5/ssp.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Test = ../test.dhall ? env:DHALL_GENODE_TEST
3 2
 
4 3
 let Child = Test.Genode.Init.Child

+ 0
- 1
tests/solo5/time.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Genode = env:DHALL_GENODE
3 2
 
4 3
 let Init = Genode.Init

+ 18
- 19
tests/test-wrapper.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Test = ./test.dhall ? env:DHALL_GENODE_TEST
3 2
 
4 3
 let Genode = Test.Genode
@@ -18,15 +17,15 @@ let Children = TextMapType Child.Type
18 17
 let Manifest/Type = TextMapType (TextMapType Text)
19 18
 
20 19
 let Manifest/toRoutes =
21
-        λ(manifest : Manifest/Type)
22
-       Prelude.List.map
20
+      λ(manifest : Manifest/Type)
21
+        Prelude.List.map
23 22
           (Prelude.Map.Entry Text Text)
24 23
           Init.ServiceRoute.Type
25
-          (   λ(entry : Prelude.Map.Entry Text Text)
26
-             { service =
27
-                  { name = "ROM"
28
-                  , label = Init.LabelSelector.Type.Last entry.mapKey
29
-                  }
24
+          ( λ(entry : Prelude.Map.Entry Text Text)
25
+              { service =
26
+                { name = "ROM"
27
+                , label = Init.LabelSelector.Type.Last entry.mapKey
28
+                }
30 29
               , route =
31 30
                   Init.Route.Type.Child
32 31
                     { name = "store_rom"
@@ -44,9 +43,9 @@ let parentROMs =
44 43
       Prelude.List.map
45 44
         Text
46 45
         Init.ServiceRoute.Type
47
-        (   λ(label : Text)
48
-           { service =
49
-                { name = "ROM", label = Init.LabelSelector.Type.Last label }
46
+        ( λ(label : Text)
47
+            { service =
48
+              { name = "ROM", label = Init.LabelSelector.Type.Last label }
50 49
             , route =
51 50
                 Init.Route.Type.Parent { label = Some label, diag = None Bool }
52 51
             }
@@ -54,9 +53,9 @@ let parentROMs =
54 53
 
55 54
 let wrapHarness
56 55
     : Children → Manifest/Type → Child.Type
57
-    =   λ(children : Children)
58
-      λ(manifest : Manifest/Type)
59
-       Child.nested
56
+    = λ(children : Children)
57
+      λ(manifest : Manifest/Type)
58
+        Child.nested
60 59
           children
61 60
           Child.Attributes::{
62 61
           , binary = "sotest-harness"
@@ -88,11 +87,11 @@ let wrapHarness
88 87
               # Manifest/toRoutes manifest
89 88
           }
90 89
 
91
-in    λ(test : Test.Type)
92
-    λ(storeSize : Natural)
93
-    λ(storeManifest : Manifest/Type)
94
-    λ(bootManifest : Manifest/Type)
95
-     Genode.Boot::{
90
+in  λ(test : Test.Type)
91
+    λ(storeSize : Natural)
92
+    λ(storeManifest : Manifest/Type)
93
+    λ(bootManifest : Manifest/Type)
94
+      Genode.Boot::{
96 95
       , config = Init::{
97 96
         , children =
98 97
           [ { mapKey = "timer"

+ 3
- 4
tests/test.dhall Vedi File

@@ -1,19 +1,18 @@
1
-
2 1
 let Genode = env:DHALL_GENODE
3 2
 
4 3
 let Prelude = Genode.Prelude
5 4
 
6 5
 let Init = Genode.Init
7 6
 
8
-in  { Genode = Genode
7
+in  { Genode
9 8
     , Type =
10 9
         { children : Prelude.Map.Type Text Init.Child.Type
11 10
         , rom : Genode.BootModules.Type
12 11
         }
13 12
     , default.rom = [] : Genode.BootModules.Type
14 13
     , initToChildren =
15
-          λ(init : Init.Type)
16
-         toMap
14
+        λ(init : Init.Type)
15
+          toMap
17 16
             { init =
18 17
                 Init.toChild
19 18
                   init

+ 3
- 4
tests/vmm_arm.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Test = ./test.dhall ? env:DHALL_GENODE_TEST
3 2
 
4 3
 let Genode = Test.Genode
@@ -11,8 +10,8 @@ let ServiceRoute = Init.ServiceRoute
11 10
 
12 11
 let Child = Init.Child
13 12
 
14
-in    λ(guest : { linux : Text, dtb : Text, initrd : Text })
15
-     let init =
13
+in  λ(guest : { linux : Text, dtb : Text, initrd : Text })
14
+      let init =
16 15
             Init::{
17 16
             , children = toMap
18 17
                 { nic =
@@ -38,7 +37,7 @@ in    λ(guest : { linux : Text, dtb : Text, initrd : Text })
38 37
                                 ]
39 38
                               }
40 39
                           ]
41
-                        , defaultPolicy = Some Init.Config.Policy::{
40
+                        , defaultPolicy = Some Init.Config.DefaultPolicy::{
42 41
                           , attributes = toMap { domain = "default" }
43 42
                           }
44 43
                         }

+ 1
- 2
tests/vmm_x86.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Test = ./test.dhall ? env:DHALL_GENODE_TEST
3 2
 
4 3
 let Genode = Test.Genode
@@ -18,4 +17,4 @@ let vmm =
18 17
         , routes = [ Genode.Init.ServiceRoute.parent "VM" ]
19 18
         }
20 19
 
21
-in  Test::{ children = toMap { vmm = vmm } }
20
+in  Test::{ children = toMap { vmm } }

+ 1
- 2
tests/x86.dhall Vedi File

@@ -1,4 +1,3 @@
1
-
2 1
 let Test = ./test.dhall ? env:DHALL_GENODE_TEST
3 2
 
4 3
 let Genode = Test.Genode
@@ -83,7 +82,7 @@ let pciInit =
83 82
                             , attributes = toMap { class = "ALL" }
84 83
                             }
85 84
                         ]
86
-                      , label = Init.LabelSelector.Type.Scoped "test-pci"
85
+                      , label = Init.LabelSelector.prefix "test-pci"
87 86
                       }
88 87
                     ]
89 88
                   }

Loading…
Annulla
Salva