From c18c618d839c0660ba1d5b2680013775c4c5fbe9 Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Sat, 28 Dec 2024 22:40:52 +0800 Subject: [PATCH 01/28] rsyslog: fix the issue of run time config and build config * the openembedded build configuration does not match the runtime config of openeuler's rsyslog repo which has a higher priority than openembedded's run time config * so use openembedded's build configuration and openembedded's runtime config Signed-off-by: Wayne Ren --- .../recipes-extended/rsyslog/rsyslog_%.bbappend | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog_%.bbappend b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog_%.bbappend index 80b4b262547..0599adbf2ac 100644 --- a/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog_%.bbappend +++ b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog_%.bbappend @@ -34,10 +34,22 @@ SRC_URI[sha256sum] = "774032006128a896437f5913e132aa27dbfb937cd8847e449522d5a12d DEPENDS:remove = "liblogging" PACKAGECONFIG:remove = "libgcrypt" -# new version alter +# new version uses openssl PACKAGECONFIG:remove = "gnutls" PACKAGECONFIG:append = " openssl" +# in openeuler rsyslog's repo, there are rsyslog.conf and rsyslog.service which +# will conflict with the rsyslog.conf and rsyslog.service in openembedded's rsyslog +# recipe. Here we use a trick to use openembedded's rsyslog config files. +do_install:prepend() { + # remove openeuler's config files as they have higher priority + rm ${WORKDIR}/rsyslog.conf + rm ${WORKDIR}/rsyslog.service + # use openembedded's config files + cp ${FILE_DIRNAME}/rsyslog/rsyslog.conf ${WORKDIR} + cp ${FILE_DIRNAME}/rsyslog/rsyslog.service ${WORKDIR} +} + PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl," # For libcap-ng, see commit log and https://github.com/rsyslog/rsyslog/issues/5091 PACKAGECONFIG[libcap-ng] = "--enable-libcap-ng,--disable-libcap-ng,libcap-ng," -- Gitee From 2b72cbe8e30269838e976117edd698791816a404 Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Mon, 30 Dec 2024 14:44:56 +0800 Subject: [PATCH 02/28] openeuler: add description about the priority of file path openeuler's repo and yocto recipe local folder may have the same files, e.g., config files, tool files, even patch files, add the description about which copy will be used. By default, openeuler repo's copy will be used. pls note that openeuler repo's copy maybe unmatch the yocto recipe, e.g., the issue found in rsyslog. Then a fix or a workaround is required Signed-off-by: Wayne Ren --- meta-openeuler/conf/distro/openeuler.conf | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/meta-openeuler/conf/distro/openeuler.conf b/meta-openeuler/conf/distro/openeuler.conf index 86700e8f1b0..31f1e3f2df8 100644 --- a/meta-openeuler/conf/distro/openeuler.conf +++ b/meta-openeuler/conf/distro/openeuler.conf @@ -102,7 +102,23 @@ OPENEULER_REPO_NAMES ?= "${OPENEULER_LOCAL_NAME}" OPENEULER_DL_DIR ?= "${OPENEULER_SP_DIR}/${OPENEULER_LOCAL_NAME}" DL_DIR ?= "${OPENEULER_SP_DIR}/downloads" # for all .bb file, OPENEULER_SP_DIR will be included -# in file path +# in file path. +# According to yocto's mechanism of setting FILESPATH, +# openEuler repos's path has a higher priority than yocto's path. +# For example, file://busybox.conf may exist both yocto's path and openeuler's +# repo path. by default, openeuler's busybox.conf will be used not yocto's. +# However this may cause some issues, the unmatch of runtime conf from openeuler +# and build configuration from yocto. Tasking rsyslog as example, yocto's build +# does not enable imjournal module, but the rsyslog.conf from openeuler assume +# imjournal module enabled with systemd, this unmatch will cause error of rsyslog. +# A better way is to use yocto's rsyslog.conf to match yocto's build. +# To fix it, you can do it in ryslog.bbappend, or set yocto's path has a higher priority +# than openeuler's path the following : +##FILEPATH:append = ":${OPENEULER_DL_DIR}:" +##FILEPATH:append = "${OPENEULER_SP_DIR}:" +# if you want yocto's path has a higher priority +# than openeuler's path, then comment FILESEXTRAPATHS lines, +# and use FILEPATH lines FILESEXTRAPATHS:prepend = "${OPENEULER_DL_DIR}:" FILESEXTRAPATHS:prepend = "${OPENEULER_SP_DIR}:" # cache SRCREV during parsing, so the SRCREV will not be affected by the -- Gitee From b636cf6b295ccf122dc50170b84cdb130ae6d2e4 Mon Sep 17 00:00:00 2001 From: guningbo Date: Fri, 17 Jan 2025 14:03:08 +0800 Subject: [PATCH 03/28] kexec-tools: add kexec-tools repo and modify kdump.conf * add kexec-tools repo address * add kdump.conf kdump kdump.service Signed-off-by: guningbo_buaa --- .oebuild/manifest.yaml | 3 + .../recipes-kernel/kexec/files/kdump | 145 ++++++++++++++++++ .../recipes-kernel/kexec/files/kdump.conf | 14 ++ .../recipes-kernel/kexec/files/kdump.service | 14 ++ .../kexec/kexec-tools_%.bbappend | 2 +- 5 files changed, 177 insertions(+), 1 deletion(-) create mode 100755 meta-openeuler/recipes-kernel/kexec/files/kdump create mode 100644 meta-openeuler/recipes-kernel/kexec/files/kdump.conf create mode 100644 meta-openeuler/recipes-kernel/kexec/files/kdump.service diff --git a/.oebuild/manifest.yaml b/.oebuild/manifest.yaml index f1bb108a15a..5ec4bbdc34d 100644 --- a/.oebuild/manifest.yaml +++ b/.oebuild/manifest.yaml @@ -2193,3 +2193,6 @@ manifest_list: zstd: remote_url: https://gitee.com/src-openeuler/zstd.git version: 1bd03ae8e15c88c9bad864c65fa6b3998f3fa07f + kexec-tools: + remote_url: https://gitee.com/src-openeuler/kexec-tools.git + version: 29cd6c89f904b231563459d35e3900e848596a03 diff --git a/meta-openeuler/recipes-kernel/kexec/files/kdump b/meta-openeuler/recipes-kernel/kexec/files/kdump new file mode 100755 index 00000000000..69e3cafe5cf --- /dev/null +++ b/meta-openeuler/recipes-kernel/kexec/files/kdump @@ -0,0 +1,145 @@ +#! /bin/sh +# +# kdump +# +# Description: The kdump script provides the support: +# 1. Load a kdump kernel image into memory; +# 2. Copy away vmcore when system panic. +# + +#default +KEXEC=/usr/sbin/kexec +KEXEC_ARGS="-p" + +MAKEDUMPFILE=/usr/bin/makedumpfile +MAKEDUMPFILE_ARGS="-E -d 1" + +LOGGER="logger -p info -t kdump" + +if [ -f /etc/sysconfig/kdump.conf ]; then + . /etc/sysconfig/kdump.conf +else + echo "no /etc/sysconfig/kdump.conf" + exit 1; +fi + +do_check() +{ + #check makedumpfile + if [ ! -e ${MAKEDUMPFILE} -o ! -x ${MAKEDUMPFILE} ] ;then + echo "No makedumpfile found." + exit 0 + fi + + #check kexec + if [ ! -e ${KEXEC} -o ! -x ${KEXEC} ] ;then + echo "No kexec found." + exit 0 + fi + + #check whether kdump kernel image exists on the system + if [ -z "${KDUMP_KIMAGE}" -o ! -f "${KDUMP_KIMAGE}" ]; then + echo "No kdump kernel image found." + exit 0 + fi + + if [ "${KDUMP_CMDLINE}"x = "x" ] ; then + echo "KDUMP_CMDLINE is not configured" + exit 0 + fi +} + +do_save_vmcore() +{ + if [ ${KDUMP_VMCORE_PATH}x = x ]; then + KDUMP_VMCORE_PATH="/var/crash/`date +"%Y-%m-%d"`" + fi + + mkdir -p ${KDUMP_VMCORE_PATH} + echo "Saving a vmcore to ${KDUMP_VMCORE_PATH}." + + ${MAKEDUMPFILE} ${MAKEDUMPFILE_ARGS} /proc/vmcore ${KDUMP_VMCORE_PATH}/vmcore-"`date +"%H:%M:%S"`" +# cp --sparse=always /proc/vmcore ${KDUMP_VMCORE_PATH}/vmcore-"`date +"%H:%M:%S"`" + rc=$? + if [ ${rc} == 0 ]; then + ${LOGGER} "Saved a vmcore to ${KDUMP_VMCORE_PATH}." + else + ${LOGGER} "Failed to save vmcore!" + fi + return ${rc} +} + +do_start() +{ + #check file + do_check + + #check whether the running kernel supports kdump. + if [ ! -e /sys/kernel/kexec_crash_loaded ]; then + echo "Kdump isn't supported on the running kernel!!!" + ${LOGGER} "Kdump isn't supported on the running kernel!!!" + return 1 + fi + + #check whether kdump kernel image has been loaded + rc=`cat /sys/kernel/kexec_crash_loaded` + if [ ${rc} != 0 ]; then + echo "Kdump is already running."; + ${LOGGER} "Kdump is already running." + return 0 + fi + + #check the running kernel cmdline option,insure "crashkernel=" always set. + grep -q crashkernel= /proc/cmdline + if [ $? != 0 ]; then + echo "Kdump isn't supported on the running kernel,please check boot option!!!" + ${LOGGER} "Kdump isn't supported on the running kernel,please check boot option!!!" + return 1 + fi + + #Load the kdump kernel image + ${KEXEC} ${KEXEC_ARGS} "${KDUMP_KIMAGE}" --append="${KDUMP_CMDLINE}" + if [ $? != 0 ]; then + echo "Failed to load kdump kernel!" + ${LOGGER} "Failed to load kdump kernel!" + return 1 + fi + + echo "Kdump started up." + ${LOGGER} "Kdump started up." +} + +do_stop() +{ + ${KEXEC} -p -u 2>/dev/null + if [ $? == 0 ]; then + echo "Kdump has been stopped." + ${LOGGER} "Kdump has been stopped." + else + echo "Failed to stop kdump!" + ${LOGGER} "Failed to stop kdump!" + fi +} + +case "$1" in + start) + if [ -s /proc/vmcore ]; then + do_save_vmcore + reboot + else + do_start + fi + ;; + restart) + do_stop + do_start + ;; + stop) + do_stop + ;; + *) + echo $"Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/meta-openeuler/recipes-kernel/kexec/files/kdump.conf b/meta-openeuler/recipes-kernel/kexec/files/kdump.conf new file mode 100644 index 00000000000..fa5c1baf2a2 --- /dev/null +++ b/meta-openeuler/recipes-kernel/kexec/files/kdump.conf @@ -0,0 +1,14 @@ +#the kdump kernel version string. +KDUMP_KVER="`uname -r`" + +#this will be passed to the kdump kernel as kdump kernel command line +KDUMP_CMDLINE="`cat /proc/cmdline`" + +#the kernel image for kdump +KDUMP_KIMAGE="/boot/bzImage-${KDUMP_KVER}" + +#Where to save the vmcore +KDUMP_VMCORE_PATH="/var/crash/`date +"%Y-%m-%d"`" + +#the arguments to makedumpfile +MAKEDUMPFILE_ARGS="-l --message-level 1 -d 31" diff --git a/meta-openeuler/recipes-kernel/kexec/files/kdump.service b/meta-openeuler/recipes-kernel/kexec/files/kdump.service new file mode 100644 index 00000000000..b4a2c0611d3 --- /dev/null +++ b/meta-openeuler/recipes-kernel/kexec/files/kdump.service @@ -0,0 +1,14 @@ +[Unit] +Description=Reboot and dump vmcore via kexec +DefaultDependencies=no +Requires=sysinit.target +After=sysinit.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@LIBEXECDIR@/kdump-helper start +ExecStop=@LIBEXECDIR@/kdump-helper stop + +[Install] +WantedBy=multi-user.target diff --git a/meta-openeuler/recipes-kernel/kexec/kexec-tools_%.bbappend b/meta-openeuler/recipes-kernel/kexec/kexec-tools_%.bbappend index 7b0814af59a..1a99fcc65a6 100644 --- a/meta-openeuler/recipes-kernel/kexec/kexec-tools_%.bbappend +++ b/meta-openeuler/recipes-kernel/kexec/kexec-tools_%.bbappend @@ -1,5 +1,5 @@ # main bbfile: yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.21.bb - +FILESEXTRAPATHS:prepend := "${THISDIR}/files/:" # kexec-tools version in openEuler PV = "2.0.26" -- Gitee From 7c36db3a6f56cd3e3e875d232ced5c7fab1438bf Mon Sep 17 00:00:00 2001 From: lixinyu Date: Fri, 17 Jan 2025 15:26:57 +0800 Subject: [PATCH 04/28] hwloc: add hwloc bbappend * add hwloc bbappend Signed-off-by: lixinyu --- .oebuild/manifest.yaml | 3 +++ .../recipes-extended/hwloc/hwloc_%.bbappend | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 meta-openeuler/recipes-extended/hwloc/hwloc_%.bbappend diff --git a/.oebuild/manifest.yaml b/.oebuild/manifest.yaml index 5ec4bbdc34d..4b91187ae99 100644 --- a/.oebuild/manifest.yaml +++ b/.oebuild/manifest.yaml @@ -600,6 +600,9 @@ manifest_list: i2c-tools: remote_url: https://gitee.com/src-openeuler/i2c-tools.git version: 7bd44caa2557da2ac039f1819015f78b4c8571d8 + hwloc: + remote_url: https://gitee.com/src-openeuler/hwloc.git + version: 041894e6aba4114554352c98989aff5c0c708439 iSulad: remote_url: https://gitee.com/src-openeuler/iSulad.git version: 8fb10803b7da72d4c1b54bf023672cb9114d9ff5 diff --git a/meta-openeuler/recipes-extended/hwloc/hwloc_%.bbappend b/meta-openeuler/recipes-extended/hwloc/hwloc_%.bbappend new file mode 100644 index 00000000000..e845a85f9e5 --- /dev/null +++ b/meta-openeuler/recipes-extended/hwloc/hwloc_%.bbappend @@ -0,0 +1,16 @@ +# bb file: ./yocto-meta-openembedded/meta-oe/recipes-extended/hwloc/hwloc_1.11.13.bb + +LIC_FILES_CHKSUM = "file://COPYING;md5=79179bb373cd55cbd834463a514fb714" + +PV = "2.11.2" + +SRC_URI = "\ + file://hwloc-${PV}.tar.bz2 \ +" + +SRC_URI[md5sum] = "4bb1d9bdf550a95fea4f588d8911b8e2" +SRC_URI[sha256sum] = "f7f88fecae067100f1a1a915b658add0f4f71561259482910a69baea22fe8409" + +PACKAGECONFIG[numactl] = "--enable-libnuma,numactl,numactl" + +FILES:${PN} += "/usr/share/bash-completion/completions/hwloc" -- Gitee From a71204eb244883b597669923ed3bb98c0f27f220 Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Wed, 22 Jan 2025 23:30:45 +0800 Subject: [PATCH 05/28] openeuler: remove the default sysvinit distro feature refactor the systemd support in openeuler, remove the default "sysvinit" distro feature. Signed-off-by: Wayne Ren --- meta-openeuler/conf/distro/openeuler.conf | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/meta-openeuler/conf/distro/openeuler.conf b/meta-openeuler/conf/distro/openeuler.conf index 31f1e3f2df8..770f90e2d96 100644 --- a/meta-openeuler/conf/distro/openeuler.conf +++ b/meta-openeuler/conf/distro/openeuler.conf @@ -22,9 +22,6 @@ ROOT_HOME ?= "/root" DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${OPENEULER_DEFAULT_DISTRO_FEATURES}" -# Even we uses other init manager (busybox or systemd), -# we need sysvinit DISTRO_FEATURES to enable update-rc.d mechanism -DISTRO_FEATURES += "sysvinit" # remove currently unsupported features DISTRO_FEATURES_DEFAULT:remove = "bluetooth x11" @@ -108,7 +105,7 @@ DL_DIR ?= "${OPENEULER_SP_DIR}/downloads" # For example, file://busybox.conf may exist both yocto's path and openeuler's # repo path. by default, openeuler's busybox.conf will be used not yocto's. # However this may cause some issues, the unmatch of runtime conf from openeuler -# and build configuration from yocto. Tasking rsyslog as example, yocto's build +# and build configuration from yocto. Taking rsyslog as example, yocto's build # does not enable imjournal module, but the rsyslog.conf from openeuler assume # imjournal module enabled with systemd, this unmatch will cause error of rsyslog. # A better way is to use yocto's rsyslog.conf to match yocto's build. -- Gitee From 86e596d7ae346bf7738028992b7ec72094116233 Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Wed, 22 Jan 2025 23:45:34 +0800 Subject: [PATCH 06/28] os-base: add systemd related configuration * ethernet interfaces are named as eth0, eth1 * add network configuration for eth0 Signed-off-by: Wayne Ren --- .../os-base/os-base/10-eth0.network | 7 ++++++ .../os-base/os-base/70-persistent-net.rules | 1 + .../recipes-core/os-base/os-base_1.0.bb | 25 +++++++++++++------ 3 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 meta-openeuler/recipes-core/os-base/os-base/10-eth0.network create mode 100644 meta-openeuler/recipes-core/os-base/os-base/70-persistent-net.rules diff --git a/meta-openeuler/recipes-core/os-base/os-base/10-eth0.network b/meta-openeuler/recipes-core/os-base/os-base/10-eth0.network new file mode 100644 index 00000000000..de4d0835630 --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/10-eth0.network @@ -0,0 +1,7 @@ +[Match] +Name=eth0 + +[Network] +Address=192.168.7.2/24 +Gateway=192.168.7.1 +DHCP=ipv4 diff --git a/meta-openeuler/recipes-core/os-base/os-base/70-persistent-net.rules b/meta-openeuler/recipes-core/os-base/os-base/70-persistent-net.rules new file mode 100644 index 00000000000..81b01ff0d7e --- /dev/null +++ b/meta-openeuler/recipes-core/os-base/os-base/70-persistent-net.rules @@ -0,0 +1 @@ +SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{type}=="1", NAME="eth%n" \ No newline at end of file diff --git a/meta-openeuler/recipes-core/os-base/os-base_1.0.bb b/meta-openeuler/recipes-core/os-base/os-base_1.0.bb index 958215f9c7e..ce68fdafce3 100644 --- a/meta-openeuler/recipes-core/os-base/os-base_1.0.bb +++ b/meta-openeuler/recipes-core/os-base/os-base_1.0.bb @@ -19,6 +19,8 @@ SRC_URI = " \ file://services \ file://protocols \ file://rpc \ + file://10-eth0.network \ + file://70-persistent-net.rules \ " do_install() { @@ -29,13 +31,22 @@ do_install() { # all init scripts should be in /etc/init.d, currently openeuler embedded specific init functions are mainly # located in rc.functions and rc.sysinit - install -d ${D}${sysconfdir}/init.d - install -m 0744 ${WORKDIR}/rc.functions ${D}${sysconfdir}/init.d - install -m 0744 ${WORKDIR}/rc.sysinit ${D}${sysconfdir}/init.d -# to match busybox's rcS script and buysbox-inittab, set a link in rc5.d to let rc.sysinit run - if [ x"${INIT_MANAGER}" = x"mdev-busybox" ]; then - install -d ${D}${sysconfdir}/rc5.d - update-rc.d -r ${D} rc.sysinit start 50 5 . + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then + install -d ${D}${sysconfdir}/init.d + install -m 0744 ${WORKDIR}/rc.functions ${D}${sysconfdir}/init.d + install -m 0744 ${WORKDIR}/rc.sysinit ${D}${sysconfdir}/init.d + # to match busybox's rcS script and buysbox-inittab, set a link in rc5.d to let rc.sysinit run + if [ x"${INIT_MANAGER}" = x"mdev-busybox" ]; then + install -d ${D}${sysconfdir}/rc5.d + update-rc.d -r ${D} rc.sysinit start 50 5 . + fi + fi +## systemd related basic configuration + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${sysconfdir}/systemd/network + install -d ${D}${sysconfdir}/udev/rules.d + install -m 0644 ${WORKDIR}/10-eth0.network ${D}${sysconfdir}/systemd/network + install -m 0644 ${WORKDIR}/70-persistent-net.rules ${D}${sysconfdir}/udev/rules.d fi # necessary infrastructure for basic TCP/IP based networking from netbase_6.2.bb -- Gitee From fbb3add531759ff3e84dbcb486106f3c7ca54479 Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Wed, 22 Jan 2025 23:49:31 +0800 Subject: [PATCH 07/28] packagegroup-base: initscript should not be included initscript should not be included in packagegroup-base, it's related to 'sysvinit' feature Signed-off-by: Wayne Ren --- meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb | 1 - 1 file changed, 1 deletion(-) diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb index 7732bdc5b71..971a8c08bb1 100644 --- a/meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb @@ -61,7 +61,6 @@ elfutils \ " RDEPENDS:packagegroup-base-libs = " \ -initscripts \ json-c \ libcap-bin \ libcap-ng-bin \ -- Gitee From 117a516b34dc19bbd8c949c503868ec79c1e71de Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Wed, 22 Jan 2025 23:51:37 +0800 Subject: [PATCH 08/28] openssh: fix the openssh configuration The priority of config files with the same name is: yocto-meta-openeuler > openeuler repo > yocto poky or openembedded The configuration in openeuler repo may be not compatible with yocto's recipe, so use the configuration in yocto-meta-openuler. Signed-off-by: Wayne Ren --- .../recipes-connectivity/openssh/files/sshd.socket | 11 +++++++++++ .../recipes-connectivity/openssh/files/sshd@.service | 10 ++++++++++ .../openssh/{openeuler-config => files}/sshd_config | 0 .../recipes-connectivity/openssh/openssh_%.bbappend | 3 +-- 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 meta-openeuler/recipes-connectivity/openssh/files/sshd.socket create mode 100644 meta-openeuler/recipes-connectivity/openssh/files/sshd@.service rename meta-openeuler/recipes-connectivity/openssh/{openeuler-config => files}/sshd_config (100%) diff --git a/meta-openeuler/recipes-connectivity/openssh/files/sshd.socket b/meta-openeuler/recipes-connectivity/openssh/files/sshd.socket new file mode 100644 index 00000000000..8d76d623097 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/openssh/files/sshd.socket @@ -0,0 +1,11 @@ +[Unit] +Conflicts=sshd.service +Wants=sshdgenkeys.service + +[Socket] +ExecStartPre=@BASE_BINDIR@/mkdir -p /var/run/sshd +ListenStream=22 +Accept=yes + +[Install] +WantedBy=sockets.target diff --git a/meta-openeuler/recipes-connectivity/openssh/files/sshd@.service b/meta-openeuler/recipes-connectivity/openssh/files/sshd@.service new file mode 100644 index 00000000000..9d9965e6245 --- /dev/null +++ b/meta-openeuler/recipes-connectivity/openssh/files/sshd@.service @@ -0,0 +1,10 @@ +[Unit] +Description=OpenSSH Per-Connection Daemon +After=sshdgenkeys.service + +[Service] +Environment="SSHD_OPTS=" +EnvironmentFile=-/etc/default/ssh +ExecStart=-@SBINDIR@/sshd -i $SSHD_OPTS +StandardInput=socket +KillMode=process diff --git a/meta-openeuler/recipes-connectivity/openssh/openeuler-config/sshd_config b/meta-openeuler/recipes-connectivity/openssh/files/sshd_config similarity index 100% rename from meta-openeuler/recipes-connectivity/openssh/openeuler-config/sshd_config rename to meta-openeuler/recipes-connectivity/openssh/files/sshd_config diff --git a/meta-openeuler/recipes-connectivity/openssh/openssh_%.bbappend b/meta-openeuler/recipes-connectivity/openssh/openssh_%.bbappend index 47e2550e08b..2e70053872b 100644 --- a/meta-openeuler/recipes-connectivity/openssh/openssh_%.bbappend +++ b/meta-openeuler/recipes-connectivity/openssh/openssh_%.bbappend @@ -6,8 +6,7 @@ PV = "9.3p2" # notice files in openssh are all from higher version of oe # ref: http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/openssh/openssh?id=c80a3a7a4a9dc40cbb675777a1ba1481532ecb05 -FILESEXTRAPATHS:prepend := "${THISDIR}/openeuler-config/:" -FILESEXTRAPATHS:prepend := "${THISDIR}/files/:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" # conflict: other openeuler patches can't apply SRC_URI:prepend = " \ -- Gitee From 3d169f0512ed67fa4303e72705f7e35ccc4a0fef Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Wed, 22 Jan 2025 23:55:45 +0800 Subject: [PATCH 09/28] rsyslog: use a better way to process the configuration file the priority of configuration file with same name: yocto-meta-openeuler > openeuler'repo > yocto poky/openembedded here we add yocto-meta-openeuler's configuration file Signed-off-by: Wayne Ren --- .../rsyslog/rsyslog/rsyslog.conf | 140 +++++++++++------- .../rsyslog/rsyslog/rsyslog.service | 21 +++ .../rsyslog/rsyslog_%.bbappend | 12 -- 3 files changed, 110 insertions(+), 63 deletions(-) create mode 100644 meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog/rsyslog.service diff --git a/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog/rsyslog.conf b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog/rsyslog.conf index 7642bf726ec..dbfefb75976 100644 --- a/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog/rsyslog.conf +++ b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog/rsyslog.conf @@ -1,53 +1,91 @@ -# rsyslog configuration file - -# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html -# or latest version online at http://www.rsyslog.com/doc/rsyslog_conf.html -# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html - -#### GLOBAL DIRECTIVES #### - -# Where to place auxiliary files -global(workDirectory="/var/lib/rsyslog") - -# Use default timestamp format -module(load="builtin:omfile" Template="RSYSLOG_TraditionalFileFormat") - -#### MODULES #### - -module(load="imuxsock" # provides support for local system logging (e.g. via logger command) - SysSock.Use="off") # Turn off message reception via local log socket; - # local messages are retrieved through imjournal now. - -#module(load="imklog") # reads kernel messages (the same are read from journald) -#module(load="immark") # provides --MARK-- message capability - -# Include all config files in /etc/rsyslog.d/ -include(file="/etc/rsyslog.d/*.conf" mode="optional") -#### RULES #### - -# Log all kernel messages to the console. -# Logging much else clutters up the screen. -#kern.* /dev/console - -# Log anything (except mail) of level info or higher. -# Don't log private authentication messages! -*.info;mail.none;authpriv.none;cron.none /var/log/messages - -# The authpriv file has restricted access. -authpriv.* /var/log/secure - -# Log all the mail messages in one place. -mail.* -/var/log/maillog - - -# Log cron stuff -cron.* /var/log/cron - -# Everybody gets emergency messages -*.emerg :omusrmsg:* - -# Save news errors of level crit and higher in a special file. -uucp,news.crit /var/log/spooler +# if you experience problems, check +# http://www.rsyslog.com/troubleshoot for assistance + +# rsyslog v3: load input modules +# If you do not load inputs, nothing happens! +# You may need to set the module load path if modules are not found. +# +# Ported from debian's sysklogd.conf + +$ModLoad immark # provides --MARK-- message capability +$ModLoad imuxsock # provides support for local system logging (e.g. via logger command) +$ModLoad imklog # kernel logging (formerly provided by rklogd) + +# +# Set the default permissions +# +$FileOwner root +$FileGroup adm +$FileCreateMode 0640 +$DirCreateMode 0755 +$Umask 0022 + +auth,authpriv.* /var/log/auth.log +*.*;auth,authpriv.none -/var/log/syslog +cron.* /var/log/cron.log +daemon.* -/var/log/daemon.log +kern.* -/var/log/kern.log +lpr.* -/var/log/lpr.log +mail.* -/var/log/mail.log +user.* -/var/log/user.log + +# +# Logging for the mail system. Split it up so that +# it is easy to write scripts to parse these files. +# +mail.info -/var/log/mail.info +mail.warn -/var/log/mail.warn +mail.err /var/log/mail.err + +# Logging for INN news system +# +news.crit /var/log/news.crit +news.err /var/log/news.err +news.notice -/var/log/news.notice + +# +# Some `catch-all' logfiles. +# +*.=debug;\ + auth,authpriv.none;\ + news.none;mail.none -/var/log/debug +*.=info;*.=notice;*.=warn;\ + auth,authpriv.none;\ + cron,daemon.none;\ + mail,news.none -/var/log/messages + +# +# Emergencies are sent to everybody logged in. +# +*.emerg :omusrmsg:* # Save boot messages also to boot.log -local7.* /var/log/boot.log \ No newline at end of file +local7.* /var/log/boot.log + +# Remote Logging (we use TCP for reliable delivery) +# An on-disk queue is created for this action. If the remote host is +# down, messages are spooled to disk and sent when it is up again. +#$WorkDirectory /var/spool/rsyslog # where to place spool files +#$ActionQueueFileName uniqName # unique name prefix for spool files +$ActionQueueMaxDiskSpace 10m # 1gb space limit (use as much as possible) +#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown +#$ActionQueueType LinkedList # run asynchronously +#$ActionResumeRetryCount -1 # infinite retries if host is down +# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional +#*.* @@remote-host:514 + + +# ######### Receiving Messages from Remote Hosts ########## +# TCP Syslog Server: +# provides TCP syslog reception and GSS-API (if compiled to support it) +#$ModLoad imtcp.so # load module +#$InputTCPServerRun 514 # start up TCP listener at port 514 + +# UDP Syslog Server: +#$ModLoad imudp.so # provides UDP syslog reception +#$UDPServerRun 514 # start a UDP syslog server at standard port 514 + +# +# Include all config files in /etc/rsyslog.d/ +# +$IncludeConfig /etc/rsyslog.d/*.conf diff --git a/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog/rsyslog.service b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog/rsyslog.service new file mode 100644 index 00000000000..0aacff32d51 --- /dev/null +++ b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog/rsyslog.service @@ -0,0 +1,21 @@ +[Unit] +Description=System Logging Service +Requires=syslog.socket +Wants=network.target network-online.target +After=network.target network-online.target +Documentation=man:rsyslogd(8) +Documentation=http://www.rsyslog.com/doc/ + +[Service] +Type=notify +ExecStart=@sbindir@/rsyslogd -n -iNONE +StandardOutput=null +Restart=on-failure + +# Increase the default a bit in order to allow many simultaneous +# files to be monitored, we might need a lot of fds. +LimitNOFILE=16384 + +[Install] +WantedBy=multi-user.target +Alias=syslog.service diff --git a/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog_%.bbappend b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog_%.bbappend index 0599adbf2ac..54642f59776 100644 --- a/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog_%.bbappend +++ b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-extended/rsyslog/rsyslog_%.bbappend @@ -38,18 +38,6 @@ PACKAGECONFIG:remove = "libgcrypt" PACKAGECONFIG:remove = "gnutls" PACKAGECONFIG:append = " openssl" -# in openeuler rsyslog's repo, there are rsyslog.conf and rsyslog.service which -# will conflict with the rsyslog.conf and rsyslog.service in openembedded's rsyslog -# recipe. Here we use a trick to use openembedded's rsyslog config files. -do_install:prepend() { - # remove openeuler's config files as they have higher priority - rm ${WORKDIR}/rsyslog.conf - rm ${WORKDIR}/rsyslog.service - # use openembedded's config files - cp ${FILE_DIRNAME}/rsyslog/rsyslog.conf ${WORKDIR} - cp ${FILE_DIRNAME}/rsyslog/rsyslog.service ${WORKDIR} -} - PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl," # For libcap-ng, see commit log and https://github.com/rsyslog/rsyslog/issues/5091 PACKAGECONFIG[libcap-ng] = "--enable-libcap-ng,--disable-libcap-ng,libcap-ng," -- Gitee From 793066808dad33a4c728543cfa5622161820a889 Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Thu, 23 Jan 2025 13:39:05 +0800 Subject: [PATCH 10/28] qemu-aarch64: enlarge the mem to 1024 MB enlarge the mem to 1024 MB to cover all scenarios, not limited to ros Signed-off-by: Wayne Ren --- meta-openeuler/recipes-core/images/qemu-aarch64.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-openeuler/recipes-core/images/qemu-aarch64.inc b/meta-openeuler/recipes-core/images/qemu-aarch64.inc index 1c0134c39f2..05924e1d209 100644 --- a/meta-openeuler/recipes-core/images/qemu-aarch64.inc +++ b/meta-openeuler/recipes-core/images/qemu-aarch64.inc @@ -8,8 +8,8 @@ QB_DEFAULT_FSTYPE = "${@d.getVar('IMAGE_FSTYPES').split(' ')[0]}" QB_MACHINE = "-machine virt,gic-version=3" QB_CPU = "-cpu cortex-a53" QB_SMP = "-smp 4" -# for features like ros, we need to increase the memory size -QB_MEM = "${@bb.utils.contains("DISTRO_FEATURES", "ros", "-m 1024", "-m 256", d)}" +# use 1024M memory to cover most scenarios +QB_MEM = "-m 1024" QB_CPU_KVM = "-cpu host -machine gic-version=3" # For graphics to work we need to define the VGA device as well as the necessary USB devices QB_GRAPHICS = "-device virtio-gpu-pci" -- Gitee From 534adb44a8b127726143f7e0a4dca3d969aa3489 Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Thu, 23 Jan 2025 13:50:18 +0800 Subject: [PATCH 11/28] openeuler.conf: add 'sysvinit' when busybox is used as init manager add sysvinit into DISTRO_FEAURES when busybox is used as init manager. sysvinit is not appended to DISTRO_FEAURES through DISTRO_FEATURES_BACKFILL_CONSIDERED in init-manager-mdev-busybox.inc. But sysvinit is required for some init scripts. Signed-off-by: Wayne Ren --- meta-openeuler/conf/distro/openeuler.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-openeuler/conf/distro/openeuler.conf b/meta-openeuler/conf/distro/openeuler.conf index 770f90e2d96..9a2b6831cd4 100644 --- a/meta-openeuler/conf/distro/openeuler.conf +++ b/meta-openeuler/conf/distro/openeuler.conf @@ -22,6 +22,9 @@ ROOT_HOME ?= "/root" DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${OPENEULER_DEFAULT_DISTRO_FEATURES}" +# if init manager is busybox sysvinit should be +# added into DISTRO_FEATURES +DISTRO_FEATURES += "${@['', 'sysvinit']['${INIT_MANAGER}' == 'mdev-busybox']}" # remove currently unsupported features DISTRO_FEATURES_DEFAULT:remove = "bluetooth x11" -- Gitee From 7248559afc2a667c7cab913eec80e369a3f6c3a2 Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Fri, 24 Jan 2025 11:30:44 +0800 Subject: [PATCH 12/28] cargo: rename prebuilt cargo.bbclass to cargo_bin.bbclass the original cargo.bbclass for prebuilt cargo in openeuler embedded will override the cargo.bbclass in yocto-poky becasue they have the same name, but are totally different. according to the upstream meta-rust-bin, rename cargo.bbclass to cargo_bin.bbclass Signed-off-by: Wayne Ren --- .../classes/{cargo.bbclass => cargo_bin.bbclass} | 8 ++++---- meta-openeuler/recipes-devtools/rust/cargo-bin-cross.inc | 3 ++- meta-openeuler/recipes-devtools/rust/rustc-bin-cross.inc | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) rename meta-openeuler/classes/{cargo.bbclass => cargo_bin.bbclass} (98%) diff --git a/meta-openeuler/classes/cargo.bbclass b/meta-openeuler/classes/cargo_bin.bbclass similarity index 98% rename from meta-openeuler/classes/cargo.bbclass rename to meta-openeuler/classes/cargo_bin.bbclass index a941aa994b4..3062695c2e1 100644 --- a/meta-openeuler/classes/cargo.bbclass +++ b/meta-openeuler/classes/cargo_bin.bbclass @@ -16,7 +16,7 @@ RUST_BASE_URI := "https://static.rust-lang.org" # Many crates rely on pkg-config to find native versions of their libraries for # linking - do the simple thing and make it generally available. DEPENDS:append = "\ - cargo-bin-cross-${TARGET_ARCH} \ + ${@ "cargo-bin-cross-${TARGET_ARCH}" if d.getVar('TARGET_ARCH') != "${BUILD_ARCH}" else "cargo-bin-native" } \ pkgconfig-native \ " @@ -125,7 +125,7 @@ EOF fi } -cargo_do_configure() { +cargo_bin_do_configure() { mkdir -p "${B}" mkdir -p "${CARGO_HOME}" mkdir -p "${WRAPPER_DIR}" @@ -173,7 +173,7 @@ EOF create_cargo_config } -cargo_do_compile() { +cargo_bin_do_compile() { export TARGET_CC="${WRAPPER_DIR}/cc-wrapper.sh" export TARGET_CXX="${WRAPPER_DIR}/cxx-wrapper.sh" export CC="${WRAPPER_DIR}/cc-native-wrapper.sh" @@ -191,7 +191,7 @@ cargo_do_compile() { cargo build ${CARGO_BUILD_FLAGS} } -cargo_do_install() { +cargo_bin_do_install() { if [ "${CARGO_BUILD_TYPE}" = "--release" ]; then local cargo_bindir="${CARGO_RELEASE_DIR}" else diff --git a/meta-openeuler/recipes-devtools/rust/cargo-bin-cross.inc b/meta-openeuler/recipes-devtools/rust/cargo-bin-cross.inc index 9088c4787e1..36e99c023f0 100644 --- a/meta-openeuler/recipes-devtools/rust/cargo-bin-cross.inc +++ b/meta-openeuler/recipes-devtools/rust/cargo-bin-cross.inc @@ -17,7 +17,8 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" SECTION = "devel" -inherit cross cargo +inherit cross +inherit cargo_bin # prevent loop dependency DEPENDS:remove = "cargo-bin-cross-${TARGET_ARCH}" diff --git a/meta-openeuler/recipes-devtools/rust/rustc-bin-cross.inc b/meta-openeuler/recipes-devtools/rust/rustc-bin-cross.inc index d9d67b55c25..54a6ac97fdb 100644 --- a/meta-openeuler/recipes-devtools/rust/rustc-bin-cross.inc +++ b/meta-openeuler/recipes-devtools/rust/rustc-bin-cross.inc @@ -17,7 +17,8 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" SECTION = "devel" -inherit cross cargo +inherit cross +inherit cargo_bin # prevent loop dependency DEPENDS:remove = "cargo-bin-cross-${TARGET_ARCH}" -- Gitee From 9000c5a2b4c63c5a62a1f692816ec4171393e29f Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Fri, 24 Jan 2025 11:38:14 +0800 Subject: [PATCH 13/28] python3-asn1crypto: add missed adaption in openeuler there is python3-asn1crypto_%.bbappend in openeuler embedded but no specific adaption in manifest.yaml Signed-off-by: Wayne Ren --- .oebuild/manifest.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.oebuild/manifest.yaml b/.oebuild/manifest.yaml index 4b91187ae99..c6b8f73dcfd 100644 --- a/.oebuild/manifest.yaml +++ b/.oebuild/manifest.yaml @@ -1452,6 +1452,9 @@ manifest_list: python-attrs: remote_url: https://gitee.com/src-openeuler/python-attrs.git version: 4f3b44809131fca392bc1daedda76a21ebc66944 + python-asn1crypto: + remote_url: https://gitee.com/src-openeuler/python-asn1crypto.git + version: 59c9fa5ffb80473812a0174c8ab671ac83090505 python-blinker: remote_url: https://gitee.com/src-openeuler/python-blinker.git version: ea4f9c448825469f94824af1ec9e0a575d3073b5 -- Gitee From 9147b3aad2422fcdad8307f858307080b96382d8 Mon Sep 17 00:00:00 2001 From: zhang-wenyu1 Date: Mon, 27 Jan 2025 17:59:17 +0800 Subject: [PATCH 14/28] ppp: modify ppp_%.bbappend to fix bug and modify manifest.yaml 1. modify ppp_%.bbappend to fix bug 2. modify manifest.yaml Signed-off-by: zhang_wenyu --- .oebuild/manifest.yaml | 3 ++ .../recipes-connectivity/ppp/ppp_%.bbappend | 33 ++++++++++--------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.oebuild/manifest.yaml b/.oebuild/manifest.yaml index c6b8f73dcfd..6ee55a84b16 100644 --- a/.oebuild/manifest.yaml +++ b/.oebuild/manifest.yaml @@ -2202,3 +2202,6 @@ manifest_list: kexec-tools: remote_url: https://gitee.com/src-openeuler/kexec-tools.git version: 29cd6c89f904b231563459d35e3900e848596a03 + ppp: + remote_url: https://gitee.com/src-openeuler/ppp.git + version: aff479b12f6e91f4a23bd38c9b1de85f23b8bae9 diff --git a/meta-openeuler/recipes-connectivity/ppp/ppp_%.bbappend b/meta-openeuler/recipes-connectivity/ppp/ppp_%.bbappend index 4c1a46f2d3f..3503f8d064e 100644 --- a/meta-openeuler/recipes-connectivity/ppp/ppp_%.bbappend +++ b/meta-openeuler/recipes-connectivity/ppp/ppp_%.bbappend @@ -6,22 +6,23 @@ PV = "2.4.9" # this patch backport-0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch make a new path and will conflict with other package, not apply # failed to apply the patch: backport-0027-Set-LIBDIR-for-RISCV.patch (for riscv64) SRC_URI:prepend = " \ - file://backport-0004-doc-add-configuration-samples.patch \ - file://backport-ppp-2.4.9-build-sys-don-t-hardcode-LIBDIR-but-set-it-according.patch \ - file://backport-0006-scritps-use-change_resolv_conf-function.patch \ - file://backport-ppp-2.4.8-pppd-we-don-t-want-to-accidentally-leak-fds.patch \ - file://backport-ppp-2.4.9-everywhere-O_CLOEXEC-harder.patch \ - file://backport-0014-everywhere-use-SOCK_CLOEXEC-when-creating-socket.patch \ - file://backport-0015-pppd-move-pppd-database-to-var-run-ppp.patch \ - file://backport-0016-rp-pppoe-add-manpage-for-pppoe-discovery.patch \ - file://backport-0018-scritps-fix-ip-up.local-sample.patch \ - file://backport-0020-pppd-put-lock-files-in-var-lock-ppp.patch \ - file://backport-0023-build-sys-install-rp-pppoe-plugin-files-with-standar.patch \ - file://backport-0024-build-sys-install-pppoatm-plugin-files-with-standard.patch \ - file://backport-ppp-2.4.8-pppd-install-pppd-binary-using-standard-perms-755.patch \ - file://backport-ppp-2.4.9-configure-cflags-allow-commas.patch \ - file://backport-pppd-Negotiate-IP-address-when-only-peer-addresses-are-provided.patch \ - file://backport-CVE-2022-4603.patch \ + file://${BPN}-${PV}.tar.gz \ + file://backport-0004-doc-add-configuration-samples.patch \ + file://backport-ppp-2.4.9-build-sys-don-t-hardcode-LIBDIR-but-set-it-according.patch \ + file://backport-0006-scritps-use-change_resolv_conf-function.patch \ + file://backport-ppp-2.4.8-pppd-we-don-t-want-to-accidentally-leak-fds.patch \ + file://backport-ppp-2.4.9-everywhere-O_CLOEXEC-harder.patch \ + file://backport-0014-everywhere-use-SOCK_CLOEXEC-when-creating-socket.patch \ + file://backport-0015-pppd-move-pppd-database-to-var-run-ppp.patch \ + file://backport-0016-rp-pppoe-add-manpage-for-pppoe-discovery.patch \ + file://backport-0018-scritps-fix-ip-up.local-sample.patch \ + file://backport-0020-pppd-put-lock-files-in-var-lock-ppp.patch \ + file://backport-0023-build-sys-install-rp-pppoe-plugin-files-with-standar.patch \ + file://backport-0024-build-sys-install-pppoatm-plugin-files-with-standard.patch \ + file://backport-ppp-2.4.8-pppd-install-pppd-binary-using-standard-perms-755.patch \ + file://backport-ppp-2.4.9-configure-cflags-allow-commas.patch \ + file://backport-pppd-Negotiate-IP-address-when-only-peer-addresses-are-provided.patch \ " SRC_URI[sha256sum] = "f938b35eccde533ea800b15a7445b2f1137da7f88e32a16898d02dee8adc058d" + -- Gitee From d305b4205333a9bcb9e963b20511a41ce5bd15d7 Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Wed, 5 Feb 2025 11:41:24 +0800 Subject: [PATCH 15/28] network: optimize the ether interface static network configuration the first ether interface named as "eth*" will have a static IP, 192. 168.7.2. This matches the description in doc. Signed-off-by: Wayne Ren --- .../os-base/{10-eth0.network => 10-eth-static.network} | 2 +- meta-openeuler/recipes-core/os-base/os-base_1.0.bb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename meta-openeuler/recipes-core/os-base/os-base/{10-eth0.network => 10-eth-static.network} (87%) diff --git a/meta-openeuler/recipes-core/os-base/os-base/10-eth0.network b/meta-openeuler/recipes-core/os-base/os-base/10-eth-static.network similarity index 87% rename from meta-openeuler/recipes-core/os-base/os-base/10-eth0.network rename to meta-openeuler/recipes-core/os-base/os-base/10-eth-static.network index de4d0835630..47efc5b0f59 100644 --- a/meta-openeuler/recipes-core/os-base/os-base/10-eth0.network +++ b/meta-openeuler/recipes-core/os-base/os-base/10-eth-static.network @@ -1,5 +1,5 @@ [Match] -Name=eth0 +Name=eth* [Network] Address=192.168.7.2/24 diff --git a/meta-openeuler/recipes-core/os-base/os-base_1.0.bb b/meta-openeuler/recipes-core/os-base/os-base_1.0.bb index ce68fdafce3..4cb1ecd423a 100644 --- a/meta-openeuler/recipes-core/os-base/os-base_1.0.bb +++ b/meta-openeuler/recipes-core/os-base/os-base_1.0.bb @@ -19,7 +19,7 @@ SRC_URI = " \ file://services \ file://protocols \ file://rpc \ - file://10-eth0.network \ + file://10-eth-static.network \ file://70-persistent-net.rules \ " @@ -45,7 +45,7 @@ do_install() { if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then install -d ${D}${sysconfdir}/systemd/network install -d ${D}${sysconfdir}/udev/rules.d - install -m 0644 ${WORKDIR}/10-eth0.network ${D}${sysconfdir}/systemd/network + install -m 0644 ${WORKDIR}/10-eth-static.network ${D}${sysconfdir}/systemd/network install -m 0644 ${WORKDIR}/70-persistent-net.rules ${D}${sysconfdir}/udev/rules.d fi -- Gitee From 9d1a8b7884adc33d52936a43652ce4ca50849f1d Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Wed, 5 Feb 2025 11:44:31 +0800 Subject: [PATCH 16/28] kernel_version: remove unused kernel-version.bbclass kernel-version.bbclass is not used now. Signed-off-by: Wayne Ren --- meta-openeuler/classes/kernel-version.bbclass | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 meta-openeuler/classes/kernel-version.bbclass diff --git a/meta-openeuler/classes/kernel-version.bbclass b/meta-openeuler/classes/kernel-version.bbclass deleted file mode 100644 index 188aa130ab7..00000000000 --- a/meta-openeuler/classes/kernel-version.bbclass +++ /dev/null @@ -1,23 +0,0 @@ -def get_kernelversion_headers(p): - import re - - fn = p + '/include/linux/utsrelease.h' - if not os.path.isfile(fn): - # after 2.6.33-rc1 - fn = p + '/include/generated/utsrelease.h' - if not os.path.isfile(fn): - fn = p + '/include/linux/version.h' - - try: - f = open(fn, 'r') - except IOError: - return None - - l = f.readlines() - f.close() - r = re.compile("#define UTS_RELEASE \"(.*)\"") - for s in l: - m = r.match(s) - if m: - return m.group(1).replace("+", "") - return None -- Gitee From 36aeb76cfdfe402de2b2128e6ac39792172c36a7 Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Wed, 5 Feb 2025 11:46:09 +0800 Subject: [PATCH 17/28] perf: optimize the perf bb the original perf.bb is mainly for kernel 5.10, should be updated for kernel 6.6. So refer the perf.bb in yocto 5.0, optimize the perf.bb to avoid the build error Signed-off-by: Wayne Ren --- meta-openeuler/recipes-kernel/perf/perf.bbappend | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meta-openeuler/recipes-kernel/perf/perf.bbappend b/meta-openeuler/recipes-kernel/perf/perf.bbappend index fafe1f69c3e..59266a122fd 100644 --- a/meta-openeuler/recipes-kernel/perf/perf.bbappend +++ b/meta-openeuler/recipes-kernel/perf/perf.bbappend @@ -1 +1,13 @@ PACKAGECONFIG = "libunwind dwarf" + +# add some extra PACKAGECONIFG to avoid compiler error +# for linux-kernel 6.6, pls update perf.bb to the one in yocto 5.0 +PACKAGECONFIG[perl] = ",NO_LIBPERL=1,perl" +PACKAGECONFIG[bfd] = ",NO_LIBBFD=1" +PACKAGECONFIG[libtraceevent] = ",NO_LIBTRACEEVENT=1,libtraceevent" +# jevents requires host python for generating a .c file, but is +# unrelated to the python item. +PACKAGECONFIG[jevents] = ",NO_JEVENTS=1,python3-native" +PACKAGECONFIG[pfm4] = ",NO_LIBPFM4=1,libpfm4" +PACKAGECONFIG[babeltrace] = ",NO_LIBBABELTRACE=1,babeltrace" +PACKAGECONFIG[zstd] = ",NO_LIBZSTD=1,zstd" -- Gitee From e64c637884ed88da07668466733b36470394a2e5 Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Wed, 5 Feb 2025 11:51:25 +0800 Subject: [PATCH 18/28] libxcrypt-compat: add adaption for openeuler some packages in native sdk will relay on libxcrypt.so.1, which is provided by libxcrypt-compat. Meanwhile, the glibc in poky will disable libxcrypt. So we need to add the adaption for libxcrypt-compat Signed-off-by: Wayne Ren --- .../recipes-core/libxcrypt/libxcrypt-compat_%.bbappend | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 meta-openeuler/recipes-core/libxcrypt/libxcrypt-compat_%.bbappend diff --git a/meta-openeuler/recipes-core/libxcrypt/libxcrypt-compat_%.bbappend b/meta-openeuler/recipes-core/libxcrypt/libxcrypt-compat_%.bbappend new file mode 100644 index 00000000000..735ee521252 --- /dev/null +++ b/meta-openeuler/recipes-core/libxcrypt/libxcrypt-compat_%.bbappend @@ -0,0 +1,8 @@ +OPENEULER_LOCAL_NAME = "libxcrypt" + +PV = "4.4.36" + +SRC_URI:prepend = "file://v${PV}.tar.gz \ + " + +S = "${WORKDIR}/libxcrypt-${PV}" -- Gitee From 0913daa528218ed6f8d8c9069a7148c08a815ebc Mon Sep 17 00:00:00 2001 From: hanzongcheng Date: Wed, 5 Feb 2025 16:21:36 +0800 Subject: [PATCH 19/28] kexec-tools: add makedumpfile * Add makedumpfile to make linux vmcore. * Install kexec-tools by default, enable kdump by default for x86 machines and kp920. Signed-off-by: hanzongcheng --- bsp/meta-kunpeng/conf/machine/kp920.conf | 3 +++ meta-openeuler/conf/machine/generic-x86-64.conf | 2 +- .../recipes-kernel/makedumpfile/makedumpfile_%.bbappend | 7 +++++++ .../recipes-core/packagegroups/packagegroup-base.bb | 1 + meta-openeuler/recipes-kernel/kexec/kexec-tools_%.bbappend | 2 ++ 5 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 meta-openeuler/dynamic-layers/openembedded-layer/recipes-kernel/makedumpfile/makedumpfile_%.bbappend diff --git a/bsp/meta-kunpeng/conf/machine/kp920.conf b/bsp/meta-kunpeng/conf/machine/kp920.conf index 705459ecc1e..1267172d345 100644 --- a/bsp/meta-kunpeng/conf/machine/kp920.conf +++ b/bsp/meta-kunpeng/conf/machine/kp920.conf @@ -31,6 +31,9 @@ IMAGE_FSTYPES += "iso" KERNEL_MODULE_AUTOLOAD = "" USE_VT ?= "1" +# cmdline +APPEND += "console=tty1 crashkernel=256M" + # set MCS_FEATURES # kp920 only supports the "openamp" mechanism, # and client os only supports uniproton diff --git a/meta-openeuler/conf/machine/generic-x86-64.conf b/meta-openeuler/conf/machine/generic-x86-64.conf index 269f334b7c6..2f6e1b152de 100644 --- a/meta-openeuler/conf/machine/generic-x86-64.conf +++ b/meta-openeuler/conf/machine/generic-x86-64.conf @@ -29,7 +29,7 @@ SERIAL_CONSOLES ?= "115200;ttyS0" USE_VT="1" # cmdline -APPEND += "console=ttyS0,115200 console=tty1" +APPEND += "console=ttyS0,115200 console=tty1 crashkernel=256M" # set hostname to openEuler-Embedded hostname:pn-base-files = "openEuler-Embedded" diff --git a/meta-openeuler/dynamic-layers/openembedded-layer/recipes-kernel/makedumpfile/makedumpfile_%.bbappend b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-kernel/makedumpfile/makedumpfile_%.bbappend new file mode 100644 index 00000000000..36b6c192f5a --- /dev/null +++ b/meta-openeuler/dynamic-layers/openembedded-layer/recipes-kernel/makedumpfile/makedumpfile_%.bbappend @@ -0,0 +1,7 @@ +OPENEULER_LOCAL_NAME = "kexec-tools" + +PV = "1.7.4" + +S = "${WORKDIR}/${BP}" + +SRC_URI:prepend = "file://${BP}.tar.gz " diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb index 971a8c08bb1..bf3e2e9f7ba 100644 --- a/meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-base.bb @@ -31,6 +31,7 @@ gzip \ bzip2 \ iproute2-ip \ iptables \ +kexec-tools \ kmod \ less \ logrotate \ diff --git a/meta-openeuler/recipes-kernel/kexec/kexec-tools_%.bbappend b/meta-openeuler/recipes-kernel/kexec/kexec-tools_%.bbappend index 1a99fcc65a6..d752719771e 100644 --- a/meta-openeuler/recipes-kernel/kexec/kexec-tools_%.bbappend +++ b/meta-openeuler/recipes-kernel/kexec/kexec-tools_%.bbappend @@ -15,3 +15,5 @@ SRC_URI += "file://kexec-Add-quick-kexec-support.patch \ SRC_URI[md5sum] = "ce3c79e0f639035ef7ddfc39b286a61a" SRC_URI[sha256sum] = "7fe36a064101cd5c515e41b2be393dce3ca88adce59d6ee668e0af7c0c4570cd" + +RDEPENDS:${PN} += "makedumpfile" -- Gitee From cf97a6e3808f7e595c603663e05e3ba5136c8e05 Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Fri, 7 Feb 2025 10:33:50 +0800 Subject: [PATCH 20/28] dsoftbus: remove the special handling in some bsp dsoftbus and isulad are not part of openeuler-image by default. They are controlled by DISTRO_FEATURES now. So no need to do special handling in some bsp, through just simply removing it. A better way is to use features_check.bbclass Signed-off-by: Wayne Ren --- bsp/meta-hisilicon/recipes-core/images/image-hiedge1.inc | 9 ++------- .../recipes-core/images/image-hieulerpi1.inc | 9 ++------- .../sunxi/recipes-core/images/openeuler-image.bbappend | 8 +++----- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/bsp/meta-hisilicon/recipes-core/images/image-hiedge1.inc b/bsp/meta-hisilicon/recipes-core/images/image-hiedge1.inc index f0288c3ecaa..92d721eb3ad 100644 --- a/bsp/meta-hisilicon/recipes-core/images/image-hiedge1.inc +++ b/bsp/meta-hisilicon/recipes-core/images/image-hiedge1.inc @@ -8,11 +8,6 @@ IMAGE_INSTALL += " \ hiedge1-user-driver \ " +inherit features_check -# 1. dsoftbus is not adpated to hieulerpi1 -# 2. user-driver may provides libsecurec.so, -# it conflicts with libboundscheck, especially in SDK -# so, remove dsoftbus from IMAGE_INSTALL -IMAGE_INSTALL:remove = " \ - packagegroup-dsoftbus \ -" +CONFLICT_DISTRO_FEATURES = " dsoftbus " diff --git a/bsp/meta-hisilicon/recipes-core/images/image-hieulerpi1.inc b/bsp/meta-hisilicon/recipes-core/images/image-hieulerpi1.inc index 4284c68b769..968fc3d46cb 100644 --- a/bsp/meta-hisilicon/recipes-core/images/image-hieulerpi1.inc +++ b/bsp/meta-hisilicon/recipes-core/images/image-hieulerpi1.inc @@ -73,11 +73,6 @@ dtof-node \ hirobot-description \ ", "", d)}" +inherit features_check -# 1. dsoftbus is not adpated to hieulerpi1 -# 2. hieulerpi1-user-driver provides libsecurec.so, -# it conflicts with libboundscheck, especially in SDK -# so, remove dsoftbus from IMAGE_INSTALL for hieulerpi1 -IMAGE_INSTALL:remove = " \ - packagegroup-dsoftbus \ -" +CONFLICT_DISTRO_FEATURES = " dsoftbus " diff --git a/bsp/meta-openeuler-bsp/sunxi/recipes-core/images/openeuler-image.bbappend b/bsp/meta-openeuler-bsp/sunxi/recipes-core/images/openeuler-image.bbappend index c1d2556a52d..0eb654c7196 100644 --- a/bsp/meta-openeuler-bsp/sunxi/recipes-core/images/openeuler-image.bbappend +++ b/bsp/meta-openeuler-bsp/sunxi/recipes-core/images/openeuler-image.bbappend @@ -1,5 +1,3 @@ -# remove some unverified package -IMAGE_INSTALL:remove = " \ -packagegroup-isulad \ -packagegroup-dsoftbus \ -" \ No newline at end of file +inherit features_check + +CONFLICT_DISTRO_FEATURES = " dsoftbus isulad " -- Gitee From c6dc92f79f1b6423c16d2678870b552ea40dc079 Mon Sep 17 00:00:00 2001 From: zhang-wenyu1 Date: Mon, 10 Feb 2025 11:56:38 +0800 Subject: [PATCH 21/28] python3-ruamel-yaml: modify python3-ruamel-yaml_%.bbappend to fix bug 1. modify python3-ruamel-yaml_%.bbappend to fix bug 2. modify manifest.yaml Signed-off-by: zhang_wenyu --- .oebuild/manifest.yaml | 3 +++ .../python/python3-ruamel-yaml_%.bbappend | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.oebuild/manifest.yaml b/.oebuild/manifest.yaml index 6ee55a84b16..bcfbf3119b3 100644 --- a/.oebuild/manifest.yaml +++ b/.oebuild/manifest.yaml @@ -2205,3 +2205,6 @@ manifest_list: ppp: remote_url: https://gitee.com/src-openeuler/ppp.git version: aff479b12f6e91f4a23bd38c9b1de85f23b8bae9 + python3-ruamel-yaml: + remote_url: https://gitee.com/src-openeuler/python-ruamel-yaml.git + version: 465a6dcb69f63797d8027decc95f19eb610d8186 diff --git a/meta-openeuler/recipes-devtools/python/python3-ruamel-yaml_%.bbappend b/meta-openeuler/recipes-devtools/python/python3-ruamel-yaml_%.bbappend index 54c248c9d45..588d315c2ce 100644 --- a/meta-openeuler/recipes-devtools/python/python3-ruamel-yaml_%.bbappend +++ b/meta-openeuler/recipes-devtools/python/python3-ruamel-yaml_%.bbappend @@ -1,7 +1,9 @@ -PV = "0.17.21" +# source bb: yocto-poky/meta/recipes-devtools/python/python3-ruamel-yaml_0.17.21.bb -SRC_URI[sha256sum] = "8b7ce697a2f212752a35c1ac414471dc16c424c9573be4926b56ff3f5d23b7af" -LIC_FILES_CHKSUM = "file://LICENSE;md5=034154b7344d15438bc5ed5ee9cc075f" +PV = "0.18.6" + +SRC_URI[sha256sum] = "8b27e6a217e786c6fbe5634d8f3f11bc63e0f80f6a5890f28863d9c45aac311b" +LIC_FILES_CHKSUM = "file://LICENSE;md5=30cbbccd94bf3a2b0285ec35671a1938" require pypi-src-openeuler.inc -OPENEULER_LOCAL_NAME = "python-ruamel-yaml" +OPENEULER_LOCAL_NAME = "python3-ruamel-yaml" -- Gitee From 58ab51e7756e7c0dc3100b0072eb50c0931d9346 Mon Sep 17 00:00:00 2001 From: zhang-wenyu1 Date: Tue, 11 Feb 2025 15:06:01 +0800 Subject: [PATCH 22/28] python3-ply: modify python3-ply_%.bbappend to fix bug 1. modify python3-ply_%.bbappend to fix bug 2. modify manifest.yaml Signed-off-by: zhang_wenyu --- .oebuild/manifest.yaml | 3 +++ .../recipes-devtools/python/python3-ply_%.bbappend | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/.oebuild/manifest.yaml b/.oebuild/manifest.yaml index bcfbf3119b3..7e5ae409605 100644 --- a/.oebuild/manifest.yaml +++ b/.oebuild/manifest.yaml @@ -2208,3 +2208,6 @@ manifest_list: python3-ruamel-yaml: remote_url: https://gitee.com/src-openeuler/python-ruamel-yaml.git version: 465a6dcb69f63797d8027decc95f19eb610d8186 + python3-ply: + remote_url: https://gitee.com/src-openeuler/python-ply.git + version: 3e8bd8270c51debdded2440272e99a2f78a27f15 diff --git a/meta-openeuler/recipes-devtools/python/python3-ply_%.bbappend b/meta-openeuler/recipes-devtools/python/python3-ply_%.bbappend index a843318cad8..1a4f1909a6c 100644 --- a/meta-openeuler/recipes-devtools/python/python3-ply_%.bbappend +++ b/meta-openeuler/recipes-devtools/python/python3-ply_%.bbappend @@ -1,4 +1,10 @@ +# source bb: yocto-poky/meta/recipes-devtools/python/python3-ply_3.11.bb + PV = "3.11" + SRC_URI[md5sum] = "6465f602e656455affcd7c5734c638f8" SRC_URI[sha256sum] = "00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3" + require pypi-src-openeuler.inc + +OPENEULER_LOCAL_NAME = "${BPN}" -- Gitee From f035e56064faa181699deaddf18baae0f4e77cee Mon Sep 17 00:00:00 2001 From: zhang-wenyu1 Date: Tue, 11 Feb 2025 17:50:15 +0800 Subject: [PATCH 23/28] python3-asn1crypto: modify python3-asn1crypto_%.bbappend to fix bug 1. modify python3-asn1crypto_%.bbappend to fix bug 2. modify manifest.yaml Signed-off-by: zhang_wenyu --- .oebuild/manifest.yaml | 3 +++ .../recipes-devtools/python/python3-asn1crypto_%.bbappend | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/.oebuild/manifest.yaml b/.oebuild/manifest.yaml index 7e5ae409605..cd4fce103e2 100644 --- a/.oebuild/manifest.yaml +++ b/.oebuild/manifest.yaml @@ -2211,3 +2211,6 @@ manifest_list: python3-ply: remote_url: https://gitee.com/src-openeuler/python-ply.git version: 3e8bd8270c51debdded2440272e99a2f78a27f15 + python3-asn1crypto: + remote_url: https://gitee.com/src-openeuler/python-asn1crypto.git + version: 59c9fa5ffb80473812a0174c8ab671ac83090505 diff --git a/meta-openeuler/recipes-devtools/python/python3-asn1crypto_%.bbappend b/meta-openeuler/recipes-devtools/python/python3-asn1crypto_%.bbappend index de2d11aa23b..6a0058e988e 100644 --- a/meta-openeuler/recipes-devtools/python/python3-asn1crypto_%.bbappend +++ b/meta-openeuler/recipes-devtools/python/python3-asn1crypto_%.bbappend @@ -1,5 +1,13 @@ +# source bb: yocto-poky/meta/recipes-devtools/python/python3-asn1crypto_1.5.1.bb + PV = "1.5.1" + LIC_FILES_CHKSUM = "file://LICENSE;md5=b5cda97fbd7959ad47a952651a87051a" + SRC_URI[md5sum] = "f7a5271af9b81246fbdf57d703afce2f" SRC_URI[sha256sum] = "13ae38502be632115abf8a24cbe5f4da52e3b5231990aff31123c805306ccb9c" + require pypi-src-openeuler.inc + +OPENEULER_LOCAL_NAME = "python3-${PYPI_PACKAGE}" + -- Gitee From bb25666f7878b135819c6dcd644f3188517c6d9a Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Thu, 13 Feb 2025 11:34:24 +0800 Subject: [PATCH 24/28] hi3093: use features_check for unsupported features hi3093 doest not support dsoftbus and isulad because of adaption and memory footprint. Signed-off-by: Wayne Ren --- bsp/meta-hisilicon/recipes-core/images/image-hi3093.inc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bsp/meta-hisilicon/recipes-core/images/image-hi3093.inc b/bsp/meta-hisilicon/recipes-core/images/image-hi3093.inc index f52a2eca0d6..f40b95d3a38 100644 --- a/bsp/meta-hisilicon/recipes-core/images/image-hi3093.inc +++ b/bsp/meta-hisilicon/recipes-core/images/image-hi3093.inc @@ -6,11 +6,9 @@ require recipes-core/images/bsp-${MACHINE}.inc DEPENDS:append = "${@bb.utils.contains("DISTRO_FEATURES", "mpu_solution", " signtools-hi3093 u-boot-emmc ", "", d)}" -# too large for hhi3093 emmc -IMAGE_INSTALL:remove = " \ -packagegroup-isulad \ -packagegroup-dsoftbus \ -" +inherit features_check + +CONFLICT_DISTRO_FEATURES = " dsoftbus isulad " # note, these modules form 3093 bsp not release now: # * kernel-module-sol-drv -- Gitee From 18304e56d0edb47b4ed0236472a76789ae396e1c Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Thu, 13 Feb 2025 23:48:48 +0800 Subject: [PATCH 25/28] image-live: optimize comments optimize comments Signed-off-by: Wayne Ren --- meta-openeuler/classes/image-live.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-openeuler/classes/image-live.bbclass b/meta-openeuler/classes/image-live.bbclass index c54106cfdcd..016a5ac9f02 100644 --- a/meta-openeuler/classes/image-live.bbclass +++ b/meta-openeuler/classes/image-live.bbclass @@ -73,13 +73,13 @@ BOOTIMG_EXTRA_SPACE ?= "512" populate_live() { populate_kernel $1 - # zImage is not support, when recive a zImage, replace with Image + # zImage is not supported in tradition Grub+BIOS, replace zImage with Image* # it should compact with DEPLOY_DIR_IMAGE/image in meta-openeuler/recipes-core/images/qemu.inc if [ "${KERNEL_IMAGETYPE}" == "zImage" ];then if [ -e ${DEPLOY_DIR_IMAGE}/Image* ]; then install -m 0644 ${DEPLOY_DIR_IMAGE}/Image* $1/${KERNEL_IMAGETYPE} else - bbfatal "unsupport zImage in grub cfg, should replace with ${DEPLOY_DIR_IMAGE}/Image* but not exists." + bbfatal "zImage unsupported in grub cfg, should replace with ${DEPLOY_DIR_IMAGE}/Image* but not exists." fi fi -- Gitee From d3daf6b8996b3488a49f3071a1accd7d51164bd7 Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Thu, 13 Feb 2025 23:50:06 +0800 Subject: [PATCH 26/28] openeuler-image-common: /etc/init.d may not exist /etc/init.d may not exist, for example, when systemd is used Signed-off-by: Wayne Ren --- .../recipes-core/images/openeuler-image-common.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meta-openeuler/recipes-core/images/openeuler-image-common.inc b/meta-openeuler/recipes-core/images/openeuler-image-common.inc index 77643232177..32542a60273 100644 --- a/meta-openeuler/recipes-core/images/openeuler-image-common.inc +++ b/meta-openeuler/recipes-core/images/openeuler-image-common.inc @@ -65,9 +65,11 @@ EXTRANATIVEPATH:remove = "${@['', 'python3-native']['${OPENEULER_PREBUILT_TOOLS_ # set file permission for secure configuration set_permissions_from_rootfs() { - cd "${IMAGE_ROOTFS}" - chmod 750 ./etc/init.d - cd - + cd "${IMAGE_ROOTFS}" + if [ -d ./etc/init.d ];then + chmod 755 ./etc/init.d + fi + cd - } IMAGE_PREPROCESS_COMMAND += "set_permissions_from_rootfs;" -- Gitee From 8218c4e6712d21460d68aedf9a366ad5e950c796 Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Thu, 13 Feb 2025 23:52:25 +0800 Subject: [PATCH 27/28] image-live: use same init manager as the image to install * the image-live use same init manager(sysvinit or systemd) as the the big image to be installed * need to add the handling of calling install-efi.sh in systemd * optimize the related recipes Signed-off-by: Wayne Ren --- .../images/openeuler-image-live.bb | 31 +++++++++---------- .../packagegroup-core-boot-live.bb | 12 ++----- 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/meta-openeuler/recipes-core/images/openeuler-image-live.bb b/meta-openeuler/recipes-core/images/openeuler-image-live.bb index 9a1821574d7..fa3de0f647d 100644 --- a/meta-openeuler/recipes-core/images/openeuler-image-live.bb +++ b/meta-openeuler/recipes-core/images/openeuler-image-live.bb @@ -3,38 +3,35 @@ SUMMARY = "Simple initramfs image. Mostly used for live images" +# install scripts for efi boot INITRAMFS_SCRIPTS ?= "\ initramfs-module-install-efi \ " -# we want a non systemd init manager, packagegroup-core-boot-live is for it. -VIRTUAL-RUNTIME_base-utils = "packagegroup-core-boot-live" - +# packages containing necessary tools required in image live, PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} \ - ${VIRTUAL-RUNTIME_base-utils} \ - base-passwd \ + packagegroup-core-boot-live \ ${ROOTFS_BOOTSTRAP_INSTALL} \ packagegroup-kernel-modules \ efivar efibootmgr \ " export IMAGE_BASENAME = "openeuler-image-live" - IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" -IMAGE_FSTYPES_DEBUGFS = "${INITRAMFS_FSTYPES}" - -# INITRD_IMAGE_LIVE cannot use image live, hddimg or iso. -IMAGE_FSTYPES:remove = "live hddimg iso" -# make install or nologin when using busybox-inittab +# directly call install-efi.sh after initialization set_permissions_from_rootfs:append() { - cd "${IMAGE_ROOTFS}" - if [ -e ./etc/inittab ];then - sed -i "s#respawn:/sbin/getty.*#respawn:-/bin/sh /init.d/install-efi.sh#g" ./etc/inittab + + # if sysvinit is used, modify inittab to call install-efi.sh + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then + cd "${IMAGE_ROOTFS}" + if [ -e ./etc/inittab ];then + sed -i "s#respawn:/sbin/getty.*#respawn:-/bin/sh /init.d/install-efi.sh#g" ./etc/inittab + fi + cd - fi - cd - -} -IMAGE_FEATURES:append = " empty-root-password" + # todo: call install-efi.sh in systemd +} require openeuler-image-common.inc diff --git a/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot-live.bb b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot-live.bb index d59bd4a4ace..9c93592167d 100644 --- a/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot-live.bb +++ b/meta-openeuler/recipes-core/packagegroups/packagegroup-core-boot-live.bb @@ -4,14 +4,9 @@ PR = "r1" PACKAGE_ARCH = "${MACHINE_ARCH}" inherit packagegroup -# live should use this VIRTUAL-RUNTIME as we don't want systemd: -# Notice: we need busybox-inittab to setup in RDEPENDS -DISTRO_FEATURES_BACKFILL_CONSIDERED:append := " systemd" -VIRTUAL-RUNTIME_dev_manager := "busybox-mdev" -VIRTUAL-RUNTIME_init_manager := "busybox" -VIRTUAL-RUNTIME_initscripts := "initscripts" -VIRTUAL-RUNTIME_keymaps := "keymaps" -VIRTUAL-RUNTIME_login_manager := "busybox" +# Distro can override the following VIRTUAL-RUNTIME providers: +VIRTUAL-RUNTIME_dev_manager ?= "udev" +VIRTUAL-RUNTIME_keymaps ?= "keymaps" EFI_PROVIDER ??= "grub-efi" @@ -38,7 +33,6 @@ RDEPENDS:${PN} = "\ kernel-image \ kernel-vmlinux \ os-base \ - busybox-inittab \ " # No rule to make target "Image" for x86-64, remove it -- Gitee From 26a2aed9035e19279700f5bcca5b454a367d9c4f Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Sat, 15 Feb 2025 21:44:07 +0800 Subject: [PATCH 28/28] local-git: remove empty class files local-git.bbclass is empty, remove it Signed-off-by: Wayne Ren --- meta-openeuler/classes/local-git.bbclass | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 meta-openeuler/classes/local-git.bbclass diff --git a/meta-openeuler/classes/local-git.bbclass b/meta-openeuler/classes/local-git.bbclass deleted file mode 100644 index e69de29bb2d..00000000000 -- Gitee