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 scarthgap projects #31

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
47 changes: 35 additions & 12 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
jobs:
build:
if: github.event_name != 'pull_request' || github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci')
name: Build ${{ matrix.project }} ${{ matrix.machine }}
name: Build ${{ matrix.project }} ${{ matrix.release }} ${{ matrix.machine }}
runs-on:
- self-hosted
- Linux
Expand All @@ -26,25 +26,48 @@ jobs:
strategy:
fail-fast: false
matrix:
project:
- tedge-rauc
- tedge-mender
machine:
- raspberrypi3-64
- raspberrypi4-64
release: [kirkstone, scarthgap]
project: [tedge-rauc, tedge-bin-rauc, tedge-mender, tedge-bin-mender]
machine: [raspberrypi3-64, raspberrypi4-64]
include:
- project: tedge-rauc
image_name: core-image-tedge-rauc
image_ext: "wic.bz2"
update_ext: "raucb"
manifest_ext: "manifest"

- project: tedge-bin-rauc
image_name: core-image-tedge-rauc
image_ext: "wic.bz2"
update_ext: "raucb"
manifest_ext: "manifest"

- project: tedge-mender
image_name: core-image-tedge-mender
image_ext: "sdimg.bz2"
update_ext: "mender"
manifest_ext: "manifest"

- project: tedge-bin-mender
image_name: core-image-tedge-mender
image_ext: "sdimg.bz2"
update_ext: "mender"
manifest_ext: "manifest"
exclude:
# For kirkstone build tedge from source
- release: kirkstone
project: tedge-bin-rauc

- release: kirkstone
project: tedge-bin-mender

# For scarthgap use pre-built binaries (due to issue with Rust MSRV)
- release: scarthgap
project: tedge-rauc

- release: scarthgap
project: tedge-mender

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -62,14 +85,14 @@ jobs:
if: ${{ !startsWith(runner.name, 'tedge') }}

