Skip to content

Commit

Permalink
*: Fix files so that pre-commit passes
Browse files Browse the repository at this point in the history
Signed-off-by: Tymoteusz Burak <[email protected]>
  • Loading branch information
tym2k1 committed Aug 22, 2024
1 parent be3911f commit 0363001
Show file tree
Hide file tree
Showing 32 changed files with 163 additions and 150 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ assignees: ''
**How to reproduce**

Steps to reproduce the behavior:
1.
2.
3.
1.
2.
3.

**Expected behavior**
<!--(A clear and concise description of what you expected to happen.)-->
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
---
blank_issues_enabled: false
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/question-or-support-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ assignees: ''

**Question text**
<!--(Question text)-->

1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ assignees: ''

**Additional context**
<!--(Add any other context about the problem here.)-->

59 changes: 32 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
meta-rte
========
# meta-rte

# Meta-RTE Yocto BSP documentation

Expand Down Expand Up @@ -28,14 +27,14 @@ inside container, via the [kas-container] script.

* [kas-container] installation:

```
```sh
wget -O ~/bin/kas-container https://raw.githubusercontent.com/siemens/kas/master/kas-container
chmod +x ~/bin/kas-container
```

## Build

```
```sh
mkdir rte-sdk
cd rte-sdk
git clone https://github.com/3mdeb/meta-rte.git
Expand All @@ -51,19 +50,19 @@ There are two main ways to flash an image, etcher and bmaptool.
The easiest way to flash image on all system platforms is to use `etcher`. It
is multi-platform application that is available for Linux, Windows or macOS.

- Download and install [etcher](https://etcher.io/).
* Download and install [etcher](https://etcher.io/).

- Insert the SD card to the SD card reader of your host PC.
* Insert the SD card to the SD card reader of your host PC.

- Run etcher.
* Run etcher.

- Click on `Select Image` and select built image. There is no need to unpack
* Click on `Select Image` and select built image. There is no need to unpack
the image first.

The SD card reader should be picked automatically. If more than one readers
are present, click on `Change` and select the one you want to use.

- When confirmed, click on the `Flash` button to start flashing procedure.
* When confirmed, click on the `Flash` button to start flashing procedure.

### bmaptool

Expand All @@ -72,23 +71,25 @@ depending on the package manager your system uses, use one of the following
commands:

**for Ubuntu:**
```

```sh
sudo apt install bmap-tools
```

**for Fedora:**
```

```sh
sudo dnf install bmap-tools
```

you can then download the latest image from the
[releases](https://github.com/3mdeb/meta-rte/releases) page. You should
download both the `.wic.bmap` and `.wic.gz` files.

Once you have chosen the version you want and downloaded it (both files), you can then
flash it using bmaptool, like this:
Once you have chosen the version you want and downloaded it (both files), you
can then flash it using bmaptool, like this:

```
```sh
bmaptool copy --bmap /path/to/example.wic.bmap /path/to/example.wic.gz /dev/sdX
```

Expand All @@ -99,7 +100,7 @@ what your SD card is called.

## Login to the system

