Commit Graph

519 Commits

Author SHA1 Message Date
Christian Prochaska
cda48b4a49 sculpt: add base binary archive path to build_info ROM
Fixes #5118
2024-02-28 16:31:45 +01:00
Norman Feske
07669ac991 os: record-and-play session interfaces and mixer
- New session interfaces:
  - os/include/play_session   (for audio playing   / mic-input driver)
  - os/include/record_session (for audio recording / audio-output driver)
- Mixer at os/src/record_play_mixer providing both play and record services
- Simple waveform player at os/src/app/waveform_player
- Simple audio-signal capturing component at os/src/app/record_rom
- Simple oscilloscpe at gems/src/app/rom_osci (using record_rom)
- Simple test-audio_play for playing raw stereo f32 data

The _gems/run/waveform_player.run_ script illustrates the use of the new
components and interfaces.

Issue #5097
2024-02-28 16:31:45 +01:00
Christian Prochaska
7651c94bf5 os: add test for 'Genode::Path'
Issue #5106
2024-02-26 08:59:10 +01:00
Christian Prochaska
a1b5ebeb09 depot_query: add support for bin and dbg archives
Fixes #5110
2024-02-26 08:59:09 +01:00
Johannes Schlatow
d23e1a87dd vfs_import: truncate files before writing
genodelabs/genode#5107
2024-02-26 08:59:08 +01:00
Josef Söntgen
89270f69e0 sculpt_image: copy uboot.env file for PinePhone
Issue genodelabs/genode-allwinner#26.
2023-12-13 12:33:05 +01:00
Christian Helmuth
54c5b7d712 depot_autopilot: disable test-rm_nested on pistachio 2023-12-13 12:33:05 +01:00
Norman Feske
12b89852e0 sculpt: add "runtime" and "global" TRACE options
Issue #847
2023-12-13 12:28:52 +01:00
Norman Feske
f66ce025d3 Adapt run scripts to trace-subject filtering
Issue #847
2023-12-13 12:28:52 +01:00
Norman Feske
5a75a2f930 gems: use [build_artifacts] in run scripts
Issue #4860
2023-11-28 14:44:29 +01:00
Christian Helmuth
f663168ffd sculpt: version 23.11 2023-11-28 14:24:25 +01:00
Christian Helmuth
0db4116ba6 sculpt: version 23.10 2023-10-25 08:58:52 +02:00
Christian Prochaska
1bb1ebe2ae sculpt: use debug monitor as runtime init
Fixes #5012
2023-10-04 13:22:08 +02:00
Norman Feske
aff17cb177 sculpt: propagate managing_system role
This change allows for the hosting of system-management components
in Sculpt's runtime. The special role must be declared either as
<launcher managing_system="yes"> attribute or in the deploy
configuration's <start managing_system="yes"> attribute.

Issue #5009
2023-10-04 13:22:07 +02:00
Norman Feske
4fdc999087 Dialog API
The new API at gems/include/dialog/ aids the creation of simple GUI
applications based on the menu-view widget renderer. Its use is
illustrated by the simple test application at src/test/dialog/
that is accompanied with the dialog.run script.

Issue #5008
2023-10-04 13:22:06 +02:00
Christian Prochaska
9c32d53914 os: add a src recipe for test-terminal_echo
Fixes #5006
2023-10-04 13:22:06 +02:00
Alice Domage
6881a71a87 depot_remove.run: improve <remove_all/> tests
This commits introduces changes to test number 4, so it must keep
more than one PKG. Also, it introduces a 5th test to verify that the
<remove_all/> functionality does delete everything in the depot.

Issue genodelabs#4866
2023-09-29 12:15:05 +02:00
Alice Domage
3f661a75e4 depot_remove.run: make test functions more intuitive
This commits introduces improvements to the test functions to avoid
code duplication, and renames these functions to reflect better what they
are used for.

Issue genodelabs#4866
2023-09-29 12:15:05 +02:00
Martin Stein
b587134a8d net tests: raise nic_drv/drivers cap quota
Several nightly network-related tests fail currently on sel4/pc because the
new e1000 NIC driver requires more capabilities. The "drivers nic" package
was already adapted to the new requirement but some tests fail to provide
enough caps to the corresponding sub system. This commit tries to fix all
remaining tests.

