Skip to content

Commit

Permalink
Merge pull request #100 from balena-os/add_test_workflows
Browse files Browse the repository at this point in the history
workflows: Run OS and cloud suites for the JP5 Jetson devices
  • Loading branch information
acostach authored Dec 12, 2024
2 parents 341baf0 + 02da95d commit f360069
Show file tree
Hide file tree
Showing 25 changed files with 117 additions and 816 deletions.
41 changes: 37 additions & 4 deletions .github/workflows/jetson-xavier-nx-devkit-emmc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
name: "Nvidia Jetson Xavier NX Devkit eMMC"

on:
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
pull_request:
branches:
- main
- master
# ESR branches glob pattern
#- 20[0-9][0-9].[0-1]?[1470].x
pull_request_target:
branches:
- main
- master
push:
tags:
# Semver tags glob pattern (includes ESR in format v20YY.MM.PATCH)
- v[0-9]+.[0-9]+.[0-9]+\+?r?e?v?*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
Expand All @@ -9,6 +25,11 @@ on:
required: false
type: boolean
default: false
deploy-environment:
description: Environment to use for build and deploy
required: false
type: string
default: balena-staging.com

permissions:
id-token: write # This is required for requesting the JWT #https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services#requesting-the-access-token
Expand All @@ -21,12 +42,24 @@ jobs:
yocto:
name: Yocto
uses: balena-os/balena-yocto-scripts/.github/workflows/yocto-build-deploy.yml@master
# Prevent duplicate workflow executions for pull_request (PR) and pull_request_target (PRT) events.
# Both PR and PRT will be triggered for the same pull request, whether it is internal or from a fork.
# This condition will prevent the workflow from running twice for the same pull request while
# still allowing it to run for all other event types.
if: (github.event.pull_request.head.repo.full_name == github.repository) == (github.event_name == 'pull_request')
secrets: inherit
with:
machine: jetson-xavier-nx-devkit-emmc
# worker_type defaults to testbot
# worker_fleets defaults to balena/testbot-rig,balena/testbot-rig-partners,balena/testbot-rig-x86,balena/testbot-rig-partners-x86
test_matrix: >
{
"test_suite": ["os","cloud"],
"environment": ["balena-cloud.com"],
"worker_type": ["testbot"],
"runs_on": [["ubuntu-latest"]]
}
# Allow manual workflow runs to force finalize without checking previous test runs
force-finalize: ${{ inputs.force-finalize || false }}
# This workflow is just for building and then deploying to staging, nothing else
# This workflow is just for building and then deploying to staging, nothing else
deploy-environment: balena-staging.com

# Default to balena-staging.com for workflow dispatch, but balena-cloud.com for other events
deploy-environment: ${{ inputs.deploy-environment || 'balena-cloud.com' }}
41 changes: 37 additions & 4 deletions .github/workflows/jetson-xavier-nx-devkit.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
name: "Nvidia Jetson Xavier NX Devkit SD-CARD"

on:
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
pull_request:
branches:
- main
- master
# ESR branches glob pattern
#- 20[0-9][0-9].[0-1]?[1470].x
pull_request_target:
branches:
- main
- master
push:
tags:
# Semver tags glob pattern (includes ESR in format v20YY.MM.PATCH)
- v[0-9]+.[0-9]+.[0-9]+\+?r?e?v?*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
Expand All @@ -9,6 +25,11 @@ on:
required: false
type: boolean
default: false
deploy-environment:
description: Environment to use for build and deploy
required: false
type: string
default: balena-staging.com

