Skip to content

Commit 861c601

Browse files
committed
Added scripts to build ARM image for Elxr12
1 parent 1542877 commit 861c601

7 files changed

Lines changed: 472 additions & 52 deletions

File tree

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: ARM Build ELXR12 Raw Image
2+
on:
3+
workflow_dispatch: # Manual runs
4+
push:
5+
inputs:
6+
ref:
7+
description: "Branch or SHA to test (e.g. feature/x or a1b2c3)"
8+
required: false
9+
run_qemu_test:
10+
description: "Run QEMU boot test after build"
11+
required: false
12+
default: "false"
13+
type: choice
14+
options:
15+
- "true"
16+
- "false"
17+
push:
18+
branches:
19+
- srmungar_armlocal_dev_branch
20+
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
build-elxr12-arm-raw:
26+
runs-on: ubuntu-24.04-arm
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
with:
31+
persist-credentials: false
32+
ref: ${{ github.event.inputs.ref || github.ref }}
33+
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v3
36+
37+
- name: Install Earthly
38+
uses: earthly/actions-setup@v1
39+
with:
40+
github-token: ${{ secrets.GITHUB_TOKEN }}
41+
version: "latest"
42+
43+
- name: Install system deps
44+
run: |
45+
sudo apt-get update
46+
sudo apt-get install -y qemu-system-aarch64 ovmf tree jq systemd-ukify mmdebstrap systemd-boot qemu-efi-aarch64
47+
48+
- name: Set up Go
49+
uses: actions/setup-go@v5
50+
with:
51+
go-version: stable
52+
53+
- name: Prepare build script
54+
run: |
55+
if [ ! -f scripts/build_elxr12_arm_raw.sh ]; then
56+
echo "scripts/build_elxr12_arm_raw.sh not found!"
57+
exit 1
58+
fi
59+
chmod +x scripts/build_elxr12_arm_raw.sh
60+
61+
- name: Run ARM ELXR12 Raw Image Build
62+
env:
63+
RUN_QEMU_TEST: ${{ github.event.inputs.run_qemu_test }}
64+
run: |
65+
echo "Starting ARM ELXR12 raw image build..."
66+
# Ensure script has access to docker group for Earthly
67+
sudo usermod -aG docker $USER
68+
69+
# Prepare arguments with input validation
70+
ARGS=""
71+
case "${RUN_QEMU_TEST}" in
72+
"true")
73+
ARGS="--qemu-test"
74+
echo "QEMU boot test will be run after build"
75+
;;
76+
"false"|"")
77+
echo "QEMU boot test will be skipped"
78+
;;
79+
*)
80+
echo "Invalid input for run_qemu_test: ${RUN_QEMU_TEST}"
81+
exit 1
82+
;;
83+
esac
84+
85+
# Run the ELXR12 raw image build script
86+
./scripts/build_elxr12_arm_raw.sh $ARGS
87+
echo "ELXR12 raw image build completed."
88+
- name: Set file permissions for artifacts
89+
run: |
90+
sudo chmod -R 755 workspace/ || true
91+
find workspace/*/imagebuild/*/ -name "*.raw*" -exec chmod 777 {} \; || true
92+
93+
- name: GitHub Upload Release Artifacts
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: ubuntu24-arm-raw-image
97+
path: |
98+
workspace/*/imagebuild/*/*.raw*
99+
retention-days: 30

config/osv/wind-river-elxr/elxr12/config.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,10 @@ x86_64:
66
arch: x86_64 # Target architecture
77
pkgType: deb # Package management system
88
chrootenvConfigFile: chrootenvconfigs/chrootenv_x86_64.yml # Path to chrootenv config
9-
releaseVersion: "12.10.0.0" # Distribution release version
9+
releaseVersion: "12.10.0.0" # Distribution release version
10+
aarch64:
11+
dist: aria # Distribution identifier
12+
arch: aarch64 # Target architecture
13+
pkgType: deb # Package management system
14+
chrootenvConfigFile: chrootenvconfigs/chrootenv_aarch64.yml # Path to chrootenv config
15+
releaseVersion: "12.10.0.0" # Distribution release version
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
repositories:
2+
- name: "aria"
3+
type: "deb" # Repository type: rpm or deb
4+
baseURL: "https://mirror.elxr.dev/elxr"
5+
pkgPrefix: "https://mirror.elxr.dev/elxr/"
6+
releaseFile: "https://mirror.elxr.dev/elxr/dists/aria/Release"
7+
releaseSign: "https://mirror.elxr.dev/elxr/dists/aria/Release.gpg"
8+
pbGPGKey: "https://mirror.elxr.dev/elxr/public.gpg"
9+
gpgCheck: true
10+
repoGPGCheck: true
11+
enabled: true
12+
component: "main non-free-firmware" # Repository component/section identifier
13+
buildPath: "./builds/elxr12/main" # Will be replaced with temp_dir/builds/elxr12 at runtime
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
repositories:
2+
- name: "aria"
3+
type: "deb" # Repository type: rpm or deb
4+
baseURL: "https://mirror.elxr.dev/elxr"
5+
pkgPrefix: "https://mirror.elxr.dev/elxr/"
6+
releaseFile: "https://mirror.elxr.dev/elxr/dists/aria/Release"
7+
releaseSign: "https://mirror.elxr.dev/elxr/dists/aria/Release.gpg"
8+
pbGPGKey: "https://mirror.elxr.dev/elxr/public.gpg"
9+
gpgCheck: true
10+
repoGPGCheck: true
11+
enabled: true
12+
component: "main non-free-firmware" # Repository component/section identifier
13+
buildPath: "./builds/elxr12/main" # Will be replaced with temp_dir/builds/elxr12 at runtime
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
image:
2+
name: elxr12-x86_64-minimal
3+
version: "1.0.0"
4+
5+
target:
6+
os: wind-river-elxr # Target OS name
7+
dist: elxr12 # Target OS distribution
8+
arch: aarch64 # Target OS architecture
9+
imageType: raw # Image type, valid value: [raw, iso].
10+
11+
disk:
12+
name: Minimal_Raw # 1:1 mapping to the systemConfigs name
13+
artifacts:
14+
-
15+
type: raw # image file format, valid value [raw, vhd, vhdx, qcow2, vmdk, vdi]
16+
compression: gz # image compression format (optional)
17+
- type: vhdx
18+
size: 4GiB # 4G, 4GB, 4096 MiB also valid. (Required for raw)
19+
partitionTableType: gpt # Partition table type, valid value: [gpt, mbr]
20+
partitions: # Required for raw, optional for ISO, not needed for rootfs.
21+
- id: boot
22+
type: esp
23+
flags:
24+
- esp
25+
- boot
26+
start: 1MiB
27+
end: 513MiB
28+
fsType: fat32
29+
mountPoint: /boot/efi
30+
mountOptions: umask=0077
31+
32+
- id: rootfs
33+
type: linux-root-amd64
34+
start: 513MiB
35+
end: "0"
36+
fsType: ext4
37+
mountPoint: /
38+
mountOptions: defaults
39+
40+
systemConfig:
41+
name: Minimal_Raw
42+
description: Default yml configuration for raw image
43+
44+
immutability:
45+
enabled: false # default is true, overridden to false here

image-templates/ubtunu24-minimal-aarch64-raw.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)