diff --git a/README.md b/README.md index b01ef20719..f3d6008f54 100644 --- a/README.md +++ b/README.md @@ -22,18 +22,8 @@ appear here. - [Running tests](#running-tests) - [Running tests via wrapper](#running-tests-via-wrapper) - [Running regressions tests](#running-regressions-tests) -* [QEMU workflow](#qemu-workflow) - - [Booting](#booting) -* [Contributing](#contributing) - - [Code](#code) - - [Issues](#issues) -* [Guidelines](#guidelines) - - [Pre-commit and CI checks](#pre-commit-and-ci-checks) - - [Code style](#code-style) - - [Keywords](#keywords) - - [Documentation](#documentation) * [Useful refactoring tools](#useful-refactoring-tools) -* [RCS Talos II platforms](#rcs-talos-ii-platform) +* [Additional documents](#additional-documents) ## Lab architecture @@ -69,15 +59,17 @@ different platform) may vary. | Manufacturer | Platform | Firmware | $CONFIG | |--------------|----------------------|--------------------------|----------------------------------------| -| NovaCustom | NV41MZ | Dasharo | `novacustom-nv41mz` | -| NovaCustom | NV41MB | Dasharo | `novacustom-nv41mb` | +| MSI | PRO Z690 A DDR5 | Dasharo | `msi-pro-z690-a-ddr5` | +| MSI | PRO Z690 A WIFI DDR4 | Dasharo | `msi-pro-z690-a-wifi-ddr4` | | NovaCustom | NS50MU | Dasharo | `novacustom-ns50mu` | -| NovaCustom | NS70MU | Dasharo | `movacustom-ns70mu` | -| NovaCustom | NV41PZ | Dasharo | `novacustom-nv41pz` | | NovaCustom | NS50PU | Dasharo | `novacustom-ns50pu` | +| NovaCustom | NS70MU | Dasharo | `movacustom-ns70mu` | | NovaCustom | NS70PU | Dasharo | `novacustom-ns70pu` | -| MSI | PRO Z690 A WIFI DDR4 | Dasharo | `msi-pro-z690-a-wifi-ddr4` | -| MSI | PRO Z690 A DDR5 | Dasharo | `msi-pro-z690-a-ddr5` | +| NovaCustom | NV41MB | Dasharo | `novacustom-nv41mb` | +| NovaCustom | NV41MZ | Dasharo | `novacustom-nv41mz` | +| NovaCustom | NV41PZ | Dasharo | `novacustom-nv41pz` | +| PC Engines | apu3 | Dasharo | `pcengines-apu3` | +| PC Engines | apu4 | Dasharo | `pcengines-apu4` | | Protectli | V1210 | Dasharo | `protectli-v1210` | | Protectli | V1410 | Dasharo | `protectli-v1410` | | Protectli | V1610 | Dasharo | `protectli-v1610` | @@ -86,9 +78,9 @@ different platform) may vary. | Protectli | VP4630 | Dasharo | `protectli-vp4630` | | Protectli | VP4650 | Dasharo | `protectli-vp4650` | | Protectli | VP4670 | Dasharo | `protectli-vp4670` | +| QEMU | Q35 | Dasharo (UEFI) | `qemu` | | Raptor-CS | TalosII | Dasharo | `raptor-cs_talos2` | | Raspberry Pi | RaspberryPi 3B | Yocto | `rpi-3b` | -| QEMU | Q35 | Dasharo (UEFI) | `qemu` | ## Getting started @@ -193,146 +185,6 @@ platform config file. FW_FILE=$FW_FILE DEVICE_IP=$DEVICE_IP RTE_IP=$RTE_IP CONFIG=$CONFIG ./scripts/regression.sh ``` -## QEMU workflow - -> Make sure to proceed with [Getting started section](#getting-started) first. - -Many of the test and keywords can be tested in emulation environment. This -can greatly increase the development speed: -* there is no need to acquire hardware, -* there is no need to flash hardware, or resolve other hardware-related - problems, -* the boot time (and responsivness in general) is much faster. - -### Booting - -Following script assume that you have `OVMF_CODE.fd` and `OVMF_VARS.fd` in you -current working directory. If those binaries will not be found script will -download latest release of Dasharo (UEFI) for QEMU Q35. - -If you want to use script in development workflow, most likely you have already built -Dasharo (UEFI) for QEMU Q35 according to -[this instruction](https://docs.dasharo.com/variants/qemu_q35/building-manual/). -In that case you would like to provide directory with Dasharo (UEFI) binaries as -environment variable (`DIR`). - -You may also decide to not use graphics user interface for QEMU. In that case -choose mode `nographic`. If you run QEMU on a remote machine you may consider -to use mode `vnc` with default port for graphical output being `5900`. - -Dasharo (UEFI) in QEMU can be started with: - -```bash -./scripts/ci/qemu-run.sh graphic firmware -``` - -In this mode, a graphical QEMU window would popup, so you can observe the test -flow, or control it manually. The actual testing will happen over -serial, which is exposed via telnet. For more modes and options, please refer -to the script's help text. - -You may also build customized Dasharo firmware for QEMU (e.g. with some Dasharo -options enabled or disabled). In such a case, please refer to: -* [Building Manual in Dasharo for QEMU documentation](https://docs.dasharo.com/variants/qemu_q35/building-manual/) -* [Development section in Dasharo for QEMU documentation](https://docs.dasharo.com/variants/qemu_q35/development/) - -Refer to the [latest releases](https://github.com/Dasharo/edk2/releases/latest/) -to see which test have been proven to work on QEMU so far. - -You may also refer to the `./scripts/ci/qemu-self-test.sh`, where we aim to -keep testing common keywords, to ensure of their correct operation. - -## Contributing - -### Code - -* Install pre-commit hooks after cloning repository: - -```bash -pre-commit install -``` - -### Issues - -If you are certain that the issue is related to this repository, create issue -directly -[here](https://github.com/Dasharo/open-source-firmware-validation/issues/new/choose). -Otherwise, create an issue in -[dasharo-issues repisotory](https://github.com/Dasharo/dasharo-issues/issues/new/choose). - -## Guidelines - -A list of guidelines we shall follow during transition to improve the quality -of this repository. We start with getting rid of duplicated keywords, reducing -the size of `keywords.robot` file, and improving their overall quality. - -There are other areas of interest that we will look into in the next steps -and add as guidelines: -* variables (use Python/YAML, not robot syntax), -* platform-configs (get rid of duplication, and unused data), -* separate test for different OS into different suites, -* prepare the OS for running test suite via some dedicated tools (e.g. Ansible), - rather than implementing keywords for that from scratch, -* reduce the number of unnecessary power events, so tests can finish quicker, -* improve overall code quality by enabling back more - [robocop checks we cannot pass right now](https://github.com/Dasharo/open-source-firmware-validation/blob/main/robocop.toml), -* To Be Continued. - -### Pre-commit and CI checks - -1. Make sure to use `pre-commit` locally. All pre-commit and other CI checks - must pass of course, prior requesting for review. Please check the status of - checks in your PR. If the failure is questionable, provide your arguments - for that, rather than silently ignoring this fact. - -### Code style - -1. It is automatically handled by - [robotidy](https://robotidy.readthedocs.io/en/stable/). The current rules - can be found - [here](https://github.com/Dasharo/open-source-firmware-validation/blob/main/.robotidy). - -### Keywords - -1. No new keywords in `keywords.robot` will be accepted -* new keywords must be placed in a logically divided modules, under `lib/` - directory - - see - [openbmc-test-automation](https://github.com/openbmc/openbmc-test-automation/tree/master/lib) - as a reference -* if you need to modify something in `keywords.robot`, you should create a new - module under `lib/` -* if you add new keyword module, you should review the `keywords.module` and - move related keywords there as well, if suitable -1. If keyword from keywords.robot can be reused or improved, do that instead - of creating a new one - - keyword duplication will not be accepted, - - you will be asked to use/improve existing keywords instead. -1. You are encouraged to use Python for more sophisticaed or complex keywords - (e.g. more convoluted data parsing and processing). We are not forced to use - RF for all keywords. Especially when it is simply easier to use Python. -1. For reading from terminal (no matter if it is Telnet, or SSH), - following keywords must be used: - - `Read From Terminal Until Prompt` - - `Read From Terminal Until` - - `Read From Terminal` - Usage of other keywords is prohibited. Whenever you modify a test/keyword, - you should rework it to use one of the above. -1. For writing into terminal, following keywords must be used: - - `Execute Command In Terminal` - - `Write Into Terminal` - - `Write Bare Into Terminal` - Usage of other keywords is prohibited. Whenever you modify a test/keyword, - you should rework it to use one of the above. - You should use `Execute Command In Terminal` unless you have a very good - reason not to. Thanks to that, your keyword will not leave floating output - in buffer to be received by another keywords, not expecting that. - -### Documentation - -* Each new (or modified) file, test, keyword, must have a `[Documentation]` - section. - ## Useful refactoring tools * [sherlock](https://github.com/MarketSquare/robotframework-sherlock) @@ -341,50 +193,12 @@ and add as guidelines: * [Renaming Test Cases](https://robotidy.readthedocs.io/en/stable/transformers/RenameTestCases.html) * [Renaming Variables](https://robotidy.readthedocs.io/en/stable/transformers/RenameVariables.html) -## RCS Talos II platform - -When running tests on Talos II platform use the following commands: - -**WARNING** The support state of this platform in the `main` branch may vary. -We should have a single documentation for all platforms. This effort is tracked in -[this issue](https://github.com/Dasharo/open-source-firmware-validation/issues/112). - -* For running a single test case: - -```bash -robot -L TRACE -v device_ip:$DEVICE_IP -v config:raptor-cs_talos2 -v fw_file:$FW_FILE \ --v bootblock_file:$BOOTBLOCK_FILE -v zImage_file:$ZIMAGE_FILE -v pnor_file:$PNOR_FILE \ --t $TEST_CASE_ID $TEST_MODULE/$TEST_SUITE -``` +## Additional documents -* For running single test suite: - -```bash -robot -L TRACE -v device_ip:$DEVICE_IP -v config:raptor-cs_talos2 -v fw_file:$FW_FILE \ --v bootblock_file:$BOOTBLOCK_FILE -v zImage_file:$ZIMAGE_FILE -v pnor_file:$PNOR_FILE \ -$TEST_MODULE/$TEST_SUITE -``` - -* For running single test module: - -```bash -robot -L TRACE -v device_ip:$DEVICE_IP -v config:raptor-cs_talos2 -v fw_file:$FW_FILE \ --v bootblock_file:$BOOTBLOCK_FILE -v zImage_file:$ZIMAGE_FILE -v pnor_file:$PNOR_FILE \ -./$TEST_MODULE -``` - -Parameters should be defined as follows: - -* $DEVICE_IP - OBMC IP address (currently `192.168.20.9`), -* $FW_FILE - path to and name of the coreboot firmware file, -* $BOOTBLOCK_FILE - path to and name of the bootblock file, -* $ZIMAGE_FILE - path to and name of the zImage file, -* $PNOR_FILE - path to and name of the pnor file, -* $TEST_MODULE - name of the test module (i.e. `dasharo-compatibility`), -* $TEST_SUITE - name of the test suite (i.e. `coreboot-base-port`), -* $TEST_CASE_ID - ID of the requested to run test case (i.e. `CBP001.001`). - Note that after test case ID asterisk should be added. This is necessary due - to the construction of the flag `-t` (or `--test`) - -You can also run tests with `-v snipeit:no` in order to skip checking whether -the platform is available on snipeit. +- [Adding new platforms](docs/adding-new-platforms.md) - Instructions for adding + support for new platforms +- [Contributing](docs/contributing.md) - Instructions for first-time + contributors +- [Raptor CS Talos II](docs/raptor-talos-2.md) - Documentation specific to the + Raptor Computing Systems Talos II mainboard +- [QEMU](docs/qemu.md) - Documentation for running tests in QEMU diff --git a/docs/adding-new-platforms.md b/docs/adding-new-platforms.md new file mode 100644 index 0000000000..7637d39594 --- /dev/null +++ b/docs/adding-new-platforms.md @@ -0,0 +1,81 @@ +## Adding new platforms + +Depending on what type of platform you're adding, the instructions here will +vary. + +### Adding a brand new platform + +- Create a new file for your mainboard in `platform-configs/`. For most + platforms this file will be called `[platform-vendor]-[platform-model].robot`. +- Add the following at the top of your platform config: + +```robot +*** Settings *** +Resource default.robot +``` + +- Copy the contents of `include/default.robot` to your platform config +- Modify the file for your platform: + - Modify the settings appropriately for your mainboard + - Remove any unmodified lines - they will be sourced from `default.robot` +- Add the platform configuration to `variables.robot: + - Create a new configuration of RTE, if you are using one, e.g.: + + ```robot + &{RTE11}= ip=192.168.10.174 cpuid=02c000426621f7ea pcb_rev=1.0.0 + ... platform=apu4 board-revision=4d env=prod + ... platform_vendor=PC Engines firmware_type=UEFI + ``` + + - Add the RTE to the list: + + ``` + @{RTE_LIST}= &{RTE05} + ... &{RTE06} &{RTE07} &{RTE08} &{RTE09} &{RTE10} + ... &{RTE11} + ``` + + - Do the same for any modules installed in the platform + - Create a new CONFIG contaning the RTE and modules used for testing, and + append it to the list: + + ``` + @{CONFIG04}= &{RTE11} &{SSD06} &{CARD06} &{USB03} + ... &{MODULE06} &{ADAPTER01} &{MODULE10} + + @{CONFIG_LIST}= @{CONFIG01} @{CONFIG02} @{CONFIG03} @{CONFIG04} + ``` + + - Run a simple test to verify the config is working correctly - for example + UEFI Shell: + + ``` + robot -v snipeit:no -L TRACE -v rte_ip:192.168.10.174 -v device_ip:0.0.0.0 -v config:pcengines-apu4 dasharo-compatibility/uefi-shell.robot + ``` + +### Adding new variant of an existing platform + +Some boards come in multiple variants, where the majority of properties and +features can be shared. For these cases, we have shared "base" configs in +`platform-configs/include/`. This way we don't need to copy-paste entire config +files, making maintenance easier. In this example we'll be adding a new PC +Engines apu variant, using an existing pcengines base config: + +- Create a config file in `platform-configs` for your platform +- Add the following to your platform config + +``` +*** Settings *** +Resource include/pcengines.robot +``` + +- Add variant-specific settings for your platform - in this case, only the + SMBIOS product name field: + +``` +*** Variables *** +${DMIDECODE_PRODUCT_NAME}= apu4 +``` + +- Proceed with adding the platform to `variables.robot` as per +[Adding a brand new platform](#adding-a-brand-new-platform). diff --git a/docs/contributing.md b/docs/contributing.md new file mode 100644 index 0000000000..af81919154 --- /dev/null +++ b/docs/contributing.md @@ -0,0 +1,90 @@ +## Contributing + +### Code + +* Install pre-commit hooks after cloning repository: + +```bash +pre-commit install +``` + +### Issues + +If you are certain that the issue is related to this repository, create issue +directly +[here](https://github.com/Dasharo/open-source-firmware-validation/issues/new/choose). +Otherwise, create an issue in +[dasharo-issues repisotory](https://github.com/Dasharo/dasharo-issues/issues/new/choose). + +## Guidelines + +A list of guidelines we shall follow during transition to improve the quality +of this repository. We start with getting rid of duplicated keywords, reducing +the size of `keywords.robot` file, and improving their overall quality. + +There are other areas of interest that we will look into in the next steps +and add as guidelines: +* variables (use Python/YAML, not robot syntax), +* platform-configs (get rid of duplication, and unused data), +* separate test for different OS into different suites, +* prepare the OS for running test suite via some dedicated tools (e.g. Ansible), + rather than implementing keywords for that from scratch, +* reduce the number of unnecessary power events, so tests can finish quicker, +* improve overall code quality by enabling back more + [robocop checks we cannot pass right now](https://github.com/Dasharo/open-source-firmware-validation/blob/main/robocop.toml), +* To Be Continued. + +### Pre-commit and CI checks + +1. Make sure to use `pre-commit` locally. All pre-commit and other CI checks + must pass of course, prior requesting for review. Please check the status of + checks in your PR. If the failure is questionable, provide your arguments + for that, rather than silently ignoring this fact. + +### Code style + +1. It is automatically handled by + [robotidy](https://robotidy.readthedocs.io/en/stable/). The current rules + can be found + [here](https://github.com/Dasharo/open-source-firmware-validation/blob/main/.robotidy). + +### Keywords + +1. No new keywords in `keywords.robot` will be accepted +* new keywords must be placed in a logically divided modules, under `lib/` + directory + - see + [openbmc-test-automation](https://github.com/openbmc/openbmc-test-automation/tree/master/lib) + as a reference +* if you need to modify something in `keywords.robot`, you should create a new + module under `lib/` +* if you add new keyword module, you should review the `keywords.module` and + move related keywords there as well, if suitable +1. If keyword from keywords.robot can be reused or improved, do that instead + of creating a new one + - keyword duplication will not be accepted, + - you will be asked to use/improve existing keywords instead. +1. You are encouraged to use Python for more sophisticaed or complex keywords + (e.g. more convoluted data parsing and processing). We are not forced to use + RF for all keywords. Especially when it is simply easier to use Python. +1. For reading from terminal (no matter if it is Telnet, or SSH), + following keywords must be used: + - `Read From Terminal Until Prompt` + - `Read From Terminal Until` + - `Read From Terminal` + Usage of other keywords is prohibited. Whenever you modify a test/keyword, + you should rework it to use one of the above. +1. For writing into terminal, following keywords must be used: + - `Execute Command In Terminal` + - `Write Into Terminal` + - `Write Bare Into Terminal` + Usage of other keywords is prohibited. Whenever you modify a test/keyword, + you should rework it to use one of the above. + You should use `Execute Command In Terminal` unless you have a very good + reason not to. Thanks to that, your keyword will not leave floating output + in buffer to be received by another keywords, not expecting that. + +### Documentation + +* Each new (or modified) file, test, keyword, must have a `[Documentation]` + section. diff --git a/docs/qemu.md b/docs/qemu.md new file mode 100644 index 0000000000..63c91c06da --- /dev/null +++ b/docs/qemu.md @@ -0,0 +1,48 @@ +## QEMU workflow + +> Make sure to proceed with [Getting started section](../README.md#getting-started) first. + +Many of the test and keywords can be tested in emulation environment. This +can greatly increase the development speed: +* there is no need to acquire hardware, +* there is no need to flash hardware, or resolve other hardware-related + problems, +* the boot time (and responsivness in general) is much faster. + +### Booting + +Following script assume that you have `OVMF_CODE.fd` and `OVMF_VARS.fd` in you +current working directory. If those binaries will not be found script will +download latest release of Dasharo (UEFI) for QEMU Q35. + +If you want to use script in development workflow, most likely you have already built +Dasharo (UEFI) for QEMU Q35 according to +[this instruction](https://docs.dasharo.com/variants/qemu_q35/building-manual/). +In that case you would like to provide directory with Dasharo (UEFI) binaries as +environment variable (`DIR`). + +You may also decide to not use graphics user interface for QEMU. In that case +choose mode `nographic`. If you run QEMU on a remote machine you may consider +to use mode `vnc` with default port for graphical output being `5900`. + +Dasharo (UEFI) in QEMU can be started with: + +```bash +./scripts/ci/qemu-run.sh graphic firmware +``` + +In this mode, a graphical QEMU window would popup, so you can observe the test +flow, or control it manually. The actual testing will happen over +serial, which is exposed via telnet. For more modes and options, please refer +to the script's help text. + +You may also build customized Dasharo firmware for QEMU (e.g. with some Dasharo +options enabled or disabled). In such a case, please refer to: +* [Building Manual in Dasharo for QEMU documentation](https://docs.dasharo.com/variants/qemu_q35/building-manual/) +* [Development section in Dasharo for QEMU documentation](https://docs.dasharo.com/variants/qemu_q35/development/) + +Refer to the [latest releases](https://github.com/Dasharo/edk2/releases/latest/) +to see which test have been proven to work on QEMU so far. + +You may also refer to the `./scripts/ci/qemu-self-test.sh`, where we aim to +keep testing common keywords, to ensure of their correct operation. diff --git a/docs/raptor-talos-2.md b/docs/raptor-talos-2.md new file mode 100644 index 0000000000..072c49e6d9 --- /dev/null +++ b/docs/raptor-talos-2.md @@ -0,0 +1,47 @@ +## RCS Talos II platform + +When running tests on Talos II platform use the following commands: + +**WARNING** The support state of this platform in the `main` branch may vary. +We should have a single documentation for all platforms. This effort is tracked in +[this issue](https://github.com/Dasharo/open-source-firmware-validation/issues/112). + +* For running a single test case: + +```bash +robot -L TRACE -v device_ip:$DEVICE_IP -v config:raptor-cs_talos2 -v fw_file:$FW_FILE \ +-v bootblock_file:$BOOTBLOCK_FILE -v zImage_file:$ZIMAGE_FILE -v pnor_file:$PNOR_FILE \ +-t $TEST_CASE_ID $TEST_MODULE/$TEST_SUITE +``` + +* For running single test suite: + +```bash +robot -L TRACE -v device_ip:$DEVICE_IP -v config:raptor-cs_talos2 -v fw_file:$FW_FILE \ +-v bootblock_file:$BOOTBLOCK_FILE -v zImage_file:$ZIMAGE_FILE -v pnor_file:$PNOR_FILE \ +$TEST_MODULE/$TEST_SUITE +``` + +* For running single test module: + +```bash +robot -L TRACE -v device_ip:$DEVICE_IP -v config:raptor-cs_talos2 -v fw_file:$FW_FILE \ +-v bootblock_file:$BOOTBLOCK_FILE -v zImage_file:$ZIMAGE_FILE -v pnor_file:$PNOR_FILE \ +./$TEST_MODULE +``` + +Parameters should be defined as follows: + +* $DEVICE_IP - OBMC IP address (currently `192.168.20.9`), +* $FW_FILE - path to and name of the coreboot firmware file, +* $BOOTBLOCK_FILE - path to and name of the bootblock file, +* $ZIMAGE_FILE - path to and name of the zImage file, +* $PNOR_FILE - path to and name of the pnor file, +* $TEST_MODULE - name of the test module (i.e. `dasharo-compatibility`), +* $TEST_SUITE - name of the test suite (i.e. `coreboot-base-port`), +* $TEST_CASE_ID - ID of the requested to run test case (i.e. `CBP001.001`). + Note that after test case ID asterisk should be added. This is necessary due + to the construction of the flag `-t` (or `--test`) + +You can also run tests with `-v snipeit:no` in order to skip checking whether +the platform is available on snipeit. diff --git a/platform-configs/include/pcengines-legacy.robot b/platform-configs/include/pcengines-legacy.robot new file mode 100644 index 0000000000..352d7389cc --- /dev/null +++ b/platform-configs/include/pcengines-legacy.robot @@ -0,0 +1,105 @@ +*** Settings *** +Resource default.robot + + +*** Variables *** +${INITIAL_DUT_CONNECTION_METHOD}= Telnet +${DUT_CONNECTION_METHOD}= ${INITIAL_DUT_CONNECTION_METHOD} +${PAYLOAD}= seabios +${RTE_S2_N_PORT}= 13541 +${FLASH_SIZE}= ${8*1024*1024} +${FLASH_LENGTH}= ${EMPTY} +${SETUP_MENU_KEY}= ${F10} +${SETUP_MENU_STRING}= F10 +${IPXE_BOOT_ENTRY}= ?. iPXE +${MANUFACTURER}= PC Engines +${CPU}= AMD GX-412TC SOC +${INITIAL_CPU_FREQUENCY}= 1000 +${DEF_CORES}= 4 +${DEF_THREADS}= 1 +${DEF_CPU}= 4 +${DEF_ONLINE_CPU}= 0-3 +${DEF_SOCKETS}= 1 +${POWER_CTRL}= RteCtrl +${FLASH_VERIFY_METHOD}= iPXE-boot +${FLASH_VERIFY_OPTION}= UEFI Shell +# TODO +${MAX_CPU_TEMP}= ${EMPTY} + +${DMIDECODE_MANUFACTURER}= PC Engines +${DMIDECODE_VENDOR}= 3mdeb +${DMIDECODE_FAMILY}= N/A +# TODO +${DMIDECODE_TYPE}= Desktop + +# Supported test environments +${TESTS_IN_FIRMWARE_SUPPORT}= ${TRUE} +${TESTS_IN_UBUNTU_SUPPORT}= ${TRUE} + +# Regression test flags +${DASHARO_SECURITY_MENU_SUPPORT}= ${TRUE} +# Test module: dasharo-compatibility +${CUSTOM_BOOT_MENU_KEY_SUPPORT}= ${TRUE} +${CUSTOM_SETUP_MENU_KEY_SUPPORT}= ${TRUE} +${EC_AND_SUPER_IO_SUPPORT}= ${TRUE} +${USB_DISKS_DETECTION_SUPPORT}= ${TRUE} +${UEFI_SHELL_SUPPORT}= ${TRUE} +${UEFI_COMPATIBLE_INTERFACE_SUPPORT}= ${TRUE} +${IPXE_BOOT_SUPPORT}= ${TRUE} +${SD_CARD_READER_SUPPORT}= ${TRUE} +${WIRELESS_CARD_SUPPORT}= ${TRUE} +${WIRELESS_CARD_WIFI_SUPPORT}= ${TRUE} +${SERIAL_NUMBER_VERIFICATION}= ${TRUE} +${FIRMWARE_NUMBER_VERIFICATION}= ${TRUE} +${FIRMWARE_FROM_BINARY}= ${TRUE} +${PRODUCT_NAME_VERIFICATION}= ${TRUE} +${RELEASE_DATE_VERIFICATION}= ${TRUE} +${RELEASE_DATE_FROM_SOL}= ${TRUE} +${MANUFACTURER_VERIFICATION}= ${TRUE} +${VENDOR_VERIFICATION}= ${TRUE} +${FAMILY_VERIFICATION}= ${TRUE} +${TYPE_VERIFICATION}= ${TRUE} +${HARDWARE_WP_SUPPORT}= ${TRUE} +${DTS_SUPPORT}= ${TRUE} +${FIRMWARE_BUILDING_SUPPORT}= ${TRUE} +${UPLOAD_ON_USB_SUPPORT}= ${TRUE} +${CPU_TESTS_SUPPORT}= ${TRUE} +${RESET_TO_DEFAULTS_SUPPORT}= ${TRUE} +${L2_CACHE_SUPPORT}= ${TRUE} +${L3_CACHE_SUPPORT}= ${TRUE} +${DEFAULT_POWER_STATE_AFTER_FAIL}= Powered On +${ESP_SCANNING_SUPPORT}= ${TRUE} +${DTS_FIRMWARE_FLASHING_SUPPORT}= ${TRUE} +${MINI_PC_IE_SLOT_SUPPORT}= ${TRUE} + +# Test module: dasharo-security +${TPM_SUPPORT}= ${TRUE} +${VERIFIED_BOOT_SUPPORT}= ${TRUE} +${VERIFIED_BOOT_POPUP_SUPPORT}= ${TRUE} +${MEASURED_BOOT_SUPPORT}= ${TRUE} +${SECURE_BOOT_SUPPORT}= ${TRUE} +${SECURE_BOOT_DEFAULT_STATE}= Disabled +${UEFI_PASSWORD_SUPPORT}= ${TRUE} + +# Test module: dasharo-performance +${SERIAL_BOOT_MEASURE}= ${TRUE} +${CPU_TEMPERATURE_MEASURE}= ${TRUE} +${CPU_FREQUENCY_MEASURE}= ${TRUE} +${PLATFORM_STABILITY_CHECKING}= ${TRUE} + +# Test module: dasharo-stab +${TPM_DETECT_SUPPORT}= ${TRUE} +${USB_TYPE-A_DEVICES_DETECTION_SUPPORT}= ${TRUE} + +*** Keywords *** +Power On + [Documentation] Keyword clears telnet buffer and sets Device Under Test + ... into Power On state using RTE OC buffers. Implementation + ... must be compatible with the theory of operation of a + ... specific platform. + IF '${DUT_CONNECTION_METHOD}' == 'SSH' RETURN + Sleep 2s + RteCtrl Power Off + Sleep 10s + Telnet.Read + RteCtrl Power On diff --git a/platform-configs/include/pcengines.robot b/platform-configs/include/pcengines.robot new file mode 100644 index 0000000000..96302be6d3 --- /dev/null +++ b/platform-configs/include/pcengines.robot @@ -0,0 +1,109 @@ +*** Settings *** +Resource default.robot + + +*** Variables *** +${INITIAL_DUT_CONNECTION_METHOD}= Telnet +${DUT_CONNECTION_METHOD}= ${INITIAL_DUT_CONNECTION_METHOD} +${PAYLOAD}= tianocore +${RTE_S2_N_PORT}= 13541 +${FLASH_SIZE}= ${8*1024*1024} +${FLASH_LENGTH}= ${EMPTY} +${TIANOCORE_STRING}= ENTER +${BOOT_MENU_KEY}= ${F11} +${SETUP_MENU_KEY}= ${DELETE} +${BOOT_MENU_STRING}= Please select boot device: +${SETUP_MENU_STRING}= Select Entry +${IPXE_BOOT_ENTRY}= iPXE Network Boot +${EDK2_IPXE_CHECKPOINT}= iPXE Shell +${MANUFACTURER}= PC Engines +${CPU}= AMD GX-412TC SOC +${INITIAL_CPU_FREQUENCY}= 1000 +${DEF_CORES}= 4 +${DEF_THREADS}= 1 +${DEF_CPU}= 4 +${DEF_ONLINE_CPU}= 0-3 +${DEF_SOCKETS}= 1 +${POWER_CTRL}= RteCtrl +${FLASH_VERIFY_METHOD}= tianocore-shell +${FLASH_VERIFY_OPTION}= UEFI Shell +# TODO +${MAX_CPU_TEMP}= ${EMPTY} + +${DMIDECODE_MANUFACTURER}= PC Engines +${DMIDECODE_VENDOR}= 3mdeb +${DMIDECODE_FAMILY}= N/A +# TODO +${DMIDECODE_TYPE}= Desktop + +# Supported test environments +${TESTS_IN_FIRMWARE_SUPPORT}= ${TRUE} +${TESTS_IN_UBUNTU_SUPPORT}= ${TRUE} + +# Regression test flags +${DASHARO_SECURITY_MENU_SUPPORT}= ${TRUE} +# Test module: dasharo-compatibility +${CUSTOM_BOOT_MENU_KEY_SUPPORT}= ${TRUE} +${CUSTOM_SETUP_MENU_KEY_SUPPORT}= ${TRUE} +${EC_AND_SUPER_IO_SUPPORT}= ${TRUE} +${USB_DISKS_DETECTION_SUPPORT}= ${TRUE} +${UEFI_SHELL_SUPPORT}= ${TRUE} +${UEFI_COMPATIBLE_INTERFACE_SUPPORT}= ${TRUE} +${IPXE_BOOT_SUPPORT}= ${TRUE} +${SD_CARD_READER_SUPPORT}= ${TRUE} +${WIRELESS_CARD_SUPPORT}= ${TRUE} +${WIRELESS_CARD_WIFI_SUPPORT}= ${TRUE} +${SERIAL_NUMBER_VERIFICATION}= ${TRUE} +${FIRMWARE_NUMBER_VERIFICATION}= ${TRUE} +${FIRMWARE_FROM_BINARY}= ${TRUE} +${PRODUCT_NAME_VERIFICATION}= ${TRUE} +${RELEASE_DATE_VERIFICATION}= ${TRUE} +${RELEASE_DATE_FROM_SOL}= ${TRUE} +${MANUFACTURER_VERIFICATION}= ${TRUE} +${VENDOR_VERIFICATION}= ${TRUE} +${FAMILY_VERIFICATION}= ${TRUE} +${TYPE_VERIFICATION}= ${TRUE} +${HARDWARE_WP_SUPPORT}= ${TRUE} +${DTS_SUPPORT}= ${TRUE} +${FIRMWARE_BUILDING_SUPPORT}= ${TRUE} +${UPLOAD_ON_USB_SUPPORT}= ${TRUE} +${CPU_TESTS_SUPPORT}= ${TRUE} +${RESET_TO_DEFAULTS_SUPPORT}= ${TRUE} +${L2_CACHE_SUPPORT}= ${TRUE} +${L3_CACHE_SUPPORT}= ${TRUE} +${DEFAULT_POWER_STATE_AFTER_FAIL}= Powered On +${ESP_SCANNING_SUPPORT}= ${TRUE} +${DTS_FIRMWARE_FLASHING_SUPPORT}= ${TRUE} +${MINI_PC_IE_SLOT_SUPPORT}= ${TRUE} + +# Test module: dasharo-security +${TPM_SUPPORT}= ${TRUE} +${VERIFIED_BOOT_SUPPORT}= ${TRUE} +${VERIFIED_BOOT_POPUP_SUPPORT}= ${TRUE} +${MEASURED_BOOT_SUPPORT}= ${TRUE} +${SECURE_BOOT_SUPPORT}= ${TRUE} +${SECURE_BOOT_DEFAULT_STATE}= Disabled +${UEFI_PASSWORD_SUPPORT}= ${TRUE} + +# Test module: dasharo-performance +${SERIAL_BOOT_MEASURE}= ${TRUE} +${CPU_TEMPERATURE_MEASURE}= ${TRUE} +${CPU_FREQUENCY_MEASURE}= ${TRUE} +${PLATFORM_STABILITY_CHECKING}= ${TRUE} + +# Test module: dasharo-stab +${TPM_DETECT_SUPPORT}= ${TRUE} +${USB_TYPE-A_DEVICES_DETECTION_SUPPORT}= ${TRUE} + +*** Keywords *** +Power On + [Documentation] Keyword clears telnet buffer and sets Device Under Test + ... into Power On state using RTE OC buffers. Implementation + ... must be compatible with the theory of operation of a + ... specific platform. + IF '${DUT_CONNECTION_METHOD}' == 'SSH' RETURN + Sleep 2s + RteCtrl Power Off + Sleep 10s + Telnet.Read + RteCtrl Power On diff --git a/platform-configs/pcengines-apu3.robot b/platform-configs/pcengines-apu3.robot new file mode 100644 index 0000000000..1857f77f70 --- /dev/null +++ b/platform-configs/pcengines-apu3.robot @@ -0,0 +1,6 @@ +*** Settings *** +Resource include/pcengines-legacy.robot + + +*** Variables *** +${DMIDECODE_PRODUCT_NAME}= apu3 diff --git a/platform-configs/pcengines-apu4.robot b/platform-configs/pcengines-apu4.robot new file mode 100644 index 0000000000..f0408b59e1 --- /dev/null +++ b/platform-configs/pcengines-apu4.robot @@ -0,0 +1,6 @@ +*** Settings *** +Resource include/pcengines.robot + + +*** Variables *** +${DMIDECODE_PRODUCT_NAME}= apu4 diff --git a/variables.robot b/variables.robot index 3eb5c645d9..ba9532b3ca 100644 --- a/variables.robot +++ b/variables.robot @@ -40,9 +40,9 @@ ${OS_UBUNTU}= ubuntu &{RTE10}= ip=192.168.10.173 cpuid=02c00042a3b72a65 pcb_rev=0.5.3 ... platform=apu3 board-revision=c4 env=prod ... platform_vendor=PC Engines firmware_type=BIOS -&{RTE11}= ip=192.168.10.174 cpuid=02c000426621f7ea pcb_rev=0.5.3 +&{RTE11}= ip=192.168.10.174 cpuid=02c000426621f7ea pcb_rev=1.0.0 ... platform=apu4 board-revision=4d env=prod -... platform_vendor=PC Engines firmware_type=BIOS +... platform_vendor=PC Engines firmware_type=UEFI &{RTE12}= ip=192.168.10.175 cpuid=02c000420334dd56 pcb_rev=0.5.3 ... platform=apu5 board-revision=b env=prod ... platform_vendor=PC Engines firmware_type=BIOS