Skip to content

Commit

Permalink
xilinx-v2024.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Tosainu committed Jul 5, 2024
1 parent 7f5e6ef commit 7d09737
Show file tree
Hide file tree
Showing 11 changed files with 1,039 additions and 5,670 deletions.
6 changes: 3 additions & 3 deletions .github/actions/install-earthly/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Install Earthly
description: Install Earthly v0.6.23 (earthly-linux-amd64) to ~/.local/bin/earthly
description: Install Earthly v0.8.14 (earthly-linux-amd64) to ~/.local/bin/earthly
inputs: {}
runs:
using: composite
steps:
- run: |
cd "$(mktemp -d)"
curl -LO https://github.com/earthly/earthly/releases/download/v0.6.23/earthly-linux-amd64
echo '6503f0f0706e3fcc8a641699322bc8d741ff21519750d5b3970aef616b2577ccf629e8ab20f5d385d00fad20c8b5b1fb5318845018bd14fde27a4ce530b1a196 earthly-linux-amd64' | sha512sum -c
curl -LO https://github.com/earthly/earthly/releases/download/v0.8.14/earthly-linux-amd64
echo 'a7104aec5c632ed6b36ef0f88eed494b7d5d56bf45fbf901982b109ddca0185a89b3235bcd48f78585a1d13500c7afb34a3aa445c4540ab7b0ff037f9fd34174 earthly-linux-amd64' | sha512sum -c
mkdir -p ~/.local/bin
mv earthly-linux-amd64 ~/.local/bin/earthly
chmod +x ~/.local/bin/earthly
Expand Down
66 changes: 29 additions & 37 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
VERSION 0.6
VERSION 0.8