permissions:
id-token: write # This is required for requesting the JWT #https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services#requesting-the-access-token
Expand All @@ -21,12 +42,24 @@ jobs:
yocto:
name: Yocto
uses: balena-os/balena-yocto-scripts/.github/workflows/yocto-build-deploy.yml@master
# Prevent duplicate workflow executions for pull_request (PR) and pull_request_target (PRT) events.
# Both PR and PRT will be triggered for the same pull request, whether it is internal or from a fork.
# This condition will prevent the workflow from running twice for the same pull request while
# still allowing it to run for all other event types.
if: (github.event.pull_request.head.repo.full_name == github.repository) == (github.event_name == 'pull_request')
secrets: inherit
with:
machine: jetson-xavier-nx-devkit
# worker_type defaults to testbot
# worker_fleets defaults to balena/testbot-rig,balena/testbot-rig-partners,balena/testbot-rig-x86,balena/testbot-rig-partners-x86
test_matrix: >
{
"test_suite": ["os","cloud"],
"environment": ["balena-cloud.com"],
"worker_type": ["testbot"],
"runs_on": [["ubuntu-latest"]]
}
# Allow manual workflow runs to force finalize without checking previous test runs
force-finalize: ${{ inputs.force-finalize || false }}
# This workflow is just for building and then deploying to staging, nothing else
# This workflow is just for building and then deploying to staging, nothing else
deploy-environment: balena-staging.com

# Default to balena-staging.com for workflow dispatch, but balena-cloud.com for other events
deploy-environment: ${{ inputs.deploy-environment || 'balena-cloud.com' }}
40 changes: 37 additions & 3 deletions .github/workflows/jetson-xavier.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
name: "Nvidia Jetson Xavier"

on:
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
pull_request:
branches:
- main
- master
# ESR branches glob pattern
#- 20[0-9][0-9].[0-1]?[1470].x
pull_request_target:
branches:
- main
- master
push:
tags:
# Semver tags glob pattern (includes ESR in format v20YY.MM.PATCH)
- v[0-9]+.[0-9]+.[0-9]+\+?r?e?v?*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
Expand All @@ -9,6 +25,11 @@ on:
required: false
type: boolean
default: false
deploy-environment:
description: Environment to use for build and deploy
required: false
type: string
default: balena-staging.com

permissions:
id-token: write # This is required for requesting the JWT #https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services#requesting-the-access-token
Expand All @@ -21,11 +42,24 @@ jobs:
yocto:
name: Yocto
uses: balena-os/balena-yocto-scripts/.github/workflows/yocto-build-deploy.yml@master
# Prevent duplicate workflow executions for pull_request (PR) and pull_request_target (PRT) events.
# Both PR and PRT will be triggered for the same pull request, whether it is internal or from a fork.
# This condition will prevent the workflow from running twice for the same pull request while
# still allowing it to run for all other event types.
if: (github.event.pull_request.head.repo.full_name == github.repository) == (github.event_name == 'pull_request')
secrets: inherit
with:
machine: jetson-xavier
# worker_type defaults to testbot
# worker_fleets defaults to balena/testbot-rig,balena/testbot-rig-partners,balena/testbot-rig-x86,balena/testbot-rig-partners-x86
test_matrix: >
{
"test_suite": ["os","cloud"],
"environment": ["balena-cloud.com"],
"worker_type": ["testbot"],
"runs_on": [["ubuntu-latest"]]
}
# Allow manual workflow runs to force finalize without checking previous test runs
force-finalize: ${{ inputs.force-finalize || false }}
# This workflow is just for building and then deploying to staging, nothing else
# This workflow is just for building and then deploying to staging, nothing else
deploy-environment: balena-staging.com
# Default to balena-staging.com for workflow dispatch, but balena-cloud.com for other events
deploy-environment: ${{ inputs.deploy-environment || 'balena-cloud.com' }}
7 changes: 3 additions & 4 deletions layers/meta-balena-jetson/conf/samples/conf-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
Resin specific images available:
balena-image

Forecr DSBOARD NX2 Xavier NX eMMC : $ MACHINE=forecr-dsb-nx2-xavier-nx-emmc bitbake balena-image
Nvidia Jetson AGX Orin Devkit : $ MACHINE=jetson-agx-orin-devkit bitbake balena-image
Nvidia Jetson Orin NX in Xavier NX Devkit : $ MACHINE=jetson-orin-nx-xavier-nx-devkit bitbake balena-image
Nvidia Jetson Xavier AGX : $ MACHINE=jetson-xavier bitbake balena-image
Jetson Xavier NX Devkit eMMC : $ MACHINE=jetson-xavier-nx-devkit-emmc bitbake balena-image
Nvidia Jetson Xavier NX Devkit SD-CARD : $ MACHINE=jetson-xavier-nx-devkit bitbake balena-image
Nvidia Jetson Xavier : $ MACHINE=jetson-xavier bitbake balena-image

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,14 @@ do_image:balenaos-img[depends] += " tegra-flash-dry:do_deploy"

