summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorlinxin <[email protected]>2024-10-29 11:50:56 +0800
committerlinxin <[email protected]>2024-10-29 11:50:56 +0800
commit43c1fda6d1c3ce979cb55696205aedf1fada6cd2 (patch)
treefc358db15096866fa8568ecfd9b6071749cf2606 /make
parent35b7cbdbc415597f108a680deaf88c8dfe0ea8c9 (diff)
🐎 ci: test aarch64 build host image
Diffstat (limited to 'make')
-rw-r--r--make/Makefile.aarch64_COTS49
1 files changed, 49 insertions, 0 deletions
diff --git a/make/Makefile.aarch64_COTS b/make/Makefile.aarch64_COTS
new file mode 100644
index 00000000..660fc8ed
--- /dev/null
+++ b/make/Makefile.aarch64_COTS
@@ -0,0 +1,49 @@
+PROFILE_ID := aarch64_COTS
+SUPPORTED_MACHINE_ID := aarch64_COTS
+KERNEL_ARGS := crashkernel=512M default_hugepagesz=1G intel_iommu=on iommu=pt mitigations=off psi=1 selinux=0 coredump_filter=0x3f quiet splash transparent_hugepage=never processor.max_cstate=0 intel_idle.max_cstate=0 intel_pstate=disable
+KERNEL_ARGS_9000_NPB := console=ttyS0,115200n8 pci=realloc,assign-busses
+GRUB_SERIAL_COMMAND :=
+SIZE_PART_SYSROOT := 16384M
+SIZE_PART_UPDATE := 16384M
+
+PROFILE_ID_IN_SHORT := $(subst -,$e,$(PROFILE_ID))
+CHROOT_PKG := tsg-os-${OS_RELEASE_VER}-${PROFILE_ID_IN_SHORT}-chroot.tar.bz2
+CHROOT_BIN := tsg-os-${OS_RELEASE_VER}-${PROFILE_ID_IN_SHORT}-ONIE.bin
+APP_BUNDLE_BIN := tsg-os-${OS_RELEASE_VER}-${PROFILE_ID_IN_SHORT}-APP-BUNDLE.bin
+
+TARGET_BUILD_DIR := $(BUILDDIR_BASE)/$(PROFILE_ID)
+TARGET_INSTALLER_DIR := $(TARGET_BUILD_DIR)/installer
+TARGET_SYSROOT_DIR := $(TARGET_BUILD_DIR)/sysroot
+
+.PHONY: all builddir installer sysroot-base
+
+all: sysroot-binary
+
+builddir:
+ mkdir -p $(TARGET_BUILD_DIR)
+
+installer: builddir
+ rm -rf $(TARGET_INSTALLER_DIR)
+ mkdir -p $(TARGET_INSTALLER_DIR)
+ cp $(INSTALLERDIR)/install.sh $(TARGET_INSTALLER_DIR)/install.sh
+ cp $(INSTALLERDIR)/distro-setup.sh $(TARGET_INSTALLER_DIR)/distro-setup.sh
+ chmod +x $(TARGET_INSTALLER_DIR)/install.sh
+ chmod +x $(TARGET_INSTALLER_DIR)/distro-setup.sh
+
+ sed -i -e "s/%%DISTR0_VER%%/$(OS_RELEASE_VER)/" $(TARGET_INSTALLER_DIR)/install.sh
+ sed -i -e "s/%%MACHINE_ID%%/$(SUPPORTED_MACHINE_ID)/" $(TARGET_INSTALLER_DIR)/install.sh
+ sed -i -e "s/%%CHROOT_PKG%%/$(CHROOT_PKG)/" $(TARGET_INSTALLER_DIR)/install.sh
+ sed -i -e "s/%%KERNAL_ARGS%%/$(KERNEL_ARGS)/" $(TARGET_INSTALLER_DIR)/install.sh
+ sed -i -e "s/%%KERNEL_ARGS_9000_NPB%%/$(KERNEL_ARGS_9000_NPB)/" $(TARGET_INSTALLER_DIR)/install.sh
+ sed -i -e "s/%%GRUB_SERIAL_COMMAND%%/$(GRUB_SERIAL_COMMAND)/" $(TARGET_INSTALLER_DIR)/install.sh
+ sed -i -e "s/%%SIZE_PART_SYSROOT%%/$(SIZE_PART_SYSROOT)/" $(TARGET_INSTALLER_DIR)/install.sh
+ sed -i -e "s/%%SIZE_PART_UPDATE%%/$(SIZE_PART_UPDATE)/" $(TARGET_INSTALLER_DIR)/install.sh
+ sed -i -e "s/%%APP_BUNDLE_BIN%%/$(APP_BUNDLE_BIN)/" $(TARGET_INSTALLER_DIR)/install.sh
+
+ifeq ($(ENABLE_ALIYUN_INTERNAL_DOMAIN),1)
+ sed -i -e "s/mirrors.aliyun.com/mirrors.cloud.aliyuncs.com/" $(CONFDIR)/yum-RockyLinux-8.conf
+ sed -i -e "s/mirrors.aliyun.com/mirrors.cloud.aliyuncs.com/" $(CONFDIR)/yum-RockyLinux-9.conf
+endif
+
+sysroot-base: builddir
+ $(TOOLSDIR)/mk-base-image $(CONFDIR)/yum-RockyLinux-9.conf $(TARGET_SYSROOT_DIR) $(PROJECTDIR) $(PROFILE_ID) \ No newline at end of file