prep:
FROM ubuntu:jammy@sha256:20fa2d7bb4de7723f542be5923b06c4d704370f0390e4ae9e1c833c8785644c1
FROM ubuntu:jammy@sha256:340d9b015b194dc6e2a13938944e0d016e57b9679963fdeb9ce021daac430221
RUN \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
autoconf automake bc bison build-essential ca-certificates cmake cpio \
crossbuild-essential-arm64 curl dbus-x11 dosfstools e2fsprogs fdisk flex gzip \
crossbuild-essential-arm64 curl debhelper dbus-x11 dosfstools e2fsprogs fdisk flex gzip \
kmod libncurses-dev libssl-dev libtinfo5 libtool-bin locales rsync xz-utils zstd && \
rm -rf /var/lib/apt/lists/* && \
sed -i 's/^#\s*\(en_US.UTF-8\)/\1/' /etc/locale.gen && \
dpkg-reconfigure --frontend noninteractive locales
ARG XSCT_URL=https://petalinux.xilinx.com/sswreleases/rel-v2022/xsct-trim/xsct-2022-1.tar.xz
ARG XSCT_SHA256SUM=e343a8b386398e292f636f314a057076e551a8173723b8ea0bc1bbd879c05259
ARG XSCT_URL=https://petalinux.xilinx.com/sswreleases/rel-v2024.1/xsct-trim/xsct-2024-1_0515.tar.xz
ARG XSCT_SHA256SUM=b73be5f07312e48aa3ceb96d947a5c7b347caf2dd23c85c3db12893c319235d5
RUN --mount=type=tmpfs,target=/tmp \
curl --no-progress-meter -L "${XSCT_URL}" -o /tmp/xsct.tar.xz && \
echo "${XSCT_SHA256SUM} /tmp/xsct.tar.xz" | sha256sum -c - && \
Expand All @@ -27,7 +27,6 @@ build:

COPY +app-r5-0/bin/ipi-led.elf .
COPY +boot.bin/ .
COPY +boot.scr/ .
COPY +fsbl.elf/ .
COPY +generate-src/system.bit .
COPY +pmufw.elf/ .
Expand Down Expand Up @@ -55,22 +54,21 @@ disk.img.zst:
umount /mnt && \
truncate -s 1M /tmp/header.img && \
cat /tmp/header.img /tmp/boot.img /tmp/root.img > /tmp/disk.img && \
echo "label: dos\n1M,${DISK_IMG_PART1_SIZE},e\n,${DISK_IMG_PART2_SIZE},L\n" | sfdisk /tmp/disk.img && \
echo "label: dos\n1M,${DISK_IMG_PART1_SIZE},e\n,${DISK_IMG_PART2_SIZE},L,*\n" | sfdisk /tmp/disk.img && \
zstd --no-progress -9 /tmp/disk.img -o disk.img.zst
SAVE ARTIFACT disk.img.zst

boot.tar:
FROM +prep
COPY +boot.scr/boot.scr boot/
COPY +boot.bin/ boot/
COPY +system.dtb/ boot/
RUN tar --create -f boot.tar -C boot .
SAVE ARTIFACT boot.tar

rootfs.tar:
FROM +prep
COPY +rootfs-base.tar/rootfs-base.tar rootfs.tar
COPY linux/rootfs rootfs
COPY +system.dtb/ rootfs/boot/
COPY +app-a53/ rootfs
RUN tar --append -f rootfs.tar --xattrs --xattrs-include='*' -C rootfs .
SAVE ARTIFACT rootfs.tar
Expand All @@ -89,13 +87,6 @@ boot.bin:
RUN ./bootgen -arch zynqmp -image boot.bif -o boot.bin
SAVE ARTIFACT boot.bin

boot.scr:
FROM +prep
COPY +u-boot/mkimage .
COPY boot.cmd .
RUN ./mkimage -c none -A arm64 -T script -d boot.cmd boot.scr
SAVE ARTIFACT boot.scr

fsbl.elf:
FROM +prep
COPY +generate-src/fsbl .
Expand Down Expand Up @@ -167,7 +158,7 @@ generate-src:
SAVE ARTIFACT system.bit

rootfs-base.tar:
FROM --platform=linux/arm64 ubuntu:jammy@sha256:1bc0bc3815bdcfafefa6b3ef1d8fd159564693d0f8fbb37b8151074651a11ffb
FROM --platform=linux/arm64 ubuntu:jammy@sha256:340d9b015b194dc6e2a13938944e0d016e57b9679963fdeb9ce021daac430221
RUN apt-get update && \
apt-get install -y --no-install-recommends mmdebstrap && \
rm -rf /var/lib/apt/lists/*
Expand Down Expand Up @@ -197,58 +188,59 @@ rootfs-base.tar:
bootgen:
FROM +prep
RUN --mount=type=tmpfs,target=/tmp \
curl --no-progress-meter -L https://github.com/Xilinx/bootgen/archive/refs/tags/xilinx_v2022.1.tar.gz -o /tmp/archive.tar.gz && \
echo 'a7db095abda9820babbd0406e7036d663e89e8c7c27696bf4227d8a2a4276d13 /tmp/archive.tar.gz' | sha256sum -c && \
curl --no-progress-meter -L https://github.com/Xilinx/bootgen/archive/refs/tags/xilinx_v2024.1.tar.gz -o /tmp/archive.tar.gz && \
echo '7879c7d40642bcf7adcec177a51cf73f95bd45d315f75d125d3fc1680c0a9b24 /tmp/archive.tar.gz' | sha256sum -c && \
tar xf /tmp/archive.tar.gz --strip-components=1
RUN make
SAVE ARTIFACT bootgen

linux:
FROM +prep
RUN --mount=type=tmpfs,target=/tmp \
curl --no-progress-meter -L https://github.com/Xilinx/linux-xlnx/archive/75872fda9ad270b611ee6ae2433492da1e22b688.tar.gz -o /tmp/archive.tar.gz && \
echo '75e40c693484710cd7fc5cd972adb272414d196121c66a6ee2ca6ef762cb60c9 /tmp/archive.tar.gz' | sha256sum -c && \
curl --no-progress-meter -L https://github.com/Xilinx/linux-xlnx/archive/485728ba736edd5ba491e0ca8e9daa7f982a5df1.tar.gz -o /tmp/archive.tar.gz && \
echo 'f1dcaccd8965fb74fc69511fc69b97513bb87798611aecb542acafcde719cceb /tmp/archive.tar.gz' | sha256sum -c && \
tar xf /tmp/archive.tar.gz --strip-components=1
COPY linux/.config .
COPY linux/defconfig arch/arm64/configs/myboard_defconfig
ARG nproc=$(nproc)
RUN CROSS_COMPILE=aarch64-linux-gnu- make -j$nproc ARCH=arm64 bindeb-pkg
RUN make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 myboard_defconfig
RUN make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 bindeb-pkg -j$nproc
SAVE ARTIFACT include/dt-bindings /include/dt-bindings
SAVE ARTIFACT /*.deb

tf-a:
FROM +prep
RUN --mount=type=tmpfs,target=/tmp \
curl --no-progress-meter -L https://github.com/Xilinx/arm-trusted-firmware/archive/refs/tags/xilinx-v2022.1.tar.gz -o /tmp/archive.tar.gz && \
echo 'e7d6a4f30d35b19ec54d27e126e7edc2c6a9ad6d53940c6b04aa1b782c55284e /tmp/archive.tar.gz' | sha256sum -c && \
curl --no-progress-meter -L https://github.com/Xilinx/arm-trusted-firmware/archive/refs/tags/xilinx-v2024.1.tar.gz -o /tmp/archive.tar.gz && \
echo 'bb0f1a7077bf02a012d14e9ee690d06ccb2b58871e4cd7c4a7c111508f7b5555 /tmp/archive.tar.gz' | sha256sum -c && \
tar xf /tmp/archive.tar.gz --strip-components=1
ARG nproc=$(nproc)
RUN CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 \
make -j$nproc PLAT=zynqmp RESET_TO_BL31=1 ZYNQMP_CONSOLE=cadence1
RUN make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=zynqmp RESET_TO_BL31=1 ZYNQMP_CONSOLE=cadence1 bl31 -j$nproc
SAVE ARTIFACT build/zynqmp/release/bl31/bl31.elf /

u-boot:
FROM +prep
RUN --mount=type=tmpfs,target=/tmp \
curl --no-progress-meter -L https://github.com/Xilinx/u-boot-xlnx/archive/refs/tags/xilinx-v2022.1.tar.gz -o /tmp/archive.tar.gz && \
echo 'a02adc8d80f736050772367ea6f868214faaf47b6b3539781d6972dab26b227c /tmp/archive.tar.gz' | sha256sum -c && \
curl --no-progress-meter -L https://github.com/Xilinx/u-boot-xlnx/archive/refs/tags/xilinx-v2024.1.tar.gz -o /tmp/archive.tar.gz && \
echo '32bcf6b792ef8c072e82ec7d0388f6d9659020bc35f9335e7fb2eff72bc819df /tmp/archive.tar.gz' | sha256sum -c && \
tar xf /tmp/archive.tar.gz --strip-components=1
ARG nproc=$(nproc)
COPY u-boot.config .config
RUN CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 \
make -j$nproc u-boot.elf
COPY u-boot.defconfig configs/myboard_defconfig
RUN make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm myboard_defconfig
RUN make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm u-boot.elf -j$nproc
SAVE ARTIFACT u-boot.elf
SAVE ARTIFACT scripts/dtc/dtc /dtc
SAVE ARTIFACT tools/mkimage /mkimage

xsct:
FROM +prep
RUN --mount=type=tmpfs,target=/tmp \
curl --no-progress-meter -L https://github.com/Xilinx/embeddedsw/archive/refs/tags/xilinx_v2022.1.tar.gz -o /tmp/archive.tar.gz && \
echo '5ed25477197eab2303bfa13e7af15e32d5b62979327ea250f98859d478cff11f /tmp/archive.tar.gz' | sha256sum -c && \
curl --no-progress-meter -L https://github.com/Xilinx/embeddedsw/archive/refs/tags/xilinx_v2024.1.tar.gz -o /tmp/archive.tar.gz && \
echo '733fdb09b2525c1fa322242b97f015122aaf9e32530a824dec71d6328be83850 /tmp/archive.tar.gz' | sha256sum -c && \
mkdir -p embeddedsw && \
tar xf /tmp/archive.tar.gz --strip-components=1 -C embeddedsw
RUN --mount=type=tmpfs,target=/tmp \
curl --no-progress-meter -L https://github.com/Xilinx/device-tree-xlnx/archive/refs/tags/xilinx_v2022.1.tar.gz -o /tmp/archive.tar.gz && \
echo '49c119a5956e747dc11d2a4aca85b02cbc2545ea2fc5d88dc5868b60bb565e08 /tmp/archive.tar.gz' | sha256sum -c && \
curl --no-progress-meter -L https://github.com/Xilinx/device-tree-xlnx/archive/refs/tags/xilinx_v2024.1.tar.gz -o /tmp/archive.tar.gz && \
echo '8f47cbddc8d2e7a746f56e75ab729605d153edf9305021da382844209e6a6d9b /tmp/archive.tar.gz' | sha256sum -c && \
mkdir -p device-tree-xlnx && \
tar xf /tmp/archive.tar.gz --strip-components=1 -C device-tree-xlnx

RUN sed -i 's/{\s*\(\w\+\)\s*==\s*"$\(.\+\)"\s*}/"\1==$\2"/' embeddedsw/lib/bsp/standalone/data/standalone.tcl
3 changes: 0 additions & 3 deletions boot.cmd

This file was deleted.

3 changes: 1 addition & 2 deletions boot.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if { [string length $hw_server_url] } {

puts "\[+\] reset system"
targets -set -filter {name == "PSU"}
rst -system
rst -por

puts "\[+\] PL: system.bit"
targets -set -filter {name == "PL"}
Expand All @@ -53,7 +53,6 @@ targets -set -filter {name =~ "*A53*#0"}
dow "$build_dir/u-boot.elf"
dow "$build_dir/bl31.elf"
dow -data "$build_dir/system.dtb" 0x100000
dow -data "$build_dir/boot.scr" 0x20000000
con

puts "\[+\] R5 #0: ipi-led.elf"
Expand Down
4 changes: 2 additions & 2 deletions design_1_wrapper.xsa
Git LFS file not shown
Loading

0 comments on commit 7d09737

Please sign in to comment.