Loongarch64: initial change for tool chain build

1. add loongarch64 in make.sh

2. updated many source tar balls with config.guss
   and config.sub with loongarch64 support

3. remove rust and surricata for now

4. workaround binary env dynamic linker missing
   by symbolic link tools_loongarch64/lib to lib64
   when ./make.sh build

   cd build_loongarch64; ln -s tools_loongarch64/lib lib64

./make.sh toolchain to build tool chain
./make clean to start fresh
./make.sh gettoolchain to extract tool chaina from cache
./make.sh build to build software and image

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
Vincent Li
2024-12-15 09:09:28 -08:00
parent 0d774f0db5
commit 8a0ca16bae
87 changed files with 243 additions and 212 deletions

View File

@@ -35,6 +35,12 @@ HEADERS_ARCH = $(BUILD_PLATFORM)
KERNEL_ARCH = $(BUILD_ARCH)
KERNEL_TARGET = bzImage
ifeq "$(BUILD_ARCH)" "loongarch64"
HEADERS_ARCH = loongarch
KERNEL_ARCH = loongarch
KERNEL_TARGET = vmlinuz
endif
ifeq "$(BUILD_ARCH)" "aarch64"
HEADERS_ARCH = arm64
KERNEL_ARCH = arm64
@@ -165,7 +171,13 @@ else
rm -rf /lib/modules/$(KVER)
# Build the kernel
cd $(DIR_APP) && make $(MAKETUNING) $(KERNEL_TARGET) modules
# Loongarch64 make requires no argument to build vmlinuz and EFI under arch/loongarch/boot
ifeq "$(BUILD_ARCH)" "loongarch64"
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make $(MAKETUNING) modules
else
cd $(DIR_APP) && make V=1 $(MAKETUNING) $(KERNEL_TARGET) modules
endif
# Install the kernel
cd $(DIR_APP) && cp -v arch/$(KERNEL_ARCH)/boot/$(KERNEL_TARGET) /boot/vmlinuz-$(KVER)