# Leave some space, just in case future L4Ts add device specific partitions
# All values are in KiB
DEVICE_SPECIFIC_SPACE:jetson-agx-orin-devkit = "331776"
DEVICE_SPECIFIC_SPACE:jetson-orin-nx-xavier-nx-devkit = "331776"
DEVICE_SPECIFIC_SPACE:jetson-orin-nano-devkit-nvme = "598016"
DEVICE_SPECIFIC_SPACE:jetson-orin-nx-seeed-j4012 = "598016"
DEVICE_SPECIFIC_SPACE:jetson-xavier = "921600"
DEVICE_SPECIFIC_SPACE:jetson-xavier-nx-devkit-emmc = "593920"
DEVICE_SPECIFIC_SPACE:jetson-xavier-nx-devkit = "593920"

BALENA_BOOT_SIZE:jetson-orin-nx-xavier-nx-devkit = "121440"
BALENA_BOOT_SIZE:jetson-orin-nano-devkit-nvme = "121440"
BALENA_BOOT_SIZE:jetson-xavier = "121440"
BALENA_BOOT_SIZE:jetson-xavier-nx-devkit-emmc = "121440"
BALENA_BOOT_SIZE:jetson-xavier-nx-devkit = "121440"

IMAGE_ROOTFS_SIZE:jetson-agx-orin-devkit = "1003520"
IMAGE_ROOTFS_SIZE:jetson-orin-nx-xavier-nx-devkit = "983040"
IMAGE_ROOTFS_SIZE:jetson-orin-nx-seeed-j4012 = "733184"
IMAGE_ROOTFS_SIZE:jetson-orin-nano-devkit-nvme = "733184"
IMAGE_ROOTFS_SIZE:jetson-xavier = "733184"
IMAGE_ROOTFS_SIZE:jetson-xavier-nx-devkit-emmc = "733184"
IMAGE_ROOTFS_SIZE:jetson-xavier-nx-devkit = "733184"
Expand All @@ -32,8 +22,6 @@ BALENA_BOOT_PARTITION_FILES:append = " \
"

PART_SPEC_FILE = "partition_specification234.txt"
PART_SPEC_FILE:jetson-orin-nano-devkit-nvme = "partition_specification234_orin_nano.txt"
PART_SPEC_FILE:jetson-orin-nx-seeed-j4012 = "partition_specification234_orin_nano.txt"
PART_SPEC_FILE:jetson-xavier-nx-devkit-emmc = "partition_specification194_nxde.txt"
PART_SPEC_FILE:jetson-xavier-nx-devkit = "partition_specification194_nxde.txt"
PART_SPEC_FILE:jetson-xavier = "partition_specification194.txt"
Expand Down
52 changes: 0 additions & 52 deletions layers/meta-balena-jetson/recipes-core/images/balena-image.inc
Original file line number Diff line number Diff line change
Expand Up @@ -19,58 +19,6 @@ IMAGE_INSTALL:remove = "setup-nv-boot-control-service"
MACHINE_EXTRA_RRECOMMENDS += " kernel-image-initramfs"
MACHINE_EXTRA_RDEPENDS += " kernel-image-initramfs"

IMAGE_INSTALL:append:jetson-orin-nano-devkit-nvme = " \
parted \
gptfdisk \
tegra-nvpmodel \
tegra-configs-nvstartup \
tegra-configs-udev \
mtd-utils \
tegra-bluetooth \
tegra-wifi \
tegra-firmware-rtl8822 \
l4t-launcher-extlinux \
jetson-dtbs \
nvidia-display-driver \
tegra-nvpower \
"

IMAGE_INSTALL:append:jetson-agx-orin-devkit = " \
parted \
gptfdisk \
tegra-nvpmodel \
tegra-configs-nvstartup \
tegra-configs-udev \
mtd-utils \
tegra-bluetooth \
tegra-wifi \
tegra-firmware-rtl8822 \
l4t-launcher-extlinux \
jetson-dtbs \
nvidia-display-driver \
tegra-nvfancontrol \
dtc \
"

