Newcomers
If you are new to Dasharo, this section is to help you get started using Dasharo firmware and possibly contributing to making it better.
coreboot
If you have no prior experience with coreboot, it's highly recommended to visit OpenSecurityTraining2 and finish these courses:
OpenSecurityTraining2 provides other great courses related to firmware, which are all freely available here.
Docker
coreboot needs a specific toolchain to be built, hence why it is usually built inside of a Docker. In case of Dasharo, all images are built using Docker, so you will make sure it works properly on your system.
Follow these two links:
Once you have Docker set up on your machine, you can pull docker images from coreboot/coreboot-sdk (keep in mind that some platforms require older docker images).
To pull a Docker image, use:
docker pull coreboot/coreboot-sdk:<tag>
The typical procedure to build a coreboot image is as follows:
git clone https://github.com/Dasharo/coreboot.git
cd coreboot
git checkout <platform>/release
docker run -u $UID --rm -it \
-v $PWD:/home/coreboot/coreboot
-w /home/coreboot/coreboot coreboot/coreboot-sdk:<tag>\
bash
cp configs/config.<platform> .config
make olddefconfig
make
Dasharo Contribution
All code review and all issues related to Dasharo are resolved on GitHub. An account there is necessary to contribute and report issues. All Dasharo repositories can be found here.
When you have an account on GitHub go ahead and configure an SSH key. It's also highly recommended to configure a GPG key before contributing anything. Instructions to do that can be found here. With that your account should be ready to contribute to Dasharo.
Since Dasharo is based on coreboot and edk2, it's best to contribute directly in the upstream if possible. Refer to these documents:
If for some reason you can't contribute your change in upstream repositories, then consider contributing directly to Dasharo. Before doing anything it's best to get familiar with source code structure. To create a patch:
- fork the repository which you want to edit,
- in the forked repository:
git checkout <platform>/develop
(make sure to start from the correct branch), - create a new branch:
git checkout -b <platform>/<feature>
, - commit your changes:
- make sure to sign your commits by using
git commit -sm "<commit_message>"
, <commit_message>
should be:path/to/file: Change description
,- one commit should be one logical change,
- make sure to sign your commits by using
- create a pull request from a fork.
Do not forget to check whether patch has been reviewed and changes to your contribution (PR) are needed. If so, remember about answering to each addressed thread with information about change in the commit
- template:
Fixed: <link to commit>
- example: Fixed 0a2a4ee
Dasharo Matrix Space
Matrix is a communicator used at Dasharo. If you want quick answers it's best to join our matrix space and talk to us there.
If you've never used Matrix before, you will first need to get a client. Available clients are listed here.
Dasharo lab user guide
To get information about available platforms it's or it's RTE's IP address, use the platform reservation tool: SnipeIT
OSFV_CLI is a script, which allows to interact with devices setup in Dasharo OSFV lab.
If the DUT has connected RTE you can refer to: RTE
commands,
also you may connect to the RTE by using web browser by typing:
http://<rte_ip_address>:8000
. For more please refer to: RTE Quick Start
Guide.
Default RTE login: root
, password: meta-rte
If the DUT uses PiKVM you may use: https://<PiKVM_ip_address>
, for more info
refer to:
PiKVM.
Default PiKVM login: admin
, password: admin
Firmware source: Dasharo Universe or Cloud (only for logged in users), alternatively newest builds can be found at Github.
Running tests: Open Source Firmware Remote Test Environment
It is strongly suggested to run your first test on QEMU.
To prepare Ubuntu OS image for QEMU refer to: Ubuntu OS,
after downloading and creating image copy ubuntu.iso
to .../open-source-firmware-validation/qemu-data/
also create a drive onto which the os is going to be installed by running
qemu-img create -f qcow2 qemu-data/hdd.qcow2 20G
run QEMU with:
./scripts/ci/qemu-run.sh graphic os_install
To start QEMU so that it boots to os run:
./scripts/ci/qemu-run.sh graphic os
Troubleshooting
Connecting to RTE serial output: Connection refused
Most probably a telnet connection hasn't been closed correctly. To terminate this connection restart RTE by logging to it by ssh and reboot it:
ssh root@rte_ip_address
password: meta-rte
systemctl restart ser2net
and then logout
DUT won't power on
-
Use the OSFV CLI. Check if Sonoff state is set to ON
osfv_cli sonoff --sonoff_ip <sonoff_ip_address> on
and power on the DUTosfv_cli rte --rte_ip <rte_ip_address> pwr on
-
Check if a proper BIOS/firmware is flashed. If not a proper firmware can be flashed with use of OSFV CLI by running
osfv_cli rte --rte_ip <rte_ip_address> flash write --rom <path_to_fw_file>
command.
Ubuntu won't download and create image
- Download image from: Ubuntu, and use the script:
./ubuntu/create_image.sh -i ~/Downloads/ubuntu-22.04.4-desktop-amd64.iso