Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux 6.6 th1520 pinctrl/emmc #2

Merged
merged 22 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9a192d6
dt-bindings: pinctrl: Add thead,th1520-pinctrl bindings
esmil Jan 3, 2024
df9d3eb
pinctrl: Add driver for the T-Head TH1520 SoC
esmil Jan 3, 2024
198e91a
riscv: dts: thead: Add TH1520 pin control nodes
esmil Jan 3, 2024
081edec
riscv: dts: thead: Add TH1520 GPIO ranges
esmil Jan 3, 2024
436f2ef
riscv: dts: thead: Adjust TH1520 GPIO labels
esmil Jan 3, 2024
8c10ff5
riscv: dts: thead: Add Lichee Pi 4M GPIO line names
esmil Jan 3, 2024
99d80d7
riscv: dts: thead: Add TH1520 pinctrl settings for UART0
esmil Jan 3, 2024
86c9b9d
riscv: dtb: thead: Add BeagleV Ahead LEDs
esmil Jan 3, 2024
54a354b
configs: force CONFIG_PINCTRL_TH1520 builtin
RevySR Apr 25, 2024
2476d79
fix: remove linux/array_size.h for pinctrl-th1520
RevySR Apr 25, 2024
bacd73a
ci: add th1520 deb build
RevySR Apr 25, 2024
42e8968
dt-bindings: mmc: sdhci-of-dwcmhsc: Add T-Head TH1520 support
pdp7 Nov 14, 2023
dd6af81
mmc: sdhci: add __sdhci_execute_tuning() to header
pdp7 Nov 14, 2023
d4d5c15
mmc: sdhci-of-dwcmshc: Add support for T-Head TH1520
pdp7 Nov 14, 2023
2c9ce6a
riscv: defconfig: Enable mmc and dma drivers for T-Head TH1520
pdp7 Dec 6, 2023
f03b14d
riscv: dts: thead: Add TH1520 mmc controllers and sdhci clock
pdp7 Dec 6, 2023
ea598a0
riscv: dts: thead: Enable BeagleV Ahead eMMC and microSD
pdp7 Dec 6, 2023
ae7a215
riscv: dts: thead: Enable LicheePi 4A eMMC and microSD
pdp7 Dec 6, 2023
8f3915d
ci: add th1520 emmc image build
RevySR Apr 30, 2024
b61e182
remove compression for riscv Image
RevySR Sep 21, 2023
5edcb12
chore: dtb_install in /boot
RevySR Jan 12, 2024
0634bb1
Revert "ci: Disable CGROUP for all defconfig"
RevySR Apr 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 144 additions & 0 deletions .github/workflows/th1520.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: th1520-build

on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 3 * * *"

env:
xt64_toolchain: https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1705395627867
xt64_toolchain_file_name: Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.1-20240115.tar.gz
rv64_toolchain: https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.04.12
rv64_toolchain_file_name: riscv64-glibc-ubuntu-22.04-gcc-nightly-2024.04.12-nightly.tar.gz
ARCH: riscv
KBUILD_BUILD_USER: builder
KBUILD_BUILD_HOST: ci-riscv-builder
KDEB_COMPRESS: none
KDEB_CHANGELOG_DIST: unstable
TH1520_IMAGE_BASE_URL: https://mirror.iscas.ac.cn/revyos/extra/images/lpi4amain
TH1520_IMAGE_DATE: 20240127
TH1520_BOOT: boot-lpi4amain-20240127_105111.ext4.zst
TH1520_ROOT: root-lpi4amain-20240127_105111.ext4.zst

jobs:
kernel:
strategy:
fail-fast: false
matrix:
include:
- name: linux-64lp64-xt
toolchain_tripe: riscv64-unknown-linux-gnu-
- name: linux-64lp64
toolchain_tripe: riscv64-unknown-linux-gnu-

runs-on: ubuntu-22.04
env:
CROSS_COMPILE: ${{ matrix.toolchain_tripe }}

steps:
- name: Install software
run: |
sudo apt update && \
sudo apt install -y gdisk dosfstools g++-12-riscv64-linux-gnu build-essential \
libncurses-dev gawk flex bison openssl libssl-dev tree \
dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf device-tree-compiler \
devscripts debhelper pahole qemu-user-static binfmt-support zstd ninja-build wget

