From 32e948a5931f56c1816bea9fb47f1242d68207bb Mon Sep 17 00:00:00 2001 From: bLueriVerLHR Date: Thu, 20 Jul 2023 17:47:07 +0800 Subject: [PATCH] [Add] import xv6-riscv and submodules --- .gitmodules | 9 +++++++++ Makefile | 26 ++++++++++++++++++++++++++ lasoft/la32r-nemu | 1 + loongarch64-linux-gnu | 1 + nscscc-team-la32r | 1 + 5 files changed, 38 insertions(+) create mode 100644 .gitmodules create mode 100644 Makefile create mode 160000 lasoft/la32r-nemu create mode 160000 loongarch64-linux-gnu create mode 160000 nscscc-team-la32r diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..f0ca3ed --- /dev/null +++ b/.gitmodules @@ -0,0 +1,9 @@ +[submodule "loongarch64-linux-gnu"] + path = loongarch64-linux-gnu + url = https://gitee.com/loongarch_community/loongarch64-linux-gnu +[submodule "nscscc-team-la32r"] + path = nscscc-team-la32r + url = https://gitee.com/loongson-edu/nscscc-team-la32r +[submodule "lasoft/la32r-nemu"] + path = lasoft/la32r-nemu + url = https://gitee.com/wwt_panache/la32r-nemu diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6b7ca56 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +# prepare loongarch toolchain + +TOOLCHAIN_PK := loongarch64-linux-gnu/toolchain-loongarch64-linux-gnu-gcc8-host-x86_64-2022-07-18.tar.xz + +LA_PATH := ext/toolchain-loongarch64-linux-gnu-gcc8-host-x86_64-2022-07-18/bin +LA_ARCH := loongarch64-linux-gnu- +LA := $(LA_PATH)/$(LA_ARCH) + +GCC := $(LA)gcc +OD := $(LA)objdump +OC := $(LA)objcopy +RE := $(LA)readelf + +LA_TOOLS := $(GCC) $(OD) $(OC) $(RE) + +$(TOOLCHAIN_PK): + git submodule update --init + +unpk-gcc: $(TOOLCHAIN_PK) + mkdir -p ext + tar -xvf $(TOOLCHAIN_PK) -C ext + +$(LA_TOOLS): unpk-gcc + +# prepare loongarch source code + diff --git a/lasoft/la32r-nemu b/lasoft/la32r-nemu new file mode 160000 index 0000000..993f212 --- /dev/null +++ b/lasoft/la32r-nemu @@ -0,0 +1 @@ +Subproject commit 993f212e0fda029c9b587fac47b5626cfe5cd9e4 diff --git a/loongarch64-linux-gnu b/loongarch64-linux-gnu new file mode 160000 index 0000000..f535a6f --- /dev/null +++ b/loongarch64-linux-gnu @@ -0,0 +1 @@ +Subproject commit f535a6f47e8837dc3a5fea74a1d49a9aa1bad393 diff --git a/nscscc-team-la32r b/nscscc-team-la32r new file mode 160000 index 0000000..0ef5a87 --- /dev/null +++ b/nscscc-team-la32r @@ -0,0 +1 @@ +Subproject commit 0ef5a87bed530b261aa8b362ba1201753dd252b4