diff --git a/dist/Makefile b/dist/Makefile index 73e38377febd099fa4118e6b6eec189f08982de4..5d0191b4069bc506d3c67f64cd5b41d9b985248e 100644 --- a/dist/Makefile +++ b/dist/Makefile @@ -29,7 +29,7 @@ NATIVE_ARCH := $(shell uname -m | sed -e 's/amd64/x86_64/;s/arm64/aarch64/;s/*86 # When building binary package, which arch to build against ARCH := $(NATIVE_ARCH) # ARCH to be covered by spec file -SPEC_ARCH := x86_64 aarch64 riscv64 +SPEC_ARCH := x86_64 aarch64 riscv64 loongarch64 # Which kernel config to use, this build system supports multiple config targets, # Get the available config by scripts/ls-config.sh CONFIG := $(shell $(DISTDIR)/scripts/ls-config-targets.sh | tail -n 1) @@ -55,7 +55,7 @@ DISTFILES = $(DISTDIR) $(DISTTEMPLATES) $(DISTCONFIGS) $(DISTSCRIPTS) $(DISTSOUR BUILD_ARCH := $(ARCH) override BUILD_ARCH := $(shell echo $(BUILD_ARCH) | sed -e 's/amd64/x86_64/;s/arm64/aarch64/;s/*86$$/x86/') # ARCH is for Kbuild -override ARCH := $(shell echo $(BUILD_ARCH) | sed -e 's/amd64/x86_64/;s/aarch64/arm64/;s/*86$$/x86/') +override ARCH := $(shell echo $(BUILD_ARCH) | sed -e 's/amd64/x86_64/;s/aarch64/arm64/;s/*86$$/x86/;s/loongarch64/loongarch/') ### Check if TAG is valid TAG := HEAD diff --git a/dist/configs/00base/generic/loongarch64.config b/dist/configs/00base/generic/loongarch64.config new file mode 120000 index 0000000000000000000000000000000000000000..181eb4144faae86b692e0d83eab138f08a03c62a --- /dev/null +++ b/dist/configs/00base/generic/loongarch64.config @@ -0,0 +1 @@ +../../../../arch/loongarch/configs/loongson3_defconfig \ No newline at end of file diff --git a/dist/templates/kernel.template.spec b/dist/templates/kernel.template.spec index abc57e081c5ad071655592a644a9a50061fd5467..0f3d3589eb50077e4c6c6891aedeb51e42e73342 100644 --- a/dist/templates/kernel.template.spec +++ b/dist/templates/kernel.template.spec @@ -798,7 +798,8 @@ InstKernelBasic() { %ifarch loongarch64 INSTALL_DTB_ARCH_PATH= - install -m 644 $_KernBuild/vmlinuz vmlinuz + strip -s $_KernBuild/vmlinux -o $_KernBuild/vmlinux.elf + install -m 644 $_KernBuild/vmlinux.elf vmlinuz %endif # Install Arch DTB if exists @@ -913,13 +914,6 @@ InstKernelDevel() { cp -a $_KernSrc/arch/$Arch/include arch/$Arch/ cp -a $_KernBuild/arch/$Arch/include arch/$Arch/ -%ifarch loongarch64 - if [ -f $_KernSrc/arch/$Arch/la64/Platform ]; then - mkdir -p arch/$Arch/la64 - cp -a $_KernSrc/arch/$Arch/la64/Platform arch/$Arch/la64 - fi -%endif - if [ -d $_KernBuild/arch/$Arch/scripts ]; then cp -a $_KernBuild/arch/$Arch/scripts arch/$Arch/ || : fi