```
```sh
Login: root
Password: meta-rte
```
Expand All @@ -110,28 +111,31 @@ To perform update on platform we will use
[SWUpdate](https://sbabic.github.io/swupdate/index.html) software already
installed on OS.

- Download latest available .swu update image from [releases
* Download latest available .swu update image from [releases
page](https://github.com/3mdeb/meta-rte/releases).

- Provide anyhow downloaded .swu update image to device, for example using scp
* Provide anyhow downloaded .swu update image to device, for example using scp

```shell
$ scp path/to/swu/file.swu root@RTE_IP:/path/to/deploy/file/
```

>Note: you can check RTE_IP by running `ip a` command on RTE.
- Check active partition, run `findmnt /` command on RTE
* Check active partition, run `findmnt /` command on RTE

```shell
# findmnt /
TARGET SOURCE FSTYPE OPTIONS
/ /dev/mmcblk0p2 ext4 rw,relatime
```

- Now run `swupdate` command, for flag `-e` we need to provide an inactive
* Now run `swupdate` command, for flag `-e` we need to provide an inactive
partition which in this case is `mmcblk0p3`. If `findmnt /` command would
return `mmcblk0p3` then `mmcblk0p2` should be provided for `-e`. Flag `-i` is
used to provide update image stored locally and `-v` will cause to print debug
logs.

```shell
# swupdate -e "rte,mmcblk0p3" -i /path/to/file.swu -v
Swupdate v2020.04.0
Expand All @@ -144,8 +148,9 @@ installed on OS.
[DEBUG] : SWUPDATE running : [postupdate] : Running Post-update command
```

- After success reboot the board. Platform should start from diferrent partition
* After success reboot the board. Platform should start from different partition
and updated system. This can be verified by running `cat /etc/os-release`.

```shell
# cat /etc/os-release
ID=rte
Expand All @@ -155,7 +160,7 @@ installed on OS.
PRETTY_NAME="RTE (Remote Test Environment Distro) 0.7.4-rc1 (rocko)"
```

- From now, updated partition will be set as active, so every next reboot will
* From now, updated partition will be set as active, so every next reboot will
cause to boot updated OS.

## OpenVPN
Expand All @@ -169,13 +174,13 @@ SD card with the name `rte.conf`.
You can access the DUT's serial connection from the RS232/UART port at
`/dev/ttyS1`, for example, through Minicom:

```
```sh
# minicom -D /dev/ttyS1
```

All possible devices can be listed using following command:

```
```sh
# ls /dev/tty*
```

Expand All @@ -185,14 +190,14 @@ It is also possible to use telnet communication via RTE. On RTE there is serial
to network proxy service called `ser2net`. Its status can be seen by running a
command:

```
```sh
# systemctl -all | grep ser2net
ser2net.service loaded active running
```

Service configuration is placed here:

```
```sh
# cat /etc/ser2net.conf
13542:telnet:16000:/dev/ttyS1:115200 8DATABITS NONE 1STOPBIT
13541:telnet:16000:/dev/ttyUSB0:115200 8DATABITS NONE 1STOPBIT
Expand All @@ -203,13 +208,13 @@ indicates the path to the device with which the connection is made.

Serial connection with the device can be established by command:

```
```sh
$ telnet <RTE_IP> <PORT>
```

for example:

```
```sh
$ telnet 192.168.4.170 13541
```

Expand Down
4 changes: 2 additions & 2 deletions conf/distro/rte.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules kernel-devicetree"

DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${RTE_DEFAULT_DISTRO_FEATURES}"

# explicitely use systemd and disable sysvinit completely
# explicitly use systemd and disable sysvinit completely
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = ""
VIRTUAL-RUNTIME_syslog = ""
Expand Down Expand Up @@ -73,7 +73,7 @@ ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
http://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n"

# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully
# The CONNECTIVITY_CHECK_URI's are used to test whether we can successfully
# fetch from the network (and warn you if not). To disable the test set
# the variable to be empty.
# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master
Expand Down
18 changes: 8 additions & 10 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
RTE Yocto - Development process description
------------------------
# RTE Yocto - Development process description

## Intro

