diff --git a/.gitmodules b/.gitmodules index c1aa3f9..73a180d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "lasoft/la32r-nemu"] path = lasoft/la32r-nemu url = https://gitee.com/wwt_panache/la32r-nemu +[submodule "lasoft/la32r-Linux"] + path = lasoft/la32r-Linux + url = https://gitee.com/loongson-edu/la32r-Linux diff --git a/Makefile b/Makefile index 8ab6ab8..d8d11f3 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,10 @@ LA_GDB_URL := https://gitee.com/loongson-edu/la32r-toolchains/releases/download TOOLCHAIN_TAR := $(notdir $(TOOLCHAIN_URL)) LA_GDB_TAR := $(notdir $(LA_GDB_URL)) -ext/$(TOOLCHAIN_TAR): +$(TOOLCHAIN_TAR): wget $(TOOLCHAIN_URL) + +ext/$(TOOLCHAIN_TAR): tar -zxvf $(notdir $@) mv loongarch32r-linux-gnusf-* ext @@ -22,6 +24,34 @@ lagcc: ext/$(TOOLCHAIN_TAR) LA_ARCH := loongarch32r-linux-gnusf- +# prepare busybox + +BUSYBOX_URL := https://gitee.com/loongson-edu/la32r-Linux/releases/download/v0.2/initrd_d.tar.gz +BUSYBOX_TAR := $(notdir $(BUSYBOX_URL)) + +$(BUSYBOX_TAR): + wget $(BUSYBOX_URL) + +ext/$(BUSYBOX_TAR): $(BUSYBOX_TAR) + tar -xvf $(notdir $@) + mv initrd_d* ext + +busybox: ext/$(BUSYBOX_TAR) + +# prepare loongarch linux source code + +LALX_URL := https://gitee.com/loongson-edu/la32r-Linux +LALX_TAR := $(notdir $(LALX_URL)) + +$(LALX_TAR): + wget $(LALX_URL) + +ext/$(LALX_TAR): $(LALX_TAR) + tar -xvf $(notdir $@) + mv v0.2* ext + +lalx: ext/$(LALX_TAR) + # prepare loongarch source code xv6: lagcc diff --git a/lasoft/la32r-Linux b/lasoft/la32r-Linux new file mode 160000 index 0000000..bb6b2ca --- /dev/null +++ b/lasoft/la32r-Linux @@ -0,0 +1 @@ +Subproject commit bb6b2ca56ade552181363f5b8be3c42397a223c0