summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlinxin <[email protected]>2024-10-29 14:54:06 +0800
committerlinxin <[email protected]>2024-11-07 18:38:33 +0800
commite6d1af2a7a93b8ebddf824a403b3d2c5ef80791a (patch)
treee4b56e015600bf7f47d97b95a548351186b43fca
parent3c3a74aaeda13a802f8b74b30ef0857bf31ceb9f (diff)
🐎 ci:base os adapted AArch64 arch
-rw-r--r--.gitlab-ci.yml4
-rw-r--r--Makefile2
-rw-r--r--ansible/HAL_deploy.yml17
-rw-r--r--ansible/install_config/group_vars/rpm_version.yml10
-rw-r--r--ansible/roles/clixon/tasks/main.yml3
-rw-r--r--ansible/roles/k3s-exporter/tasks/main.yml8
-rw-r--r--ansible/roles/k3s-install/files/cni-plugins-linux-arm64.tgzbin0 -> 44028108 bytes
-rw-r--r--ansible/roles/k3s-install/tasks/main.yml47
-rw-r--r--ansible/roles/qemu-user-static/files/qemu-x86_64-staticbin0 -> 5549312 bytes
-rw-r--r--ansible/roles/qemu-user-static/files/qemu-x86_64.conf1
-rw-r--r--ansible/roles/qemu-user-static/tasks/main.yml13
-rw-r--r--ansible/roles/sosreport/tasks/main.yml8
-rw-r--r--ansible/roles/system-init/tasks/main.yml48
-rw-r--r--ansible/roles/tsg-diagnose/tasks/main.yml6
-rw-r--r--ansible/roles/tsg-os-logo/tasks/main.yml38
-rw-r--r--conf/yum-RockyLinux-9.conf42
-rwxr-xr-xinstaller/install.sh14
-rw-r--r--make/Makefile.aarch64_COTS40
-rwxr-xr-xtools/mk-base-image21
19 files changed, 235 insertions, 87 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d29fc2f8..b3f110d5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,7 @@
#image: "git.mesalab.cn:7443/mesa_platform/build-env:master"
variables:
GIT_STRATEGY: "clone"
- JOB_DOCKER_IMAGE_AARCH64: "rockylinux:8.9"
+ JOB_DOCKER_IMAGE_AARCH64: "git.mesalab.cn:7443/mesa_platform/build-env:rocky9-aarch64"
GIT_DEPTH: 1
stages:
@@ -16,7 +16,7 @@ stages:
- ./tools/upload.sh
tags:
- tsg-os-builder-aarch64
- resource_group: global
+ resource_group: aarch64
develop_build_x86_64_COTS:
image: $JOB_DOCKER_IMAGE_AARCH64
diff --git a/Makefile b/Makefile
index cd1be79b..011a5527 100644
--- a/Makefile
+++ b/Makefile
@@ -114,6 +114,8 @@ all: $(PROFILE_LIST)
$(Q) chmod 0755 $(TOOLSDIR)/*
$(Q) sed -i -e 's/PULP_REPO_USERNAME/$(PULP_REPO_USERNAME)/g' $(CONFDIR)/yum-RockyLinux-8.conf
$(Q) sed -i -e 's/PULP_REPO_PASSWORD/$(PULP_REPO_PASSWORD)/g' $(CONFDIR)/yum-RockyLinux-8.conf
+ $(Q) sed -i -e 's/PULP_REPO_USERNAME/$(PULP_REPO_USERNAME)/g' $(CONFDIR)/yum-RockyLinux-9.conf
+ $(Q) sed -i -e 's/PULP_REPO_PASSWORD/$(PULP_REPO_PASSWORD)/g' $(CONFDIR)/yum-RockyLinux-9.conf
$(Q) echo "=== Building $< $(OS_RELEASE_VER) ==="
$(Q) echo "=== Building chart version $< $(HELM_CHART_VER) ==="
$(Q) $(MAKE) -f make/Makefile.$< all
diff --git a/ansible/HAL_deploy.yml b/ansible/HAL_deploy.yml
index 88c1f8d8..b6f249f1 100644
--- a/ansible/HAL_deploy.yml
+++ b/ansible/HAL_deploy.yml
@@ -1,4 +1,4 @@
-- hosts: x86_64_COTS
+- hosts: aarch64_COTS
remote_user: root
vars_files:
- install_config/group_vars/HAL_x86_64_COTS.yml
@@ -8,22 +8,19 @@
- {role: coredump-tools, tags: coredump-tools}
- {role: clixon, tags: clixon}
- {role: tsg-os-HAL, tags: tsg-os-HAL}
- - {role: traffic-engine, tags: traffic-engine}
- - {role: k8s-dashboard, tags: k8s-dashboard}
- - {role: k3s-exporter, tags: k3s-exporter}
- - {role: tsg-diagnose, tags: tsg-diagnose}
- {role: sysctl, tags: sysctl}
- {role: system-init-P0906, tags: system-init-P0906}
+ - {role: sysctl, tags: sysctl}
- {role: system-init, tags: system-init}
- - {role: consul, tags: consul}
- - {role: hasp, tags: hasp}
- - {role: OFED, tags: OFED}
- {role: sosreport, tags: sosreport}
- {role: nm-config, tags: nm-config}
- {role: tsg-os-logo, tags: tsg-os-logo}
- - {role: cm-cache, tags: cm-cache}
+ # - {role: tsg-diagnose, tags: tsg-diagnose}
+ - {role: k8s-dashboard, tags: k8s-dashboard}
+ - {role: k3s-exporter, tags: k3s-exporter}
+ - {role: consul, tags: consul}
- {role: exporter, tags: exporter}
- {role: tuned, tags: tuned}
- - {role: patches-9000-NPB, tags: patches-9000-NPB}
- {role: tsg-os-oobc, tags: tsg-os-oobc}
- {role: tsg-os-logfile-cleaner, tags: tsg-os-logfile-cleaner}
+ - {role: qemu-user-static, tags: qemu-user-static} \ No newline at end of file
diff --git a/ansible/install_config/group_vars/rpm_version.yml b/ansible/install_config/group_vars/rpm_version.yml
index bcdecce3..af5264bd 100644
--- a/ansible/install_config/group_vars/rpm_version.yml
+++ b/ansible/install_config/group_vars/rpm_version.yml
@@ -1,13 +1,13 @@
tsg_diagnose_rpm_version:
- tsg_diagnose: tsg-diagnose-2.0.10.4d80fdf
+ tsg_diagnose: tsg-diagnose-2.0.11.cce5969
hasp_tools_rpm_version:
hasp_tools: hasp-tools-1.0.12.66db85d
tsg_os_clixon_rpm_version:
- cligen: cligen-5.8.0-release
- clixon: clixon-5.8.4-6462458
- tsg-os-mgnt-srv: tsg-os-mgnt-srv-1.2.45.57c3ba0
+ cligen: cligen-5.8.3-76634d0
+ clixon: clixon-5.8.7-70e2c25
+ tsg-os-mgnt-srv: tsg-os-mgnt-srv-1.2.49.d06e237
coredump_tools_rpm_version:
- coredump_tools: coredump-tools-1.1.0-3d3ba73
+ coredump_tools: coredump-tools-1.1.2-70125ea
diff --git a/ansible/roles/clixon/tasks/main.yml b/ansible/roles/clixon/tasks/main.yml
index e4235eb3..f6927bd4 100644
--- a/ansible/roles/clixon/tasks/main.yml
+++ b/ansible/roles/clixon/tasks/main.yml
@@ -7,6 +7,9 @@
- name: "clixon: set symlink"
shell: ln -vfs /lib64/libyaml-0.so.2.0.5 /usr/lib64/libyaml.so
+- name: "clixon: install pip3"
+ shell: yum install -y python3-pip
+
- name: "clixon: install jinja-cli"
shell: pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple jinja-cli
diff --git a/ansible/roles/k3s-exporter/tasks/main.yml b/ansible/roles/k3s-exporter/tasks/main.yml
index e943d457..4503ea12 100644
--- a/ansible/roles/k3s-exporter/tasks/main.yml
+++ b/ansible/roles/k3s-exporter/tasks/main.yml
@@ -45,8 +45,8 @@
src: "{{ role_path }}/files/mrzcpd/helm"
dest: /tmp/exporter-mrzcpd/
-- name: "create charts packages"
- shell: helm package --app-version 1.0.1 --version 1.0.1 -d /var/lib/rancher/k3s/server/static/charts/ /tmp/exporter-mrzcpd/helm
+# - name: "create charts packages"
+# shell: helm package --app-version 1.0.1 --version 1.0.1 -d /var/lib/rancher/k3s/server/static/charts/ /tmp/exporter-mrzcpd/helm
# The image build by the the follow command
# Command 1: docker pull rockylinux:8
@@ -81,8 +81,8 @@
src: "{{ role_path }}/files/systemd/helm"
dest: /tmp/systemd-exporter/
-- name: "create charts packages"
- shell: helm package --app-version 1.0.1 --version 1.0.1 -d /var/lib/rancher/k3s/server/static/charts/ /tmp/systemd-exporter/helm
+# - name: "create charts packages"
+# shell: helm package --app-version 1.0.1 --version 1.0.1 -d /var/lib/rancher/k3s/server/static/charts/ /tmp/systemd-exporter/helm
- name: "copy systemd-exporter-crd.yaml to dest"
copy:
diff --git a/ansible/roles/k3s-install/files/cni-plugins-linux-arm64.tgz b/ansible/roles/k3s-install/files/cni-plugins-linux-arm64.tgz
new file mode 100644
index 00000000..51bc3a4b
--- /dev/null
+++ b/ansible/roles/k3s-install/files/cni-plugins-linux-arm64.tgz
Binary files differ
diff --git a/ansible/roles/k3s-install/tasks/main.yml b/ansible/roles/k3s-install/tasks/main.yml
index 7aefdb70..a36c91d5 100644
--- a/ansible/roles/k3s-install/tasks/main.yml
+++ b/ansible/roles/k3s-install/tasks/main.yml
@@ -4,9 +4,17 @@
#- name: "execute k3s install"
# shell: curl -sfL https://rancher-mirror.rancher.cn/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn INSTALL_K3S_SKIP_ENABLE=true sh -
-- name: "get k3s to dest"
+# - name: "get k3s to dest"
+# get_url:
+# url: https://repo.geedge.net/filerepo/install/release/os-build-files/k3s/v1.29.2/k3s
+# dest: /usr/bin/k3s
+# url_username: "{{ lookup('env', 'PULP_REPO_USERNAME') }}"
+# url_password: "{{ lookup('env', 'PULP_REPO_PASSWORD') }}"
+# mode: 0755
+
+- name: "get k3s-aarch64 to dest"
get_url:
- url: https://repo.geedge.net/filerepo/install/release/os-build-files/k3s/v1.29.2/k3s
+ url: https://repo.geedge.net/filerepo/install/release/os-build-files/k3s/v1.29.2/k3s-arm64
dest: /usr/bin/k3s
url_username: "{{ lookup('env', 'PULP_REPO_USERNAME') }}"
url_password: "{{ lookup('env', 'PULP_REPO_PASSWORD') }}"
@@ -24,10 +32,17 @@
# src: "{{ role_path }}/files/k3s-airgap-images-amd64.tar"
# dest: /var/lib/rancher/k3s/agent/images/
-- name: "get k3s-airgap-images-amd64.tar to dest"
+# - name: "get k3s-airgap-images-amd64.tar to dest"
+# get_url:
+# url: https://repo.geedge.net/filerepo/install/release/os-build-files/k3s/v1.29.2/k3s-airgap-images-amd64.tar
+# dest: /var/lib/rancher/k3s/agent/images/k3s-airgap-images-amd64.tar
+# url_username: "{{ lookup('env', 'PULP_REPO_USERNAME') }}"
+# url_password: "{{ lookup('env', 'PULP_REPO_PASSWORD') }}"
+
+- name: "get k3s-airgap-images-arm64.tar to dest"
get_url:
- url: https://repo.geedge.net/filerepo/install/release/os-build-files/k3s/v1.29.2/k3s-airgap-images-amd64.tar
- dest: /var/lib/rancher/k3s/agent/images/k3s-airgap-images-amd64.tar
+ url: https://repo.geedge.net/filerepo/install/release/os-build-files/k3s/v1.29.2/k3s-airgap-images-arm64.tar
+ dest: /var/lib/rancher/k3s/agent/images/k3s-airgap-images-arm64.tar
url_username: "{{ lookup('env', 'PULP_REPO_USERNAME') }}"
url_password: "{{ lookup('env', 'PULP_REPO_PASSWORD') }}"
@@ -67,9 +82,14 @@
path: "/opt/cni/bin"
state: directory
-- name: "unarchive cni plugin tar package"
+# - name: "unarchive cni plugin tar package"
+# unarchive:
+# src: "{{ role_path }}/files/cni-plugins-linux-amd64.tgz"
+# dest: /opt/cni/bin/
+
+- name: "unarchive aarch64 cni plugin tar package"
unarchive:
- src: "{{ role_path }}/files/cni-plugins-linux-amd64.tgz"
+ src: "{{ role_path }}/files/cni-plugins-linux-arm64.tgz"
dest: /opt/cni/bin/
- name: "copy 10-bridge.conf to destination"
@@ -135,10 +155,17 @@
dest: /usr/bin/
mode: 0755
-- name: "download helm-controller images tar"
+# - name: "download helm-controller images tar"
+# get_url:
+# url: https://repo.geedge.net/filerepo/install/release/os-build-files/k3s/v1.29.2/k3s-helm-controller-amd64.tar
+# dest: /var/lib/rancher/k3s/agent/images/k3s-helm-controller-amd64.tar
+# url_username: "{{ lookup('env', 'PULP_REPO_USERNAME') }}"
+# url_password: "{{ lookup('env', 'PULP_REPO_PASSWORD') }}"
+
+- name: "download helm-controller aarch64 images tar"
get_url:
- url: https://repo.geedge.net/filerepo/install/release/os-build-files/k3s/v1.29.2/k3s-helm-controller-amd64.tar
- dest: /var/lib/rancher/k3s/agent/images/k3s-helm-controller-amd64.tar
+ url: https://repo.geedge.net/filerepo/install/release/os-build-files/k3s/v1.29.2/k3s-helm-controller-arm64.tar
+ dest: /var/lib/rancher/k3s/agent/images/k3s-helm-controller-arm64.tar
url_username: "{{ lookup('env', 'PULP_REPO_USERNAME') }}"
url_password: "{{ lookup('env', 'PULP_REPO_PASSWORD') }}"
diff --git a/ansible/roles/qemu-user-static/files/qemu-x86_64-static b/ansible/roles/qemu-user-static/files/qemu-x86_64-static
new file mode 100644
index 00000000..086ab64d
--- /dev/null
+++ b/ansible/roles/qemu-user-static/files/qemu-x86_64-static
Binary files differ
diff --git a/ansible/roles/qemu-user-static/files/qemu-x86_64.conf b/ansible/roles/qemu-user-static/files/qemu-x86_64.conf
new file mode 100644
index 00000000..3bc7ccbd
--- /dev/null
+++ b/ansible/roles/qemu-user-static/files/qemu-x86_64.conf
@@ -0,0 +1 @@
+:qemu-x86_64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00:\xff\xff\xff\xff\xff\xfe\xfe\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-x86_64-static:POCF
diff --git a/ansible/roles/qemu-user-static/tasks/main.yml b/ansible/roles/qemu-user-static/tasks/main.yml
new file mode 100644
index 00000000..1296c073
--- /dev/null
+++ b/ansible/roles/qemu-user-static/tasks/main.yml
@@ -0,0 +1,13 @@
+- name: "copy qemu-x86_64 file to /usr/bin"
+ copy:
+ src: "{{ role_path }}/files/qemu-x86_64-static"
+ dest: /usr/bin/
+ mode: 0755
+
+- name: "copy qemu-x86_64 conf file to /usr/lib/binfmt.d/"
+ copy:
+ src: "{{ role_path }}/files/qemu-x86_64.conf"
+ dest: /usr/lib/binfmt.d/
+
+# - name: "binfmt enable qemu-x86_64"
+# shell: echo ':qemu-x86_64:M:0:\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00:\xff\xff\xff\xff\xff\xfe\xfe\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-x86_64-static:POCF' > /proc/sys/fs/binfmt_misc/register
diff --git a/ansible/roles/sosreport/tasks/main.yml b/ansible/roles/sosreport/tasks/main.yml
index 25e39174..002a1bdd 100644
--- a/ansible/roles/sosreport/tasks/main.yml
+++ b/ansible/roles/sosreport/tasks/main.yml
@@ -1,19 +1,19 @@
- name: "copy sosreport Auditd_info script file to dest"
copy:
src: '{{ role_path }}/files/aureport.py'
- dest: /usr/lib/python3.6/site-packages/sos/report/plugins/aureport.py
+ dest: /usr/lib/python3.9/site-packages/sos/report/plugins/aureport.py
- name: "copy sosreport clixon script file to dest"
copy:
src: '{{ role_path }}/files/clixon.py'
- dest: /usr/lib/python3.6/site-packages/sos/report/plugins/clixon.py
+ dest: /usr/lib/python3.9/site-packages/sos/report/plugins/clixon.py
- name: "copy sosreport k3s script file to dest"
copy:
src: '{{ role_path }}/files/k3s.py'
- dest: /usr/lib/python3.6/site-packages/sos/report/plugins/k3s.py
+ dest: /usr/lib/python3.9/site-packages/sos/report/plugins/k3s.py
- name: "copy sosreport mrzcpd script file to dest"
copy:
src: '{{ role_path }}/files/mrzcpd.py'
- dest: /usr/lib/python3.6/site-packages/sos/report/plugins/mrzcpd.py \ No newline at end of file
+ dest: /usr/lib/python3.9/site-packages/sos/report/plugins/mrzcpd.py \ No newline at end of file
diff --git a/ansible/roles/system-init/tasks/main.yml b/ansible/roles/system-init/tasks/main.yml
index 7f491a2d..49943696 100644
--- a/ansible/roles/system-init/tasks/main.yml
+++ b/ansible/roles/system-init/tasks/main.yml
@@ -15,10 +15,10 @@
dest: /usr/lib/tmpfiles.d/chrony.conf
tags: template
-- name: "disable ntpd"
- systemd:
- name: ntpd
- enabled: no
+# - name: "disable ntpd"
+# systemd:
+# name: ntpd
+# enabled: no
#Service Optimization
- name: "enable snmpd"
@@ -31,25 +31,25 @@
name: snmptrapd
enabled: yes
-- name: "disenable abrt-ccpp"
- systemd:
- name: abrt-ccpp
- enabled: no
+# - name: "disenable abrt-ccpp"
+# systemd:
+# name: abrt-ccpp
+# enabled: no
-- name: "disenable abrt-oops"
- systemd:
- name: abrt-oops
- enabled: no
+# - name: "disenable abrt-oops"
+# systemd:
+# name: abrt-oops
+# enabled: no
-- name: "disenable abrtd"
- systemd:
- name: abrtd
- enabled: no
+# - name: "disenable abrtd"
+# systemd:
+# name: abrtd
+# enabled: no
-- name: "disenable dmraid-activation"
- systemd:
- name: dmraid-activation
- enabled: no
+# - name: "disenable dmraid-activation"
+# systemd:
+# name: dmraid-activation
+# enabled: no
- name: "disenable postfix"
systemd:
@@ -99,9 +99,9 @@
regexp: '^(F! /run/nologin 0644*)'
replace: '#\1'
-- name: "Install python module"
- shell: pip2 install -i https://pypi.tuna.tsinghua.edu.cn/simple PrettyTable==0.7.2
- when: runtime_env == 'TSG-X-P0906'
+# - name: "Install python module"
+# shell: pip2 install -i https://pypi.tuna.tsinghua.edu.cn/simple PrettyTable==0.7.2
+# when: runtime_env == 'TSG-X-P0906'
- name: "copy tsg-dign to dest"
copy:
@@ -133,7 +133,7 @@
when: runtime_env == 'TSG-X-P0906'
- name: "add dracut module to initramfs"
- shell: dracut --force -v /boot/initramfs-5.17.15-1.el8.x86_64.img 5.17.15-1.el8.x86_64
+ shell: KERNEL=$(rpm -q kernel --qf "%{VERSION}-%{RELEASE}.%{ARCH}") && dracut --force -v /boot/initramfs-$KERNEL.img $KERNEL
when: runtime_env == 'TSG-X-P0906'
- name: "install python3 toml"
diff --git a/ansible/roles/tsg-diagnose/tasks/main.yml b/ansible/roles/tsg-diagnose/tasks/main.yml
index f9e4c51b..3730c620 100644
--- a/ansible/roles/tsg-diagnose/tasks/main.yml
+++ b/ansible/roles/tsg-diagnose/tasks/main.yml
@@ -28,9 +28,9 @@
shell: cp /opt/tsg/tsg-diagnose/k8s-resource/* /var/lib/rancher/k3s/server/manifests/
when: runtime_env == 'TSG-X-P0906'
-- name: "Set service function config mount path."
- shell: sed -i 's/\/opt\/tsg\/tsg-diagnose\/share/\/opt\/tsg\/clixon\/share/g' /var/lib/rancher/k3s/server/manifests/tsg-diagnose-client.yaml
- when: runtime_env == 'TSG-X-P0906'
+# - name: "Set service function config mount path."
+# shell: sed -i 's/\/opt\/tsg\/tsg-diagnose\/share/\/opt\/tsg\/clixon\/share/g' /var/lib/rancher/k3s/server/manifests/tsg-diagnose-client.yaml
+# when: runtime_env == 'TSG-X-P0906'
- name: "copy iptables shell to dispatcher.d"
copy:
diff --git a/ansible/roles/tsg-os-logo/tasks/main.yml b/ansible/roles/tsg-os-logo/tasks/main.yml
index d92ca152..b71ae57d 100644
--- a/ansible/roles/tsg-os-logo/tasks/main.yml
+++ b/ansible/roles/tsg-os-logo/tasks/main.yml
@@ -4,18 +4,18 @@
src: "{{ role_path }}/files/"
dest: "/tmp/tsg-os-logo/"
-- name: "install the mock uname tools"
- copy:
- src: "{{ item.src }}"
- dest: "{{ item.dest }}"
- mode: "{{ item.mode }}"
- remote_src: yes
- with_items:
- - { src: "/usr/bin/uname" , dest: "/usr/bin/uname-backup" , mode: "0755" }
- - { src: "/tmp/mft/uname" , dest: "/usr/bin/uname" , mode: "0755" }
+# - name: "install the mock uname tools"
+# copy:
+# src: "{{ item.src }}"
+# dest: "{{ item.dest }}"
+# mode: "{{ item.mode }}"
+# remote_src: yes
+# with_items:
+# - { src: "/usr/bin/uname" , dest: "/usr/bin/uname-backup" , mode: "0755" }
+# - { src: "/tmp/mft/uname" , dest: "/usr/bin/uname" , mode: "0755" }
-- name: "change kernel version for uname"
- shell: sed -i -e 's/KERNEL_VERSION/5.17.15-1.el8/' /usr/bin/uname
+# - name: "change kernel version for uname"
+# shell: sed -i -e 's/KERNEL_VERSION/5.17.15-1.el8/' /usr/bin/uname
- name: "unarchive the tsg-os-plymouth-theme.tar.gz to /usr/share/plymouth/themes/"
unarchive:
@@ -32,12 +32,12 @@
name: plymouth-plugin-script
state: present
-- name: "set the theme as default"
- shell: "plymouth-set-default-theme -R fedora-plymouth"
+# - name: "set the theme as default"
+# shell: "plymouth-set-default-theme -R fedora-plymouth"
-- name: "uninstall the mocked uname tools"
- copy:
- src: "/usr/bin/uname-backup"
- dest: "/usr/bin/uname"
- mode: "0755"
- remote_src: yes \ No newline at end of file
+# - name: "uninstall the mocked uname tools"
+# copy:
+# src: "/usr/bin/uname-backup"
+# dest: "/usr/bin/uname"
+# mode: "0755"
+# remote_src: yes \ No newline at end of file
diff --git a/conf/yum-RockyLinux-9.conf b/conf/yum-RockyLinux-9.conf
index 0c6fcb49..811c2e61 100644
--- a/conf/yum-RockyLinux-9.conf
+++ b/conf/yum-RockyLinux-9.conf
@@ -43,4 +43,44 @@ gpgcheck=0
name=App Packages for Enterprise Linux 9 - $basearch
baseurl=http://mirrors.aliyun.com/rockylinux/9/AppStream/$basearch/os/
enabled=1
-gpgcheck=0 \ No newline at end of file
+gpgcheck=0
+
+[framework]
+name=framework
+baseurl=https://repo.geedge.net/pulp/content/9/$basearch/stable/framework/
+enabled=1
+gpgcheck=0
+username=PULP_REPO_USERNAME
+password=PULP_REPO_PASSWORD
+
+[platform]
+name=platform
+baseurl=https://repo.geedge.net/pulp/content/9/$basearch/stable/platform/
+enabled=1
+gpgcheck=0
+username=PULP_REPO_USERNAME
+password=PULP_REPO_PASSWORD
+
+[protocol]
+name=protocol
+baseurl=https://repo.geedge.net/pulp/content/9/$basearch/stable/protocol/
+enabled=1
+gpgcheck=0
+username=PULP_REPO_USERNAME
+password=PULP_REPO_PASSWORD
+
+[tsg]
+name=tsg
+baseurl=https://repo.geedge.net/pulp/content/9/$basearch/stable/tsg/
+enabled=1
+gpgcheck=0
+username=PULP_REPO_USERNAME
+password=PULP_REPO_PASSWORD
+
+[AppSktech]
+name=AppSketch
+baseurl=https://repo.geedge.net/pulp/content/9/$basearch/stable/AppSketch/
+enabled=1
+gpgcheck=0
+username=PULP_REPO_USERNAME
+password=PULP_REPO_PASSWORD \ No newline at end of file
diff --git a/installer/install.sh b/installer/install.sh
index 02c0e5c4..f01f00ef 100755
--- a/installer/install.sh
+++ b/installer/install.sh
@@ -211,6 +211,20 @@ install_uefi_grub()
echo "ERROR: efibootmgr failed to create new boot variable on: $blk_dev"
exit 1
}
+
+ # Delete onie UEFI bootnum if machine_id is aarch64_COTS
+ if [ ${MACHINE_ID} == "aarch64_COTS" ];then
+ boot_num=$(efibootmgr -v| grep "ONIE:" | grep "HD" | awk '{ print $1 }')
+ boot_num=${boot_num#Boot}
+ # Remove trailing '*'
+ boot_num=${boot_num%\*}
+ if [ -n "$boot_num" ] ; then
+ efibootmgr --quiet --bootnum $boot_num --delete-bootnum && return
+ echo "ERROR: Problems delete ONIE UEFI Bootnum variable"
+ else
+ echo "INFO: ONIE UEFI Bootnum is not exist"
+ fi
+ fi
}
diff --git a/make/Makefile.aarch64_COTS b/make/Makefile.aarch64_COTS
index 54933a1f..dc376021 100644
--- a/make/Makefile.aarch64_COTS
+++ b/make/Makefile.aarch64_COTS
@@ -15,9 +15,9 @@ 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 sysroot-binary
+.PHONY: all builddir installer sysroot-base sysroot-cleanup sysroot-archive sysroot-binary add-images-into-installer-dir add-patch-into-installer-dir clean
-all: sysroot-base sysroot-binary
+all: sysroot-binary
builddir:
mkdir -p $(TARGET_BUILD_DIR)
@@ -48,7 +48,39 @@ endif
sysroot-base: builddir
$(TOOLSDIR)/mk-base-image $(CONFDIR)/yum-RockyLinux-9.conf $(TARGET_SYSROOT_DIR) $(PROJECTDIR) $(PROFILE_ID)
-sysroot-binary:
+sysroot-verfile: sysroot-base
+ sed -i -e "s/^NAME=.*/NAME=\"TSG-OS\"/" $(TARGET_SYSROOT_DIR)/usr/lib/os-release
+ sed -i -e "s/^VERSION=.*/VERSION=\"$(OS_RELEASE_VER) ($(PROFILE_ID_IN_SHORT))\"/" $(TARGET_SYSROOT_DIR)/usr/lib/os-release
+ sed -i -e "s/^PRETTY_NAME=.*/PRETTY_NAME=\"TSG-OS $(OS_RELEASE_VER) ($(PROFILE_ID_IN_SHORT))\"/" $(TARGET_SYSROOT_DIR)/usr/lib/os-release
+
+sysroot-ansible: sysroot-verfile sysroot-base
+ cp $(CONFDIR)/yum-RockyLinux-9.conf $(TARGET_SYSROOT_DIR)/tmp/ -r
+ cp /etc/resolv.conf $(TARGET_SYSROOT_DIR)/etc/ -r
+ cp $(TARGET_SYSROOT_DIR)/etc/hosts $(TARGET_SYSROOT_DIR)/tmp/ -r
+ cp /etc/hosts $(TARGET_SYSROOT_DIR)/etc/ -r
+ $(TOOLSDIR)/ansible-HAL $(PROFILE_ID) $(PROJECTDIR) $(TARGET_SYSROOT_DIR) /tmp/yum-RockyLinux-9.conf $(OS_RELEASE_VER) $(HELM_CHART_VER)
+ cp $(TARGET_SYSROOT_DIR)/tmp/hosts $(TARGET_SYSROOT_DIR)/etc/ -r
+ rm -rf $(TARGET_SYSROOT_DIR)/etc/resolv.conf
+
+sysroot-cleanup:
+ rm -rf $(TARGET_SYSROOT_DIR)/tmp/*
+ rm -rf $(TARGET_SYSROOT_DIR)/dev/*
+
+add-patch-into-installer-dir:
+ echo "need copy patch file"
+
+add-images-into-installer-dir: builddir sysroot-verfile sysroot-ansible
+ echo "need copy APP_BUNDLE_BIN"
+ du -sh $(TARGET_SYSROOT_DIR)
+ df -h
+
+sysroot-archive: installer add-images-into-installer-dir add-patch-into-installer-dir sysroot-cleanup
+ tar --exclude=*~ --exclude-backups --owner=root --group=root -c -C $(TARGET_SYSROOT_DIR) . | pbzip2 -p9 > $(TARGET_INSTALLER_DIR)/$(CHROOT_PKG)
+
+sysroot-binary: sysroot-archive
mkdir -p $(TARGET_BUILD_DIR)/cook-bits
$(TOOLSDIR)/cook-bits $(TARGET_BUILD_DIR) $(TARGET_BUILD_DIR)/cook-bits $(IMAGEDIR_BASE)/$(CHROOT_BIN)
- sha256sum $(IMAGEDIR_BASE)/$(CHROOT_BIN) | awk '{print $$1}' > $(IMAGEDIR_BASE)/$(CHROOT_BIN).sha256sum.txt \ No newline at end of file
+ sha256sum $(IMAGEDIR_BASE)/$(CHROOT_BIN) | awk '{print $$1}' > $(IMAGEDIR_BASE)/$(CHROOT_BIN).sha256sum.txt
+
+clean:
+ rm -rf $(TARGET_BUILD_DIR) \ No newline at end of file
diff --git a/tools/mk-base-image b/tools/mk-base-image
index b13d7a5b..d0b8df8d 100755
--- a/tools/mk-base-image
+++ b/tools/mk-base-image
@@ -28,7 +28,7 @@ case $profile_id in
esac
case $profile_id in
- "x86_64_COTS" | "aarch64_COTS" )
+ "x86_64_COTS" )
base_package_to_install="@base @core @debugging @anaconda-tools @additional-devel @guest-agents @system-tools
@hardware-monitoring @network-file-system-client @performance @remote-system-management adcli certmonger
ipa-client clevis-dracut clevis-udisks2 krb5-pkinit krb5-workstation sssd-polkit-rules krb5-pkinit luksmeta
@@ -39,6 +39,17 @@ case $profile_id in
python3-docutils libnsl liburing hwloc-gui perl-open perl python2 js-d3-flame-graph xmlstarlet conntrack-tools crudini"
;;
+ "aarch64_COTS" )
+ base_package_to_install="@base @core @debugging @anaconda-tools @additional-devel @guest-agents @system-tools
+ @hardware-monitoring @network-file-system-client @performance @remote-system-management adcli certmonger
+ ipa-client clevis-dracut clevis-udisks2 krb5-pkinit krb5-workstation sssd-polkit-rules krb5-pkinit luksmeta
+ nscd nss-pam-ldapd grub2 epel-release efibootmgr yum-utils ipmitool OpenIPMI docker-ce docker-ce-cli
+ containerd.io lrzsz python3 watchdog git tmux fish kernel kernel-devel kernel-tools-libs kernel-modules
+ kernel-tools kernel-core rpm-build libtool kernel-rpm-macros tcsh kernel-modules-extra gcc-gfortran
+ libdb-devel fuse-devel python3-Cython cmake perl-generators libstdc++-devel libmnl-devel bison flex gcc-c++
+ python3-docutils libnsl liburing hwloc-gui perl-open perl js-d3-flame-graph xmlstarlet conntrack-tools crudini"
+
+ ;;
*)
base_package_to_install="error_profile_id"
echo "Set base_package_to_install failed, error profile_id: $profile_id"
@@ -117,6 +128,14 @@ case $profile_id in
ln -sf initramfs-$kernel_version.img initrd.img
cd -
;;
+ "aarch64_COTS" )
+ cd $target/boot
+ kernel_version=$(rpm --root $target -q kernel --qf "%{VERSION}-%{RELEASE}.%{ARCH}")
+ echo $kernel_version
+ ln -sf vmlinuz-$kernel_version vmlinuz
+ ln -sf initramfs-$kernel_version.img initrd.img
+ cd -
+ ;;
*)
;;
esac