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

scripts: fix build_rv_euler_kernel bug #152

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Changes from all commits
Commits
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
15 changes: 14 additions & 1 deletion scripts/envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,9 @@ function build_rv_ubuntu_kernel()
mv ../linux-headers-${KERNELRELEASE}_*.deb $RV_DEB_INSTALL_DIR/linux-headers-${KERNELRELEASE}.deb
mv ../linux-libc-dev_${KERNELRELEASE}-*.deb $RV_DEB_INSTALL_DIR/linux-libc-dev_${KERNELRELEASE}.deb

if [ ! -d $RV_FIRMWARE_INSTALL_DIR ]; then
mkdir -p $RV_FIRMWARE_INSTALL_DIR
fi
cp $RV_KERNEL_BUILD_DIR/arch/riscv/boot/dts/sophgo/${CHIP}-*.dtb $RV_FIRMWARE_INSTALL_DIR

popd
Expand Down Expand Up @@ -941,8 +944,18 @@ EOT
rm -f $RV_RPM_INSTALL_DIR/kernel-*.rpm
fi

if [ ! -d $RV_FIRMWARE_INSTALL_DIR ]; then
mkdir -p $RV_FIRMWARE_INSTALL_DIR
else
rm -f $RV_FIRMWARE_INSTALL_DIR/${CHIP}-*.dtb
fi

cp $RPMBUILD_DIR/RPMS/riscv64/*.rpm $RV_RPM_INSTALL_DIR/
cp $RV_KERNEL_SRC_DIR/arch/riscv/boot/dts/sophgo/${CHIP}-*.dtb $RV_FIRMWARE_INSTALL_DIR
if [[ ${KERNELRELEASE:0:4} == "6.1." ]]; then
cp $RPMBUILD_DIR/BUILD/kernel-${KERNELRELEASE}/arch/riscv/boot/dts/sophgo/${CHIP}-*.dtb $RV_FIRMWARE_INSTALL_DIR
else
cp $RV_KERNEL_SRC_DIR/arch/riscv/boot/dts/sophgo/${CHIP}-*.dtb $RV_FIRMWARE_INSTALL_DIR
fi
make ARCH=riscv CROSS_COMPILE=$RISCV64_LINUX_CROSS_COMPILE distclean
rm *.tar.gz
rm -rf $RPMBUILD_DIR
Expand Down
Loading