diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8d430cc2..fd6d7285 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,7 +54,7 @@ feature_branch_build_9000: - /^update-.*$/i feature_branch_build_TSGXP1403: - image: $BUILD_BASED_IMAGE_ROCKYLINUX8 + image: $BUILD_BASED_IMAGE_CENTOS7 stage: build extends: .build_tsg-buildimage variables: @@ -66,6 +66,19 @@ feature_branch_build_TSGXP1403: - /^rel-.*$/i - /^update-.*$/i +feature_branch_build_TSGXP0804: + image: $BUILD_BASED_IMAGE_ROCKYLINUX8 + stage: build + extends: .build_tsg-buildimage + variables: + PROFILE_LIST: TSGXNXR620G40R01P0804 + DALIY_BUILD_VERSION: 1 + except: + - tags + - /^dev-.*$/i + - /^rel-.*$/i + - /^update-.*$/i + feature_branch_build_server_unlocked: image: $BUILD_BASED_IMAGE_CENTOS7 stage: build @@ -137,7 +150,7 @@ develop_build_9000: - /^dev-.*$/i develop_build_TSGXP1403: - image: $BUILD_BASED_IMAGE_ROCKYLINUX8 + image: $BUILD_BASED_IMAGE_CENTOS7 stage: build extends: .build_tsg-buildimage variables: @@ -150,6 +163,20 @@ develop_build_TSGXP1403: only: - /^dev-.*$/i +develop_build_TSGXP0804: + image: $BUILD_BASED_IMAGE_ROCKYLINUX8 + stage: build + extends: .build_tsg-buildimage + variables: + PROFILE_LIST: TSGXNXR620G40R01P0804 + UPLOAD_TO_FILE_REPO: 1 + PULP3_FILE_REPO_NAME: tsg-os-images-develop + PULP3_FILE_DIST_NAME: tsg-os-images-develop + DALIY_BUILD_VERSION: 1 + FILE_REPO_PATH: install/develop/tsg-os-images + only: + - /^dev-.*$/i + develop_build_server_unlocked: image: $BUILD_BASED_IMAGE_CENTOS7 stage: build @@ -223,7 +250,7 @@ testing_build_9000: - /^rel-.*$/i testing_build_TSGXP1403: - image: $BUILD_BASED_IMAGE_ROCKYLINUX8 + image: $BUILD_BASED_IMAGE_CENTOS7 stage: build extends: .build_tsg-buildimage variables: @@ -236,6 +263,20 @@ testing_build_TSGXP1403: only: - /^rel-.*$/i +testing_build_TSGXP0804: + image: $BUILD_BASED_IMAGE_ROCKYLINUX8 + stage: build + extends: .build_tsg-buildimage + variables: + PROFILE_LIST: TSGXNXR620G40R01P0804 + UPLOAD_TO_FILE_REPO: 1 + PULP3_FILE_REPO_NAME: tsg-os-images-testing + PULP3_FILE_DIST_NAME: tsg-os-images-testing + FILE_REPO_PATH: install/testing/tsg-os-images + DALIY_BUILD_VERSION: 1 + only: + - /^rel-.*$/i + testing_build_server_unlocked: image: $BUILD_BASED_IMAGE_CENTOS7 stage: build @@ -309,7 +350,7 @@ rc_build_9000: - /^.*-rc.*$/i rc_build_TSGXP1403: - image: $BUILD_BASED_IMAGE_ROCKYLINUX8 + image: $BUILD_BASED_IMAGE_CENTOS7 stage: build extends: .build_tsg-buildimage variables: @@ -322,6 +363,20 @@ rc_build_TSGXP1403: only: - /^.*-rc.*$/i +rc_build_TSGXP0804: + image: $BUILD_BASED_IMAGE_ROCKYLINUX8 + stage: build + extends: .build_tsg-buildimage + variables: + PROFILE_LIST: TSGXNXR620G40R01P0804 + UPLOAD_TO_FILE_REPO: 1 + DALIY_BUILD_VERSION: 0 + PULP3_FILE_REPO_NAME: tsg-os-images-rc + PULP3_FILE_DIST_NAME: tsg-os-images-rc + FILE_REPO_PATH: install/rc/tsg-os-images + only: + - /^.*-rc.*$/i + rc_build_server_unlocked: image: $BUILD_BASED_IMAGE_CENTOS7 stage: build @@ -401,7 +456,7 @@ release_build_9000: - /^.*-rc.*$/i release_build_TSGXP1403: - image: $BUILD_BASED_IMAGE_ROCKYLINUX8 + image: $BUILD_BASED_IMAGE_CENTOS7 stage: build extends: .build_tsg-buildimage variables: @@ -416,6 +471,22 @@ release_build_TSGXP1403: except: - /^.*-rc.*$/i +release_build_TSGXP0804: + image: $BUILD_BASED_IMAGE_ROCKYLINUX8 + stage: build + extends: .build_tsg-buildimage + variables: + PROFILE_LIST: TSGXNXR620G40R01P0804 + UPLOAD_TO_FILE_REPO: 1 + DALIY_BUILD_VERSION: 0 + PULP3_FILE_REPO_NAME: tsg-os-images-release + PULP3_FILE_DIST_NAME: tsg-os-images-release + FILE_REPO_PATH: install/release/tsg-os-images + only: + - tags + except: + - /^.*-rc.*$/i + release_build_server_unlocked: image: $BUILD_BASED_IMAGE_CENTOS7 stage: build diff --git a/ansible/HAL_deploy.yml b/ansible/HAL_deploy.yml index 3b891010..0a445d1e 100644 --- a/ansible/HAL_deploy.yml +++ b/ansible/HAL_deploy.yml @@ -109,3 +109,26 @@ - {role: tsg-os-provision-condition, tags: tsg-os-provision-condition} - {role: hasp, tags: hasp} - {role: OFED, tags: OFED} + +- hosts: TSG-X-NXR620G40-R01-P0804 + remote_user: root + vars_files: + - install_config/group_vars/HAL_TSGXNXR620G40R01P0804.yml + - install_config/group_vars/rpm_version.yml + roles: + - {role: tsg-os-provision, tags: tsg-os-provision} + - {role: tsg_device_tag, tags: tsg_device_tag} + - {role: tsg_sn, tags: tsg_sn} + - {role: framework, tags: framework} + - {role: mrzcpd, tags: mrzcpd} + - {role: sapp, tags: sapp} + - {role: tsg_master, tags: tsg_master} + - {role: firewall, tags: firewall} + - {role: tsg_app, tags: tsg_app} + - {role: telegraf_statistic, tags: telegraf_statistic} + - {role: exporter, tags: exporter} + - {role: system-init-TSG-X-P1403, tags: system-init-TSG-X-P1403} + - {role: system-init, tags: system-init} + - {role: tsg-os-provision-condition, tags: tsg-os-provision-condition} + - {role: hasp, tags: hasp} + - {role: OFED, tags: OFED} \ No newline at end of file diff --git a/ansible/install_config/group_vars/HAL_TSGXNXR620G40R01P0804.yml b/ansible/install_config/group_vars/HAL_TSGXNXR620G40R01P0804.yml new file mode 100644 index 00000000..8664c8c1 --- /dev/null +++ b/ansible/install_config/group_vars/HAL_TSGXNXR620G40R01P0804.yml @@ -0,0 +1,36 @@ +control_and_policy: + nic_name: "{% raw %}{{ network_setting.nic_policy_log.name }}{% endraw %}" + +workload_zcpd: + cpu_affinity: "{% raw %}{{ workload_zcpd_cpu_affinity }}{% endraw %}" + hugepage_num_1G: 32 + +workload_firewall: + cpu_affinity: "{% raw %}{{ workload_firewall_cpu_affinity }}{% endraw %}" + worker_threads: "{% raw %}{{ workload_firewall_worker_threads }}{% endraw %}" + send_only_threads_max: 0 + +dp_traffic_mirror: + nic_name: eth_mirr_d + traffic_mirror_vlan_id: 0 + +dp_steering_firewall: + #deloyment value: mirror,inline, transparent. mirror = one arm + mirror, inline = one arm + series, transparent = two arm + series + deployment: inline + #encapsulation value: vlan, vxlan, raw, provision + encapsulation: vxlan + # capture_packet value: pcap, driver + capture_packet: driver + nic_internal: "{% raw %}{{ network_setting.nic_raw.name }}{% endraw %}" + enable_mirror: 0 + +prefix_path: + mrzcpd: /opt/tsg/mrzcpd + framework: /opt/tsg/framework + sapp: /opt/tsg/sapp + +monitor: + enable_redis_exporter: 1 + enable_ipmi_exporter: 1 +### TSG-server, TSG-7400-mcn0 TSG-7400-mcn123 TSG-9140 +runtime_env: TSG-X-P0804 \ No newline at end of file diff --git a/ansible/roles/OFED/files/MLNX_OFED_LINUX-5.5-1.0.3.2-rhel7.9-x86_64-ext.tgz b/ansible/roles/OFED/files/MLNX_OFED_LINUX-5.5-1.0.3.2-rhel7.9-x86_64-ext.tgz new file mode 100644 index 00000000..5c122f64 Binary files /dev/null and b/ansible/roles/OFED/files/MLNX_OFED_LINUX-5.5-1.0.3.2-rhel7.9-x86_64-ext.tgz differ diff --git a/ansible/roles/OFED/tasks/main.yml b/ansible/roles/OFED/tasks/main.yml index 6821fd5a..a97ee39f 100644 --- a/ansible/roles/OFED/tasks/main.yml +++ b/ansible/roles/OFED/tasks/main.yml @@ -9,18 +9,36 @@ path: "/tmp/OFED/unarchived" state: directory +######TSG-X-P0804 install start###### - name: "unarchive OFED installer" unarchive: src: /tmp/OFED/MLNX_OFED_LINUX-5.5-1.0.3.2-rhel8.5-x86_64-ext.tgz dest: /tmp/OFED/unarchived/ remote_src: yes + when: runtime_env == 'TSG-X-P0804' - name: "Get linux kernel file path" shell: ls /boot/vmlinuz-*.x86_64 | grep -oP "^/boot/vmlinuz-\K.*" register: obtain_kernel_version + when: runtime_env == 'TSG-X-P0804' - name: "execute OFED installer" shell: /tmp/OFED/unarchived/MLNX_OFED_LINUX-5.5-1.0.3.2-rhel8.5-x86_64-ext/mlnxofedinstall -k {{obtain_kernel_version.stdout}} --distro rhel8.5 --force + when: runtime_env == 'TSG-X-P0804' +######TSG-X-P0804 install end ###### + +######TSG-X-P1403 install start###### +- name: "unarchive OFED installer" + unarchive: + src: /tmp/OFED/MLNX_OFED_LINUX-5.5-1.0.3.2-rhel7.9-x86_64-ext.tgz + dest: /tmp/OFED/unarchived/ + remote_src: yes + when: runtime_env == 'TSG-X-P1403' + +- name: "execute OFED installer" + shell: /tmp/OFED/unarchived/MLNX_OFED_LINUX-5.5-1.0.3.2-rhel7.9-x86_64-ext/mlnxofedinstall --add-kernel-support --kernel 3.10.0-1160.59.1.el7.x86_64 --force --without-depcheck + when: runtime_env == 'TSG-X-P1403' +######TSG-X-P1403 install end ###### - name: "enable auto update firmware on boot" replace: diff --git a/ansible/roles/mrzcpd/tasks/main.yml b/ansible/roles/mrzcpd/tasks/main.yml index b3b27eae..5166e4d1 100644 --- a/ansible/roles/mrzcpd/tasks/main.yml +++ b/ansible/roles/mrzcpd/tasks/main.yml @@ -82,7 +82,7 @@ src: "{{ role_path }}/templates/mrglobal.conf.j2.j2.TSGXNXR620G40R01P1403" dest: /opt/tsg/tsg-os-provision/templates/mrglobal.conf.j2 when: - - runtime_env == 'TSG-X-P1403' + - runtime_env == 'TSG-X-P1403' or runtime_env == 'TSG-X-P0804' - name: "replace action: replace service WantedBy from multi-user.target to workload.target" replace: diff --git a/ansible/roles/sapp/tasks/main.yml b/ansible/roles/sapp/tasks/main.yml index df25d78d..3785de0e 100644 --- a/ansible/roles/sapp/tasks/main.yml +++ b/ansible/roles/sapp/tasks/main.yml @@ -56,14 +56,14 @@ src: "{{ role_path }}/templates/send_raw_pkt.conf.j2" dest: /opt/tsg/sapp/etc/send_raw_pkt.conf tags: template - when: runtime_env != 'TSG-X-P1403' + when: runtime_env != 'TSG-X-P1403' and runtime_env != 'TSG-X-P0804' - name: Template the send_raw_pkt.conf template: src: "{{ role_path }}/templates/send_raw_pkt.conf.j2" dest: /opt/tsg/tsg-os-provision/templates/send_raw_pkt.conf.j2 tags: template - when: runtime_env == 'TSG-X-P1403' + when: runtime_env == 'TSG-X-P1403' or runtime_env == 'TSG-X-P0804' - name: Template the conflist.inf - tsg_server template: @@ -111,7 +111,7 @@ dest: /opt/tsg/sapp/etc/vlan_flipping_map.conf tags: template when: - - runtime_env == 'TSG-X-P1403' + - runtime_env == 'TSG-X-P1403' or runtime_env == 'TSG-X-P0804' - name: Template the sapp_log.conf template: diff --git a/ansible/roles/system-init/tasks/main.yml b/ansible/roles/system-init/tasks/main.yml index 7a91646e..42e62d60 100644 --- a/ansible/roles/system-init/tasks/main.yml +++ b/ansible/roles/system-init/tasks/main.yml @@ -61,4 +61,4 @@ - name: "update initramfs" shell: dracut --force -v /boot/initramfs-5.4.159-1.el7.elrepo.x86_64.img 5.4.159-1.el7.elrepo.x86_64 - when: runtime_env != 'TSG-X-P1403' \ No newline at end of file + when: runtime_env != 'TSG-X-P1403' and runtime_env != 'TSG-X-P0804' \ No newline at end of file diff --git a/ansible/roles/tsg-os-provision-condition/tasks/main.yml b/ansible/roles/tsg-os-provision-condition/tasks/main.yml index aa139da2..4124e8a9 100644 --- a/ansible/roles/tsg-os-provision-condition/tasks/main.yml +++ b/ansible/roles/tsg-os-provision-condition/tasks/main.yml @@ -58,4 +58,4 @@ - mrzcpd - sapp - telegraf_statistic - when: runtime_env == 'TSG-X-P1403' + when: runtime_env == 'TSG-X-P1403' or runtime_env == 'TSG-X-P0804' diff --git a/ansible/roles/tsg-os-provision/tasks/main.yml b/ansible/roles/tsg-os-provision/tasks/main.yml index f8d36e79..97ed44c5 100644 --- a/ansible/roles/tsg-os-provision/tasks/main.yml +++ b/ansible/roles/tsg-os-provision/tasks/main.yml @@ -75,7 +75,7 @@ src: "{{ role_path }}/files/tasks/provision.yml.TSGXNXR620G40R01P1403" dest: /opt/tsg/tsg-os-provision/tasks/provision.yml mode: 0644 - when: runtime_env == 'TSG-X-P1403' + when: runtime_env == 'TSG-X-P1403' or runtime_env == 'TSG-X-P0804' - name: "tsg-os-provision: copy provision.yml.sample file to dest - tsg9140" copy: @@ -117,7 +117,7 @@ src: "{{ role_path }}/files/config_sample/provision.default.yml.TSGXNXR620G40R01P1403" dest: /opt/tsg/tsg-os-provision/provision.default.yml mode: 0644 - when: runtime_env == 'TSG-X-P1403' + when: runtime_env == 'TSG-X-P1403' or runtime_env == 'TSG-X-P0804' - name: "tsg-os-provision: copy provision.yml.sample to dest - tsg7400 mcn0" copy: @@ -145,7 +145,7 @@ src: "{{ role_path }}/files/config_sample/provision.yml.sample.TSGXNXR620G40R01P1403" dest: /opt/tsg/tsg-os-provision/provision.yml.sample mode: 0644 - when: runtime_env == 'TSG-X-P1403' + when: runtime_env == 'TSG-X-P1403' or runtime_env == 'TSG-X-P0804' - name: "tsg-os-provision: copy provision.sh file to dest" copy: @@ -213,20 +213,20 @@ mode: 0644 with_items: - { "src": tsg-os-provision.service.TSGXP1403, "dest": tsg-os-provision.service } - when: runtime_env == 'TSG-X-P1403' + when: runtime_env == 'TSG-X-P1403' or runtime_env == 'TSG-X-P0804' - name: "replace action: add service into sysinit.target --TSG-X-P1403" shell: ln -vfs --relative /usr/lib/systemd/system/{{item}} /usr/lib/systemd/system/sysinit.target.wants/{{item}} with_items: - tsg-os-provision.service - when: runtime_env == 'TSG-X-P1403' + when: runtime_env == 'TSG-X-P1403' or runtime_env == 'TSG-X-P0804' - name: "tsg-os-provision: copy tsg-start.sh to dest - TSG-X-P1403" copy: src: "{{ role_path }}/files/script/provision-config-apply" dest: /opt/tsg/tsg-os-provision/ mode: 0755 - when: runtime_env == 'TSG-X-P1403' + when: runtime_env == 'TSG-X-P1403' or runtime_env == 'TSG-X-P0804' ######TSG-X-P1403 end###### #- name: "tsg-os-provision: install yaml module using pip3" diff --git a/ansible/roles/tsg_sn/tasks/main.yml b/ansible/roles/tsg_sn/tasks/main.yml index 010ecac9..a616fc1f 100644 --- a/ansible/roles/tsg_sn/tasks/main.yml +++ b/ansible/roles/tsg_sn/tasks/main.yml @@ -28,4 +28,4 @@ src: "{{ role_path }}/files/obtain_sn.sh.TSGXP1403" dest: /opt/tsg/tsg-os-provision/scripts/obtain_sn.sh mode: 0755 - when: runtime_env == 'TSG-X-P1403' \ No newline at end of file + when: runtime_env == 'TSG-X-P1403' or runtime_env == 'TSG-X-P0804' \ No newline at end of file diff --git a/make/Makefile.TSGXNXR620G40R01P0804 b/make/Makefile.TSGXNXR620G40R01P0804 new file mode 100644 index 00000000..81145b0b --- /dev/null +++ b/make/Makefile.TSGXNXR620G40R01P0804 @@ -0,0 +1,71 @@ + +PROFILE_ID := TSG-X-NXR620G40-R01-P0804 +SUPPORTED_MACHINE_ID := TSG-X-NXR620G40-R01-P0804 +KERNEL_ARGS := console=ttyS0,115200n8 crashkernel=512M default_hugepagesz=1G hugepagesz=1G hugepages=16 intel_iommu=on iommu=pt mitigations=off pci=realloc,assign-busses psi=1 isolcpus=4-95 +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 + +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-ansible sysroot-cleanup sysroot-archive sysroot-binary clean + +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/%%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 '/sapp:/d;/tfe:/d' $(PROJECTDIR)/ansible/install_config/group_vars/rpm_version.yml + +sysroot-base: builddir + $(TOOLSDIR)/mk-base-image $(CONFDIR)/yum-RockyLinux-8.5.conf $(TARGET_SYSROOT_DIR) $(PROJECTDIR) $(PROFILE_ID) + +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-8.5.conf $(TARGET_SYSROOT_DIR)/tmp/ -r + cp $(CONFDIR)/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-8.5.conf + cp $(TARGET_SYSROOT_DIR)/tmp/hosts $(TARGET_SYSROOT_DIR)/etc/ -r + +sysroot-cleanup: + rm -rf $(TARGET_SYSROOT_DIR)/tmp/* + rm -rf $(TARGET_SYSROOT_DIR)/dev/* + +sysroot-archive: installer sysroot-ansible 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 + +clean: + rm -rf $(TARGET_BUILD_DIR) \ No newline at end of file diff --git a/make/Makefile.TSGXNXR620G40R01P1403 b/make/Makefile.TSGXNXR620G40R01P1403 index 42fd8665..c9671f4c 100644 --- a/make/Makefile.TSGXNXR620G40R01P1403 +++ b/make/Makefile.TSGXNXR620G40R01P1403 @@ -40,7 +40,7 @@ installer: builddir sed -i '/sapp:/d;/tfe:/d' $(PROJECTDIR)/ansible/install_config/group_vars/rpm_version.yml sysroot-base: builddir - $(TOOLSDIR)/mk-base-image $(CONFDIR)/yum-RockyLinux-8.5.conf $(TARGET_SYSROOT_DIR) $(PROJECTDIR) $(PROFILE_ID) + $(TOOLSDIR)/mk-base-image $(CONFDIR)/yum-CentOS-7.conf $(TARGET_SYSROOT_DIR) $(PROJECTDIR) $(PROFILE_ID) sysroot-verfile: sysroot-base sed -i -e "s/^NAME=.*/NAME=\"TSG-OS\"/" $(TARGET_SYSROOT_DIR)/usr/lib/os-release @@ -48,11 +48,11 @@ sysroot-verfile: sysroot-base 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-8.5.conf $(TARGET_SYSROOT_DIR)/tmp/ -r + cp $(CONFDIR)/yum-CentOS-7.conf $(TARGET_SYSROOT_DIR)/tmp/ -r cp $(CONFDIR)/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-8.5.conf + $(TOOLSDIR)/ansible-HAL $(PROFILE_ID) $(PROJECTDIR) $(TARGET_SYSROOT_DIR) /tmp/yum-CentOS-7.conf cp $(TARGET_SYSROOT_DIR)/tmp/hosts $(TARGET_SYSROOT_DIR)/etc/ -r sysroot-cleanup: diff --git a/tools/mk-base-image b/tools/mk-base-image index 7bda54d8..592c272b 100755 --- a/tools/mk-base-image +++ b/tools/mk-base-image @@ -10,8 +10,12 @@ yum_config=$1 target=$2 projectdir=$3 profile_id=$4 -if [ $profile_id != "TSG-X-NXR620G40-R01-P1403" ];then - kernel_version="5.4.159-1.el7.elrepo.x86_64" +if [ $profile_id != "TSG-X-NXR620G40-R01-P0804" ];then + if [ $profile_id != "TSG-X-NXR620G40-R01-P1403" ];then + kernel_version="5.4.159-1.el7.elrepo.x86_64" + else + kernel_version="3.10.0-1160.59.1.el7.x86_64" + fi fi set -ex @@ -26,7 +30,7 @@ package_to_install_RockyLinux85="@base @core @debugging @anaconda-tools @additio grub2 epel-release efibootmgr ansible yum-utils ipmitool OpenIPMI docker-ce docker-ce-cli containerd.io lrzsz python3 watchdog pcm git tmux fish kernel kernel-devel kernel-tools-libs kernel-modules kernel-tools kernel-core rpm-build libtool kernel-rpm-macros python36-devel tcsh kernel-modules-extra gcc-gfortran" -if [ $profile_id != "TSG-X-NXR620G40-R01-P1403" ];then +if [ $profile_id != "TSG-X-NXR620G40-R01-P0804" ];then locak_package_to_install_CentOS7="$projectdir/package/kernel-lt-$kernel_version.rpm $projectdir/package/kernel-lt-devel-$kernel_version.rpm" fi @@ -36,14 +40,18 @@ kernel_package_to_install="kernel-3.10.0-1160.59.1.el7.x86_64 kernel-devel-3.10. setopt="group_package_types=mandatory,default,optional" yum -c "$yum_config" --installroot="$target" -y makecache -if [ $profile_id != "TSG-X-NXR620G40-R01-P1403" ];then +if [ $profile_id != "TSG-X-NXR620G40-R01-P0804" ];then yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt install $package_to_install_CentOS7 - yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt localinstall $locak_package_to_install_CentOS7 + if [ $profile_id != "TSG-X-NXR620G40-R01-P1403" ];then + yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt localinstall $locak_package_to_install_CentOS7 + else + yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt install $kernel_package_to_install + fi else yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt install $package_to_install_RockyLinux85 fi -if [ $profile_id == "TSG-X-NXR620G40-R01-P1403" ];then +if [ $profile_id == "TSG-X-NXR620G40-R01-P0804" ];then kernel_version=$(ls $target/boot/vmlinuz-*.x86_64 | grep -oP "^$target/boot/vmlinuz-\K.*") fi #git clone --depth 1 https://github.com/brendangregg/FlameGraph.git /opt/tools/FlameGraph/