IMAGE_INSTALL:append:jetson-orin-nx-xavier-nx-devkit = " \
parted \
gptfdisk \
tegra-nvpmodel \
tegra-configs-nvstartup \
tegra-configs-udev \
mtd-utils \
tegra-bluetooth \
tegra-wifi \
tegra-firmware-rtl8822 \
l4t-launcher-extlinux \
jetson-dtbs \
nvidia-display-driver \
tegra-nvfancontrol \
linux-firmware-rtl8168 \
kernel-module-realtek \
pciutils \
"

XAVIER_PACKAGES = " \
tegra-redundant-boot \
tegra-nv-boot-control-config \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ DEPENDS += "acl"

do_install:append() {
# It appears that 10s is not enough for high loads after hup
sed -i 's/10s/60s/g' ${D}/${sysconfdir}/systemd/system.conf.d/watchdog.conf
sed -i 's/10s/30s/g' ${D}/${sysconfdir}/systemd/system.conf.d/watchdog.conf
}
33 changes: 0 additions & 33 deletions layers/meta-balena-jetson/recipes-kernel/linux/jetson-dtbs.bb
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,6 @@ do_install[depends] += " linux-tegra:do_deploy "
S = "${WORKDIR}"
DTBNAME = "${@os.path.basename(d.getVar('KERNEL_DEVICETREE', True).split()[0])}"

SRC_URI:append:jetson-agx-orin-devkit = " file://tegra234-p3701-0000-p3737-0000-spi.dtb "

do_install:jetson-agx-orin-devkit() {
install -d ${D}/boot/
install -m 0644 "${DEPLOY_DIR_IMAGE}/${DTBNAME}" "${D}/boot/${DTBNAME}"
install -m 0644 "${DEPLOY_DIR_IMAGE}/tegra234-p3701-0004-p3737-0000.dtb" "${D}/boot/tegra234-p3701-0004-p3737-0000.dtb"
install -m 0644 "${WORKDIR}/tegra234-p3701-0000-p3737-0000-spi.dtb" "${D}/boot/tegra234-p3701-0000-p3737-0000-spi.dtb"
}

FILES:${PN}:jetson-agx-orin-devkit += " \
/boot/tegra234-p3701-0000-p3737-0000.dtb \
/boot/tegra234-p3701-0004-p3737-0000.dtb \
/boot/tegra234-p3701-0000-p3737-0000-spi.dtb \
"

do_install:jetson-orin-nx-xavier-nx-devkit() {
install -d ${D}/boot/
install -m 0644 "${DEPLOY_DIR_IMAGE}/${DTBNAME}" "${D}/boot/${DTBNAME}"
}

FILES:${PN}:jetson-orin-nx-xavier-nx-devkit += " \
/boot/tegra234-p3767-0000-p3509-a02.dtb \
"

do_install:jetson-orin-nano-devkit-nvme() {
install -d ${D}/boot/
install -m 0644 "${DEPLOY_DIR_IMAGE}/${DTBNAME}" "${D}/boot/${DTBNAME}"
}

FILES:${PN}:jetson-orin-nano-devkit-nvme += " \
/boot/tegra234-p3767-0003-p3768-0000-a0.dtb \
"

do_install:jetson-xavier() {
install -d ${D}/boot/
install -m 0644 "${DEPLOY_DIR_IMAGE}/${DTBNAME}" "${D}/boot/${DTBNAME}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ BALENA_CONFIGS[binder] = " \

L4TVER=" l4tver=${L4T_VERSION}"

KERNEL_ARGS = " firmware_class.path=/etc/firmware fbcon=map:0 "
KERNEL_ARGS = " firmware_class.path=/etc/firmware fbcon=map:0 rootdelay=1 roottimeout=120"
KERNEL_ARGS:append:jetson-xavier = " video=efifb:off nospectre_bhb "
KERNEL_ARGS:append:jetson-xavier-nx-devkit-emmc = " video=efifb:off nospectre_bhb "
KERNEL_ARGS:append:jetson-xavier-nx-devkit = " video=efifb:off nospectre_bhb "
Expand Down
Loading

0 comments on commit f360069

Please sign in to comment.