From be8745fc396be9075b497efad9354b6b1c80adfe Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 17 Dec 2020 13:20:16 +0100 Subject: [PATCH 1/2] readme: apply some fixes Signed-off-by: Alessandro Comodi --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b616d52..45e0e3c 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,7 @@ Building the kernel: ``` bash cd linux-xlnx +git apply ../linux/0001-Add-symbiflow-tester-driver.patch export ARCH=arm export CROSS_COMPILE=arm-none-eabi- export LOADADDR=0x8000 @@ -91,7 +92,7 @@ Copy the required files to the SD card: ``` bash cp arch/arm/boot/uImage /path/to/mountpoint/boot cp arch/arm/boot/dts/zynq-zybo-z7.dtb /path/to/mountpoint/boot/devicetree.dtb -sudo cp drivers/misci/symbiflow-tester.ko /path/to/mountpoint/rootfs/root +sudo cp drivers/misc/symbiflow-tester.ko /path/to/mountpoint/rootfs/root ``` ### Adding required files to rootfs @@ -101,7 +102,7 @@ Copy the required files to the SD card: ``` bash sudo cp python/symbiflow_test.py /path/to/mountpoint/rootfs/root sudo cp -a devmemX /path/to/mountpoint/rootfs/root -sudo cp -a zynq_bootloader /path/to/mountpoint/root +sudo cp -a zynq_bootloader /path/to/mountpoint/rootfs/root ``` ## Running the tests @@ -114,7 +115,7 @@ Stop U-Boot autoboot by pressing any key during countdown. In U-Boot's console run the following commands: ``` -setenv booargs "root=/dev/mmcblk0p2 rw rootwait" +setenv bootargs "root=/dev/mmcblk0p2 rw rootwait" setenv bootcmd "load mmc 0 0x1000000 uImage && load mmc 0 0x2000000 devicetree.dtb && bootm 0x1000000 - 0x2000000" saveenv ``` From cc5a5e562bc18a1f1c1f61cd81ef588a70a571cd Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 17 Dec 2020 13:20:32 +0100 Subject: [PATCH 2/2] ci: add GH actions Signed-off-by: Alessandro Comodi --- .github/scripts/ci.sh | 39 ++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++ README.md | 1 + 3 files changed, 89 insertions(+) create mode 100644 .github/scripts/ci.sh create mode 100644 .github/workflows/ci.yml diff --git a/.github/scripts/ci.sh b/.github/scripts/ci.sh new file mode 100644 index 0000000..e43319d --- /dev/null +++ b/.github/scripts/ci.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +WORKDIR=${PWD} + +# Getting the ARM toolchain +wget -qO- https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 | tar -xj +export PATH=${PWD}/gcc-arm-none-eabi-9-2019-q4-major/bin:$PATH + +# Create artifacts directory +mkdir root boot + +# Build U-boot bootloader +pushd u-boot-xlnx +export ARCH=arm +export CROSS_COMPILE=arm-none-eabi- +make zynq_zybo_z7_defconfig +make -j`nproc` + +cp spl/boot.bin u-boot.img ${WORKDIR}/boot +popd + +# Build Linux kernel +pushd linux-xlnx +git apply ../linux/0001-Add-symbiflow-tester-driver.patch +export ARCH=arm +export CROSS_COMPILE=arm-none-eabi- +export LOADADDR=0x8000 +make xilinx_zynq_defconfig +make -j`nproc` uImage +make -j`nproc` dtbs +make -j`nproc` modules + +cp arch/arm/boot/uImage ${WORKDIR}/boot +cp arch/arm/boot/dts/zynq-zybo-z7.dtb ${WORKDIR}/boot/devicetree.dtb +cp drivers/misc/symbiflow-tester.ko ${WORKDIR}/root +popd + +# Adding required files to rootfs +cp -a python/symbiflow_test.py devmemX zynq_bootloader ${WORKDIR}/root diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9a6ffe3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +name: CI artifacts generation + +on: + push: + tags: + - 'v*' + + +jobs: + + Run-tests: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Install Dependencies + run: | + sudo apt update + sudo apt install -y bzip2 make u-boot-tools + + - name: Build Images + run: | + source .github/scripts/ci.sh + zip -r uboot-linux-images.zip root boot + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release xc7 automatic tester + draft: false + prerelease: false + + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./uboot-linux-images.zip + asset_name: uboot-linux-images.zip + asset_content_type: application/zip diff --git a/README.md b/README.md index 45e0e3c..2e88d98 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,7 @@ cp arch/arm/boot/dts/zynq-zybo-z7.dtb /path/to/mountpoint/boot/devicetree.dtb sudo cp drivers/misc/symbiflow-tester.ko /path/to/mountpoint/rootfs/root ``` + ### Adding required files to rootfs Copy the required files to the SD card: