diff --git a/repos/gems/recipes/pkg/sculpt-linux/README b/repos/gems/recipes/pkg/sculpt-linux/README
new file mode 100644
index 0000000000..c24630ce2c
--- /dev/null
+++ b/repos/gems/recipes/pkg/sculpt-linux/README
@@ -0,0 +1 @@
+Minimal version of Sculpt executable on Linux
diff --git a/repos/gems/recipes/pkg/sculpt-linux/archives b/repos/gems/recipes/pkg/sculpt-linux/archives
new file mode 100644
index 0000000000..e4847ce2a7
--- /dev/null
+++ b/repos/gems/recipes/pkg/sculpt-linux/archives
@@ -0,0 +1,2 @@
+_/pkg/drivers_interactive-linux
+_/pkg/sculpt
diff --git a/repos/gems/recipes/pkg/sculpt-linux/hash b/repos/gems/recipes/pkg/sculpt-linux/hash
new file mode 100644
index 0000000000..e23c8794d2
--- /dev/null
+++ b/repos/gems/recipes/pkg/sculpt-linux/hash
@@ -0,0 +1 @@
+2022-01-03-a c6a760c01679c9213f0ae83b4075a5c73c3f09a9
diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run
index 0f9d4efd8e..3a517fa22a 100644
--- a/repos/gems/run/sculpt.run
+++ b/repos/gems/run/sculpt.run
@@ -1,8 +1,16 @@
-if {![have_board pc] && ![have_board imx8q_evk] && ![have_board mnt_reform2]} {
+proc assert_platform_supported { } {
+
+ if {[have_board pc]} return
+ if {[have_board imx8q_evk]} return
+ if {[have_board mnt_reform2]} return
+ if {[have_board linux]} return
+
puts "Platform is unsupported.";
exit 0;
}
+assert_platform_supported
+
if {[have_spec nova]} {
proc kernel_output { } { return "novga serial logmem" }
}
@@ -12,19 +20,93 @@ create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/pkg/sculpt-[board]
-proc config_system_content {} { return {\
-
-
-} }
-proc nic_drv {} {
+proc nic_drv { } {
+
if {[have_board pc]} { return ipxe_nic_drv }
if {[have_board imx8q_evk]} { return fec_nic_drv }
if {[have_board mnt_reform2]} { return fec_nic_drv }
+ if {[have_board linux]} { return nic_unavailable }
+
puts "\n Run script is not supported on this platform. \n";
exit 0;
}
+
+proc log_core_start_node { } {
+
+ if {[have_board linux]} return
+
+ return {
+
+
+
+
+
+
+
+
+
+ }
+}
+
+
+proc log_kernel_start_node { } {
+
+ if {[have_board linux]} return
+
+ return {
+
+
+
+
+
+
+
+
+
+
+ }
+}
+
+
+proc config_fs_gpu_drv { } {
+
+ if {[have_board linux]} return
+
+ return {}
+}
+
+
+proc config_fs_system { } {
+
+ return {
+
+
+}
+}
+
+
+proc config_fs_numlock_remap { } {
+
+ # the drivers_interactive pkg does not host a numlock_remap_rom component
+ if {[have_board linux]} return
+
+ return {}
+}
+
+
+proc config_fs_event_filter { } {
+
+ #
+ # Prevent the sculpt manager from generating the event-filter configuration.
+ # Use the configuration provided by drivers_interactive pkg instead.
+ #
+ if {[have_board linux]} {
+ return {} }
+}
+
+
install_config {
@@ -115,9 +197,7 @@ install_config {
-
-
@@ -125,8 +205,9 @@ install_config {
- } [config_system_content] {
-
+ } [config_fs_gpu_drv] {
+ } [config_fs_system] {
+ } [config_fs_numlock_remap] {
@@ -208,28 +289,8 @@ install_config {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ } [log_core_start_node] {
+ } [log_kernel_start_node] {
@@ -249,7 +310,8 @@ install_config {
-
+
+
@@ -512,7 +574,6 @@ install_config {
foreach file [glob "[genode_dir]/repos/gems/run/sculpt/*.config"] {
copy_file $file [run_dir]/genode/ }
-
#
# Override files normally obtained from depot archive with the most current
# version found in the Genode source tree. This way, we don't need to
@@ -552,6 +613,29 @@ if {[have_board pc]} {
}
+#
+# Linux-specific tweaks
+#
+if {[have_board linux]} {
+
+ #
+ # The Linux version of core does not export a platform_info ROM module.
+ #
+ install_boot_module "platform_info" {}
+
+ #
+ # Managed dataspaces as used by cached_fs_rom are not supported on Linux.
+ #
+ copy_file [run_dir]/genode/fs_rom [run_dir]/genode/cached_fs_rom
+
+ #
+ # The drivers_interactive-linux pkg does not offer a numlock.remap ROM as
+ # referenced by the event-filter config generated by sculpt manager.
+ #
+ install_boot_module "numlock.remap" {}
+}
+
+
#
# Define 'VERSION' ROM module
#
@@ -561,9 +645,7 @@ proc sculpt_version { } {
return "21.11" }
# write file with newline (for producing nice output when using 'cat /VERSION')
-set fd [open [run_dir]/genode/VERSION w]
-puts $fd "[sculpt_version]"
-close $fd
+install_boot_module VERSION "[sculpt_version]"
#
@@ -589,8 +671,7 @@ close $fd
# parts need to be filled in at run-script execution time, in particular the
# current versions of the packages to deploy.
#
-append manual_deploy_config {
-
+install_boot_module "manual_deploy.config" {
@@ -602,10 +683,6 @@ append manual_deploy_config {
}
-set fd [open [run_dir]/genode/manual_deploy.config w]
-puts $fd $manual_deploy_config
-close $fd
-
#
# Install launcher snippets
diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc
index f82c3e2fd6..03f6047afd 100644
--- a/repos/gems/src/app/sculpt_manager/main.cc
+++ b/repos/gems/src/app/sculpt_manager/main.cc
@@ -1851,6 +1851,7 @@ void Sculpt::Main::_generate_event_filter_config(Xml_generator &xml)
gen_input("usb");
gen_input("touch");
+ gen_input("sdl");
});
});
@@ -1893,6 +1894,7 @@ void Sculpt::Main::_generate_event_filter_config(Xml_generator &xml)
gen_policy("ps2");
gen_policy("usb");
gen_policy("touch");
+ gen_policy("sdl");
}