From 1fc0d70f658da30091bcd49f9bf29aecd6b99ba7 Mon Sep 17 00:00:00 2001 From: "Jason M. Bills" Date: Thu, 6 Jan 2022 13:50:19 -0800 Subject: Update to internal 0.86 Signed-off-by: Jason M. Bills --- .../ac-boot-check/ac-boot-check/ac-boot-check.sh | 3 + .../at-scale-debug/at-scale-debug_git.bb | 10 ++- .../recipes-core/at-scale-debug/files/asm/rwonce.h | 90 ++++++++++++++++++++++ .../recipes-core/dropbear/dropbear_%.bbappend | 22 ++---- ...-mux-setting-before-SOL-activation-via-SS.patch | 43 +++++++++++ .../recipes-core/dropbear/files/enable-ssh.sh | 33 ++------ .../recipes-core/fw-update/intel-fw-update.bb | 10 ++- .../host-error-monitor_%.bbappend | 2 +- .../recipes-core/interfaces/libmctp/asm/rwonce.h | 89 +++++++++++++++++++++ .../recipes-core/interfaces/libmctp_git.bb | 12 ++- .../recipes-core/ipmi/intel-ipmi-oem_%.bbappend | 2 +- .../recipes-core/libpeci/libpeci_%.bbappend | 2 +- .../recipes-core/os-release/version-vars.inc | 16 +++- .../meta-common/recipes-core/safec/safec_3.4.bb | 2 +- ...-Modfiy-system.conf-DefaultTimeoutStopSec.patch | 28 ------- .../systemd/systemd/systemd-time-wait-sync.service | 36 --------- .../recipes-core/systemd/systemd_%.bbappend | 17 +--- 17 files changed, 285 insertions(+), 132 deletions(-) create mode 100644 meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/asm/rwonce.h create mode 100644 meta-openbmc-mods/meta-common/recipes-core/dropbear/files/0001-Enable-UART-mux-setting-before-SOL-activation-via-SS.patch create mode 100644 meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/asm/rwonce.h delete mode 100644 meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/0001-Modfiy-system.conf-DefaultTimeoutStopSec.patch delete mode 100644 meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/systemd-time-wait-sync.service (limited to 'meta-openbmc-mods/meta-common/recipes-core') diff --git a/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.sh b/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.sh index b9ea1127c..bf5377482 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.sh +++ b/meta-openbmc-mods/meta-common/recipes-core/ac-boot-check/ac-boot-check/ac-boot-check.sh @@ -21,3 +21,6 @@ done < /proc/cmdline busctl set-property xyz.openbmc_project.Settings /xyz/openbmc_project/control/host0/ac_boot xyz.openbmc_project.Common.ACBoot ACBoot s "$ACBOOT" +source /etc/os-release + +echo "VERSION INFO - BMC - ${VERSION_ID}" diff --git a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb index 2c18cc0ec..74db92917 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb @@ -30,4 +30,12 @@ SYSTEMD_SERVICE:${PN} += "com.intel.AtScaleDebug.service" EXTRA_OECMAKE = "-DBUILD_UT=OFF" CFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include/uapi" -CFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include/" +CFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include" + +# Copying the depricated header from kernel as a temporary fix to resolve build breaks. +# It should be removed later after fixing the header dependency in this repository. +SRC_URI += "file://asm/rwonce.h" +do_configure:prepend() { + cp -r ${WORKDIR}/asm ${S}/asm +} +CFLAGS:append = " -I ${S}" diff --git a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/asm/rwonce.h b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/asm/rwonce.h new file mode 100644 index 000000000..11619bdbe --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/asm/rwonce.h @@ -0,0 +1,90 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Prevent the compiler from merging or refetching reads or writes. The + * compiler is also forbidden from reordering successive instances of + * READ_ONCE and WRITE_ONCE, but only when the compiler is aware of some + * particular ordering. One way to make the compiler aware of ordering is to + * put the two invocations of READ_ONCE or WRITE_ONCE in different C + * statements. + * + * These two macros will also work on aggregate data types like structs or + * unions. + * + * Their two major use cases are: (1) Mediating communication between + * process-level code and irq/NMI handlers, all running on the same CPU, + * and (2) Ensuring that the compiler does not fold, spindle, or otherwise + * mutilate accesses that either do not require ordering or that interact + * with an explicit memory barrier or atomic instruction that provides the + * required ordering. + */ +#ifndef __ASM_GENERIC_RWONCE_H +#define __ASM_GENERIC_RWONCE_H + +#ifndef __ASSEMBLY__ + +#include +#include +#include + +/* + * Yes, this permits 64-bit accesses on 32-bit architectures. These will + * actually be atomic in some cases (namely Armv7 + LPAE), but for others we + * rely on the access being split into 2x32-bit accesses for a 32-bit quantity + * (e.g. a virtual address) and a strong prevailing wind. + */ +#define compiletime_assert_rwonce_type(t) \ + compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ + "Unsupported access size for {READ,WRITE}_ONCE().") + +/* + * Use __READ_ONCE() instead of READ_ONCE() if you do not require any + * atomicity. Note that this may result in tears! + */ +#ifndef __READ_ONCE +#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) +#endif + +#define READ_ONCE(x) \ +({ \ + compiletime_assert_rwonce_type(x); \ + __READ_ONCE(x); \ +}) + +#define __WRITE_ONCE(x, val) \ +do { \ + *(volatile typeof(x) *)&(x) = (val); \ +} while (0) + +#define WRITE_ONCE(x, val) \ +do { \ + compiletime_assert_rwonce_type(x); \ + __WRITE_ONCE(x, val); \ +} while (0) + +static __always_inline +unsigned long __read_once_word_nocheck(const void *addr) +{ + return __READ_ONCE(*(unsigned long *)addr); +} + +/* + * Use READ_ONCE_NOCHECK() instead of READ_ONCE() if you need to load a + * word from memory atomically but without telling KASAN/KCSAN. This is + * usually used by unwinding code when walking the stack of a running process. + */ +#define READ_ONCE_NOCHECK(x) \ +({ \ + compiletime_assert(sizeof(x) == sizeof(unsigned long), \ + "Unsupported access size for READ_ONCE_NOCHECK()."); \ + (typeof(x))__read_once_word_nocheck(&(x)); \ +}) + +static __always_inline +unsigned long read_word_at_a_time(const void *addr) +{ + kasan_check_read(addr, 1); + return *(unsigned long *)addr; +} + +#endif /* __ASSEMBLY__ */ +#endif /* __ASM_GENERIC_RWONCE_H */ diff --git a/meta-openbmc-mods/meta-common/recipes-core/dropbear/dropbear_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/dropbear/dropbear_%.bbappend index 9d5dcf6b0..029defb67 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/dropbear/dropbear_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/dropbear/dropbear_%.bbappend @@ -1,22 +1,12 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" -SRC_URI += "file://enable-ssh.sh" - -add_manual_ssh_enable() { - install -d ${D}/usr/share/misc - install -m 0755 ${D}/${systemd_unitdir}/system/dropbear@.service ${D}/usr/share/misc/dropbear@.service - install -m 0755 ${D}/${systemd_unitdir}/system/dropbear.socket ${D}/usr/share/misc/dropbear.socket - install -m 0755 ${WORKDIR}/enable-ssh.sh ${D}${bindir}/enable-ssh.sh - # Remove dropbear service and socket by default, if debug-tweaks is disabled - rm ${D}/${systemd_unitdir}/system/dropbear@.service - rm ${D}/${systemd_unitdir}/system/dropbear.socket -} +SRC_URI += "file://enable-ssh.sh \ + file://0001-Enable-UART-mux-setting-before-SOL-activation-via-SS.patch \ + " do_install:append() { - # Add manual ssh enable script if debug-tweaks is disabled - ${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', '', 'add_manual_ssh_enable', d)} + install -m 0755 ${WORKDIR}/enable-ssh.sh ${D}${bindir}/ } -FILES:${PN} += "/usr/share/misc" -SYSTEMD_SERVICE:${PN} += "dropbearkey.service" -SYSTEMD_SERVICE:${PN}:remove += " ${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', '', 'dropbear.socket', d)}" +# Enable dropbear.socket and dropbearkey.service only for debug-tweaks +SYSTEMD_AUTO_ENABLE:${PN} = "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'debug-tweaks', 'enable', 'disable', d)}" diff --git a/meta-openbmc-mods/meta-common/recipes-core/dropbear/files/0001-Enable-UART-mux-setting-before-SOL-activation-via-SS.patch b/meta-openbmc-mods/meta-common/recipes-core/dropbear/files/0001-Enable-UART-mux-setting-before-SOL-activation-via-SS.patch new file mode 100644 index 000000000..22aed3a07 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/dropbear/files/0001-Enable-UART-mux-setting-before-SOL-activation-via-SS.patch @@ -0,0 +1,43 @@ +From 41a43e4b149af0bbfa82ca1b9479dd7dfb2455de Mon Sep 17 00:00:00 2001 +From: Chalapathi Venkataramashetty +Date: Wed, 13 Oct 2021 22:52:34 +0000 +Subject: [PATCH] Enable UART mux setting before SOL activation via SSH + +Switching UART routing when starting obmc-service introduces garbled +character printing out on physical host serial output and it's +inevitable so this commit moves the routing logic into host console +connection flow in SSH SOL to avoid the issue until SOL is actually +activated. + +Tested: SOL activation is working fine via SSH + +Signed-off-by: Chalapathi Venkataramashetty +--- + svr-runopts.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/svr-runopts.c b/svr-runopts.c +index 2c905dd..6fc25e8 100644 +--- a/svr-runopts.c ++++ b/svr-runopts.c +@@ -414,6 +414,17 @@ void svr_getopts(int argc, char ** argv) { + } + + if (svr_opts.forced_command) { ++ if (strcmp(svr_opts.forced_command, "/usr/bin/obmc-console-client") == 0) { ++ FILE *fp; ++ fp = fopen("/sys/bus/platform/drivers/aspeed-uart-routing/" ++ "1e789098.uart-routing/hicra", ++ "w"); ++ if (fp != NULL) { ++ char *uartMuxCtrlVal = "0x03450003"; ++ fprintf(fp, "%s", uartMuxCtrlVal); ++ fclose(fp); ++ } ++ } + dropbear_log(LOG_INFO, "Forced command set to '%s'", svr_opts.forced_command); + } + #if DROPBEAR_PLUGIN +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-core/dropbear/files/enable-ssh.sh b/meta-openbmc-mods/meta-common/recipes-core/dropbear/files/enable-ssh.sh index 922aa09f5..01ebe098f 100755 --- a/meta-openbmc-mods/meta-common/recipes-core/dropbear/files/enable-ssh.sh +++ b/meta-openbmc-mods/meta-common/recipes-core/dropbear/files/enable-ssh.sh @@ -1,38 +1,21 @@ #!/bin/sh -usage="$(basename "$0") [-h] [-d] -- Enable/Disable ssh for root user +usage="$(basename $0) [-h] [-d] -- Enable/Disable ssh for root user where: -h help -d disable ssh and remove priv-admin permission for root user" enable_ssh() { - if [ -e /etc/systemd/system/dropbear@.service ] && - [ -e /etc/systemd/system/sockets.target.wants/dropbear.socket ]; then - echo "SSH is already enabled" - else - cp /usr/share/misc/dropbear@.service /etc/systemd/system/dropbear@.service - cp /usr/share/misc/dropbear.socket /etc/systemd/system/dropbear.socket - ln -s /etc/systemd/system/dropbear.socket /etc/systemd/system/sockets.target.wants/dropbear.socket - groupmems -g priv-admin -a root - systemctl daemon-reload - systemctl restart dropbear.socket - echo "Enabled SSH service for root user successful" - fi + systemctl enable --now dropbear.socket + groupmems -g priv-admin -a root + echo "Enabled SSH service for root user successful" } disable_ssh() { - if [ -e /etc/systemd/system/dropbear@.service ] && - [ -e /etc/systemd/system/sockets.target.wants/dropbear.socket ]; then - systemctl stop dropbear.socket - systemctl stop dropbear@*.service - rm -rf /etc/systemd/system/sockets.target.wants/dropbear.socket - rm -rf /etc/systemd/system/dropbear.socket - rm -rf /etc/systemd/system/dropbear@.service - groupmems -g priv-admin -d root - echo "SSH disabled" - else - echo "SSH is already disabled" - fi + systemctl disable --now dropbear.socket + systemctl stop dropbear@*.service + groupmems -g priv-admin -d root + echo "Disabled SSH service" } case "$1" in diff --git a/meta-openbmc-mods/meta-common/recipes-core/fw-update/intel-fw-update.bb b/meta-openbmc-mods/meta-common/recipes-core/fw-update/intel-fw-update.bb index df7d6e7f1..fb76cfb3c 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/fw-update/intel-fw-update.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/fw-update/intel-fw-update.bb @@ -18,7 +18,11 @@ PFR_EN = "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'pfr', '', d)}" SRC_URI += "file://fwupd.sh" SRC_URI += "file://usb-ctrl" -FILES:${PN} += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '${datadir}/pfr', '', d)}" +DEPENDS += "obmc-intel-pfr-image-native" + +# runtime authentication of some features requires the root key certificate +FILES:${PN} += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '${datadir}/pfr/rk_cert.pem', '', d)}" +PFR_CFG_DIR = "${STAGING_DIR_NATIVE}${datadir}/pfrconfig" do_install() { install -d ${D}${bindir} @@ -26,7 +30,7 @@ do_install() { install -m 0755 ${WORKDIR}/usb-ctrl ${D}${bindir} if [ "${PFR_EN}" = "pfr" ]; then - install -d ${D}${datadir} - touch ${D}${datadir}/pfr + install -d ${D}${datadir}/pfr + install -m 0644 ${PFR_CFG_DIR}/rk_cert.pem ${D}${datadir}/pfr fi } diff --git a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend index eec234e96..4b0ce63f9 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/host-error-monitor/host-error-monitor_%.bbappend @@ -1,4 +1,4 @@ SRC_URI = "git://github.com/openbmc/host-error-monitor" -SRCREV = "4a6e45c4c2f38bc64afe5faac05ea82b3adb8d93" +SRCREV = "1c208480e6de77a5a41b0733c595e8d4a99e5311" EXTRA_OECMAKE = "-DYOCTO=1" diff --git a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/asm/rwonce.h b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/asm/rwonce.h new file mode 100644 index 000000000..c8beb875d --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp/asm/rwonce.h @@ -0,0 +1,89 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Prevent the compiler from merging or refetching reads or writes. The + * compiler is also forbidden from reordering successive instances of + * READ_ONCE and WRITE_ONCE, but only when the compiler is aware of some + * particular ordering. One way to make the compiler aware of ordering is to + * put the two invocations of READ_ONCE or WRITE_ONCE in different C + * statements. + * + * These two macros will also work on aggregate data types like structs or + * unions. + * + * Their two major use cases are: (1) Mediating communication between + * process-level code and irq/NMI handlers, all running on the same CPU, + * and (2) Ensuring that the compiler does not fold, spindle, or otherwise + * mutilate accesses that either do not require ordering or that interact + * with an explicit memory barrier or atomic instruction that provides the + * required ordering. + */ +#ifndef __ASM_GENERIC_RWONCE_H +#define __ASM_GENERIC_RWONCE_H + +#ifndef __ASSEMBLY__ + +#include +#include +#include + +/* + * Yes, this permits 64-bit accesses on 32-bit architectures. These will + * actually be atomic in some cases (namely Armv7 + LPAE), but for others we + * rely on the access being split into 2x32-bit accesses for a 32-bit quantity + * (e.g. a virtual address) and a strong prevailing wind. + */ +#define compiletime_assert_rwonce_type(t) \ + compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ + "Unsupported access size for {READ,WRITE}_ONCE().") + +/* + * Use __READ_ONCE() instead of READ_ONCE() if you do not require any + * atomicity. Note that this may result in tears! + */ +#ifndef __READ_ONCE +#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) +#endif + +#define READ_ONCE(x) \ + ({ \ + compiletime_assert_rwonce_type(x); \ + __READ_ONCE(x); \ + }) + +#define __WRITE_ONCE(x, val) \ + do { \ + *(volatile typeof(x) *)&(x) = (val); \ + } while (0) + +#define WRITE_ONCE(x, val) \ + do { \ + compiletime_assert_rwonce_type(x); \ + __WRITE_ONCE(x, val); \ + } while (0) + +static __always_inline unsigned long __read_once_word_nocheck(const void *addr) +{ + return __READ_ONCE(*(unsigned long *)addr); +} + +/* + * Use READ_ONCE_NOCHECK() instead of READ_ONCE() if you need to load a + * word from memory atomically but without telling KASAN/KCSAN. This is + * usually used by unwinding code when walking the stack of a running process. + */ +#define READ_ONCE_NOCHECK(x) \ + ({ \ + compiletime_assert( \ + sizeof(x) == sizeof(unsigned long), \ + "Unsupported access size for READ_ONCE_NOCHECK()."); \ + (typeof(x)) __read_once_word_nocheck(&(x)); \ + }) + +static __always_inline unsigned long read_word_at_a_time(const void *addr) +{ + kasan_check_read(addr, 1); + return *(unsigned long *)addr; +} + +#endif /* __ASSEMBLY__ */ +#endif /* __ASM_GENERIC_RWONCE_H */ diff --git a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb index 5ca73964c..eba56f829 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/interfaces/libmctp_git.bb @@ -2,7 +2,7 @@ SUMMARY = "libmctp" DESCRIPTION = "Implementation of MCTP (DTMF DSP0236)" SRC_URI = "git://github.com/openbmc/libmctp.git" -SRCREV = "ae59f4fe3a3ceaf52a682ada2a2b54855fad2408" +SRCREV = "663ec39ea107c2a736f9bcb20cbfdfa623092ab1" PV = "0.1+git${SRCPV}" @@ -15,9 +15,6 @@ S = "${WORKDIR}/git" DEPENDS += "i2c-tools" -CFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include/uapi" -CFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include" - FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += "file://0001-Smbus-changes-for-libmctp.patch \ @@ -41,3 +38,10 @@ CXXFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include/uapi" CXXFLAGS:append = " -I ${STAGING_KERNEL_DIR}/include" do_configure[depends] += "virtual/kernel:do_shared_workdir" + +# Copying the depricated header from kernel as a temporary fix to resolve build breaks. +# It should be removed later after fixing the header dependency in this repository. +SRC_URI += "file://asm/rwonce.h" +do_configure:prepend() { + cp -r ${WORKDIR}/asm ${S}/asm +} diff --git a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend index 4811778ca..ac61d983c 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend @@ -2,7 +2,7 @@ EXTRA_OECMAKE += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', '-DINTEL_PF EXTRA_OECMAKE += "${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'validation-unsecure', '-DBMC_VALIDATION_UNSECURE_FEATURE=ON', '', d)}" EXTRA_OECMAKE += "-DUSING_ENTITY_MANAGER_DECORATORS=OFF" SRC_URI = "git://github.com/openbmc/intel-ipmi-oem.git" -SRCREV = "e83c70aab0479a8103638166b330a06e499f4449" +SRCREV = "9e58cfe1ba5ca5bcd5263b50730c5a231eabdd4f" FILESEXTRAPATHS:append := ":${THISDIR}/${PN}" diff --git a/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_%.bbappend index 817e164a4..cea8fd6ed 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/libpeci/libpeci_%.bbappend @@ -1,3 +1,3 @@ # Enable downstream autobump SRC_URI = "git://github.com/openbmc/libpeci" -SRCREV = "ff44e549c44c7658ec11e0c19c13c4c45900cfe4" +SRCREV = "6a00e9aa72f75d66eb8b9572c7fd3894f91c6bba" diff --git a/meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc b/meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc index 872e78eba..df43dae89 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc +++ b/meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc @@ -55,12 +55,24 @@ python() { # If no tag, provide default version if meta_vers.startswith('fatal:'): - meta_vers = '{}-0.0-0-g0'.format(gen) + ver_list = obmc_vers.split('-') + obmc_tag_list = ver_list[1].split('.') + obmc_major_revision = 0 + obmc_minor_revision = 0 + obmc_minor_spare = 0 + try: + obmc_major_revision = int(obmc_tag_list[0]) + obmc_minor_revision = int(obmc_tag_list[1]) + obmc_minor_spare = int(ver_list[2]) + except ValueError: + bb.warn("Invalid obmc_vers: {}".format(obmc_vers)) + meta_vers = '{}-{}.{}-{}-g{}'.format(gen,obmc_major_revision, + obmc_minor_revision,obmc_minor_spare,obmc_hash[0:6]) meta_hash = irun_git(d, mibase, 'rev-parse HEAD') # If no hash, provide default if meta_hash.startswith('fatal:'): - meta_hash = '00000000' + meta_hash = obmc_hash[0:7] version_id = '{}-{}'.format(meta_vers, obmc_hash[0:7]) if version_id: d.setVar('VERSION_ID', version_id) diff --git a/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb b/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb index 92d0f7cd2..cf83203ec 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/safec/safec_3.4.bb @@ -7,7 +7,7 @@ SECTION = "lib" inherit autotools pkgconfig S = "${WORKDIR}/git" -SRCREV = "bfc9f8bb8a9bfd02fde8ef3fd78fcd61411d070d" +SRCREV = "e8bf1fff157ba931692130a0ec6f2833fa7d5f87" SRC_URI = "git://github.com/rurban/safeclib.git" COMPATIBLE_HOST = '(x86_64|i.86|powerpc|powerpc64|arm|aarch64).*-linux' diff --git a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/0001-Modfiy-system.conf-DefaultTimeoutStopSec.patch b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/0001-Modfiy-system.conf-DefaultTimeoutStopSec.patch deleted file mode 100644 index 5b9f17006..000000000 --- a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/0001-Modfiy-system.conf-DefaultTimeoutStopSec.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e02932693f92d6230b5520f431e127f7b6e2183e Mon Sep 17 00:00:00 2001 -From: James Feist -Date: Tue, 6 Mar 2018 16:06:33 -0800 -Subject: [PATCH 1/1] Modfiy system.conf DefaultTimeoutStopSec - -Current time is 5 minutes, change it to 10 seconds. - -Signed-off-by: James Feist ---- - src/core/system.conf.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/system.conf.in b/src/core/system.conf.in -index 8112125468..f7a35a56bb 100644 ---- a/src/core/system.conf.in -+++ b/src/core/system.conf.in -@@ -39,7 +39,7 @@ - #DefaultStandardOutput=journal - #DefaultStandardError=inherit - #DefaultTimeoutStartSec=90s --#DefaultTimeoutStopSec=90s -+DefaultTimeoutStopSec=10s - #DefaultTimeoutAbortSec= - #DefaultRestartSec=100ms - #DefaultStartLimitIntervalSec=10s --- -2.17.1 - diff --git a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/systemd-time-wait-sync.service b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/systemd-time-wait-sync.service deleted file mode 100644 index f71aea39d..000000000 --- a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd/systemd-time-wait-sync.service +++ /dev/null @@ -1,36 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1+ -# -# 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. - -[Unit] -Description=Wait Until Kernel Time Synchronized -Documentation=man:systemd-time-wait-sync.service(8) - -# Note that this tool doesn't need CAP_SYS_TIME itself, but it's primary -# usecase is to run in conjunction with a local NTP service such as -# systemd-timesyncd.service, which is conditioned this way. There might be -# niche usecases where running this service independently is desired, but let's -# make this all "just work" for the general case, and leave it to local -# modifications to make it work in the remaining cases. - -ConditionCapability=CAP_SYS_TIME -ConditionVirtualization=!container - -DefaultDependencies=no -Before=time-sync.target shutdown.target -Wants=time-sync.target -Conflicts=shutdown.target - -[Service] -Type=oneshot -ExecStart=/lib/systemd/systemd-time-wait-sync -TimeoutStartSec=10 -RemainAfterExit=yes - -[Install] -WantedBy=sysinit.target diff --git a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend index 50f82d21e..2eb5330d8 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/systemd/systemd_%.bbappend @@ -1,20 +1,11 @@ # add some configuration overrides for systemd defaults -LICENSE = "GPL-2.0" - FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI += "file://0001-Modfiy-system.conf-DefaultTimeoutStopSec.patch \ - file://systemd-time-wait-sync.service \ - file://0002-Add-event-log-for-system-time-synchronization.patch \ +SRC_URI += "file://0002-Add-event-log-for-system-time-synchronization.patch \ " -USERADD_PACKAGES:remove = "${PN}-journal-gateway ${PN}-journal-upload ${PN}-journal-remote" - -do_install:append(){ - rm -rf ${D}/lib/udev/rules.d/80-drivers.rules - cp -f ${WORKDIR}/systemd-time-wait-sync.service ${D}/lib/systemd/system/ -} - -PACKAGECONFIG:remove = " kmod" +# We don't support loadable modules in kernel config +PACKAGECONFIG:remove = "kmod" +# Add systemd-logind service to get shutdown inhibition support PACKAGECONFIG:append = " logind" -- cgit v1.2.3