Skip to content

Commit

Permalink
fix: ABI=rv64 uboot bootcmd
Browse files Browse the repository at this point in the history
Signed-off-by: Han Gao <[email protected]>
  • Loading branch information
RevySR committed Feb 29, 2024
1 parent 1c11fde commit e579d9f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: "[email protected]"
KDEB_COMPRESS: xz
KDEB_CHANGELOG_DIST: unstable
OUTPUT: output
RV64ILP32_TOOLCHAIN_HOME: /opt/rv64ilp32/
UBOOT_RV64_REVERT_COMMIT: "05c93ec8ffeeb5461f6c06b1f56b52607a699e19"

jobs:
mkrootfs:
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e579d9f

Please sign in to comment.