Ref #4923
2023-08-21 08:12:01 +02:00
Christian Helmuth
62a0605cf0 depot_autopilot: skip RAM-hungry tests on foc/pbxa9
foc (or maybe bootstrap) seems to cap RAM at 256 MiB while hw uses the
entire RAM configured at the Qemu command line.
2023-07-14 12:06:32 +02:00
Norman Feske
75bfc37b18 sculpt: screensaver infrastructure
This patch enhances Sculpt with the ability to detect user inactivity
for driving a screensaver by combining nitpicker's hover and focus
reports with a timer.

Issue #4950
2023-07-14 12:06:32 +02:00
Norman Feske
ba67b535f8 gems: remove leitzentrale.run
This run script is superseded by modular Sculpt, which is able to run on
base-linux.
2023-07-14 12:06:32 +02:00
Stefan Kalkowski
15b30f3547 sculpt_image: add MNT Reform2 as target board
Fix genodelabs/genode#4936
2023-07-14 12:06:31 +02:00
Christian Helmuth
8ecbc48211 sculpt: replace ipxe_nic_drv by pc_nic_drv
Issue #4921
2023-07-14 12:06:31 +02:00
Alice Domage
943c9809ed depot_remove.run: replace x86_64 by [depot_spec]
This change makes the run script compatible with all CPU architectures.

Issue genodelabs#4866
2023-07-14 12:01:19 +02:00
Martin Stein
abe163c335 tresor: do not use on-disc-layouted structs
* Removes all previous structs that represented an on-disc block layout
  and were therfore subject to a number of layout restrictions (packed,
  padding members, enum representations, etc.).
* Adds a replacement struct without any layout restrictions for each of the
  removed structs. The new structs are named similar to the old structs.
* Adds block encoding and decoding utilities for easily converting from the
  new structs to on-disc blocks and vice-versa (Block_scanner, Block_generator,
  T::decode_to_blk, T::encode_from_blk)
* Adapts all affected places in the library to encode and decode proberly
  instead of simply casting pointers.
* Thereby cleans up the hashing utilities to use typed-reference args instead
  of void pointers.
* Re-enables run/tresor_tester and test-file_vault_vonfig_report for platforms
  rpi, imx53_qsb, imx53_qsb_tz, imx6q_sabrelite, imx7d_sabre.

Ref #4819
2023-07-14 12:01:19 +02:00
Alice Domage
fb0e8fffa2 New depot_remove component
The depot_remove component can delete PKG archives with
automatically resolving dependencies and deleting archives that are not
required on the system anymore.

Issue genodelabs#4866
2023-06-16 11:24:26 +02:00
Martin Stein
dea53f635f Refine tresor tests
* Use jitterentropy only if supported.
  On certain targets like pbxa9 or zynq_qemu, the performance counter always
  yields 0, which renders jitterentropy unusable. On these platforms, the
  Tresor tests now use a static value as entropy source instead.

* Adds a new package test-file_vault_config_report_no_entropy that is used by
  the Depot Autopilot on targets without jitterentropy support instead of
  test-file_vault_config_report. The only difference between the two packages
  is the value of the above described new config attribute of the File Vault.

* Circumvent alignment fault.
  The Tresor lib for now has the deficiency of using on-disc data structures
  directly in code instead of decoding them first to unpacked, naturally
  aligned structures. This causes problems with memory-access alignment on
  several platforms (rpi, imx6q_sabrelite, imx53_qsb, imx7d_sabre). As fixing
  this properly is a bit of work, the commit disables the tresor_tester and
  file_vault_config_report test on the affected platforms in autopilot mode for
  now.

* Further adjustments
  * Make benchmarks optional
  * Use a smaller tresor for rekeying
  * Clean up image parameters
  * No use implicit routes/resources
  * Reduce ram consumption
  * Reduce test timeout
  * Raise cap quota, required for sel4 x86_64.

Ref #4819
2023-06-16 11:24:26 +02:00
Martin Stein
80b729703b file_vault_config_report tests: fix for pistachio
* relaxes the timing and reduces the test steps because pistachio is quite
  slow and would otherwise trigger problems with our easy approach of using a
  dynamic rom instead of a proper manager

* provide IO_PORT and IRQ session to timer driver

Ref #4819
2023-06-16 11:24:25 +02:00
Josef Söntgen
194af03fe9 autopilot.list: replace cbe with tresor tester
Issue #4819.
2023-06-16 11:24:25 +02:00
Norman Feske
6f4242f03b sculpt: version 23.06
Increase version due to upcoming binary incompatibility with 23.04.
2023-06-16 11:23:57 +02:00
Christian Helmuth
c1104ccbc7 depot_autopilot: skip file_vault on riscv and rpi
Issue #4819
2023-05-30 12:13:34 +02:00
Norman Feske
34c7085ada sculpt.run: whitespace 2023-05-30 12:13:33 +02:00
Stefan Kalkowski
435c9719a7 sculpt: support for wifi on MNT Reform 2
Fix genodelabs/genode#4908
2023-05-30 12:13:33 +02:00
Josef Söntgen
ea0a692879 wifi: get firmware from tar archive
This commit changes the firmware handling from requesting each
firmware file as a ROM module that is checked against a list of
known images (including their size) to requesting each file via
the local VFS of the 'wifi_drv'. This allows for using the original
probing mechanism that tries to select a matching firmware version.

The 'repos/dde_linux/src/drivers/wifi/README' file contains more
detailed information on how to configure the driver.

Issue #4861.
2023-05-30 12:03:33 +02:00
Josef Söntgen
d5710d9de3 Move 'wifi' driver to dde_linux repository
The bulk of the driver code now lives in the 'dde_linux' repository,
which is available on all platforms, from where it can be referenced by
other repositories.

The 'wifi_drv' binary was delegated to a generic harness that includes
all configuration and management functionality shared by all wireless
device driver components, e.g., the wpa_supplicant. The code of the
device driver emulation environment is located in 'src/lib/wifi'. It
is referenced by the platform-specific driver library that resides in
the corresponding platform repository. The runtime configuration needs
to point the driver to proper driver library.

The platform-specific library is in charge of orchestrating the contrib
source utilized by the driver as well as providing the 'source.list'
and 'dep.list' files. It must include the generic library snippet
'repos/dde_linux/lib/wifi.inc' that deals with managing the emulation
environment code.

The 'repos/dde_linux/src/drivers/wifi/README' file contains more
detailed information on how to deploy the driver.

Issue #4861.
2023-05-30 12:03:32 +02:00
Martin Stein
aeb65d6b1b file_vault: version 23.05
* ARM support and detaching from Ada/SPARK

  * Remove all CBE-related code - especially the Ada/SPARK-based CBE library.

    * We have no means or motivation of further maintaining big projects in
      Ada/SPARK (the core Genode team is native to C++).

    * The Genode Ada/SPARK toolchain and runtime don't support ARM so far - an
      important architecture for Genode. This would mean extra commitment in
      Ada/SPARK.

    * We realize that block encryption more and more becomes a fundamental
      feature of Genode systems.

  * Implement a new block encryption library named Tresor that is inspired by
    the design and feature set of the former CBE library and that is entirely
    C++ and part of the Genode gems repository.

    * The Tresor block encryption is backwards-compatible with the on-disk
      data layout of the former CBE block encryption.

    * Except from the snapshot management and the "dump" tool, the Tresor
      block encryption provides the same feature set as the former CBE block
      encryption and accepts the same user requests at the level of the
      Tresor library API.

    * So far, the Tresor block encryption does not support the creation of
      user-defined snapshots.

    * In contrast to the former CBE, the Tresor ecosystem has
      no "dump" tool beause with the CBE library it turned out to be rarely of
      use.

    * In contrast to the Block back-end of the CBE "init" tool, the Tresor
      "init" tool uses a File System back-end.

    * The former CBE VFS-plugin is replaced with a new Tresor VFS-Plugin.

      * The Tresor-VFS plugin in general is similar to the former CBE VFS but
        has a slightly different API when it comes to re-keying and re-sizing.
        Each of these operations now is controlled via two files. The first
        file is named <operation> and the user writes the start command to it.
        The user must then read this file once in order to drive the operation.
        The read returns the result of the operation, once it is finished.
        The second file is named <operation>_progress and can be watched and
        read for obtaining the progress of the operation as percentage.

    * The file vault is adapted to use the new Tresor ecosystem
      instead of the former CBE ecosystem and thereby also gains ARM support.

    * The former CBE tester and CBE VFS-tests are replaced by equivalent
      Tresor variants and are now run on ARM as well (testing with a persistent
      storage back-end is supported only when running on Linux).

    * So far, the new Tresor block encryption has no internal cache for meta
      data blocks like the former CBE.

