Skip to content

Commit

Permalink
Fix: don't clone with .git directory ending.
Browse files Browse the repository at this point in the history
  • Loading branch information
aentinger committed Aug 7, 2024
1 parent e417fd7 commit fb75fd3
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 18 deletions.
31 changes: 13 additions & 18 deletions .github/workflows/build-yocto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up latest Python
uses: actions/setup-python@v5
- name: Checkout pika-spark/lmp-manifest
uses: actions/checkout@v4
with:
python-version: "*"
repository: pika-spark/lmp-manifest
path: 'lmp-manifest'
ref: pika-spark

- name: Build Docker image
run: |
git clone https://github.com/pika-spark/lmp-manifest.git
cd lmp-manifest
docker build -t yocto-build ./lmp-manifest
- name: Check out this repository containing build script
uses: actions/checkout@v4

- name: Build Yocto image
run: |
docker run -v $(pwd):/dockerVolume -it yocto-build bash
su builder
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
cd /dockerVolume
repo init -u https://github.com/pika-spark/lmp-manifest.git -m arduino.xml -b pika-spark
repo sync
DISTRO=lmp-base-xwayland MACHINE=portenta-x8 . setup-environment
echo "ACCEPT_FSL_EULA = \"1\"" >> conf/local.conf
bitbake lmp-devel-arduino-image
docker run --rm \
-v ${{ github.workspace }}:/workdir \
-u $(id -u):$(id -g) \
yocto-build \
/bin/sh -c "cd /workdir && sh portenta-x8_build.sh"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<a href="https://pika-spark.io/"><img align="right" src="https://raw.githubusercontent.com/pika-spark/.github/main/logo/logo-pika-spark-bg-white.png" width="15%"></a>
:sparkles: `pika-spark-yocto-ci`
================================

This repository contains a GitHub action script for building the Pika Spark Yocto image.

<p align="center">
<a href="https://pika-spark.io/"><img src="https://raw.githubusercontent.com/pika-spark/.github/main/logo/logo-pika-spark-bg-white-github.png" width="40%"></a>
</p>

65 changes: 65 additions & 0 deletions portenta-x8_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Script to install and build the image for the Arduino Portenta X8
# More info at https://docs.arduino.cc/hardware/portenta-x8
# Script by Massimo Pennazio and Pablo Marquínez (@Arduino)

echo --------------------------------------------------------------------------
echo Starting wrapper script to setup and build an Image and the Flashing tools
echo @arduino Portenta-X8
echo 17 Oct 2023
echo

echo "User" $(whoami)

# Make sure its on the home directory
echo Changing directory to home
cd /workdir

# Git config
echo Git config to example credentials
git config --global user.email "[email protected]"
git config --global user.name "Your Name"

# Initialize the git-repo and pull all the repos
echo Starting git-repo initialization
repo init -u https://github.com/pika-spark/lmp-manifest.git -m arduino.xml -b pika-spark
echo Pulling git-repo files
repo sync

# Build 'lmp-partner-arduino-image' image
echo Building Portenta-X8 image
DISTRO=lmp-base-xwayland MACHINE=portenta-x8 . setup-environment
echo "ACCEPT_FSL_EULA = \"1\"" >> conf/local.conf
bitbake lmp-devel-arduino-image

echo Exit X8 folder
cd ..

# Build flashing tools
echo Building tools
DISTRO=lmp-mfgtool MACHINE=portenta-x8 . setup-environment
echo "ACCEPT_FSL_EULA = \"1\"" >> conf/local.conf
echo "MFGTOOL_FLASH_IMAGE = \"lmp-partner-arduino-image\"" >> conf/local.conf
bitbake mfgtool-files

echo Exit tools folder
cd ..

# Copy files to the deploy folder
todaysDate=$(date +%d-%b-%H_%M)
echo copying files
DEPLOY_FOLDER=/workdir/$todaysDate
mkdir $DEPLOY_FOLDER

cp -L build-lmp-mfgtool/deploy/images/portenta-x8/mfgtool-files-portenta-x8.tar.gz $DEPLOY_FOLDER
cp -L build-lmp-xwayland/deploy/images/portenta-x8/imx-boot-portenta-x8 $DEPLOY_FOLDER
cp -L build-lmp-xwayland/deploy/images/portenta-x8/u-boot-portenta-x8.itb $DEPLOY_FOLDER
cp -L build-lmp-xwayland/deploy/images/portenta-x8/sit-portenta-x8.bin $DEPLOY_FOLDER
cp -L build-lmp-xwayland/deploy/images/portenta-x8/lmp-partner-arduino-image-portenta-x8.wic $DEPLOY_FOLDER

cd $DEPLOY_FOLDER
tar xvf mfgtool-files-portenta-x8.tar.gz

echo finished
echo Output folder called $todaysDate
echo
echo Read more at https://docs.arduino.cc/hardware/portenta-x8

0 comments on commit fb75fd3

Please sign in to comment.