- name: Build
run: just build-project projects/${{ matrix.project }}.yaml
run: just build-project projects/${{ matrix.release }}/${{ matrix.project }}.yaml
env:
KAS_MACHINE: ${{ matrix.machine }}
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.image_name }}_${{ matrix.machine }}
name: ${{ matrix.image_name }}_${{ matrix.release }}_${{ matrix.machine }}
path: |
build/tmp/deploy/images/${{ matrix.machine }}/${{ matrix.image_name }}*${{ matrix.machine }}_*.${{ matrix.image_ext }}
build/tmp/deploy/images/${{ matrix.machine }}/${{ matrix.image_name }}*${{ matrix.machine }}_*.${{ matrix.update_ext }}
build/tmp/deploy/images/${{ matrix.machine }}/${{ matrix.image_name }}*${{ matrix.machine }}_*.${{ matrix.manifest_ext }}
build/tmp/deploy/images/${{ matrix.machine }}/${{ matrix.image_name }}*${{ matrix.machine }}*${{ matrix.release }}_*.${{ matrix.image_ext }}
build/tmp/deploy/images/${{ matrix.machine }}/${{ matrix.image_name }}*${{ matrix.machine }}*${{ matrix.release }}_*.${{ matrix.update_ext }}
build/tmp/deploy/images/${{ matrix.machine }}/${{ matrix.image_name }}*${{ matrix.machine }}*${{ matrix.release }}_*.${{ matrix.manifest_ext }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ Build an image which includes thin-edge.io and [RAUC](https://rauc.readthedocs.i
**Raspberry Pi**

```sh
KAS_MACHINE=raspberrypi3-64 just build-project ./projects/tedge-rauc.yaml
KAS_MACHINE=raspberrypi4-64 just build-project ./projects/tedge-rauc.yaml
KAS_MACHINE=raspberrypi3-64 just build-project ./projects/kirkstone/tedge-rauc.yaml
KAS_MACHINE=raspberrypi4-64 just build-project ./projects/scarthgap/tedge-rauc.yaml
```

Or you can save the KAS_MACHINE value in your .env file
Expand Down Expand Up @@ -134,7 +134,7 @@ just update-all-locks
Or you can specify which project file should be updated instead (if you want more control over it).

```sh
just update-lock ./projects/tedge-rauc.yaml
just update-lock ./projects/kirkstone/tedge-rauc.yaml
```

## Tips
Expand Down
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ bitbake file *args="": init
publish *args="":
{{justfile_directory()}}/scripts/publish-c8y.sh {{args}}

runqemu config="./projects/tedge-rauc.yaml":
runqemu config="./projects/kirkstone/tedge-rauc.yaml":
kas shell {{config}} -c 'runqemu'

# Update the lock files of all projects
update-all-locks:
find ./projects -maxdepth 1 \( -name "*.yaml" -a ! -name "*.lock.*" \) -exec just update-lock {} \;
find ./projects/kirkstone ./projects/scarthgap -maxdepth 1 \( -name "*.yaml" -a ! -name "*.lock.*" \) -exec just update-lock {} \;
1 change: 1 addition & 0 deletions projects/config/raspberrypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ local_conf_header:
DISTRO_FEATURES:append = " bluez5 bluetooth wifi "
IMAGE_INSTALL:append = " linux-firmware-rpidistro-bcm43430 bluez5 i2c-tools"
ENABLE_UART = "1"
LICENSE_FLAGS_ACCEPTED = "synaptics-killswitch"
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
header:
version: 14
includes:
- config/common.yaml
- config/raspberrypi.yaml
- config/rauc-raspberrypi.yaml
- config/package-management.yaml
- projects/config/common.yaml
- projects/config/raspberrypi.yaml
- projects/config/rauc-raspberrypi.yaml
- projects/config/package-management.yaml

machine: raspberrypi4-64
distro: poky
Expand All @@ -14,7 +14,8 @@ target: rauc-update-bundle
env:
IMAGE_VERSION: ""
IMAGE_VERSION_SUFFIX: "_123123"
BUNDLE_NAME: "core-image-tedge-rauc-${MACHINE}${IMAGE_VERSION_SUFFIX}"
IMAGE_RELEASE_SUFFIX: "kirkstone"
BUNDLE_NAME: "core-image-tedge-rauc-${MACHINE}-${IMAGE_RELEASE_SUFFIX}${IMAGE_VERSION_SUFFIX}"
RAUC_BUNDLE_VERSION: "${IMAGE_VERSION}"

defaults:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
header:
version: 14
includes:
- config/common.yaml
- config/mender-qemu.yaml
- config/package-management.yaml
- projects/config/common.yaml
- projects/config/mender-qemu.yaml
- projects/config/package-management.yaml

machine: qemux86-64
distro: poky
target: core-image-tedge-mender

env:
IMAGE_VERSION_SUFFIX: "_123123"
MENDER_ARTIFACT_NAME: "core-image-tedge-mender-${MACHINE}${IMAGE_VERSION_SUFFIX}"
IMAGE_RELEASE_SUFFIX: "kirkstone"
MENDER_ARTIFACT_NAME: "core-image-tedge-mender-${MACHINE}-${IMAGE_RELEASE_SUFFIX}${IMAGE_VERSION_SUFFIX}"

defaults:
repos:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
header:
version: 14
includes:
- config/common.yaml
- config/raspberrypi.yaml
- config/mender-raspberrypi.yaml
- config/package-management.yaml
- projects/config/common.yaml
- projects/config/raspberrypi.yaml
- projects/config/mender-raspberrypi.yaml
- projects/config/package-management.yaml

machine: raspberrypi4-64
distro: poky
target: core-image-tedge-mender

env:
IMAGE_VERSION_SUFFIX: "_123123"
MENDER_ARTIFACT_NAME: "core-image-tedge-mender-${MACHINE}${IMAGE_VERSION_SUFFIX}"
IMAGE_RELEASE_SUFFIX: "kirkstone"
MENDER_ARTIFACT_NAME: "core-image-tedge-mender-${MACHINE}-${IMAGE_RELEASE_SUFFIX}${IMAGE_VERSION_SUFFIX}"

defaults:
repos:
Expand Down
File renamed without changes.
11 changes: 6 additions & 5 deletions projects/tedge-rauc.yaml → projects/kirkstone/tedge-rauc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
header:
version: 14
includes:
- config/common.yaml
- config/raspberrypi.yaml
- config/rauc-raspberrypi.yaml
- config/package-management.yaml
- projects/config/common.yaml
- projects/config/raspberrypi.yaml
- projects/config/rauc-raspberrypi.yaml
- projects/config/package-management.yaml

machine: raspberrypi4-64
distro: poky
Expand All @@ -14,7 +14,8 @@ target: rauc-update-bundle
env:
IMAGE_VERSION: ""
IMAGE_VERSION_SUFFIX: "_123123"
BUNDLE_NAME: "core-image-tedge-rauc-${MACHINE}${IMAGE_VERSION_SUFFIX}"
IMAGE_RELEASE_SUFFIX: "kirkstone"
BUNDLE_NAME: "core-image-tedge-rauc-${MACHINE}-${IMAGE_RELEASE_SUFFIX}${IMAGE_VERSION_SUFFIX}"
RAUC_BUNDLE_VERSION: "${IMAGE_VERSION}"

defaults:
Expand Down
61 changes: 61 additions & 0 deletions projects/scarthgap/tedge-bin-mender.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siemens/kas/66261547b75885786777a0b9c8a4400ab81d432e/kas/schema-kas.json
header:
version: 14
includes:
- projects/config/common.yaml
- projects/config/raspberrypi.yaml
- projects/config/mender-raspberrypi.yaml
- projects/config/package-management.yaml

machine: raspberrypi4-64
distro: poky
target: core-image-tedge-mender

env:
IMAGE_VERSION_SUFFIX: "_123123"
IMAGE_RELEASE_SUFFIX: "scarthgap"
MENDER_ARTIFACT_NAME: "core-image-tedge-mender-${MACHINE}-${IMAGE_RELEASE_SUFFIX}${IMAGE_VERSION_SUFFIX}"

defaults:
repos:
branch: scarthgap

repos:
poky:
url: "https://git.yoctoproject.org/git/poky"
layers:
meta:
meta-poky:
meta-yocto-bsp:

meta-raspberrypi:
url: "https://github.com/agherzan/meta-raspberrypi.git"

meta-openembedded:
url: "https://git.openembedded.org/meta-openembedded"
layers:
meta-oe:
meta-python:
meta-networking:
meta-multimedia:

meta-mender:
url: "https://github.com/mendersoftware/meta-mender"
layers:
meta-mender-core:

meta-mender-community:
url: "https://github.com/mendersoftware/meta-mender-community"
layers:
meta-mender-raspberrypi:

meta-tedge:
url: "https://github.com/thin-edge/meta-tedge.git"
layers:
meta-tedge-bin:
meta-tedge-common:
meta-tedge-mender:

meta-lts-mixins:
url: "git://git.yoctoproject.org/meta-lts-mixins"
branch: scarthgap/u-boot
57 changes: 57 additions & 0 deletions projects/scarthgap/tedge-bin-rauc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siemens/kas/66261547b75885786777a0b9c8a4400ab81d432e/kas/schema-kas.json
header:
version: 14
includes:
- projects/config/common.yaml
- projects/config/raspberrypi.yaml
- projects/config/rauc-raspberrypi.yaml
- projects/config/package-management.yaml

machine: raspberrypi4-64
distro: poky
target: rauc-update-bundle

env:
IMAGE_VERSION: ""
IMAGE_VERSION_SUFFIX: "_123123"
IMAGE_RELEASE_SUFFIX: "scarthgap"
BUNDLE_NAME: "core-image-tedge-rauc-${MACHINE}-${IMAGE_RELEASE_SUFFIX}${IMAGE_VERSION_SUFFIX}"
RAUC_BUNDLE_VERSION: "${IMAGE_VERSION}"

defaults:
repos:
branch: scarthgap

repos:
poky:
url: "https://git.yoctoproject.org/git/poky"
layers:
meta:
meta-poky:
meta-yocto-bsp:

meta-raspberrypi:
url: "https://github.com/agherzan/meta-raspberrypi.git"

meta-openembedded:
url: "https://git.openembedded.org/meta-openembedded"
layers:
meta-oe:
meta-python:
meta-networking:
meta-multimedia:

meta-rauc:
url: "https://github.com/rauc/meta-rauc.git"

meta-rauc-community:
url: "https://github.com/rauc/meta-rauc-community"
layers:
meta-rauc-raspberrypi:

meta-tedge:
url: "https://github.com/thin-edge/meta-tedge.git"
layers:
meta-tedge-bin:
meta-tedge-common:
meta-tedge-rauc:
Loading