* Add config/report user interface

  * Add a second option for the administration front end to the file vault
    named "config and report". With this front end the File Vault communicates
    with the user via XML strings. A ROM session is requested for user input
    and a Report session for user output. The front end type must be set at
    startup via the component config and is a static setting. The graphical
    front end that was used up to now is named "menu view" and remains the
    default.

  * The File Vault can now reflect its internal state and user input ("config
    and report" mode only) at the LOG session via two new static config
    attributes "verbose_state" and "verbose_ui_config" (both defaulting to
    "no").

  * The Shutdown button in "menu view" mode is replaced with a Lock button. The
    new button doesn't terminate the File Vault but merely lock the encrypted
    container and return to a cleared passphrase input. The same transition is
    also provided in "config and report" mode.

  * The file_vault.run script is replaced with file_vault_menu_view.run and
    file_vault_cfg_report.run that address the two front end modes. In contrast
    to the former script, which is interactive, the latter script is suitable
    for automatic testing.

  * There is a new recipe/pkg/test-file_vault_cfg_report that essentially does
    the same as file_vault_cfg_report.run but uses the File Vault package and
    can be executed with the Depot Autopilot. The new test package is added to
    the default test list of depot_autopilot.run

  * The File Vault README is updated to the new version of the component and
    has gained a chapter "functional description".

  * Fixes a regression with the cbe_init_trust_anchor component that prevented
    reacting to a failed unlock attempt in the File Vault.

* The new Tresor software Trust Anchor has an optional deterministic mode in
  which it replaces the normally randomized symmetric keys with 0. This mode
  comes in handy for debugging. However, it should never be activated in
  productive systems. When activated, the user is warned extensively on the
  LOG that this system mode is insecure.

Ref #4819
2023-05-30 12:03:32 +02:00
Norman Feske
54d7a48c9b sculpt: support for pinephone wifi driver
This patch replaces the former 'nic_drv' and 'nic_drv_dtb' functions
by a more general 'nic_driver_routes' function that can return one or
multiple platform-specific ROM routes for NIC-driver binaries and dtb
files. This allows for supplying customizations for the wifi driver
as well. E.g., on the PinePhone, this hook can be used to handle the
renaming of the 'wifi_drv' to 'a64_wifi_drv'.

Related to issue #4813 and issue genodelabs/genode-allwinner#17.
2023-04-26 11:58:14 +02:00
Christian Helmuth
bba9254172 sculpt: version 23.04 2023-04-17 14:56:40 +02:00
Norman Feske
bd3936c7ed Test for combining select with a pipe
The test exercises the VFS's read-ready mechanism when using the
vfs_pipe plugin.

Issue #4785
2023-04-17 14:48:22 +02:00
Norman Feske
dc8fcc254d sculpt_image.run: fix var name in assert_run_arg 2023-03-13 14:32:54 +01:00
Norman Feske
fa167bcdc4 gems: screenshot trigger for virtual print button
The screenshot trigger displays a little red dot at the upper-left
corner of the screen. When touched or clicked-on, it generates an
artificial key-press-release sequence for the print key and disappears
for one second. In this time, a separate screenshot component can handle
the print key by capturing the screen without the red dot appearing in
the saved picture.
2023-02-27 08:22:47 +01:00
Norman Feske
3355d14b65 sculpt_image.run script for creating system images
Issue #4744
2023-02-27 08:22:46 +01:00
Norman Feske
4de71549d4 sculpt: supplement build info as boot module
This allows us to reflect the information about the running image to the
user.

Issue #4744
2023-02-27 08:22:46 +01:00
Norman Feske
ffb8321e57 sculpt_test.run: add '-boot d' to Qemu args
When using '--include image/iso', we want to ensure that the virtual
machine boots from CD-ROM.
2023-01-24 12:07:32 +01:00
Norman Feske
88becbe29d sculpt: integration of optional presets
With the new 'presets:' tag, .sculpt files can now refer to deploy
configurations to be integrated in the presets/ subdirectory of the
config file system. Those files can thereby be used as preconfigured
system scenarios. Such a preconfigured scenario can be loaded at
runtime by copying the preset file to config/deploy.

Issue #4731
2023-01-24 12:07:32 +01:00
Norman Feske
9a662249eb vfs_cbe_init.run: adapt to use of libcrypto 2023-01-24 12:07:27 +01:00
Sebastian Sumpf
8bd548416d sculpt: increase drivers caps for fuji4 (has ahci and nvme)
One test notebook has an AHCI and NVMe controller and reaches the quota
limit in Sculpt.

issue #4667
2022-11-17 08:00:36 +01:00
Norman Feske
3b06a27465 sculpt: add pin_session and pin_control resources 2022-11-17 08:00:35 +01:00
Stefan Kalkowski
73fec3bdb7 sculpt: add ROM route to nic_drv's DTB
Ref genodelabs/genode#4652
2022-11-17 08:00:35 +01:00