forked from renesas-rz/rzg2_flash_writer
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ "solidrun" ] | ||
pull_request: | ||
branches: [ "solidrun" ] | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
docker_publish: | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build and publish a Docker image for ${{ github.repository }} | ||
uses: macbre/push-to-ghcr@master | ||
with: | ||
image_name: ${{ github.repository }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
dockerfile: docker/Dockerfile | ||
|
||
build_images: | ||
needs: docker_publish | ||
runs-on: "ubuntu-latest" | ||
container: | ||
image: ghcr.io/solidrun/rzg2_flash_writer:latest | ||
strategy: | ||
matrix: | ||
device: [RZG2UL, RZG2LC, RZG2L, RZV2L] | ||
ddr_size: [512MB_1PCS, 1GB_1PCS, 2GB_1PCS] | ||
include: | ||
- device: RZG2UL | ||
swizzle: T3BC | ||
- device: RZG2LC | ||
swizzle: T3BC | ||
- device: RZG2L | ||
swizzle: T1BC | ||
- device: RZV2L | ||
swizzle: T1BC | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build firmware | ||
run: | | ||
CROSS_COMPILE=aarch64-none-linux-gnu- make DEVICE=${{ matrix.device }} \ | ||
DDR_TYPE=DDR4 \ | ||
DDR_SIZE=${{ matrix.ddr_size }} \ | ||
SWIZZLE=${{ matrix.swizzle }} \ | ||
FILENAME_ADD=_${{ matrix.device }}_HUMMINGBOARD -f makefile.linaro | ||
- name: Copy firmware | ||
run: | | ||
mkdir -p s3 | ||
cp AArch64_output/Flash_Writer_SCIF_${{ matrix.device }}_HUMMINGBOARD_DDR4_${{ matrix.ddr_size }}.mot s3 | ||
- name: Upload to S3 | ||
uses: shallwefootball/upload-s3-action@v1.3.3 | ||
if: github.event_name == 'push' | ||
with: | ||
aws_key_id: ${{ secrets.IMAGES_S3_ACCESS }} | ||
aws_secret_access_key: ${{ secrets.IMAGES_S3_SECRET }} | ||
aws_bucket: ${{ secrets.IMAGES_S3_BUCKET }} | ||
endpoint: ${{ secrets.IMAGES_S3_HOST }} | ||
source_dir: s3 | ||
destination_dir: RZ/FlashWriter/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Start with a minimal base image | ||
FROM debian:stable-slim | ||
|
||
# Set environment variables | ||
ENV TOOLCHAIN_URL=https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz \ | ||
TOOLCHAIN_DIR=/opt/arm-toolchain \ | ||
PATH=$PATH:/opt/arm-toolchain/bin | ||
|
||
# Install necessary dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
wget \ | ||
xz-utils \ | ||
ca-certificates \ | ||
build-essential \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Download and extract the ARM toolchain | ||
RUN mkdir -p $TOOLCHAIN_DIR && \ | ||
wget -qO- $TOOLCHAIN_URL | tar -xJ --strip-components=1 -C $TOOLCHAIN_DIR | ||
|
||
# Set default shell to bash for convenience | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
# Define the default command to keep the container running | ||
CMD ["bash"] |