mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
sculpt: move pc-specifics away from generic part
* Introduce sculpt-[board] specific package * Move rtc driver into managed drivers sub-system * Name nic_drv in a generic fashion in sculpt_manager * Copy over pc-specific config files only when building for PC Ref #3958
This commit is contained in:
parent
e22e2540ee
commit
22852f2e50
1
repos/gems/recipes/pkg/sculpt-pc/README
Normal file
1
repos/gems/recipes/pkg/sculpt-pc/README
Normal file
@ -0,0 +1 @@
|
|||||||
|
The x86-PC specific parts needed to run sculpt.
|
7
repos/gems/recipes/pkg/sculpt-pc/archives
Normal file
7
repos/gems/recipes/pkg/sculpt-pc/archives
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
_/pkg/drivers_managed-pc
|
||||||
|
_/pkg/sculpt
|
||||||
|
_/pkg/wifi
|
||||||
|
_/src/rtc_drv
|
||||||
|
_/src/ipxe_nic_drv
|
||||||
|
_/src/nvme_drv
|
||||||
|
|
1
repos/gems/recipes/pkg/sculpt-pc/hash
Normal file
1
repos/gems/recipes/pkg/sculpt-pc/hash
Normal file
@ -0,0 +1 @@
|
|||||||
|
2020-11-24 3f831fdee6c570eb09e3ad41b7c0c665c2beb50e
|
@ -1,5 +1,3 @@
|
|||||||
_/pkg/drivers_managed-pc
|
|
||||||
_/pkg/wifi
|
|
||||||
_/pkg/depot_download
|
_/pkg/depot_download
|
||||||
_/pkg/terminal
|
_/pkg/terminal
|
||||||
_/pkg/backdrop
|
_/pkg/backdrop
|
||||||
@ -13,7 +11,6 @@ _/src/nitpicker
|
|||||||
_/src/global_keys_handler
|
_/src/global_keys_handler
|
||||||
_/src/gui_fb
|
_/src/gui_fb
|
||||||
_/src/gui_fader
|
_/src/gui_fader
|
||||||
_/src/rtc_drv
|
|
||||||
_/src/rom_filter
|
_/src/rom_filter
|
||||||
_/src/terminal_log
|
_/src/terminal_log
|
||||||
_/src/file_terminal
|
_/src/file_terminal
|
||||||
@ -28,7 +25,6 @@ _/src/vfs_import
|
|||||||
_/src/vfs_lxip
|
_/src/vfs_lxip
|
||||||
_/src/vfs_pipe
|
_/src/vfs_pipe
|
||||||
_/src/rump
|
_/src/rump
|
||||||
_/src/ipxe_nic_drv
|
|
||||||
_/src/chroot
|
_/src/chroot
|
||||||
_/src/fetchurl
|
_/src/fetchurl
|
||||||
_/src/curl
|
_/src/curl
|
||||||
@ -38,7 +34,6 @@ _/src/log_core
|
|||||||
_/src/part_block
|
_/src/part_block
|
||||||
_/src/nic_router
|
_/src/nic_router
|
||||||
_/src/fs_utils
|
_/src/fs_utils
|
||||||
_/src/nvme_drv
|
|
||||||
_/src/wm
|
_/src/wm
|
||||||
_/src/themed_decorator
|
_/src/themed_decorator
|
||||||
_/src/libpng
|
_/src/libpng
|
||||||
|
@ -32,6 +32,9 @@
|
|||||||
<service name="Platform">
|
<service name="Platform">
|
||||||
<default-policy> <child name="platform_drv"/> </default-policy> </service>
|
<default-policy> <child name="platform_drv"/> </default-policy> </service>
|
||||||
|
|
||||||
|
<service name="Rtc">
|
||||||
|
<default-policy> <child name="rtc_drv"/> </default-policy> </service>
|
||||||
|
|
||||||
<start name="report_rom">
|
<start name="report_rom">
|
||||||
<resource name="RAM" quantum="2M"/>
|
<resource name="RAM" quantum="2M"/>
|
||||||
<provides> <service name="Report"/> <service name="ROM"/> </provides>
|
<provides> <service name="Report"/> <service name="ROM"/> </provides>
|
||||||
@ -176,6 +179,19 @@
|
|||||||
</route>
|
</route>
|
||||||
</start>
|
</start>
|
||||||
|
|
||||||
|
<start name="rtc_drv" priority="-1">
|
||||||
|
<resource name="RAM" quantum="1M"/>
|
||||||
|
<provides> <service name="Rtc"/> </provides>
|
||||||
|
<route>
|
||||||
|
<service name="IO_PORT"> <parent/> </service>
|
||||||
|
<service name="LOG"> <parent/> </service>
|
||||||
|
<service name="PD"> <parent/> </service>
|
||||||
|
<service name="RM"> <parent/> </service>
|
||||||
|
<service name="CPU"> <parent/> </service>
|
||||||
|
<service name="ROM"> <parent/> </service>
|
||||||
|
</route>
|
||||||
|
</start>
|
||||||
|
|
||||||
<!-- toggle key mappings depending on the numlock state -->
|
<!-- toggle key mappings depending on the numlock state -->
|
||||||
<start name="numlock_remap_rom" priority="-1">
|
<start name="numlock_remap_rom" priority="-1">
|
||||||
<binary name="rom_filter"/>
|
<binary name="rom_filter"/>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
if {![have_spec x86] || [have_spec linux]} {
|
if {![have_spec pc]} {
|
||||||
puts "Platform is unsupported."
|
puts "Platform is unsupported.";
|
||||||
exit 0
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if {[have_spec nova]} {
|
if {[have_spec nova]} {
|
||||||
@ -10,13 +10,18 @@ if {[have_spec nova]} {
|
|||||||
create_boot_directory
|
create_boot_directory
|
||||||
|
|
||||||
import_from_depot [depot_user]/src/[base_src] \
|
import_from_depot [depot_user]/src/[base_src] \
|
||||||
[depot_user]/pkg/sculpt
|
[depot_user]/pkg/sculpt-[board]
|
||||||
|
|
||||||
proc config_system_content {} { return {\
|
proc config_system_content {} { return {\
|
||||||
<!-- supported states: "poweroff" or "reset" when acpica started -->
|
<!-- supported states: "poweroff" or "reset" when acpica started -->
|
||||||
<!-- Note: power down your persistent Genode applications & VMs beforehand on your own ! -->
|
<!-- Note: power down your persistent Genode applications & VMs beforehand on your own ! -->
|
||||||
<system state=""/>} }
|
<system state=""/>} }
|
||||||
|
|
||||||
|
proc nic_drv {} {
|
||||||
|
if {[have_spec pc]} { return ipxe_nic_drv }
|
||||||
|
puts "\n Run script is not supported on this platform. \n";
|
||||||
|
exit 0;
|
||||||
|
}
|
||||||
|
|
||||||
install_config {
|
install_config {
|
||||||
<config prio_levels="4"> <!-- set prio_levels to 4 -->
|
<config prio_levels="4"> <!-- set prio_levels to 4 -->
|
||||||
@ -260,6 +265,7 @@ install_config {
|
|||||||
<service name="Block"/>
|
<service name="Block"/>
|
||||||
<service name="Usb"/>
|
<service name="Usb"/>
|
||||||
<service name="Platform"/>
|
<service name="Platform"/>
|
||||||
|
<service name="Rtc"/>
|
||||||
</provides>
|
</provides>
|
||||||
</start>
|
</start>
|
||||||
|
|
||||||
@ -429,11 +435,6 @@ install_config {
|
|||||||
</route>
|
</route>
|
||||||
</start>
|
</start>
|
||||||
|
|
||||||
<start name="rtc_drv" priority="-1">
|
|
||||||
<resource name="RAM" quantum="1M"/>
|
|
||||||
<provides> <service name="Rtc"/> </provides>
|
|
||||||
</start>
|
|
||||||
|
|
||||||
<start name="runtime" caps="50000" priority="-3">
|
<start name="runtime" caps="50000" priority="-3">
|
||||||
<binary name="init"/>
|
<binary name="init"/>
|
||||||
<resource name="RAM" quantum="32G"/>
|
<resource name="RAM" quantum="32G"/>
|
||||||
@ -455,6 +456,7 @@ install_config {
|
|||||||
<service name="Platform" label_prefix="acpica">
|
<service name="Platform" label_prefix="acpica">
|
||||||
<child name="drivers" label="acpica"/> </service>
|
<child name="drivers" label="acpica"/> </service>
|
||||||
<service name="Platform"> <child name="drivers"/> </service>
|
<service name="Platform"> <child name="drivers"/> </service>
|
||||||
|
<service name="Rtc"> <child name="drivers"/> </service>
|
||||||
<service name="Gui" label_prefix="leitzentrale">
|
<service name="Gui" label_prefix="leitzentrale">
|
||||||
<child name="leitzentrale"/> </service>
|
<child name="leitzentrale"/> </service>
|
||||||
<service name="Gui" label="backdrop">
|
<service name="Gui" label="backdrop">
|
||||||
@ -483,7 +485,7 @@ install_config {
|
|||||||
<service name="Report"> <child name="fs_report"/> </service>
|
<service name="Report"> <child name="fs_report"/> </service>
|
||||||
<service name="LOG" label="unlogged"> <parent/> </service>
|
<service name="LOG" label="unlogged"> <parent/> </service>
|
||||||
<service name="LOG"> <child name="log"/> </service>
|
<service name="LOG"> <child name="log"/> </service>
|
||||||
<service name="Rtc"> <child name="rtc_drv"/> </service>
|
<service name="ROM" label="nic_drv"> <parent label="} [nic_drv] {"/> </service>
|
||||||
<any-service> <parent/> </any-service>
|
<any-service> <parent/> </any-service>
|
||||||
</route>
|
</route>
|
||||||
</start>
|
</start>
|
||||||
@ -505,27 +507,29 @@ file copy -force [genode_dir]/repos/gems/recipes/pkg/sculpt/README [run_dir]/gen
|
|||||||
|
|
||||||
file copy -force [genode_dir]/repos/gems/run/sculpt/vimrc [run_dir]/genode/
|
file copy -force [genode_dir]/repos/gems/run/sculpt/vimrc [run_dir]/genode/
|
||||||
|
|
||||||
file copy -force [genode_dir]/repos/gems/run/sculpt/machine.vbox [run_dir]/genode/
|
|
||||||
|
|
||||||
file copy -force [genode_dir]/repos/gems/recipes/raw/drivers_managed-pc/drivers.config \
|
|
||||||
[run_dir]/genode/drivers.config
|
|
||||||
|
|
||||||
foreach file { en_us.chargen de_ch.chargen de_de.chargen fr_ch.chargen fr_fr.chargen special.chargen } {
|
foreach file { en_us.chargen de_ch.chargen de_de.chargen fr_ch.chargen fr_fr.chargen special.chargen } {
|
||||||
file copy -force [genode_dir]/repos/os/src/server/event_filter/$file \
|
file copy -force [genode_dir]/repos/os/src/server/event_filter/$file \
|
||||||
[run_dir]/genode/$file }
|
[run_dir]/genode/$file }
|
||||||
|
|
||||||
file copy -force [genode_dir]/repos/gems/recipes/raw/drivers_managed-pc/event_filter.config \
|
|
||||||
[run_dir]/genode/event_filter.config
|
|
||||||
|
|
||||||
file copy -force [genode_dir]/repos/gems/recipes/raw/depot_download/depot_download.config \
|
file copy -force [genode_dir]/repos/gems/recipes/raw/depot_download/depot_download.config \
|
||||||
[run_dir]/genode/depot_download.config
|
[run_dir]/genode/depot_download.config
|
||||||
|
|
||||||
file copy -force [genode_dir]/VERSION [run_dir]/genode/
|
file copy -force [genode_dir]/VERSION [run_dir]/genode/
|
||||||
|
|
||||||
file copy -force [genode_dir]/repos/gems/src/app/backdrop/genode_logo.png [run_dir]/genode/
|
file copy -force [genode_dir]/repos/gems/src/app/backdrop/genode_logo.png [run_dir]/genode/
|
||||||
file copy -force [genode_dir]/repos/gems/run/sculpt/drop_shadow.png [run_dir]/genode/
|
file copy -force [genode_dir]/repos/gems/run/sculpt/drop_shadow.png [run_dir]/genode/
|
||||||
|
|
||||||
exec gzip -dc [genode_dir]/repos/gems/run/sculpt/machine.vdi.gz > [run_dir]/genode/machine.vdi
|
if {[have_spec pc]} {
|
||||||
|
file copy -force [genode_dir]/repos/gems/recipes/raw/drivers_managed-pc/event_filter.config \
|
||||||
|
[run_dir]/genode/event_filter.config
|
||||||
|
|
||||||
|
file copy -force [genode_dir]/repos/gems/run/sculpt/machine.vbox [run_dir]/genode/
|
||||||
|
|
||||||
|
file copy -force [genode_dir]/repos/gems/recipes/raw/drivers_managed-pc/drivers.config \
|
||||||
|
[run_dir]/genode/drivers.config
|
||||||
|
|
||||||
|
exec gzip -dc [genode_dir]/repos/gems/run/sculpt/machine.vdi.gz > [run_dir]/genode/machine.vdi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include <gui_session/connection.h>
|
#include <gui_session/connection.h>
|
||||||
#include <vm_session/vm_session.h>
|
#include <vm_session/vm_session.h>
|
||||||
#include <timer_session/connection.h>
|
#include <timer_session/connection.h>
|
||||||
|
#include <io_port_session/io_port_session.h>
|
||||||
|
|
||||||
/* included from depot_deploy tool */
|
/* included from depot_deploy tool */
|
||||||
#include <children.h>
|
#include <children.h>
|
||||||
|
@ -17,8 +17,6 @@ void Sculpt::gen_nic_drv_start_content(Xml_generator &xml)
|
|||||||
{
|
{
|
||||||
gen_common_start_content(xml, "nic_drv", Cap_quota{300}, Ram_quota{16*1024*1024});
|
gen_common_start_content(xml, "nic_drv", Cap_quota{300}, Ram_quota{16*1024*1024});
|
||||||
|
|
||||||
xml.node("binary", [&] () { xml.attribute("name", "ipxe_nic_drv"); });
|
|
||||||
|
|
||||||
gen_provides<Nic::Session>(xml);
|
gen_provides<Nic::Session>(xml);
|
||||||
|
|
||||||
xml.node("config", [&] () { });
|
xml.node("config", [&] () { });
|
||||||
@ -28,7 +26,7 @@ void Sculpt::gen_nic_drv_start_content(Xml_generator &xml)
|
|||||||
xml.node("parent", [&] () {
|
xml.node("parent", [&] () {
|
||||||
xml.attribute("label", "nic"); }); });
|
xml.attribute("label", "nic"); }); });
|
||||||
|
|
||||||
gen_parent_rom_route(xml, "ipxe_nic_drv");
|
gen_parent_rom_route(xml, "nic_drv");
|
||||||
gen_parent_rom_route(xml, "ld.lib.so");
|
gen_parent_rom_route(xml, "ld.lib.so");
|
||||||
gen_parent_route<Cpu_session> (xml);
|
gen_parent_route<Cpu_session> (xml);
|
||||||
gen_parent_route<Pd_session> (xml);
|
gen_parent_route<Pd_session> (xml);
|
||||||
|
@ -3,4 +3,3 @@ SRC_CC := $(notdir $(wildcard $(PRG_DIR)/*.cc))
|
|||||||
SRC_CC += $(addprefix view/, $(notdir $(wildcard $(PRG_DIR)/view/*.cc)))
|
SRC_CC += $(addprefix view/, $(notdir $(wildcard $(PRG_DIR)/view/*.cc)))
|
||||||
LIBS += base
|
LIBS += base
|
||||||
INC_DIR += $(PRG_DIR) $(REP_DIR)/src/app/depot_deploy
|
INC_DIR += $(PRG_DIR) $(REP_DIR)/src/app/depot_deploy
|
||||||
REQUIRES = x86
|
|
||||||
|
Loading…
Reference in New Issue
Block a user