genodelabs / genode

Genode OS Framework
https://genode.org/
Other
1.06k stars 250 forks source link

Turmvilla scenario #1552

Closed nfeske closed 6 years ago

nfeske commented 9 years ago

At this year's Hack'n'Hike, I kicked off my transition of my day-to-day computing environment from Linux to Genode. This issue will document the progress.

The transition will take several steps. The first step is a minimal Genode environment that allows the hosting of a rich Linux environment inside a virtual machine. This rich Linux environment basically contains my current Linux-based setup with the sole difference of running it inside a VM. Once this setup works flawlessly, I will move my individual computing tasks to the Genode world.

I picked a Lenovo x201 as the hardware for this undertaking because those machines are very cheaply available (refurbished), they come with AMT support, and the hardware is known to be well supported by Genode's device drivers.

How does such a minimal Genode system look like? It needs to satisfy at least the following functional requirements:

As a matter of fact, I am typing this text on exactly this setup (Firefox running on Xubuntu, running in VirtualBox, running on Genode, running on NOVA).

nfeske commented 9 years ago

For setting up the basic scenario, I followed the excellent step-by-step instructions as compiled by @cproc: https://github.com/cproc/genode/blob/vbox_vm_linux/doc/virtualbox_setup.txt

I am using 32-bit Xubuntu 14.04 as my rich Linux system.

The Genode branch with the Turmvilla scenario can be found at https://github.com/nfeske/genode/commits/turmvilla Note that this branch is a topic branch. So I may rebase it from time to time. So please don't rely on it but rather create your own branch and cherry pick the commits you want.

The current version present a CLI monitor window immediately after booting. The CLI monitor can be used to start the rich Linux using the start linux command. The Noux environment can be started via start noux. The Noux environment has the following features:

Once wifi_drv is connected, the rich Linux running in VirtualBox is able to access the network.

nfeske commented 9 years ago

I updated my topic branch https://github.com/nfeske/genode/commits/turmvilla today. It is rebased on the current genodelabs/master branch. Hence, it uses the new acpi/pci infrastructure now.

Additionally, the new version comes with the following improvements

To attain a reasonably good interactive performance, I am using the NOVA patch posted in issue #1566. Note, however, that this patch is only expected to work on Lenovo x201 machines. A real solution is still pending.

I am using the Turmvilla scenario exclusively since two weeks now. My original Linux machine is just sitting idle and logs the low-level serial output of the x201 - just for the case something goes wrong. The performance within the rich Linux environment suffices for my daily computing tasks (email, browsing, light development, text editing) but it still holds me back from tackling complex development tasks, in particular building components using Qt5. I hope that #1553 will cure that.

nfeske commented 9 years ago

The commit https://github.com/nfeske/genode/commit/c3b143317c95af1940129185d63b403d9dbd8308 significantly improves the performance of the Linux guest while accessing the home partition. I wonder why the VFS block file system uses a default block-buffer count of 1?

chelmuth commented 9 years ago

Good catch, since other test cases don't increase the block count either. Unfortunately, the block-session gets constructed with a packet-stream buffer of 128 KiB only.

nfeske commented 9 years ago

I think it would make much sense to make the block-session argument configurable and derive the value for the block-buffer count from that.

chelmuth commented 9 years ago

You're absolutely right.

nfeske commented 9 years ago

I rebased my turmvilla branch to genodelabs/master. I.e., it has been adapted to the reworked platform driver.

nfeske commented 9 years ago

Today, I rebased the turmvilla branch to Genode 15.08. Apart from the use of the latest version of all components, the most significant additions are

chelmuth commented 9 years ago

:+1:

nfeske commented 8 years ago

I just rebased my turmvilla branch to the current version master. The most visible changes are:

nfeske commented 8 years ago

I rebased my turmvilla branch (https://github.com/nfeske/genode/commits/turmvilla) to Genode 15.11 just now. The following changes are worth noting:

nfeske commented 8 years ago

Please note the fixup https://github.com/nfeske/genode/commit/8c884445268bed7674fecee26c7a7da44b9bc1b2 commit on my branch.

nfeske commented 8 years ago

I rebased my turmvilla branch to the current master. The most noteworthy change is the principal support for manipulating windows with the keyboard. The maximized state can be toggled via win+enter, the focus can be switched between the most recently focused windows via win+tab and win+shift+tab.

ohpauleez commented 8 years ago

Just advertising a fork of the turmvilla branch with a Vagrant setup already in place, here.

This automates the entire process: Creating a Linux build VM with a shared directory, setting up all dependencies, performing the build of a the Turmvilla Scenario (turmvilla with NOVA and all repositories), producing the final ISO /var setup.

I'm more than happy to contribute any of the work back.

ssumpf commented 8 years ago

@ohpauleez: :+1:

m-stein commented 8 years ago

@ohpauleez That sounds very cool! I'll have a try when I'm back in the office next week.

nfeske commented 8 years ago

I rebased my turmvilla branch to Genode 16.02. The most visible improvement is the support for assigning USB devices to the rich OS.

Once a new USB device is plugged in, the user can look at /reports/usb_devices to obtain the device's vendor and device IDs. Those information can then be used to add an entry to the /config/usb_report_filter.config. When the device is plugged-in the next time, the USB driver will automatically be reconfigured with the policy needed to assign the device to the Linux VM. The USB-driver configuration can be inspected at /config/usb_drv.config.

ohpauleez commented 8 years ago

I have a few changes on my fork I'll commit soon: I automated the last steps with sed, so that a vagrant up automatically produces the iso in the shared directory when initially launched. I'm also happy to port the Vagrantfile over to a Dockerfile, providing more options for users/developers.

nfeske commented 6 years ago

Turmvilla won't receive any updates.