-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add hardkernel-odroid-h4-plus placeholder docs #903
base: master
Are you sure you want to change the base?
Changes from 9 commits
f4aa311
483e421
36190a4
6603f8e
4697210
3b627e4
40e79d7
1d34c93
e162fab
befecc5
48b99dd
ba5ee6c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Dasharo firmware building guide | ||
|
||
## Intro | ||
|
||
This guide shows how to build Dasharo firmware for Hardkernel devices. | ||
|
||
## Requirements | ||
|
||
- Docker | ||
+ follow [Install Docker Engine on Ubuntu](https://docs.docker.com/engine/install/ubuntu/) | ||
+ follow [Post-installation steps for Linux](https://docs.docker.com/engine/install/linux-postinstall/) | ||
- Git | ||
+ `sudo apt-get install git` | ||
|
||
## Building | ||
|
||
To build Dasharo firmware image, first clone the coreboot repository: | ||
```bash | ||
git clone https://github.com/Dasharo/coreboot.git | ||
``` | ||
then follow the steps below: | ||
|
||
=== "Odroid H4+" | ||
|
||
1. Checkout to the device's branch: | ||
```bash | ||
cd coreboot | ||
git checkout hardkernel_odroid_h4/release | ||
``` | ||
|
||
To build a specific version replace `hardkernel_odroid_h4/release` with | ||
`hardkernel_odroid_h4_v0.9.x` where `x` is the version number. | ||
|
||
2. Checkout submodules: | ||
|
||
```bash | ||
git submodule update --init --checkout | ||
``` | ||
3. Build the firmware: | ||
|
||
```bash | ||
./build.sh odroid_h4 | ||
``` | ||
|
||
The resulting coreboot image will be placed in the coreboot directory as | ||
`hardkernel_odroid_h4.rom`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Firmware update | ||
|
||
The following documentation describes the process of Dasharo open-source | ||
firmware update. If your device is currently flashed with the proprietary | ||
firmware please refer to the [Initial deployment](initial-deployment.md) | ||
documentation. | ||
|
||
The update process may be different, depending on the currently installed | ||
Dasharo firmware version. | ||
|
||
For simplicity of the process we recommend using | ||
[Dasharo Tools Suite](../../dasharo-tools-suite/overview.md). | ||
|
||
Before starting the update procedure be sure to disable Dasharo BIOS Boot | ||
medium lock and Secure Boot: | ||
|
||
1. Power on the device. | ||
2. While the device is booting, hold the `DELETE` key to enter the UEFI Setup | ||
Menu. | ||
3. Enter the `Dasharo System Features` menu using the arrow keys and Enter. | ||
4. Enter the [Dasharo Security Options](https://docs.dasharo.com/dasharo-menu-docs/dasharo-system-features/#dasharo-security-options) | ||
submenu. | ||
5. Verify the state of the `Lock the BIOS boot medium` option - if the option | ||
is chosen, press `Space` and then `F10` to save the changes. | ||
6. Go back to the main menu using the `ESC` key. | ||
7. Enter the `Device Manager` menu. | ||
8. Enter the [Secure Boot Configuration](https://docs.dasharo.com/dasharo-menu-docs/device-manager/#secure-boot-configuration) | ||
submenu. | ||
9. Verify that the `Current Secure Boot State` field says Disabled - if not, | ||
unselect the `Attempt Secure Boot` option below then press `F10` to save | ||
the changes. | ||
10. Reboot the device to properly apply the changes. | ||
|
||
The settings of all the above options can be restored after a firmware | ||
update. | ||
|
||
=== "ODROID H4+" | ||
|
||
## Updating Dasharo | ||
|
||
```bash | ||
flashrom -p internal -w hardkernel_odroid_h4_v<version>.rom --fmap -i bios | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Initial deployment | ||
|
||
Initial flashing of Dasharo firmware can be done from Linux using flashrom with | ||
the internal programmer. This document describes the process of building, | ||
installing and running flashrom on Ubuntu 24.04. | ||
|
||
## Build flashrom | ||
|
||
Please follow generic guide for [Dasharo flashrom fork](../../osf-trivia-list/deployment.md#how-to-install-dasharo-flashrom-fork). | ||
|
||
## Reading flash contents | ||
|
||
Always prepare a backup of the current firmware image. To read from the flash | ||
and save it to a file (`dump.rom`), execute the following command: | ||
|
||
```bash | ||
flashrom -p internal -r dump.rom | ||
``` | ||
|
||
If you forgot to do this, you can get the original, proprietary | ||
firmware from the [ODROID wiki website](https://wiki.odroid.com/odroid-h4/hardware/h4_bios_update#bios_release) | ||
to restore it in case it is bricked. Using the firmware other than | ||
your own backup should be the last resort. | ||
|
||
## Flashing Dasharo | ||
|
||
=== "ODROID H4+" | ||
|
||
To flash Dasharo on the platform, execute the following command - replace `[path]` | ||
with the path to the Dasharo image you want to flash, e.g. `hardkernel_odroid_h4_v0.9.0.rom`. | ||
|
||
```bash | ||
sudo flashrom -p internal -w [path] --ifd -i bios | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only flashing bios works for now, when our fimware image does not include Intel blobs. This might change. |
||
``` | ||
|
||
After successful operation reboot the platform. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Overview | ||
|
||
=== "Hardkernel ODROID H4+" | ||
- [Releases](../../variants/hardkernel_odroid_h4_plus/releases.md) | ||
- [Hardware Configuration Matrix](../../variants/hardkernel_odroid_h4_plus/hardware-matrix.md) | ||
- [Test Matrix](./test-matrix.md#hardkernel-odroid-h4-plus) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Recovery | ||
|
||
## Intro | ||
|
||
The following documentation describes the process of recovering hardware from | ||
the brick state using an [RTE](../../transparent-validation/rte/introduction.md) | ||
and Dasharo open-source firmware. | ||
|
||
=== "V1000-series" | ||
|
||
## Prerequisites | ||
|
||
* [Prepared RTE](../../transparent-validation/rte/v1.1.0/quick-start-guide.md) | ||
* 6x female-female wire cables | ||
|
||
## Connections | ||
|
||
To prepare the stand for flashing follow the steps described in | ||
the [Generic test stand setup](../../unified-test-documentation/generic-testing-stand-setup.md#detailed-description-of-the-process) | ||
|
||
## Firmware flashing | ||
|
||
To flash firmware follow the steps described below: | ||
|
||
1. Login to RTE via `ssh` or `minicom`. | ||
2. Turn on the platform by connecting the power supply. | ||
3. Wait at least 5 seconds. | ||
4. Turn off the platform by using the power button. | ||
5. Wait at least 3 seconds. | ||
6. Set the proper state of the SPI by using the following commands on RTE: | ||
|
||
```bash | ||
# set SPI Vcc to 3.3V | ||
echo 1 > /sys/class/gpio/gpio405/value | ||
# SPI Vcc on | ||
echo 1 > /sys/class/gpio/gpio406/value | ||
# SPI lines ON | ||
echo 1 > /sys/class/gpio/gpio404/value | ||
``` | ||
|
||
7. Wait at least 2 seconds. | ||
8. Disconnect the power supply from the platform. | ||
9. Wait at least 2 seconds. | ||
10. Check if the flash chip is connected properly | ||
|
||
```bash | ||
flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=16000 | ||
``` | ||
|
||
11. Flash the platform by using the following command: | ||
|
||
```bash | ||
flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=16000 -w [path_to_binary] | ||
``` | ||
|
||
> Flashing with flashrom takes about 1 minute. | ||
|
||
12. Change back the state of the SPI by using the following commands: | ||
|
||
```bash | ||
echo 0 > /sys/class/gpio/gpio404/value | ||
echo 0 > /sys/class/gpio/gpio405/value | ||
echo 0 > /sys/class/gpio/gpio406/value | ||
``` | ||
|
||
12. Turn on the platform by connecting the power supply. | ||
|
||
The first boot of the platform after proceeding with the above procedure can | ||
take much longer than normal. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Dasharo compatible with Hardkernel ODROID H4+ | ||
|
||
Following Release Notes describe status of Open Source Firmware development for | ||
Hardkernel ODROID H4+ | ||
|
||
For details about our release process please read | ||
[Dasharo Standard Release Process](../../dev-proc/standard-release-process.md). | ||
|
||
<center> | ||
|
||
[Subscribe to Hardkernel ODROID H4+ Dasharo Release Newsletter] | ||
[newsletter]{ .md-button .md-button--primary .center } | ||
|
||
</center> | ||
|
||
<!-- TODO --> | ||
[newsletter]: ./releases.md | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. W need to create a newsletter registration link and add it here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IT DOES NOT WORK
Will we add this platform to the build script? It might as well be replaced with manual build instructions if not.