forked from checkpoint-restore/criu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create build_iproute2.sh (needs sudo)
add scripts to cross compile iproute2 for RISC-V (need sudo permission) Signed-off-by: Yixue Zhao <[email protected]>
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
echo "running script: build_iproute2.sh" | ||
|
||
. ./config.sh | ||
. ./util.sh | ||
|
||
IPROUTE2_GIT_URL="git://git.kernel.org/pub/scm/network/iproute2/iproute2.git" | ||
|
||
build_iproute2_riscv64 () { | ||
cd $BUILD_ROOT_DIR | ||
git clone $IPROUTE2_GIT_URL | ||
cd iproute2 | ||
|
||
# mkdir -p riscv64_build | ||
# cd riscv64_build | ||
|
||
make CROSS_COMPILE=riscv64-unknown-linux-gnu- BUILD_CC=gcc && make install CROSS_COMPILE=riscv64-unknown-linux-gnu- | ||
|
||
} | ||
|
||
main () { | ||
|
||
|
||
case $TARGET_ARCH in | ||
|
||
"riscv64") | ||
printf "${BCyan}building iproute2 for $TARGET_ARCH${Color_Off}\n" | ||
measure_func_time build_iproute2_riscv64 | ||
;; | ||
|
||
*) | ||
echo "the target architecture $TARGET_ARCH is not supported, exit the program..." | ||
exit | ||
;; | ||
esac | ||
} | ||
|
||
main |