Skip to content

Commit

Permalink
Create build_iproute2.sh (needs sudo)
Browse files Browse the repository at this point in the history
add scripts to cross compile iproute2 for RISC-V (need sudo permission)

Signed-off-by: Yixue Zhao <[email protected]>
  • Loading branch information
felicitia committed Nov 26, 2023
1 parent df5e80d commit 48a84bf
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions scripts/hpsc-CC/build_iproute2.sh
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

0 comments on commit 48a84bf

Please sign in to comment.