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

prepare a old config for make menuconfig #21

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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: 13 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ CMAKE=$SHELL_DIR/toolchain/cmake/bin/
LINUX_CROSS_PREFIX=$SHELL_DIR/toolchain/linux_toolchain/bin/riscv64-unknown-linux-gnu-
NEWLIB_ELF_CROSS_PREFIX=$SHELL_DIR/toolchain/elf_newlib_toolchain/bin/riscv64-unknown-elf-

BUILD_TARGET=$1
# if no arg given
if [ $# -ne 1 ]; then
BUILD_TARGET="--help"
else
BUILD_TARGET=$1
fi

if [[ ! -e $OUT_DIR ]]; then
mkdir $OUT_DIR
Expand All @@ -35,6 +40,12 @@ build_linux_config()
echo " "
echo "============ build linux kernel config ============="
cd $SHELL_DIR/linux-5.10.4-808
# add old config for make menuconfig,
# otherwise it will take config from /boot/config-<kernel ver> of host,
# and kernel building will fail.
if [ ! -f .config ]; then
cp c906.config .config
fi
make ARCH=riscv CROSS_COMPILE=$LINUX_CROSS_PREFIX menuconfig -j$(nproc)
}

Expand Down Expand Up @@ -153,4 +164,4 @@ all)
esac

echo " "
echo "===================== build done ======================="
echo "===================== build done ======================="