Expand All @@ -15,7 +14,7 @@ repository. Tags in this repository correspond to the releases of the whole
`RTE Yocto BSP`. The content (meta layers and their revisions) of given
`RTE Yocto BSP` release is defined by the
[kas file](https://gitlab.com/3mdeb/rte/meta-rte/blob/master/kas.yml).
Desciption of kas file add project configuration can be found
Description of kas file add project configuration can be found
[here](https://kas.readthedocs.io/en/0.19.0/userguide.html#project-configuration).

## Prerequisites
Expand All @@ -31,8 +30,8 @@ Minimal recommended hardware is:

### Software requirements

* Linux distribution with [Docker](https://docs.docker.com/install/) installed
* [kas](https://github.com/siemens/kas) installed. The preferred way is to use
- Linux distribution with [Docker](https://docs.docker.com/install/) installed
- [kas](https://github.com/siemens/kas) installed. The preferred way is to use
it inside container, via the
[kas-docker script](https://github.com/siemens/kas/blob/master/kas-docker).
Check [meta-rte prerequisites](https://gitlab.com/3mdeb/rte/meta-rte#prerequisites)
Expand All @@ -45,7 +44,7 @@ in `meta-rte` repository.

### Building images

```
```sh
mkdir rte-sdk
cd rte-sdk
git clone [email protected]:3mdeb/rte/meta-rte.git
Expand All @@ -56,7 +55,7 @@ It will clone layers defined in `kas file`, set up everything and build
recipes defined in `target` section in kas file. After the `RTE Yocto BSP` has
been set up, the `rte-sdk` content can look like:

```
```sh
rte-sdk
├── build
├── meta-openembedded
Expand All @@ -77,10 +76,9 @@ built images) can be found in `build/tmp/deploy/images/orange-pi-zero`.
is a set of metadata to build given component. A recipe can build be used to
build a small package, Linux kernel, or even the whole image.


Alternatively, you can invoke usual bitbake steps manually, e.g.:

```
```sh
SHELL=bash kas-docker --ssh-dir ~/.ssh/ssh-keys shell meta-rte/kas.yml -c 'bitbake core-image-minimal-swu'
```

Expand All @@ -92,4 +90,4 @@ shown above.
Once you are familiar with the `RTE Yocto - Development process description`,
you can continue with the:

* [release process](release.md)
- [release process](release.md)
22 changes: 15 additions & 7 deletions docs/layer-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[3mdeb's RTE](https://shop.3mdeb.com/product/rte/).
The structure of the meta-rte layer looks like below:

```
```sh
meta-rte
├── CHANGELOG.md
├── conf
Expand Down Expand Up @@ -55,31 +55,36 @@ introduced there.

## conf

A [conf driectory](https://gitlab.com/3mdeb/rte/meta-rte/blob/master/conf)
A [conf directory](https://gitlab.com/3mdeb/rte/meta-rte/blob/master/conf)
contains distro configuration file `rte.conf` and layer configuration file
`layer.conf`.

## recipes-bsp

### u-boot

[U-Boot bbappend file](https://gitlab.com/3mdeb/rte/meta-rte/blob/master/recipes-bsp/u-boot/u-boot_%25.bbappend)
is used to apply custom patches and two important files:

* [fw_env.config](https://gitlab.com/3mdeb/rte/meta-rte/blob/master/recipes-bsp/u-boot/u-boot/orange-pi-zero/fw_env.config),
which contains the environment location on the `MMC` block device

<!-- markdownlint-disable-next-line line-length -->
* [boot.cmd](https://gitlab.com/3mdeb/rte/meta-rte/blob/master/recipes-bsp/u-boot/u-boot/orange-pi-zero/boot.cmd) -
U-Boot boot script to load the Linux kernel and device tree from proper
partition and pass the bootargs to the Linux kernel.

## recipes-connectivity

### ser2net

Recipe installing custom configuration file with specific uart devices and
service for ser2net deamon.
service for ser2net daemon.

## recipes-core

### base-files

System hostname and [/etc/fstab](https://gitlab.com/3mdeb/rte/meta-rte/blob/master/recipes-core/base-files/base-files/fstab)
file are configured there - partition for `/boot/bootpart` and `/storage` are
mounted here.
Expand All @@ -105,9 +110,10 @@ Place for definition of udev rules. For now `debug_uart_converter`,
`rs_485_converter`, `can_converter` are defined.

## recipes-coreboot

### coreboot-utils

Coreboot utils installation: `cbfstool`, `ifdtool`
coreboot utils installation: `cbfstool`, `ifdtool`

## recipes-devtools

Expand All @@ -116,6 +122,7 @@ Coreboot utils installation: `cbfstool`, `ifdtool`
* stlink

## recipes-extended

### images

Recipes for the `SWU` images, which allow to upgrade the system using the
Expand Down Expand Up @@ -153,21 +160,22 @@ Recipes for `RTE REST API` server

### gorilla-mux

Recipes for `gorilla-mux ` - powerful URL router and dispatcher for golang.

Recipes for `gorilla-mux` - powerful URL router and dispatcher for golang.

## recipes-kernel

### linux

Provides the recipe for the linux-yocto-mainline, patches and custom defconfig.

## recipes-support

### swupdate

We use SWUpdate as the utility to upgrade our system. The directory contains
build configuration and some patches:

```
```sh
swupdate
├── files
│   ├── defconfig
Expand Down
Loading

0 comments on commit 0363001

Please sign in to comment.