Skip to content
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

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f4aa311
docs: Add hardkernel-odroid-h4-plus placeholder files
philipandag Sep 19, 2024
483e421
mkdocs.yml: Add hardkernel odroid h4 pages
philipandag Sep 19, 2024
36190a4
hardkernel_odroid_h4_plus/releases.md: Add
philipandag Sep 19, 2024
6603f8e
unified/hardkernel/overview.md: Add
philipandag Sep 19, 2024
4697210
unified/hardkernel/building-manual.md: Add
philipandag Sep 19, 2024
3b627e4
unified/hardkernel/initial-deployment.md: Add
philipandag Sep 19, 2024
40e79d7
unified/hardkernel/firmware-update.md: Add
philipandag Sep 19, 2024
1d34c93
unified/hardkernel/recovery.md: Add
philipandag Sep 19, 2024
e162fab
docs hardkernel: pre-commit
philipandag Sep 20, 2024
befecc5
hardkernel_odroid_h4_plus/hardware-matrix.md: Add
philipandag Sep 20, 2024
48b99dd
unified/hardkernel/test-matrix.md: Add only Dasharo Compatibility
philipandag Sep 20, 2024
ba5ee6c
unified/hardkernel/test-matrix.md: Add reference from script
philipandag Sep 20, 2024
07655bc
docs: Move all odroid H4+ files from unified to variants
philipandag Sep 30, 2024
718c7e3
hardkernel_odroid_h4/firmware_update.md: update flash command
philipandag Sep 30, 2024
5c5403d
hardkernel_odroid_h4/recovery.md: Describe using flash jumper
philipandag Sep 30, 2024
aa5f0b9
hardkernel_odroid_h4/initial_deployment.md: Mention DTS
philipandag Sep 30, 2024
e15fa98
hardkernel_odroid_h4/releases.md: Add newsletter subscribe url
philipandag Sep 30, 2024
7d161f3
hardkernel_odroid_h4/recovery.md: Reword dual bios recovery
philipandag Sep 30, 2024
b0c60d7
Update docs/variants/hardkernel_odroid_h4/building-manual.md
philipandag Sep 30, 2024
9e3c3c5
hardkernel_odroid_h4/building-manual.md: Remove tab
philipandag Sep 30, 2024
b43a0ce
hardkernel_odroid_h4/firmware_update.md: Mention DTS
philipandag Sep 30, 2024
e044a73
hardkernel_odroid_h4/recovery.md: Remove tab
philipandag Sep 30, 2024
1a1ef2c
hardkernel_odroid_h4/releases.md: Add note "Coming soon."
philipandag Sep 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions docs/unified/hardkernel/building-manual.md
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
miczyg1 marked this conversation as resolved.
Show resolved Hide resolved
```

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
Copy link
Contributor Author

@philipandag philipandag Sep 20, 2024

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may add the platform to the build script.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working on it here: Dasharo/coreboot#564

```

The resulting coreboot image will be placed in the coreboot directory as
`hardkernel_odroid_h4.rom`.
miczyg1 marked this conversation as resolved.
Show resolved Hide resolved
43 changes: 43 additions & 0 deletions docs/unified/hardkernel/firmware-update.md
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+"
miczyg1 marked this conversation as resolved.
Show resolved Hide resolved

## Updating Dasharo

```bash
flashrom -p internal -w hardkernel_odroid_h4_v<version>.rom --fmap -i bios
miczyg1 marked this conversation as resolved.
Show resolved Hide resolved
```
36 changes: 36 additions & 0 deletions docs/unified/hardkernel/initial-deployment.md
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.
miczyg1 marked this conversation as resolved.
Show resolved Hide resolved

## 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
philipandag marked this conversation as resolved.
Show resolved Hide resolved
```

After successful operation reboot the platform.
6 changes: 6 additions & 0 deletions docs/unified/hardkernel/overview.md
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)
69 changes: 69 additions & 0 deletions docs/unified/hardkernel/recovery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Recovery
miczyg1 marked this conversation as resolved.
Show resolved Hide resolved

## 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"
miczyg1 marked this conversation as resolved.
Show resolved Hide resolved

## 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.
17 changes: 17 additions & 0 deletions docs/variants/hardkernel_odroid_h4_plus/releases.md
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
philipandag marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 8 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,14 @@ nav:
- 'FAQ': variants/pc_engines/faq.md
- 'Announcement': variants/pc_engines/post-eol-fw-announcement.md
- 'Firmware write protection': variants/pc_engines/bios-lock.md
- 'Hardkernel':
- 'Overview': unified/hardkernel/overview.md
- 'Building manual': unified/hardkernel/building-manual.md
- 'Initial deployment': unified/hardkernel/initial-deployment.md
- 'Firmware update': unified/hardkernel/firmware-update.md
- 'Recovery': unified/hardkernel/recovery.md
- 'Hardkernel ODROID H4+':
- 'Releases': variants/hardkernel_odroid_h4_plus/releases.md
# - 'Development Environment':
# - 'Nix': dev-env/nix-dev-env.md
- 'Guides':
Expand Down
Loading