diff options
Diffstat (limited to 'meta-ampere/meta-common')
13 files changed, 85 insertions, 59 deletions
diff --git a/meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl.bb b/meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl.bb index 5c4b6a012..03f0d58ad 100644 --- a/meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl.bb +++ b/meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl.bb @@ -15,7 +15,7 @@ SRC_URI = " \ " SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE_${PN} = " \ +SYSTEMD_SERVICE:${PN} = " \ ampere-host-force-reset@.service \ " @@ -24,12 +24,12 @@ HOST_WARM_REBOOT_FORCE_TGT = "ampere-host-force-reset@.service" HOST_WARM_REBOOT_FORCE_INSTMPL = "ampere-host-force-reset@{0}.service" HOST_WARM_REBOOT_FORCE_TGTFMT = "obmc-host-force-warm-reboot@{0}.target" HOST_WARM_REBOOT_FORCE_TARGET_FMT = "../${HOST_WARM_REBOOT_FORCE_TGT}:${HOST_WARM_REBOOT_FORCE_TGTFMT}.requires/${HOST_WARM_REBOOT_FORCE_INSTMPL}" -SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_WARM_REBOOT_FORCE_TARGET_FMT', 'OBMC_HOST_INSTANCES')}" -SYSTEMD_SERVICE_${PN} += "${HOST_WARM_REBOOT_FORCE_TGT}" +SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'HOST_WARM_REBOOT_FORCE_TARGET_FMT', 'OBMC_HOST_INSTANCES')}" +SYSTEMD_SERVICE:${PN} += "${HOST_WARM_REBOOT_FORCE_TGT}" HOST_ON_RESET_HOSTTMPL = "ampere-host-on-host-check@.service" HOST_ON_RESET_HOSTINSTMPL = "ampere-host-on-host-check@{0}.service" HOST_ON_RESET_HOSTTGTFMT = "obmc-host-startmin@{0}.target" HOST_ON_RESET_HOSTFMT = "../${HOST_ON_RESET_HOSTTMPL}:${HOST_ON_RESET_HOSTTGTFMT}.requires/${HOST_ON_RESET_HOSTINSTMPL}" -SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'HOST_ON_RESET_HOSTFMT', 'OBMC_HOST_INSTANCES')}" -SYSTEMD_SERVICE_${PN} += "${HOST_ON_RESET_HOSTTMPL}" +SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'HOST_ON_RESET_HOSTFMT', 'OBMC_HOST_INSTANCES')}" +SYSTEMD_SERVICE:${PN} += "${HOST_ON_RESET_HOSTTMPL}" diff --git a/meta-ampere/meta-common/recipes-ac01/mac/ampere-mac-update.bb b/meta-ampere/meta-common/recipes-ac01/mac/ampere-mac-update.bb index 3e18ad71e..b6ddfad80 100644 --- a/meta-ampere/meta-common/recipes-ac01/mac/ampere-mac-update.bb +++ b/meta-ampere/meta-common/recipes-ac01/mac/ampere-mac-update.bb @@ -10,17 +10,17 @@ inherit systemd inherit obmc-phosphor-systemd DEPENDS = "systemd" -RDEPENDS_${PN} = "bash" +RDEPENDS:${PN} = "bash" -FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:append := "${THISDIR}/${PN}:" SRC_URI += " \ file://ampere_update_mac.sh \ " -SYSTEMD_SERVICE_${PN} = "ampere_update_mac.service" +SYSTEMD_SERVICE:${PN} = "ampere_update_mac.service" -do_install_append() { +do_install:append() { install -d ${D}/${sbindir} install -m 755 ${WORKDIR}/ampere_update_mac.sh ${D}/${sbindir} } diff --git a/meta-ampere/meta-common/recipes-ac01/packagegroups/packagegroup-ampere-apps.bb b/meta-ampere/meta-common/recipes-ac01/packagegroups/packagegroup-ampere-apps.bb index 8da9e896e..856d3dc0a 100644 --- a/meta-ampere/meta-common/recipes-ac01/packagegroups/packagegroup-ampere-apps.bb +++ b/meta-ampere/meta-common/recipes-ac01/packagegroups/packagegroup-ampere-apps.bb @@ -15,12 +15,12 @@ PROVIDES += "virtual/obmc-chassis-mgmt" PROVIDES += "virtual/obmc-flash-mgmt" PROVIDES += "virtual/obmc-system-mgmt" -RPROVIDES_${PN}-chassis += "virtual-obmc-chassis-mgmt" -RPROVIDES_${PN}-flash += "virtual-obmc-flash-mgmt" -RPROVIDES_${PN}-system += "virtual-obmc-system-mgmt" +RPROVIDES:${PN}-chassis += "virtual-obmc-chassis-mgmt" +RPROVIDES:${PN}-flash += "virtual-obmc-flash-mgmt" +RPROVIDES:${PN}-system += "virtual-obmc-system-mgmt" -SUMMARY_${PN}-chassis = "Ampere Chassis" -RDEPENDS_${PN}-chassis = " \ +SUMMARY:${PN}-chassis = "Ampere Chassis" +RDEPENDS:${PN}-chassis = " \ obmc-op-control-power \ ampere-hostctrl \ phosphor-hostlogger \ @@ -29,11 +29,11 @@ RDEPENDS_${PN}-chassis = " \ virtual/obmc-gpio-presence \ " -SUMMARY_${PN}-system = "Ampere System" -RDEPENDS_${PN}-system = " \ +SUMMARY:${PN}-system = "Ampere System" +RDEPENDS:${PN}-system = " \ " -SUMMARY_${PN}-flash = "Ampere Flash" -RDEPENDS_${PN}-flash = " \ +SUMMARY:${PN}-flash = "Ampere Flash" +RDEPENDS:${PN}-flash = " \ ampere-flash-utils \ " diff --git a/meta-ampere/meta-common/recipes-ac01/usbnet/ampere-usbnet.bb b/meta-ampere/meta-common/recipes-ac01/usbnet/ampere-usbnet.bb index f683f8015..3045fa557 100644 --- a/meta-ampere/meta-common/recipes-ac01/usbnet/ampere-usbnet.bb +++ b/meta-ampere/meta-common/recipes-ac01/usbnet/ampere-usbnet.bb @@ -11,17 +11,17 @@ inherit systemd inherit obmc-phosphor-systemd DEPENDS = "systemd" -RDEPENDS_${PN} = "bash" +RDEPENDS:${PN} = "bash" SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE_${PN} = " \ +SYSTEMD_SERVICE:${PN} = " \ ampere_add_usbnet_gadget.service \ " SRC_URI += "file://00-bmc-usb0.network" SRC_URI += "file://ampere_add_usbnet_gadget.sh" -do_install_append() { +do_install:append() { install -d ${D}${sbindir} install -d ${D}/etc/systemd/network install -m 744 ${WORKDIR}/ampere_add_usbnet_gadget.sh ${D}${sbindir}/ diff --git a/meta-ampere/meta-common/recipes-devtools/mtd/mtd-utils/0001-flashcp-support-offset-option.patch b/meta-ampere/meta-common/recipes-devtools/mtd/mtd-utils/0001-flashcp-support-offset-option.patch index 174a1cd6d..0edae05f8 100644 --- a/meta-ampere/meta-common/recipes-devtools/mtd/mtd-utils/0001-flashcp-support-offset-option.patch +++ b/meta-ampere/meta-common/recipes-devtools/mtd/mtd-utils/0001-flashcp-support-offset-option.patch @@ -1,6 +1,6 @@ -From e29268bb252b4eec5830816912817a2650b04ee9 Mon Sep 17 00:00:00 2001 +From 32c17dd886a5b506781b86c6227bb059ce33420b Mon Sep 17 00:00:00 2001 From: Tung Nguyen <tung.nguyen@amperecomputing.com> -Date: Tue, 20 Jul 2021 15:32:32 +0700 +Date: Sun, 5 Sep 2021 09:22:08 +0000 Subject: [PATCH] flashcp support offset option The flashcp command from mtd-utils just support to flash from offset 0. @@ -8,17 +8,15 @@ Add offset option to specify the start offset so that firmware can be flashed correctly Signed-off-by: Tung Nguyen <tung.nguyen@amperecomputing.com> - -%% original patch: 0001-support-flash-offset.patch --- misc-utils/flashcp.c | 50 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/misc-utils/flashcp.c b/misc-utils/flashcp.c -index d7b0a59..d1ef79c 100644 +index 341c210..0a0e75b 100644 --- a/misc-utils/flashcp.c +++ b/misc-utils/flashcp.c -@@ -90,7 +90,7 @@ static NORETURN void showusage(bool error) +@@ -91,7 +91,7 @@ static NORETURN void showusage(bool error) "\n" "Flash Copy - Written by Abraham van der Merwe <abraham@2d3d.co.za>\n" "\n" @@ -27,7 +25,7 @@ index d7b0a59..d1ef79c 100644 " %1$s -h | --help\n" " %1$s -V | --version\n" "\n" -@@ -100,6 +100,7 @@ static NORETURN void showusage(bool error) +@@ -102,6 +102,7 @@ static NORETURN void showusage(bool error) " -V | --version Show version information and exit\n" " <filename> File which you want to copy to flash\n" " <device> Flash device to write to (e.g. /dev/mtd0, /dev/mtd1, etc.)\n" @@ -35,7 +33,7 @@ index d7b0a59..d1ef79c 100644 "\n", PROGRAM_NAME); -@@ -154,6 +155,16 @@ static void safe_rewind (int fd,const char *filename) +@@ -156,6 +157,16 @@ static void safe_rewind (int fd,const char *filename) } } @@ -52,7 +50,7 @@ index d7b0a59..d1ef79c 100644 /******************************************************************************/ static int dev_fd = -1,fil_fd = -1; -@@ -167,6 +178,8 @@ static void cleanup (void) +@@ -169,6 +180,8 @@ static void cleanup (void) int main (int argc,char *argv[]) { const char *filename = NULL,*device = NULL; @@ -61,7 +59,7 @@ index d7b0a59..d1ef79c 100644 int i,flags = FLAG_NONE; ssize_t result; size_t size,written; -@@ -218,6 +231,20 @@ int main (int argc,char *argv[]) +@@ -225,6 +238,20 @@ int main (int argc,char *argv[]) showusage(true); } } @@ -82,7 +80,7 @@ index d7b0a59..d1ef79c 100644 if (optind+2 == argc) { flags |= FLAG_FILENAME; filename = argv[optind]; -@@ -226,6 +253,8 @@ int main (int argc,char *argv[]) +@@ -233,6 +260,8 @@ int main (int argc,char *argv[]) flags |= FLAG_DEVICE; device = argv[optind+1]; DEBUG("Got device: %s\n",device); @@ -91,7 +89,7 @@ index d7b0a59..d1ef79c 100644 } if (flags & FLAG_HELP || device == NULL) -@@ -257,6 +286,12 @@ int main (int argc,char *argv[]) +@@ -264,6 +293,12 @@ int main (int argc,char *argv[]) exit (EXIT_FAILURE); } @@ -101,10 +99,10 @@ index d7b0a59..d1ef79c 100644 + exit(EXIT_FAILURE); + } + - /***************************************************** - * erase enough blocks so that we can write the file * - *****************************************************/ -@@ -271,6 +306,8 @@ int main (int argc,char *argv[]) + /* diff block flashcp */ + if (flags & FLAG_PARTITION) + { +@@ -284,6 +319,8 @@ int main (int argc,char *argv[]) } else { @@ -113,7 +111,7 @@ index d7b0a59..d1ef79c 100644 erase.length = (filestat.st_size + mtd.erasesize - 1) / mtd.erasesize; erase.length *= mtd.erasesize; } -@@ -317,6 +354,12 @@ int main (int argc,char *argv[]) +@@ -330,6 +367,12 @@ int main (int argc,char *argv[]) size = filestat.st_size; i = BUFSIZE; written = 0; @@ -126,7 +124,7 @@ index d7b0a59..d1ef79c 100644 while (size) { if (size < BUFSIZE) i = size; -@@ -361,8 +404,9 @@ int main (int argc,char *argv[]) +@@ -374,8 +417,9 @@ int main (int argc,char *argv[]) * verify that flash == file data * **********************************/ @@ -139,5 +137,5 @@ index d7b0a59..d1ef79c 100644 i = BUFSIZE; written = 0; -- -2.17.1 +2.25.1 diff --git a/meta-ampere/meta-common/recipes-devtools/mtd/mtd-utils_%.bbappend b/meta-ampere/meta-common/recipes-devtools/mtd/mtd-utils_%.bbappend index 08aa3ce69..6f3e20319 100644 --- a/meta-ampere/meta-common/recipes-devtools/mtd/mtd-utils_%.bbappend +++ b/meta-ampere/meta-common/recipes-devtools/mtd/mtd-utils_%.bbappend @@ -1,3 +1,3 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += "file://0001-flashcp-support-offset-option.patch " diff --git a/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf b/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf index 656f1d3fb..121833f36 100644 --- a/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf +++ b/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog/rsyslog.conf @@ -12,7 +12,26 @@ # journal workaround to avoid duplicate entries module(load="imjournal" StateFile="/var/log/state" RateLimit.Interval="60" - RateLimit.Burst="2000") + RateLimit.Burst="4000") + +# Template for IPMI SEL messages +# "<timestamp> <ID>,<Type>,<EventData>,[<Generator ID>,<Path>,<Direction>]" +template(name="IPMISELTemplate" type="list") { + property(name="timereported" dateFormat="rfc3339") + constant(value=" ") + property(name="$!IPMI_SEL_RECORD_ID") + constant(value=",") + property(name="$!IPMI_SEL_RECORD_TYPE") + constant(value=",") + property(name="$!IPMI_SEL_DATA") + constant(value=",") + property(name="$!IPMI_SEL_GENERATOR_ID") + constant(value=",") + property(name="$!IPMI_SEL_SENSOR_PATH") + constant(value=",") + property(name="$!IPMI_SEL_EVENT_DIR") + constant(value="\n") +} # Template for Redfish messages # "<timestamp> <MessageId>,<MessageArgs>" @@ -37,6 +56,13 @@ template(name="CrashTemplate" type="list") { } +# If the journal entry has the IPMI SEL MESSAGE_ID, save as IPMI SEL +# The MESSAGE_ID string is generated using journalctl and must match the +# MESSAGE_ID used in IPMI to correctly find the SEL entries. +if ($!MESSAGE_ID == "b370836ccf2f4850ac5bee185b77893a") then { + action(type="omfile" file="/var/log/ipmi_sel" template="IPMISELTemplate") +} + # If the journal entry has a Redfish MessageId, save as a Redfish event if ($!REDFISH_MESSAGE_ID != "") then { action(type="omfile" file="/var/log/redfish" template="RedfishTemplate") diff --git a/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend b/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend index f667fb649..034ae3cfa 100644 --- a/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend +++ b/meta-ampere/meta-common/recipes-extended/rsyslog/rsyslog_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += "file://rsyslog.conf \ file://rsyslog.logrotate \ @@ -7,11 +7,11 @@ SRC_URI += "file://rsyslog.conf \ file://rsyslog-override.conf \ " -FILES_${PN} += "${systemd_system_unitdir}/rsyslog.service.d/rsyslog-override.conf" +FILES:${PN} += "${systemd_system_unitdir}/rsyslog.service.d/rsyslog-override.conf" -PACKAGECONFIG_append = " imjournal" +PACKAGECONFIG:append = " imjournal" -do_install_append() { +do_install:append() { install -m 0644 ${WORKDIR}/rotate-event-logs.service ${D}${systemd_system_unitdir} install -d ${D}${systemd_system_unitdir}/rsyslog.service.d install -m 0644 ${WORKDIR}/rsyslog-override.conf \ @@ -21,4 +21,4 @@ do_install_append() { rm ${D}${sysconfdir}/rsyslog.d/imjournal.conf } -SYSTEMD_SERVICE_${PN} += " rotate-event-logs.service" +SYSTEMD_SERVICE:${PN} += " rotate-event-logs.service" diff --git a/meta-ampere/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend b/meta-ampere/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend index 5d75c711f..f5a250d60 100644 --- a/meta-ampere/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend +++ b/meta-ampere/meta-common/recipes-phosphor/flash/phosphor-software-manager_%.bbappend @@ -1,7 +1,7 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" PACKAGECONFIG[flash_bios] = "-Dhost-bios-upgrade=enabled, -Dhost-bios-upgrade=disabled" -PACKAGECONFIG_append_ = " flash_bios" +PACKAGECONFIG:append_ = " flash_bios" -SYSTEMD_SERVICE_${PN}-updater += "${@bb.utils.contains('PACKAGECONFIG', 'flash_bios', 'obmc-flash-host-bios@.service', '', d)}" +SYSTEMD_SERVICE:${PN}-updater += "${@bb.utils.contains('PACKAGECONFIG', 'flash_bios', 'obmc-flash-host-bios@.service', '', d)}" diff --git a/meta-ampere/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-ampere/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend index 15fb5e670..bae82cefc 100644 --- a/meta-ampere/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend +++ b/meta-ampere/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend @@ -1,7 +1,7 @@ -FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:append := "${THISDIR}/${PN}:" -EXTRA_OEMESON_append = " \ - -Dinsecure-tftp-update=enabled \ +EXTRA_OEMESON:append = " \ + -Dinsecure-tftp-update=disabled \ -Dbmcweb-logging=enabled \ -Dredfish-bmc-journal=enabled \ " diff --git a/meta-ampere/meta-common/recipes-phosphor/network/phosphor-network_%.bbappend b/meta-ampere/meta-common/recipes-phosphor/network/phosphor-network_%.bbappend index b2883fcaf..ef2e2bab4 100644 --- a/meta-ampere/meta-common/recipes-phosphor/network/phosphor-network_%.bbappend +++ b/meta-ampere/meta-common/recipes-phosphor/network/phosphor-network_%.bbappend @@ -1 +1 @@ -PACKAGECONFIG_append = " nic-ethtool" +PACKAGECONFIG:append = " nic-ethtool" diff --git a/meta-ampere/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend b/meta-ampere/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend index 2f74fd2c3..ba300eab2 100644 --- a/meta-ampere/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend +++ b/meta-ampere/meta-common/recipes-phosphor/sel-logger/phosphor-sel-logger_%.bbappend @@ -1 +1 @@ -PACKAGECONFIG_append = " log-threshold" +PACKAGECONFIG:append = " log-threshold" diff --git a/meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend b/meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend index bdb89ce63..b25ba5d94 100644 --- a/meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend +++ b/meta-ampere/meta-common/recipes-phosphor/state/phosphor-state-manager_%.bbappend @@ -1,13 +1,15 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" DEPS_CFG = "resetreason.conf" DEPS_TGT = "phosphor-discover-system-state@.service" -SYSTEMD_OVERRIDE_${PN}-discover_append = "${DEPS_CFG}:${DEPS_TGT}.d/${DEPS_CFG}" +SYSTEMD_OVERRIDE:${PN}-discover:append = "${DEPS_CFG}:${DEPS_TGT}.d/${DEPS_CFG}" + +FILES:${PN} += "${systemd_system_unitdir}/*" SRC_URI += " \ file://ampere-reset-host-check@.service \ " -do_install_append() { +do_install:append() { install -m 0644 ${WORKDIR}/ampere-reset-host-check@.service ${D}${systemd_unitdir}/system/phosphor-reset-host-check@.service -}
\ No newline at end of file +} |