From 6860328d898d798b5e598c76dbc7b4355ced72d6 Mon Sep 17 00:00:00 2001 From: Li Ping <1477412247@qq.com> Date: Tue, 16 Jul 2024 14:13:26 +0800 Subject: [PATCH] Modify some configuration and rpm.list for support huawei-course. --- config/rpm.list | 16 +++++++++++++++ config/urls | 2 ++ overlay/etc/crontab | 17 ++++++++++++++++ .../etc/sysconfig/network-scripts/ifcfg-eth0 | 5 +++++ .../NetworkManager.service | 1 + .../multi-user.target.wants/crond.service | 1 + .../multi-user.target.wants/sshd.service | 1 + .../systemd-timesyncd.service | 1 + overlay/etc/systemd/timesyncd.conf | 20 +++++++++++++++++++ scripts/install_bisheng.sh | 8 ++++---- scripts/make_cfg.sh | 3 --- scripts/make_rootfs.sh | 14 ------------- 12 files changed, 68 insertions(+), 21 deletions(-) create mode 100644 overlay/etc/crontab create mode 100644 overlay/etc/sysconfig/network-scripts/ifcfg-eth0 create mode 120000 overlay/etc/systemd/system/multi-user.target.wants/NetworkManager.service create mode 120000 overlay/etc/systemd/system/multi-user.target.wants/crond.service create mode 120000 overlay/etc/systemd/system/multi-user.target.wants/sshd.service create mode 120000 overlay/etc/systemd/system/multi-user.target.wants/systemd-timesyncd.service create mode 100644 overlay/etc/systemd/timesyncd.conf diff --git a/config/rpm.list b/config/rpm.list index d8ea542..6c0331a 100644 --- a/config/rpm.list +++ b/config/rpm.list @@ -145,6 +145,8 @@ libsecret libsigc++20 libsoup libtool +libarchive-devel +libicu-devel m4 make mpich @@ -166,6 +168,7 @@ openssh-server openssl-devel orca pango +pango-devel pangomm passwd patch @@ -248,6 +251,10 @@ iproute make acl gcc-c++ +libjpeg-devel +libpng-devel +libtiff-devel +libcurl-devel gcc glibc openssl @@ -296,6 +303,15 @@ fio ipmitool libaio-devel numactl-devel +qemu-kvm +libvirt +virt-install +libvirt-client +bridge-utils +edk2-aarch64 +edk2-devel +python3-requests +chrony gtkwave iverilog hyper-mpi diff --git a/config/urls b/config/urls index 4dfde87..71ae99f 100644 --- a/config/urls +++ b/config/urls @@ -1 +1,3 @@ https://opengauss.obs.cn-south-1.myhuaweicloud.com/latest/opengauss_rpm/opengauss-5.0.1-1.aarch64.rpm +https://repo.oepkgs.net/openeuler/rpm/openEuler-22.03-LTS-SP4/contrib/board/aarch64/Packages/kernel-devel-5.10.0%2B-1.aarch64.rpm +https://repo.oepkgs.net/openeuler/rpm/openEuler-22.03-LTS-SP4/contrib/board/aarch64/Packages/kernel-headers-5.10.0%2B-1.aarch64.rpm diff --git a/overlay/etc/crontab b/overlay/etc/crontab new file mode 100644 index 0000000..f3bd06e --- /dev/null +++ b/overlay/etc/crontab @@ -0,0 +1,17 @@ +SHELL=/bin/bash +PATH=/sbin:/bin:/usr/sbin:/usr/bin +MAILTO=root + +# For details see man 4 crontabs + +# Example of job definition: +# .---------------- minute (0 - 59) +# | .------------- hour (0 - 23) +# | | .---------- day of month (1 - 31) +# | | | .------- month (1 - 12) OR jan,feb,mar,apr ... +# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat +# | | | | | +# * * * * * user-name command to be executed + +*/30 * * * * root cd / && run-parts --report /etc/crob.minirc/ +0 * * * * root systemctl restart systemd-timesyncd > /dev/null 2>&1 diff --git a/overlay/etc/sysconfig/network-scripts/ifcfg-eth0 b/overlay/etc/sysconfig/network-scripts/ifcfg-eth0 new file mode 100644 index 0000000..9a864e7 --- /dev/null +++ b/overlay/etc/sysconfig/network-scripts/ifcfg-eth0 @@ -0,0 +1,5 @@ +DEVICE=eth0 +BOOTPROTO=static +ONBOOT=yes +IPADDR=192.168.10.8 +NETMASK=255.255.255.0 diff --git a/overlay/etc/systemd/system/multi-user.target.wants/NetworkManager.service b/overlay/etc/systemd/system/multi-user.target.wants/NetworkManager.service new file mode 120000 index 0000000..7a9fab3 --- /dev/null +++ b/overlay/etc/systemd/system/multi-user.target.wants/NetworkManager.service @@ -0,0 +1 @@ +/lib/systemd/system/NetworkManager.service \ No newline at end of file diff --git a/overlay/etc/systemd/system/multi-user.target.wants/crond.service b/overlay/etc/systemd/system/multi-user.target.wants/crond.service new file mode 120000 index 0000000..c29d11a --- /dev/null +++ b/overlay/etc/systemd/system/multi-user.target.wants/crond.service @@ -0,0 +1 @@ +/lib/systemd/system/crond.service \ No newline at end of file diff --git a/overlay/etc/systemd/system/multi-user.target.wants/sshd.service b/overlay/etc/systemd/system/multi-user.target.wants/sshd.service new file mode 120000 index 0000000..d21ebd9 --- /dev/null +++ b/overlay/etc/systemd/system/multi-user.target.wants/sshd.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/sshd.service \ No newline at end of file diff --git a/overlay/etc/systemd/system/multi-user.target.wants/systemd-timesyncd.service b/overlay/etc/systemd/system/multi-user.target.wants/systemd-timesyncd.service new file mode 120000 index 0000000..cd00411 --- /dev/null +++ b/overlay/etc/systemd/system/multi-user.target.wants/systemd-timesyncd.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/systemd-timesyncd.service \ No newline at end of file diff --git a/overlay/etc/systemd/timesyncd.conf b/overlay/etc/systemd/timesyncd.conf new file mode 100644 index 0000000..a23e62f --- /dev/null +++ b/overlay/etc/systemd/timesyncd.conf @@ -0,0 +1,20 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. +# +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the timesyncd.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. +# +# See timesyncd.conf(5) for details. + +[Time] +NTP=0.cn.pool.ntp.org +FallbackNTP=1.asia.pool.ntp.org 2.asia.pool.ntp.org 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org +#RootDistanceMaxSec=5 +#PollIntervalMinSec=32 +#PollIntervalMaxSec=2048 diff --git a/scripts/install_bisheng.sh b/scripts/install_bisheng.sh index 50c97eb..8bdc56d 100644 --- a/scripts/install_bisheng.sh +++ b/scripts/install_bisheng.sh @@ -1,6 +1,6 @@ #!/bin/bash -BISHENG_COMPILER_URL="https://mirrors.huaweicloud.com/kunpeng/archive/compiler/bisheng_compiler/BiShengCompiler-3.2.0-aarch64-linux-mini.tar.gz" +BISHENG_COMPILER_URL="https://mirrors.huaweicloud.com/kunpeng/archive/compiler/bisheng_compiler/BiShengCompiler-4.0.0-aarch64-linux.tar.gz" BISHENG_INSTALL_DIR="/opt/compiler" function install_bisheng() @@ -24,7 +24,7 @@ function config_bisheng_env() { cat <> ${ROOTFS}/etc/profile -export PATH=${BISHENG_INSTALL_DIR}/BiShengCompiler-3.2.0-aarch64-linux-mini/bin:\$PATH -export LD_LIBRARY_PATH=${BISHENG_INSTALL_DIR}/BiShengCompiler-3.2.0-aarch64-linux-mini/lib:\$LD_LIBRARY_PATH +export PATH=${BISHENG_INSTALL_DIR}/BiShengCompiler-4.0.0-aarch64-linux/bin:\$PATH +export LD_LIBRARY_PATH=${BISHENG_INSTALL_DIR}/BiShengCompiler-4.0.0-aarch64-linux/lib:\$LD_LIBRARY_PATH EOF -} \ No newline at end of file +} diff --git a/scripts/make_cfg.sh b/scripts/make_cfg.sh index 650e92e..990cd39 100755 --- a/scripts/make_cfg.sh +++ b/scripts/make_cfg.sh @@ -1,8 +1,5 @@ #!/bin/bash -systemctl enable sshd -systemctl enable systemd-timesyncd - #启动gdm显示器 #systemctl enable gdm #systemctl set-default graphical.target diff --git a/scripts/make_rootfs.sh b/scripts/make_rootfs.sh index 5510d7b..001bf4e 100755 --- a/scripts/make_rootfs.sh +++ b/scripts/make_rootfs.sh @@ -75,19 +75,6 @@ function make_rootfs() display_alert "Make rootfs" "${YUM_CONF} end ..." "info" } -#时间同步配置 -function fix_timesyncd() -{ - set +e - display_alert "process timesyncd.conf ..." "" "info" - cat ${ROOTFS}/etc/systemd/timesyncd.conf | grep "^NTP=*" - if [ $? -ne 0 ]; then - sed -i -e '/^#NTP=/cNTP=0.cn.pool.ntp.org' ${ROOTFS}/etc/systemd/timesyncd.conf - sed -i 's/#FallbackNTP=/FallbackNTP=1.asia.pool.ntp.org 2.asia.pool.ntp.org /g' ${ROOTFS}/etc/systemd/timesyncd.conf - fi - set -e -} - function fix_gnome() { #解决gnome默认启动失败问题 @@ -156,7 +143,6 @@ function make_filesystem() copy_qemu cp /etc/resolv.conf ${ROOTFS}/etc/resolv.conf - fix_timesyncd fix_gnome process_chroot install_devkit -- Gitee