mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 08:25:38 +00:00
parent
3b36542212
commit
3b36673e03
@ -4,6 +4,7 @@ libc
|
||||
os
|
||||
blit
|
||||
nitpicker_gfx
|
||||
nitpicker_session
|
||||
framebuffer_session
|
||||
input_session
|
||||
timer_session
|
||||
|
@ -35,7 +35,7 @@ if {[have_include power_on/qemu]} {
|
||||
exit 1
|
||||
}
|
||||
|
||||
append qemu_args " -m 1024 "
|
||||
append qemu_args " -m 1536 "
|
||||
append qemu_args " -cpu phenom"
|
||||
append_if $use_block_sata qemu_args " -drive id=disk,file=bin/seoul-disc.raw,format=raw,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d"
|
||||
}
|
||||
|
@ -5,6 +5,11 @@
|
||||
# \author Alexander Boettcher
|
||||
# \date 2011-11-21
|
||||
|
||||
create_boot_directory
|
||||
|
||||
import_from_depot [depot_user]/src/[base_src] \
|
||||
[depot_user]/src/init \
|
||||
[depot_user]/src/nitpicker
|
||||
#
|
||||
# Build
|
||||
#
|
||||
@ -21,7 +26,6 @@ source ${genode_dir}/repos/base/run/platform_drv.inc
|
||||
proc platform_drv_priority {} { return { priority="-1"} }
|
||||
|
||||
set build_components {
|
||||
core init timer
|
||||
drivers/rtc
|
||||
drivers/input
|
||||
app/seoul
|
||||
@ -35,12 +39,8 @@ lappend_if $use_block_sata build_components drivers/ahci
|
||||
lappend_if $use_nic_session build_components drivers/nic
|
||||
lappend_if $use_nic_bridge build_components server/nic_bridge
|
||||
lappend_if $use_framebuffer build_components drivers/framebuffer
|
||||
lappend_if $use_fancy_stuff build_components server/nitpicker
|
||||
lappend_if $use_fancy_stuff build_components app/pointer
|
||||
lappend_if $use_fancy_stuff build_components app/status_bar
|
||||
lappend_if $use_fancy_stuff build_components server/liquid_framebuffer
|
||||
lappend_if $use_fancy_stuff build_components app/launchpad
|
||||
lappend_if $use_fancy_stuff build_components server/nitlog
|
||||
lappend_if $use_fancy_stuff build_components server/report_rom
|
||||
lappend_if $use_genode_iso build_components server/iso9660
|
||||
lappend_if $use_genode_iso build_components server/rom_block
|
||||
@ -137,8 +137,6 @@ puts $vm_cfg_fd {
|
||||
</config>}
|
||||
close $vm_cfg_fd
|
||||
|
||||
create_boot_directory
|
||||
|
||||
#
|
||||
# Generate Genode config
|
||||
#
|
||||
@ -193,7 +191,7 @@ append_if $use_block_sata config {
|
||||
|
||||
append_if $use_block_ram config {
|
||||
<start name="ram_block" priority="-1">
|
||||
<resource name="RAM" quantum="162M" />
|
||||
<resource name="RAM" quantum="262M" />
|
||||
<provides><service name="Block"/></provides>
|
||||
<config file="seoul-disc.raw" block_size="512"/>
|
||||
</start>}
|
||||
@ -244,7 +242,7 @@ append_if $use_framebuffer config {
|
||||
<service name="Platform"><any-child/></service>
|
||||
<any-service><parent/></any-service>
|
||||
</route>
|
||||
<config width="1024" height="768" depth="16" buffered="yes"/>
|
||||
<config width="1280" height="1024" depth="16" buffered="yes"/>
|
||||
</start> }
|
||||
|
||||
if {!$use_fancy_stuff} {
|
||||
@ -260,8 +258,6 @@ append_if [expr $use_nic_session && $use_nic_bridge] config {
|
||||
<service name="Nic"> <child name="nic_bridge"/> </service>}
|
||||
append_if [expr $use_nic_session && !$use_nic_bridge] config {
|
||||
<service name="Nic"> <child name="nic_drv"/> </service>}
|
||||
append_if $use_framebuffer config {
|
||||
<service name="Framebuffer"><child name="fb_drv"/></service>}
|
||||
append_if $use_genode_iso config {
|
||||
<service name="ROM" unscoped_label="seoul"> <parent/> </service>
|
||||
<service name="ROM" label="vm_seoul.cfg"> <parent/> </service>
|
||||
@ -284,17 +280,28 @@ append_if $use_usb config {
|
||||
</config>
|
||||
</start>}
|
||||
|
||||
append_if $use_fancy_stuff config {
|
||||
append config {
|
||||
<start name="nitpicker" priority="-1">
|
||||
<resource name="RAM" quantum="8M"/>
|
||||
<config>
|
||||
<report focus="yes" />
|
||||
<domain name="pointer" layer="1" content="client" label="no" origin="pointer" />
|
||||
<domain name="panel" layer="2" content="client" label="no" focus="none" />
|
||||
<domain name="init.1" layer="3" content="client" focus="click"
|
||||
hover="always" xpos="20" ypos="30" height="-20"/>
|
||||
<domain name="init.2" layer="3" content="client" focus="click"
|
||||
hover="always" xpos="30" ypos="40" height="-20"/>
|
||||
<domain name="init.3" layer="3" content="client" focus="click"
|
||||
hover="always" xpos="40" ypos="50" height="-20"/>
|
||||
<domain name="" layer="3" content="client" focus="click"
|
||||
hover="always" ypos="18" height="-18" />
|
||||
hover="always" xpos="10" ypos="20" height="-20"/>
|
||||
<policy label_prefix="pointer" domain="pointer"/>
|
||||
<policy label_prefix="status_bar" domain="panel"/>
|
||||
|
||||
<policy label_prefix="launchpad -> init.1" domain="init.1"/>
|
||||
<policy label_prefix="launchpad -> init.2" domain="init.2"/>
|
||||
<policy label_prefix="launchpad -> init.3" domain="init.3"/>
|
||||
|
||||
<default-policy domain=""/>
|
||||
</config>
|
||||
<route>
|
||||
@ -305,22 +312,26 @@ append_if $use_fancy_stuff config {
|
||||
</route>
|
||||
<provides><service name="Nitpicker"/></provides>
|
||||
</start>
|
||||
|
||||
<start name="pointer">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
</start>
|
||||
<start name="status_bar">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<route>
|
||||
<service name="ROM" label="focus"> <child name="report_rom"/> </service>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</route>
|
||||
</start>
|
||||
|
||||
<start name="report_rom">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides> <service name="Report"/> <service name="ROM"/> </provides>
|
||||
<config>
|
||||
<policy label="status_bar -> focus" report="nitpicker -> focus"/>
|
||||
</config>
|
||||
</start>}
|
||||
|
||||
append_if $use_fancy_stuff config {
|
||||
<start name="status_bar">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<route>
|
||||
<service name="ROM" label="focus"> <child name="report_rom"/> </service>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</route>
|
||||
</start>
|
||||
<start name="launchpad" priority="-2" caps="1500">
|
||||
<resource name="RAM" quantum="64000M"/>
|
||||
@ -367,27 +378,12 @@ if {$use_fancy_stuff} {
|
||||
<service name="Rtc"/>
|
||||
</parent-provides>
|
||||
|
||||
<start name="fb.seoul" priority="-1" caps="100">
|
||||
<binary name="liquid_fb"/>
|
||||
<resource name="RAM" quantum="16M"/>
|
||||
<provides>
|
||||
<service name="Framebuffer"/>
|
||||
<service name="Input"/>
|
||||
</provides>
|
||||
<route>
|
||||
<any-service><parent/></any-service>
|
||||
</route>
|
||||
<config xpos="10" ypos="10" width="800" height="600" animate="off"/>
|
||||
</start>
|
||||
|
||||
<start name="seoul" priority="-1" caps="200">
|
||||
<start name="seoul" priority="-1" caps="200" ld="no">
|
||||
<binary name="seoul"/>
|
||||
<resource name="RAM" quantum="256M"/>
|
||||
<route>
|
||||
<service name="Timer"><parent/></service>
|
||||
<service name="Nic"><parent/></service>
|
||||
<service name="Input"><child name="fb.seoul"/></service>
|
||||
<service name="Framebuffer"><child name="fb.seoul"/></service>
|
||||
<any-service><parent/></any-service>
|
||||
</route>
|
||||
<configfile name="vm_seoul.cfg"/>
|
||||
@ -406,8 +402,6 @@ install_config $config
|
||||
|
||||
# generic modules
|
||||
set boot_modules {
|
||||
core ld.lib.so init
|
||||
timer
|
||||
rtc_drv
|
||||
seoul
|
||||
vm_seoul.cfg
|
||||
@ -421,12 +415,8 @@ lappend_if $use_nic_session boot_modules nic_drv
|
||||
lappend_if $use_nic_bridge boot_modules nic_bridge
|
||||
lappend_if $use_framebuffer boot_modules fb_drv
|
||||
|
||||
lappend_if $use_fancy_stuff boot_modules nitpicker
|
||||
lappend_if $use_fancy_stuff boot_modules pointer
|
||||
lappend_if $use_fancy_stuff boot_modules status_bar
|
||||
lappend_if $use_fancy_stuff boot_modules liquid_fb
|
||||
lappend_if $use_fancy_stuff boot_modules launchpad
|
||||
lappend_if $use_fancy_stuff boot_modules nitlog
|
||||
lappend_if $use_fancy_stuff boot_modules launchpad-config
|
||||
lappend_if $use_fancy_stuff boot_modules report_rom
|
||||
|
||||
|
@ -373,13 +373,14 @@ bool Seoul::Console::receive(MessageTimeout &msg) {
|
||||
|
||||
Seoul::Console::Console(Genode::Env &env, Synced_motherboard &mb,
|
||||
Motherboard &unsynchronized_motherboard,
|
||||
Framebuffer::Connection &framebuffer,
|
||||
Nitpicker::Connection &nitpicker,
|
||||
Genode::Dataspace_capability guest_fb_ds)
|
||||
:
|
||||
_env(env),
|
||||
_unsynchronized_motherboard(unsynchronized_motherboard),
|
||||
_motherboard(mb),
|
||||
_framebuffer(framebuffer),
|
||||
_framebuffer(*nitpicker.framebuffer()),
|
||||
_input(*nitpicker.input()),
|
||||
_guest_fb_ds(guest_fb_ds),
|
||||
_fb_mode(_framebuffer.mode()),
|
||||
_fb_size(Genode::Dataspace_client(_framebuffer.dataspace()).size()),
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <framebuffer_session/connection.h>
|
||||
#include <input/event.h>
|
||||
#include <input_session/connection.h>
|
||||
#include <nitpicker_session/connection.h>
|
||||
#include <timer_session/connection.h>
|
||||
|
||||
#include <os/pixel_rgb565.h>
|
||||
@ -47,23 +48,23 @@ class Seoul::Console : public StaticReceiver<Seoul::Console>
|
||||
{
|
||||
private:
|
||||
|
||||
Genode::Env &_env;
|
||||
Motherboard &_unsynchronized_motherboard;
|
||||
Synced_motherboard &_motherboard;
|
||||
Framebuffer::Connection &_framebuffer;
|
||||
Genode::Dataspace_capability _guest_fb_ds;
|
||||
Framebuffer::Mode _fb_mode;
|
||||
size_t _fb_size;
|
||||
short *_pixels;
|
||||
Genode::Surface<Pixel_rgb565> _surface;
|
||||
Input::Connection _input { _env };
|
||||
Keyboard _vkeyb { _motherboard };
|
||||
char *_guest_fb { nullptr };
|
||||
VgaRegs *_regs { nullptr };
|
||||
bool _left { false };
|
||||
bool _middle { false };
|
||||
bool _right { false };
|
||||
unsigned _timer { 0 };
|
||||
Genode::Env &_env;
|
||||
Motherboard &_unsynchronized_motherboard;
|
||||
Synced_motherboard &_motherboard;
|
||||
Framebuffer::Session &_framebuffer;
|
||||
Input::Session_client &_input;
|
||||
Genode::Dataspace_capability _guest_fb_ds;
|
||||
Framebuffer::Mode _fb_mode;
|
||||
size_t _fb_size;
|
||||
short *_pixels;
|
||||
Genode::Surface<Pixel_rgb565> _surface;
|
||||
Keyboard _vkeyb { _motherboard };
|
||||
char *_guest_fb { nullptr };
|
||||
VgaRegs *_regs { nullptr };
|
||||
bool _left { false };
|
||||
bool _middle { false };
|
||||
bool _right { false };
|
||||
unsigned _timer { 0 };
|
||||
|
||||
unsigned _input_to_ps2mouse(Input::Event const &);
|
||||
unsigned _input_to_ps2wheel(Input::Event const &);
|
||||
@ -93,7 +94,7 @@ class Seoul::Console : public StaticReceiver<Seoul::Console>
|
||||
* Constructor
|
||||
*/
|
||||
Console(Genode::Env &env, Synced_motherboard &, Motherboard &,
|
||||
Framebuffer::Connection &, Genode::Dataspace_capability fb_ds);
|
||||
Nitpicker::Connection &, Genode::Dataspace_capability fb_ds);
|
||||
};
|
||||
|
||||
#endif /* _CONSOLE_H_ */
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include <util/misc_math.h>
|
||||
|
||||
/* os includes */
|
||||
#include <framebuffer_session/connection.h>
|
||||
#include <nic_session/connection.h>
|
||||
#include <nic/packet_allocator.h>
|
||||
#include <rtc_session/connection.h>
|
||||
@ -1435,12 +1434,32 @@ void Component::construct(Genode::Env &env)
|
||||
static Vmm::Virtual_reservation reservation(env, vm_size);
|
||||
|
||||
/* setup framebuffer memory for guest */
|
||||
static Framebuffer::Connection framebuffer(env, Framebuffer::Mode(0, 0, Framebuffer::Mode::INVALID));
|
||||
Framebuffer::Mode const fb_mode = framebuffer.mode();
|
||||
static Nitpicker::Connection nitpicker { env };
|
||||
|
||||
unsigned width = config.xml().attribute_value("width", 1024U);
|
||||
unsigned height = config.xml().attribute_value("height", 768U);
|
||||
|
||||
nitpicker.buffer(Framebuffer::Mode(width, height,
|
||||
Framebuffer::Mode::RGB565), false);
|
||||
|
||||
static Framebuffer::Session &framebuffer { *nitpicker.framebuffer() };
|
||||
Framebuffer::Mode const fb_mode { framebuffer.mode() };
|
||||
|
||||
size_t const fb_size = Genode::align_addr(fb_mode.width() *
|
||||
fb_mode.height() *
|
||||
fb_mode.bytes_per_pixel(), 12);
|
||||
|
||||
typedef Nitpicker::Session::View_handle View_handle;
|
||||
typedef Nitpicker::Session::Command Command;
|
||||
|
||||
View_handle view = nitpicker.create_view();
|
||||
Nitpicker::Rect rect(Nitpicker::Point(0, 0),
|
||||
Nitpicker::Area(fb_mode.width(), fb_mode.height()));
|
||||
|
||||
nitpicker.enqueue<Command::Geometry>(view, rect);
|
||||
nitpicker.enqueue<Command::To_front>(view, View_handle());
|
||||
nitpicker.execute();
|
||||
|
||||
/* setup guest memory */
|
||||
static Guest_memory guest_memory(env, vm_size, fb_size);
|
||||
|
||||
@ -1496,7 +1515,7 @@ void Component::construct(Genode::Env &env)
|
||||
/* create console thread */
|
||||
static Seoul::Console vcon(env, machine.motherboard(),
|
||||
machine.unsynchronized_motherboard(),
|
||||
framebuffer,
|
||||
nitpicker,
|
||||
guest_memory.fb_ds());
|
||||
|
||||
vcon.register_host_operations(machine.unsynchronized_motherboard());
|
||||
|
Loading…
x
Reference in New Issue
Block a user