- name: Checkout source
uses: actions/checkout@v4
with:
path: 'kernel'

- name: Configure toolchains
run: |
if [ x"${{ matrix.name }}" = x"linux-64lp64" ]; then
wget ${rv64_toolchain}/${rv64_toolchain_file_name}
tar -xvf ${rv64_toolchain_file_name} -C /opt
rm -v ${rv64_toolchain_file_name}
fi
if [ x"${{ matrix.name }}" = x"linux-64lp64-xt" ]; then
wget ${xt64_toolchain}/${xt64_toolchain_file_name}
tar -xvf ${xt64_toolchain_file_name} -C /opt
rm -v ${xt64_toolchain_file_name}
fi

- name: Compile
run: |
mkdir artifact
if [ x"${{ matrix.name }}" = x"linux-64lp64" ]; then
export PATH="/opt/riscv/bin:$PATH"
fi
if [ x"${{ matrix.name }}" = x"linux-64lp64-xt" ]; then
export PATH="/opt/Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.8.1/bin:$PATH"
fi
pushd kernel
make defconfig
export KDEB_PKGVERSION="$(make kernelversion)-$(date "+%Y.%m.%d.%H.%M")+$(git rev-parse --short HEAD)"
make -j$(nproc) bindeb-pkg
dcmd cp -v ../*.changes ${GITHUB_WORKSPACE}/artifact
popd

- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}.tar.gz
path: artifact/*
retention-days: 90

- name: Checkout qemu
uses: actions/checkout@v4
with:
repository: revyos/qemu
path: qemu
ref: ab8f84892a89feea60f1bb24432ff58ce6d2885c # TODO: remove this line

- name: build qemu
run: |
pushd qemu
./configure \
--prefix=$HOME/qemu-install \
--static \
--target-list=riscv64-linux-user \
--disable-system \
--disable-pie \
--interp-prefix=/etc/qemu-binfmt/%M
make -j$(nproc)
make install

sudo cp -fv $HOME/qemu-install/bin/qemu-riscv64 /usr/bin/qemu-riscv64-static
popd
ls -al /usr/bin/qemu-riscv64-static
sudo dpkg-reconfigure binfmt-support

- name: Download th1520 boot/root
run: |
wget ${TH1520_IMAGE_BASE_URL}/${TH1520_IMAGE_DATE}/${TH1520_BOOT}
wget ${TH1520_IMAGE_BASE_URL}/${TH1520_IMAGE_DATE}/${TH1520_ROOT}

- name: Reconfigure th1520 boot/root
run: |
export TIMESTAMP=$(date +%Y%m%d-%H%M%S)
zstd -d ${TH1520_BOOT}
mv boot*.ext4 boot-lpi4amain-ci-${TIMESTAMP}.ext4
zstd -d ${TH1520_ROOT}
mv root*.ext4 root-lpi4amain-ci-${TIMESTAMP}.ext4
rm -rf ${TH1520_BOOT} ${TH1520_ROOT}
mkdir -p mnt
sudo mount root-lpi4amain-ci-${TIMESTAMP}.ext4 mnt
sudo mount boot-lpi4amain-ci-${TIMESTAMP}.ext4 mnt/boot
sudo chroot mnt sh -c 'apt remove -y linux-image* linux-headers*'
sudo dcmd cp -v ${GITHUB_WORKSPACE}/artifact/*.changes mnt/root
sudo chroot mnt sh -c 'dpkg -i /root/*.deb'
sudo umount -l mnt
zstd boot-lpi4amain-ci-${TIMESTAMP}.ext4
zstd root-lpi4amain-ci-${TIMESTAMP}.ext4

- name: 'Upload Artifact EMMC'
uses: actions/upload-artifact@v3
with:
retention-days: 30
name: th1520-${{ matrix.name }}
path: |
*.ext4.zst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ properties:
- rockchip,rk3568-dwcmshc
- rockchip,rk3588-dwcmshc
- snps,dwcmshc-sdhci
- thead,th1520-dwcmshc

reg:
maxItems: 1
Expand Down
Loading
Loading