Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
30 changes: 30 additions & 0 deletions build-la.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
# Build hvisor-tool for LoongArch64.
# Usage: bash build-la.sh <linux-kernel-path> [extra make args...]

set -e

SCRIPT_DIR=$(dirname "$(realpath "$0")")

KDIR=${1:-/media/boneinscri/Data/linux-v6.19/linux}
shift 2>/dev/null || true

Comment on lines +9 to +11
if [ ! -d "$KDIR" ]; then
echo "Error: kernel directory not found: $KDIR"
exit 1
fi

if [ ! -f "$KDIR/Makefile" ]; then
echo "Error: $KDIR does not look like a kernel source tree (no Makefile)"
exit 1
fi

echo "Building hvisor-tool for loongarch64"
echo " KDIR = $KDIR"

make -C "$SCRIPT_DIR" \
ARCH=loongarch \
KDIR="$KDIR" \
CROSS_COMPILE=loongarch64-linux-gnu- \
LOG=LOG_INFO \
"$@"
2 changes: 1 addition & 1 deletion driver/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ifndef CROSS_COMPILE
else ifeq ($(ARCH), riscv)
CROSS_COMPILE := riscv64-unknown-linux-gnu-
else ifeq ($(ARCH), loongarch)
CROSS_COMPILE := loongarch64-unknown-linux-gnu-
CROSS_COMPILE := loongarch64-linux-gnu-
else ifeq ($(ARCH), x86_64)
CROSS_COMPILE := x86_64-linux-gnu-
endif
Expand Down
Loading
Loading