From e579d9f4aa40bb3f290fad82e540eee6170be326 Mon Sep 17 00:00:00 2001 From: Han Gao Date: Fri, 1 Mar 2024 03:01:12 +0800 Subject: [PATCH] fix: ABI=rv64 uboot bootcmd Signed-off-by: Han Gao --- .github/workflows/build.yml | 12 ++++++++++-- build.sh | 8 ++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26d7903..791934d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,12 +19,15 @@ env: wget_alias: 'wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0' ARCH: riscv CROSS_COMPILE: riscv64-unknown-linux-gnu- - KBUILD_BUILD_USER: builder - KBUILD_BUILD_HOST: revyos-riscv-builder + KBUILD_BUILD_USER: ruyisdk + KBUILD_BUILD_HOST: ruyisdk-riscv-builder + GIT_USER: ruyisdk + GIT_EMAIL: "ruyisdk-riscv-builder@plctlab.org" KDEB_COMPRESS: xz KDEB_CHANGELOG_DIST: unstable OUTPUT: output RV64ILP32_TOOLCHAIN_HOME: /opt/rv64ilp32/ + UBOOT_RV64_REVERT_COMMIT: "05c93ec8ffeeb5461f6c06b1f56b52607a699e19" jobs: mkrootfs: @@ -60,6 +63,11 @@ jobs: export PATH="/opt/riscv/bin:$PATH" echo "PATH=${PATH}" >> $GITHUB_ENV + - name: Configure git global config + run: | + git config --global user.name ${GIT_USER} + git config --global user.email ${GIT_EMAIL} + - name: Checkout genimage uses: actions/checkout@v4 with: diff --git a/build.sh b/build.sh index 76fc633..0d7987c 100644 --- a/build.sh +++ b/build.sh @@ -11,6 +11,7 @@ BOARD=${BOARD:-canmv} ARCH=${ARCH:-riscv} CROSS_COMPILE=${CROSS_COMPILE:-riscv64-unknown-linux-gnu-} RV64ILP32_TOOLCHAIN_HOME=${RV64ILP32_TOOLCHAIN_HOME:-"/opt/rv64ilp32/"} +UBOOT_RV64_REVERT_COMMIT=${UBOOT_RV64_REVERT_COMMIT:-"05c93ec8ffeeb5461f6c06b1f56b52607a699e19"} TIMESTAMP=${TIMESTAMP:-$(date +%Y%m%d-%H%M%S)} CHROOT_TARGET=${CHROOT_TARGET:-target} @@ -87,10 +88,17 @@ function build_uboot() { pip install gmssl pushd uboot { + if [ "${ABI}" = "rv64" ]; then + sed -i "s/run rv64ilp32_k230/run rv64_k230/g" include/configs/k230_evb.h + fi make ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} O=${UBOOT_BUILD} k230_${BOARD}_defconfig make ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} O=${UBOOT_BUILD} -j$(nproc) cp -av ${UBOOT_BUILD}/u-boot-spl-k230.bin ${OUTPUT_DIR}/u-boot-spl-k230_${BOARD}.bin cp -av ${UBOOT_BUILD}/fn_u-boot.img ${OUTPUT_DIR}/fn_u-boot_${BOARD}.img + if [ "${ABI}" = "rv64" ]; then + rm -rf include/configs/k230_evb.h + git checkout include/configs/k230_evb.h + fi } popd deactivate