diff options
259 files changed, 3013 insertions, 1509 deletions
diff --git a/meta-amd/meta-ethanolx/conf/bblayers.conf.sample b/meta-amd/meta-ethanolx/conf/bblayers.conf.sample index 2b8d624bc..be7eb7c0f 100644 --- a/meta-amd/meta-ethanolx/conf/bblayers.conf.sample +++ b/meta-amd/meta-ethanolx/conf/bblayers.conf.sample @@ -17,15 +17,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-amd \ ##OEROOT##/meta-amd/meta-ethanolx \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-amd \ - ##OEROOT##/meta-amd/meta-ethanolx \ - " 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 ede8d9db5..9f1461905 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 @@ -26,7 +26,6 @@ RDEPENDS:${PN}-chassis = " \ phosphor-hostlogger \ phosphor-sel-logger \ phosphor-logging \ - virtual/obmc-gpio-presence \ " SUMMARY:${PN}-system = "Ampere System" 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 deleted file mode 100644 index 0edae05f8..000000000 --- a/meta-ampere/meta-common/recipes-devtools/mtd/mtd-utils/0001-flashcp-support-offset-option.patch +++ /dev/null @@ -1,141 +0,0 @@ -From 32c17dd886a5b506781b86c6227bb059ce33420b Mon Sep 17 00:00:00 2001 -From: Tung Nguyen <tung.nguyen@amperecomputing.com> -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. -Add offset option to specify the start offset so that firmware can be -flashed correctly - -Signed-off-by: Tung Nguyen <tung.nguyen@amperecomputing.com> ---- - 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 341c210..0a0e75b 100644 ---- a/misc-utils/flashcp.c -+++ b/misc-utils/flashcp.c -@@ -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" -- "usage: %1$s [ -v | --verbose | -A | --erase-all ] <filename> <device>\n" -+ "usage: %1$s [ -v | --verbose | -A | --erase-all ] <filename> <device> <offset>\n" - " %1$s -h | --help\n" - " %1$s -V | --version\n" - "\n" -@@ -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" -+ " <offset> The start offset. Optional, default: 0\n" - "\n", - PROGRAM_NAME); - -@@ -156,6 +157,16 @@ static void safe_rewind (int fd,const char *filename) - } - } - -+static int safe_rewind_offset(int fd, const char *filename, off_t offset) -+{ -+ if (lseek(fd, offset, SEEK_SET) < 0) { -+ log_printf(LOG_ERROR, "While seeking to start of %s: %m\n", filename); -+ return EXIT_FAILURE; -+ } -+ -+ return EXIT_SUCCESS; -+} -+ - /******************************************************************************/ - - static int dev_fd = -1,fil_fd = -1; -@@ -169,6 +180,8 @@ static void cleanup (void) - int main (int argc,char *argv[]) - { - const char *filename = NULL,*device = NULL; -+ off_t offset; -+ - int i,flags = FLAG_NONE; - ssize_t result; - size_t size,written; -@@ -225,6 +238,20 @@ int main (int argc,char *argv[]) - showusage(true); - } - } -+ -+ if (optind + 3 == argc) { -+ flags |= FLAG_FILENAME; -+ filename = argv[optind]; -+ DEBUG("Got filename: %s\n", filename); -+ -+ flags |= FLAG_DEVICE; -+ device = argv[optind + 1]; -+ DEBUG("Got device: %s\n", device); -+ -+ offset = strtoul(argv[optind + 2], NULL, 16); -+ DEBUG("Got offset: 0x%x\n", offset); -+ } -+ - if (optind+2 == argc) { - flags |= FLAG_FILENAME; - filename = argv[optind]; -@@ -233,6 +260,8 @@ int main (int argc,char *argv[]) - flags |= FLAG_DEVICE; - device = argv[optind+1]; - DEBUG("Got device: %s\n",device); -+ -+ offset = 0; - } - - if (flags & FLAG_HELP || device == NULL) -@@ -264,6 +293,12 @@ int main (int argc,char *argv[]) - exit (EXIT_FAILURE); - } - -+ /* does offset is out of the mtd */ -+ if (offset > mtd.size) { -+ log_printf(LOG_ERROR, "%s offset won't fit into %s!\n", offset, device); -+ exit(EXIT_FAILURE); -+ } -+ - /* diff block flashcp */ - if (flags & FLAG_PARTITION) - { -@@ -284,6 +319,8 @@ int main (int argc,char *argv[]) - } - else - { -+ /* Erase from the offset */ -+ erase.start = offset; - erase.length = (filestat.st_size + mtd.erasesize - 1) / mtd.erasesize; - erase.length *= mtd.erasesize; - } -@@ -330,6 +367,12 @@ int main (int argc,char *argv[]) - size = filestat.st_size; - i = BUFSIZE; - written = 0; -+ -+ /* if offset is greater than 0 */ -+ if (offset) -+ if (safe_rewind_offset(dev_fd, device, offset) != EXIT_SUCCESS) -+ return EXIT_FAILURE; -+ - while (size) - { - if (size < BUFSIZE) i = size; -@@ -374,8 +417,9 @@ int main (int argc,char *argv[]) - * verify that flash == file data * - **********************************/ - -- safe_rewind (fil_fd,filename); -- safe_rewind (dev_fd,device); -+ safe_rewind(fil_fd, filename); -+ safe_rewind_offset(dev_fd, device, offset); -+ - size = filestat.st_size; - i = BUFSIZE; - written = 0; --- -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 deleted file mode 100644 index 6f3e20319..000000000 --- a/meta-ampere/meta-common/recipes-devtools/mtd/mtd-utils_%.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" - -SRC_URI += "file://0001-flashcp-support-offset-option.patch " diff --git a/meta-ampere/meta-jade/recipes-phosphor/inventory/inventory-cleanup.bb b/meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup.bb index 1b5a119b1..1b5a119b1 100644 --- a/meta-ampere/meta-jade/recipes-phosphor/inventory/inventory-cleanup.bb +++ b/meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup.bb diff --git a/meta-ampere/meta-jade/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml b/meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml index 3fa190852..23f54e331 100644 --- a/meta-ampere/meta-jade/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml +++ b/meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml @@ -1,5 +1,5 @@ description: > - Mt.Jade inventory fixups + Ampere inventory fixups events: - name: Add Chassis interface diff --git a/meta-ampere/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend b/meta-ampere/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend new file mode 100644 index 000000000..75177dce1 --- /dev/null +++ b/meta-ampere/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend @@ -0,0 +1,9 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +inherit obmc-phosphor-systemd + +HOSTIPMI_PROVIDER_LIBRARY:remove = "libstrgfnhandler.so" + +do_install:append () { + rm -rf ${D}${libdir}/ipmid-providers +} diff --git a/meta-ampere/meta-jade/conf/bblayers.conf.sample b/meta-ampere/meta-jade/conf/bblayers.conf.sample index 6e0893eb3..6427c8b1b 100644 --- a/meta-ampere/meta-jade/conf/bblayers.conf.sample +++ b/meta-ampere/meta-jade/conf/bblayers.conf.sample @@ -17,15 +17,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-ampere \ ##OEROOT##/meta-ampere/meta-jade \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-ampere \ - ##OEROOT##/meta-ampere/meta-jade \ - " diff --git a/meta-ampere/meta-jade/conf/machine/mtjade.conf b/meta-ampere/meta-jade/conf/machine/mtjade.conf index 633efa012..40bd0f81e 100644 --- a/meta-ampere/meta-jade/conf/machine/mtjade.conf +++ b/meta-ampere/meta-jade/conf/machine/mtjade.conf @@ -14,8 +14,6 @@ FLASH_KERNEL_OFFSET = "1024" FLASH_ROFS_OFFSET = "10240" FLASH_RWFS_OFFSET = "43008" -OBMC_POWER_SUPPLY_INSTANCES = "0 1" - MACHINE_FEATURES += "\ obmc-phosphor-chassis-mgmt \ obmc-phosphor-flash-mgmt \ @@ -32,9 +30,9 @@ OBMC_IMAGE_EXTRA_INSTALL:append = "\ ampere-flash-utils \ ampere-mac-update \ mtjade-gpio-config \ - mtd-utils \ ampere-platform-init \ ampere-ipmi-oem \ + phosphor-nvme \ " PREFERRED_PROVIDER_virtual/obmc-chassis-mgmt = "packagegroup-ampere-apps" diff --git a/meta-ampere/meta-jade/recipes-ampere/flash/ampere-flash-utils.bb b/meta-ampere/meta-jade/recipes-ampere/flash/ampere-flash-utils.bb index 241070c4e..844709b91 100644 --- a/meta-ampere/meta-jade/recipes-ampere/flash/ampere-flash-utils.bb +++ b/meta-ampere/meta-jade/recipes-ampere/flash/ampere-flash-utils.bb @@ -9,6 +9,7 @@ RDEPENDS:${PN} = "bash" DEPENDS = "zlib" SRC_URI += "\ + file://ampere_firmware_upgrade.sh \ file://ampere_flash_bios.sh \ " @@ -19,5 +20,6 @@ LDFLAGS += "-L ${ROOT}/usr/lib/ -lz " do_install:append() { install -d ${D}/usr/sbin + install -m 0755 ${WORKDIR}/ampere_firmware_upgrade.sh ${D}/${sbindir}/ampere_firmware_upgrade.sh install -m 0755 ${S}/ampere_flash_bios.sh ${D}/${sbindir}/ampere_flash_bios.sh } diff --git a/meta-ampere/meta-jade/recipes-ampere/flash/ampere-flash-utils/ampere_firmware_upgrade.sh b/meta-ampere/meta-jade/recipes-ampere/flash/ampere-flash-utils/ampere_firmware_upgrade.sh new file mode 100755 index 000000000..130682d12 --- /dev/null +++ b/meta-ampere/meta-jade/recipes-ampere/flash/ampere-flash-utils/ampere_firmware_upgrade.sh @@ -0,0 +1,144 @@ +#!/bin/bash + +do_fru_upgrade() { + FRU_DEVICE="/sys/bus/i2c/devices/3-0050/eeprom" + + if ! command -v ampere_fru_upgrade; + then + echo "Bypass fru update as no ampere_fru_upgrade available" + exit + fi + ampere_fru_upgrade -d $FRU_DEVICE -f "$IMAGE" + + systemctl restart xyz.openbmc_project.FruDevice.service + systemctl restart phosphor-ipmi-host.service +} + +do_smpmpro_upgrade() { + I2C_BUS_DEV="1" + EEPROM_ADDR="0x50" + + if ! command -v ampere_eeprom_prog; + then + echo "Bypass SCP firmware update as no ampere_eeprom_prog available" + exit + fi + echo "SECPRO mode: $SECPRO" + # Turn off the Host if it is currently ON + chassisstate=$(obmcutil chassisstate | awk -F. '{print $NF}') + echo "Current Chassis State: $chassisstate" + if [ "$chassisstate" == 'On' ]; + then + echo "Turning the Chassis off" + obmcutil chassisoff + sleep 15 + # Check if HOST was OFF + chassisstate_off=$(obmcutil chassisstate | awk -F. '{print $NF}') + if [ "$chassisstate_off" == 'On' ]; + then + echo "Error : Failed turning the Chassis off" + exit + fi + fi + + if [[ $SECPRO == 1 ]]; then + # 3 is S0_SPECIAL_BOOT + gpioset 0 3=1 + # 66 is S1_SPECIAL_BOOT + gpioset 0 66=1 + fi + + # Switch EEPROM control to BMC AST2500 I2C + # 226 is BMC_GPIOAC2_SPI0_PROGRAM_SEL + gpioset 0 226=0 + + # 08 is BMC_GPIOB0_I2C_BACKUP_SEL + if [[ $DEV_SEL == 1 ]]; then + echo "Run update primary Boot EEPROM" + gpioset 0 8=1 # Main EEPROM + elif [[ $DEV_SEL == 2 ]]; then + echo "Run update secondary Boot EEPROM" + gpioset 0 8=0 # Second EEPROM + else + echo "Please choose Main (1) or Second EEPROM (2)" + exit 0 + fi + + # Write Firmware to EEPROM and read back for validation + ampere_eeprom_prog -b $I2C_BUS_DEV -s $EEPROM_ADDR -p -f "$IMAGE" + + # Switch EEPROM control to Host + # 08 is BMC_GPIOB0_I2C_BACKUP_SEL + gpioset 0 8=1 + # 226 is BMC_GPIOAC2_SPI0_PROGRAM_SEL + gpioset 0 226=1 + + if [ "$chassisstate" == 'On' ]; + then + sleep 5 + echo "Turn on the Host" + obmcutil poweron + fi + + # Deassert SECPRO GPIO PINs + if [[ $SECPRO == 1 ]]; then + chassisstate=$(obmcutil chassisstate | awk -F. '{print $NF}') + if [ "$chassisstate_off" == 'Off' ]; then + obmcutil poweron + fi + + sleep 30s + echo "De-asserting special GPIO PINs" + # 3 is S0_SPECIAL_BOOT + gpioset 0 3=0 + # 66 is S1_SPECIAL_BOOT + gpioset 0 66=0 + fi +} + + +if [ $# -eq 0 ]; then + echo "Usage:" + echo " $(basename "$0") <Type> <Image file> <DEV_SEL> [SECPRO]" + echo "Where:" + echo " <Type>: smpmpro or fru" + echo " If Type is smpmpro, then DEV_SEL must is 1 (MAIN EEPROM), 2 (Failover)" + echo " SECPRO: Optional, input '1' to enter & flash secpro mode. Default: 0" + exit 0 +fi + +TYPE=$1 +IMAGE=$2 +if [ -z "$3" ] +then + DEV_SEL="1" # by default, select Main image +else + DEV_SEL=$3 +fi + +SECPRO=0 +if [ -n "$4" ]; then + if [[ "$4" == "1" ]]; then + SECPRO=1 + fi +fi + +MANIFEST="$(echo "$IMAGE" | cut -d'/' -f-4)/MANIFEST" +if [ -f "$MANIFEST" ]; then + echo "MANIFEST: $MANIFEST" + if grep -qF "SECPRO" "$MANIFEST"; then + SECPRO=1 + fi +fi + +# Restrict to flash failover in case of SECPRO +if [ $SECPRO == 1 ] && [ "$DEV_SEL" == 2 ]; then + echo "Not allow to flash the failover with SECPRO image" + exit +fi + +if [[ $TYPE == "smpmpro" ]]; then + do_smpmpro_upgrade +elif [[ $TYPE == "fru" ]]; then + do_fru_upgrade +fi diff --git a/meta-ampere/meta-jade/recipes-ampere/flash/ampere-flash-utils/ampere_flash_bios.sh b/meta-ampere/meta-jade/recipes-ampere/flash/ampere-flash-utils/ampere_flash_bios.sh index b7f4bc52e..b13e4b50a 100755 --- a/meta-ampere/meta-jade/recipes-ampere/flash/ampere-flash-utils/ampere_flash_bios.sh +++ b/meta-ampere/meta-jade/recipes-ampere/flash/ampere-flash-utils/ampere_flash_bios.sh @@ -15,10 +15,8 @@ # limitations under the License. do_flash () { - OFFSET=$1 - # Check the PNOR partition available - HOST_MTD=$(< /proc/mtd grep "pnor" | sed -n 's/^\(.*\):.*/\1/p') + HOST_MTD=$(< /proc/mtd grep "pnor-uefi" | sed -n 's/^\(.*\):.*/\1/p') if [ -z "$HOST_MTD" ]; then # If the PNOR partition is not available, then bind again driver @@ -26,7 +24,7 @@ do_flash () { echo 1e630000.spi > /sys/bus/platform/drivers/aspeed-smc/bind sleep 2 - HOST_MTD=$(< /proc/mtd grep "pnor" | sed -n 's/^\(.*\):.*/\1/p') + HOST_MTD=$(< /proc/mtd grep "pnor-uefi" | sed -n 's/^\(.*\):.*/\1/p') if [ -z "$HOST_MTD" ]; then echo "Fail to probe Host SPI-NOR device" @@ -34,8 +32,8 @@ do_flash () { fi fi - echo "--- Flashing firmware to @/dev/$HOST_MTD offset=$OFFSET" - flashcp -v "$IMAGE" /dev/"$HOST_MTD" "$OFFSET" + echo "--- Flashing firmware to @/dev/$HOST_MTD" + flashcp -v "$IMAGE" /dev/"$HOST_MTD" } @@ -50,6 +48,12 @@ if [ ! -f "$IMAGE" ]; then exit 1 fi +if [ -z "$2" ]; then + DEV_SEL="1" # by default, select primary device +else + DEV_SEL="$2" +fi + # Turn off the Host if it is currently ON chassisstate=$(obmcutil chassisstate | awk -F. '{print $NF}') echo "--- Current Chassis State: $chassisstate" @@ -74,8 +78,21 @@ if ! gpioset 0 226=0; then exit 1 fi +# Switch the host SPI bus (between primary and secondary) +# 227 is BMC_SPI0_BACKUP_SEL +if [[ $DEV_SEL == 1 ]]; then + echo "Run update primary Host SPI-NOR" + gpioset 0 227=0 # Primary SPI +elif [[ $DEV_SEL == 2 ]]; then + echo "Run update secondary Host SPI-NOR" + gpioset 0 227=1 # Second SPI +else + echo "Please choose primary SPI (1) or second SPI (2)" + exit 0 +fi + # Flash the firmware -do_flash 0x400000 +do_flash # Switch the host SPI bus to HOST." echo "--- Switch the host SPI bus to HOST." diff --git a/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere-gpio-poweroff@.service b/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere-gpio-poweroff@.service index 78862eb32..fe776a5b9 100644 --- a/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere-gpio-poweroff@.service +++ b/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere-gpio-poweroff@.service @@ -1,10 +1,10 @@ [Unit] Description=Ampere set GPIOs before power off Requires=op-wait-power-off@%i.service -Before=op-wait-power-off@%i.service +After=op-wait-power-off@%i.service Conflicts=obmc-chassis-poweron@%i.target [Service] Type=oneshot ExecStart=/usr/bin/env ampere_gpio_utils.sh power off -SyslogIdentifier=ampere_gpio_utils
\ No newline at end of file +SyslogIdentifier=ampere_gpio_utils diff --git a/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere_gpio_utils.sh b/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere_gpio_utils.sh index 1a098f446..5d1a1a27a 100644 --- a/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere_gpio_utils.sh +++ b/meta-ampere/meta-jade/recipes-ampere/platform/mtjade-gpio-config/ampere_gpio_utils.sh @@ -10,14 +10,16 @@ function usage() { set_gpio_power_off() { echo "Setting GPIO before Power off" - gpio_configure_output "$OCP_AUX_PWREN" 1 gpio_configure_output "$OCP_MAIN_PWREN" 0 - gpio_configure_output "$SPI0_PROGRAM_SEL" 0 + rm -f /run/openbmc/host@0-on } set_gpio_power_on() { echo "Setting GPIO before Power on" - gpio_configure_output "$OCP_AUX_PWREN" 1 + val=$(gpio_get_val "$S0_CPU_FW_BOOT_OK") + if [ "$val" == 1 ]; then + exit + fi gpio_configure_output "$OCP_MAIN_PWREN" 1 gpio_configure_output "$SPI0_PROGRAM_SEL" 1 gpio_configure_output "$SPI0_BACKUP_SEL" 0 diff --git a/meta-ampere/meta-jade/recipes-phosphor/configuration/dbus-sensors_%.bbappend b/meta-ampere/meta-jade/recipes-phosphor/configuration/dbus-sensors_%.bbappend new file mode 100644 index 000000000..bfd03f8c5 --- /dev/null +++ b/meta-ampere/meta-jade/recipes-phosphor/configuration/dbus-sensors_%.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG:remove = " cpusensor ipmbsensor" diff --git a/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config.bb b/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config.bb index c9f27020f..376ebc075 100644 --- a/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config.bb +++ b/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config.bb @@ -5,27 +5,18 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5 inherit allarch SRC_URI = " \ - file://ipmi-sensors-${MACHINE}.yaml \ - file://mtjade-ipmi-fru.yaml \ - file://mtjade-ipmi-fru-properties.yaml \ + file://mtjade-ipmi-sensors.yaml \ " S = "${WORKDIR}" do_install() { - install -m 0644 -D ipmi-sensors-${MACHINE}.yaml \ - ${D}${datadir}/${BPN}/ipmi-sensors-${MACHINE}.yaml - cat mtjade-ipmi-fru.yaml > fru-read.yaml - install -m 0644 -D mtjade-ipmi-fru-properties.yaml \ - ${D}${datadir}/${BPN}/ipmi-extra-properties.yaml - install -m 0644 -D fru-read.yaml \ - ${D}${datadir}/${BPN}/ipmi-fru-read.yaml + install -m 0644 -D mtjade-ipmi-sensors.yaml \ + ${D}${datadir}/${BPN}/ipmi-sensors.yaml } FILES:${PN}-dev = " \ - ${datadir}/${BPN}/ipmi-sensors-${MACHINE}.yaml \ - ${datadir}/${BPN}/ipmi-extra-properties.yaml \ - ${datadir}/${BPN}/ipmi-fru-read.yaml \ - " + ${datadir}/${BPN}/ipmi-sensors.yaml \ + " ALLOW_EMPTY:${PN} = "1" diff --git a/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config/mtjade-ipmi-fru-properties.yaml b/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config/mtjade-ipmi-fru-properties.yaml deleted file mode 100644 index db8de9f40..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config/mtjade-ipmi-fru-properties.yaml +++ /dev/null @@ -1,23 +0,0 @@ -/system/chassis/motherboard: - xyz.openbmc_project.Inventory.Decorator.Replaceable: - FieldReplaceable: 'true' - xyz.openbmc_project.Inventory.Decorator.Cacheable: - Cached: 'true' - xyz.openbmc_project.Inventory.Item: - Present: 'true' - -/system/chassis: - xyz.openbmc_project.Inventory.Decorator.Replaceable: - FieldReplaceable: 'true' - xyz.openbmc_project.Inventory.Decorator.Cacheable: - Cached: 'true' - xyz.openbmc_project.Inventory.Item: - Present: 'true' - -/system: - xyz.openbmc_project.Inventory.Decorator.Replaceable: - FieldReplaceable: 'true' - xyz.openbmc_project.Inventory.Decorator.Cacheable: - Cached: 'true' - xyz.openbmc_project.Inventory.Item: - Present: 'true' diff --git a/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config/mtjade-ipmi-fru.yaml b/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config/mtjade-ipmi-fru.yaml index 80bcce434..e69de29bb 100644 --- a/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config/mtjade-ipmi-fru.yaml +++ b/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config/mtjade-ipmi-fru.yaml @@ -1,85 +0,0 @@ -0x00: - /system/chassis/motherboard: - entityID: 7 - entityInstance: 1 - interfaces: - xyz.openbmc_project.Inventory.Decorator.Asset: - BuildDate: - IPMIFruProperty: Mfg Date - IPMIFruSection: Board - PartNumber: - IPMIFruProperty: Part Number - IPMIFruSection: Board - Manufacturer: - IPMIFruProperty: Manufacturer - IPMIFruSection: Board - SerialNumber: - IPMIFruProperty: Serial Number - IPMIFruSection: Board - xyz.openbmc_project.Inventory.Item: - PrettyName: - IPMIFruProperty: Name - IPMIFruSection: Board - xyz.openbmc_project.Inventory.Item.NetworkInterface: - MACAddress: - IPMIFruProperty: Custom Field 1 - IPMIFruSection: Board - xyz.openbmc_project.Inventory.Decorator.VendorInformation: - CustomField1: - IPMIFruProperty: FRU File ID - IPMIFruSection: Board - xyz.openbmc_project.Common.UUID: - UUID: - IPMIFruProperty: UUID - IPMIFruSection: MultiRecord - /system/chassis: - entityID: 23 - entityInstance: 1 - interfaces: - xyz.openbmc_project.Inventory.Decorator.Asset: - SerialNumber: - IPMIFruProperty: Serial Number - IPMIFruSection: Chassis - PartNumber: - IPMIFruProperty: Part Number - IPMIFruSection: Chassis - Model: - IPMIFruProperty: Type - IPMIFruSection: Chassis - xyz.openbmc_project.Inventory.Decorator.VendorInformation: - CustomField2: - IPMIFruProperty: Custom Field 1 - IPMIFruSection: Chassis - /system: - entityID: 7 - entityInstance: 2 - interfaces: - xyz.openbmc_project.Inventory.Item: - PrettyName: - IPMIFruProperty: Name - IPMIFruSection: Product - xyz.openbmc_project.Inventory.Decorator.Asset: - PartNumber: - IPMIFruProperty: Model Number - IPMIFruSection: Product - Manufacturer: - IPMIFruProperty: Manufacturer - IPMIFruSection: Product - SerialNumber: - IPMIFruProperty: Serial Number - IPMIFruSection: Product - xyz.openbmc_project.Inventory.Decorator.Revision: - Version: - IPMIFruProperty: Version - IPMIFruSection: Product - xyz.openbmc_project.Inventory.Decorator.AssetTag: - AssetTag: - IPMIFruProperty: Asset Tag - IPMIFruSection: Product - xyz.openbmc_project.Inventory.Decorator.VendorInformation: - CustomField1: - IPMIFruProperty: FRU File ID - IPMIFruSection: Product - CustomField2: - IPMIFruProperty: Custom Field 1 - IPMIFruSection: Product diff --git a/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config/ipmi-sensors-mtjade.yaml b/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config/mtjade-ipmi-sensors.yaml index 959f353f3..959f353f3 100644 --- a/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config/ipmi-sensors-mtjade.yaml +++ b/meta-ampere/meta-jade/recipes-phosphor/configuration/mtjade-yaml-config/mtjade-ipmi-sensors.yaml diff --git a/meta-ampere/meta-jade/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-power-supply-0.conf b/meta-ampere/meta-jade/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-power-supply-0.conf deleted file mode 100644 index c5fc23ace..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-power-supply-0.conf +++ /dev/null @@ -1,6 +0,0 @@ -INVENTORY=/system/chassis/motherboard/powersupply0 -DEVPATH=/dev/input/by-path/platform-gpio-keys-event -KEY=64 -NAME=powersupply0 -DRIVERS=/sys/bus/i2c/drivers/pmbus,6-0058 -EXTRA_IFACES=xyz.openbmc_project.Inventory.Item.PowerSupply diff --git a/meta-ampere/meta-jade/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-power-supply-1.conf b/meta-ampere/meta-jade/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-power-supply-1.conf deleted file mode 100644 index e591227d2..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-power-supply-1.conf +++ /dev/null @@ -1,6 +0,0 @@ -INVENTORY=/system/chassis/motherboard/powersupply1 -DEVPATH=/dev/input/by-path/platform-gpio-keys-event -KEY=65 -NAME=powersupply1 -DRIVERS=/sys/bus/i2c/drivers/pmbus,6-0059 -EXTRA_IFACES=xyz.openbmc_project.Inventory.Item.PowerSupply diff --git a/meta-ampere/meta-jade/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend b/meta-ampere/meta-jade/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend deleted file mode 100644 index 527cbbda0..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend +++ /dev/null @@ -1,12 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" - -TMPL_POWERSUPPLY = "phosphor-gpio-presence@.service" -INSTFMT_POWERSUPPLY = "phosphor-gpio-presence@{0}.service" -POWERSUPPLY_TGT = "multi-user.target" -FMT_POWERSUPPLY = "../${TMPL_POWERSUPPLY}:${POWERSUPPLY_TGT}.requires/${INSTFMT_POWERSUPPLY}" - -SYSTEMD_LINK:${PN}-presence:append:mtjade = " ${@compose_list(d, 'FMT_POWERSUPPLY', 'OBMC_POWER_SUPPLY_INSTANCES')}" - -POWERSUPPLY_ENV_FMT = "obmc/gpio/phosphor-power-supply-{0}.conf" - -SYSTEMD_ENVIRONMENT_FILE:${PN}-presence:append:mtjade = " ${@compose_list(d, 'POWERSUPPLY_ENV_FMT', 'OBMC_POWER_SUPPLY_INSTANCES')}" diff --git a/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json b/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json deleted file mode 100644 index e7b3256a8..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json +++ /dev/null @@ -1,141 +0,0 @@ -[ - { - "path": "system/chassis/motherboard/powersupply0", - "endpoints": - [ - { - "types": - { - "rType": "inventory", - "fType": "sensors" - }, - "paths": - [ - "/xyz/openbmc_project/sensors/fan_tach/PSU0_fan1", - "/xyz/openbmc_project/sensors/temperature/PSU0_TEMP", - "/xyz/openbmc_project/sensors/voltage/PSU0_VINPUT", - "/xyz/openbmc_project/sensors/voltage/PSU0_VOUTPUT", - "/xyz/openbmc_project/sensors/power/PSU0_PINPUT", - "/xyz/openbmc_project/sensors/power/PSU0_POUTPUT", - "/xyz/openbmc_project/sensors/current/PSU0_IINPUT", - "/xyz/openbmc_project/sensors/current/PSU0_IOUTPUT" - ] - } - ] - }, - { - "path": "system/chassis/motherboard/powersupply1", - "endpoints": - [ - { - "types": - { - "rType": "inventory", - "fType": "sensors" - }, - "paths": - [ - "/xyz/openbmc_project/sensors/fan_tach/PSU1_fan1", - "/xyz/openbmc_project/sensors/temperature/PSU1_TEMP", - "/xyz/openbmc_project/sensors/voltage/PSU1_VINPUT", - "/xyz/openbmc_project/sensors/voltage/PSU1_VOUTPUT", - "/xyz/openbmc_project/sensors/power/PSU1_PINPUT", - "/xyz/openbmc_project/sensors/power/PSU1_POUTPUT", - "/xyz/openbmc_project/sensors/current/PSU1_IINPUT", - "/xyz/openbmc_project/sensors/current/PSU1_IOUTPUT" - ] - } - ] - }, - { - "path": "system/chassis", - "endpoints": - [ - { - "types": - { - "rType": "chassis", - "fType": "all_sensors" - }, - "paths": - [ - "/xyz/openbmc_project/sensors/fan_tach/FAN3_1", - "/xyz/openbmc_project/sensors/fan_tach/FAN3_2", - "/xyz/openbmc_project/sensors/fan_tach/FAN4_1", - "/xyz/openbmc_project/sensors/fan_tach/FAN4_2", - "/xyz/openbmc_project/sensors/fan_tach/FAN5_1", - "/xyz/openbmc_project/sensors/fan_tach/FAN5_2", - "/xyz/openbmc_project/sensors/fan_tach/FAN6_1", - "/xyz/openbmc_project/sensors/fan_tach/FAN6_2", - "/xyz/openbmc_project/sensors/fan_tach/FAN7_1", - "/xyz/openbmc_project/sensors/fan_tach/FAN7_2", - "/xyz/openbmc_project/sensors/fan_tach/FAN8_1", - "/xyz/openbmc_project/sensors/fan_tach/FAN8_2", - "/xyz/openbmc_project/sensors/fan_tach/PSU0_fan1", - "/xyz/openbmc_project/sensors/fan_tach/PSU1_fan1", - - "/xyz/openbmc_project/sensors/temperature/TS1_Temp", - "/xyz/openbmc_project/sensors/temperature/TS2_Temp", - "/xyz/openbmc_project/sensors/temperature/TS3_Temp", - "/xyz/openbmc_project/sensors/temperature/TS4_Temp", - "/xyz/openbmc_project/sensors/temperature/TS5_Temp", - "/xyz/openbmc_project/sensors/temperature/TS6_Temp", - "/xyz/openbmc_project/sensors/temperature/PSU0_TEMP", - "/xyz/openbmc_project/sensors/temperature/PSU1_TEMP", - - "/xyz/openbmc_project/sensors/voltage/S0_0V8_VDDC_SOC", - "/xyz/openbmc_project/sensors/voltage/S0_0V75_PCP", - "/xyz/openbmc_project/sensors/voltage/S0_1V2_VDDQ0123", - "/xyz/openbmc_project/sensors/voltage/S0_0V6_VTT0123", - "/xyz/openbmc_project/sensors/voltage/S0_2V5_VPP0123", - "/xyz/openbmc_project/sensors/voltage/S0_1V2_VDDQ4567", - "/xyz/openbmc_project/sensors/voltage/S0_0V6_VTT4567", - "/xyz/openbmc_project/sensors/voltage/S0_2V5_VPP4567", - "/xyz/openbmc_project/sensors/voltage/S0_0V85_RCA", - "/xyz/openbmc_project/sensors/voltage/S0_1V8_VDDH", - "/xyz/openbmc_project/sensors/voltage/S0_1V5_VDDH", - "/xyz/openbmc_project/sensors/voltage/S0_1V8_SOC", - "/xyz/openbmc_project/sensors/voltage/S0_1V8_PCP", - "/xyz/openbmc_project/sensors/voltage/S0_3V3_SOC", - "/xyz/openbmc_project/sensors/voltage/S0_CPU_VCORE", - "/xyz/openbmc_project/sensors/voltage/S0_DIMM_DDR_Volt", - "/xyz/openbmc_project/sensors/voltage/S0_DIMM_VR1_Volt", - "/xyz/openbmc_project/sensors/voltage/S0_DIMM_VR2_Volt", - "/xyz/openbmc_project/sensors/voltage/S0_RCA_VR_Volt", - "/xyz/openbmc_project/sensors/voltage/S0_SOC_Volt", - "/xyz/openbmc_project/sensors/voltage/S1_0V8_VDDC_SOC", - "/xyz/openbmc_project/sensors/voltage/S1_0V75_PCP", - "/xyz/openbmc_project/sensors/voltage/S1_1V2_VDDQ0123", - "/xyz/openbmc_project/sensors/voltage/S1_0V6_VTT0123", - "/xyz/openbmc_project/sensors/voltage/S1_2V5_VPP0123", - "/xyz/openbmc_project/sensors/voltage/S1_1V2_VDDQ4567", - "/xyz/openbmc_project/sensors/voltage/S1_0V6_VTT4567", - "/xyz/openbmc_project/sensors/voltage/S1_2V5_VPP4567", - "/xyz/openbmc_project/sensors/voltage/S1_0V85_RCA", - "/xyz/openbmc_project/sensors/voltage/S1_1V8_VDDH", - "/xyz/openbmc_project/sensors/voltage/S1_1V5_VDDH", - "/xyz/openbmc_project/sensors/voltage/S1_1V8_SOC", - "/xyz/openbmc_project/sensors/voltage/S1_1V8_PCP", - "/xyz/openbmc_project/sensors/voltage/S1_3V3_SOC", - "/xyz/openbmc_project/sensors/voltage/3V3_SB", - "/xyz/openbmc_project/sensors/voltage/VBAT_RTC", - "/xyz/openbmc_project/sensors/voltage/PSU0_VINPUT", - "/xyz/openbmc_project/sensors/voltage/PSU0_VOUTPUT", - "/xyz/openbmc_project/sensors/voltage/PSU1_VINPUT", - "/xyz/openbmc_project/sensors/voltage/PSU1_VOUTPUT", - - "/xyz/openbmc_project/sensors/power/PSU0_PINPUT", - "/xyz/openbmc_project/sensors/power/PSU1_PINPUT", - "/xyz/openbmc_project/sensors/power/PSU0_POUTPUT", - "/xyz/openbmc_project/sensors/power/PSU1_POUTPUT", - "/xyz/openbmc_project/sensors/power/total_power", - - "/xyz/openbmc_project/sensors/current/PSU0_IINPUT", - "/xyz/openbmc_project/sensors/current/PSU0_IOUTPUT", - "/xyz/openbmc_project/sensors/current/PSU1_IINPUT", - "/xyz/openbmc_project/sensors/current/PSU1_IOUTPUT" - ] - } - ] - } -] diff --git a/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend b/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend deleted file mode 100644 index ab3030879..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend +++ /dev/null @@ -1,10 +0,0 @@ -DEPENDS:append:mtjade = " inventory-cleanup" - -FILESEXTRAPATHS:prepend:mtjade := "${THISDIR}/${PN}:" -PACKAGECONFIG:append:mtjade = " associations" -SRC_URI:append:mtjade = " file://associations.json" - -do_install:append:mtjade() { - install -d ${D}${base_datadir} - install -m 0755 ${WORKDIR}/associations.json ${D}${base_datadir} -} diff --git a/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/motherboard b/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/motherboard deleted file mode 100644 index f0498347b..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/motherboard +++ /dev/null @@ -1,2 +0,0 @@ -SYSFS_PATH=/sys/bus/i2c/devices/3-0050/eeprom -FRUID=0 diff --git a/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend b/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend deleted file mode 100644 index 5150e2312..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend +++ /dev/null @@ -1,26 +0,0 @@ -inherit obmc-phosphor-systemd - -DEPENDS:append:mtjade = " mtjade-yaml-config" - -EXTRA_OECONF:mtjade = " \ - YAML_GEN=${STAGING_DIR_HOST}${datadir}/mtjade-yaml-config/ipmi-fru-read.yaml \ - PROP_YAML=${STAGING_DIR_HOST}${datadir}/mtjade-yaml-config/ipmi-extra-properties.yaml \ - " -FILESEXTRAPATHS:prepend:mtjade := "${THISDIR}/${PN}:" - -EEPROM_NAMES = "motherboard" - -EEPROMFMT = "system/chassis/{0}" -EEPROM_ESCAPEDFMT = "system-chassis-{0}" -EEPROMS = "${@compose_list(d, 'EEPROMFMT', 'EEPROM_NAMES')}" -EEPROMS_ESCAPED = "${@compose_list(d, 'EEPROM_ESCAPEDFMT', 'EEPROM_NAMES')}" - -ENVFMT = "obmc/eeproms/{0}" -SYSTEMD_ENVIRONMENT_FILE:${PN}:append:mtjade := "${@compose_list(d, 'ENVFMT', 'EEPROMS')}" - -TMPL = "obmc-read-eeprom@.service" -TGT = "multi-user.target" -INSTFMT = "obmc-read-eeprom@{0}.service" -FMT = "../${TMPL}:${TGT}.wants/${INSTFMT}" - -SYSTEMD_LINK:${PN}:append:mtjade := "${@compose_list(d, 'FMT', 'EEPROMS_ESCAPED')}" diff --git a/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend index fce5b74eb..04fff3d63 100644 --- a/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend +++ b/meta-ampere/meta-jade/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend @@ -1,6 +1,6 @@ -FILESEXTRAPATHS:append:mtjade := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:append := "${THISDIR}/${PN}:" -DEPENDS:append:mtjade = " mtjade-yaml-config" +DEPENDS:append = " ${MACHINE}-yaml-config" RRECOMMENDS:${PN} += "ipmitool" RDEPENDS:${PN} += "bash" @@ -10,14 +10,16 @@ SRC_URI += " \ file://ampere.xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \ " -EXTRA_OECONF:mtjade = " \ - SENSOR_YAML_GEN=${STAGING_DIR_HOST}${datadir}/mtjade-yaml-config/ipmi-sensors-${MACHINE}.yaml \ - FRU_YAML_GEN=${STAGING_DIR_HOST}${datadir}/mtjade-yaml-config/ipmi-fru-read.yaml \ - " +EXTRA_OECONF = " \ + SENSOR_YAML_GEN=${STAGING_DIR_HOST}${datadir}/${MACHINE}-yaml-config/ipmi-sensors.yaml \ + " AMPERE_SOFTPOWEROFF_TMPL = "ampere.xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" -do_install:append:mtjade(){ +PACKAGECONFIG:append = " dynamic-sensors" +HOSTIPMI_PROVIDER_LIBRARY += "libdynamiccmds.so" + +do_install:append(){ install -d ${D}${includedir}/phosphor-ipmi-host install -m 0644 -D ${S}/selutility.hpp ${D}${includedir}/phosphor-ipmi-host install -m 0755 ${WORKDIR}/ampere-phosphor-softpoweroff ${D}/${bindir}/phosphor-softpoweroff diff --git a/meta-ampere/meta-jade/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend b/meta-ampere/meta-jade/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend index 56db56883..7b27a7edd 100644 --- a/meta-ampere/meta-jade/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend +++ b/meta-ampere/meta-jade/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend @@ -3,13 +3,17 @@ RDEPENDS:${PN}-extras:append:mtjade = " \ phosphor-image-signing \ phosphor-virtual-sensor \ phosphor-misc-usb-ctrl \ - " + fault-monitor \ + id-button \ + psu-hotswap-reset \ + " RDEPENDS:${PN}-inventory:append:mtjade = " \ - fault-monitor \ - id-button \ - psu-hotswap-reset \ host-gpio-handling \ dbus-sensors \ entity-manager \ - " + " + +RDEPENDS:${PN}-extras:remove:mtjade = " phosphor-hwmon" +VIRTUAL-RUNTIME_obmc-sensors-hwmon ?= "dbus-sensors" +RDEPENDS:${PN}-extras:append:mtjade = " phosphor-virtual-sensor" diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@28.conf b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@28.conf deleted file mode 100644 index 5d1ed0944..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@28.conf +++ /dev/null @@ -1,3 +0,0 @@ -LABEL_temp1=TS1_Temp -CRITHI_temp1=50000 -CRITLO_temp1=1000 diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@29.conf b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@29.conf deleted file mode 100644 index 2429d8e14..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@29.conf +++ /dev/null @@ -1,3 +0,0 @@ -LABEL_temp1=TS2_Temp -CRITHI_temp1=50000 -CRITLO_temp1=1000 diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@2a.conf b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@2a.conf deleted file mode 100644 index 60d2783ae..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@2a.conf +++ /dev/null @@ -1,3 +0,0 @@ -LABEL_temp1=TS3_Temp -CRITHI_temp1=50000 -CRITLO_temp1=1000 diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@2b.conf b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@2b.conf deleted file mode 100644 index 9b7987400..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@2b.conf +++ /dev/null @@ -1,3 +0,0 @@ -LABEL_temp1=TS4_Temp -CRITHI_temp1=50000 -CRITLO_temp1=1000 diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@2c.conf b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@2c.conf deleted file mode 100644 index c9fc00c05..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@2c.conf +++ /dev/null @@ -1,3 +0,0 @@ -LABEL_temp1=TS5_Temp -CRITHI_temp1=50000 -CRITLO_temp1=1000 diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@2d.conf b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@2d.conf deleted file mode 100644 index 6c71eca5d..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@100/tmp175@2d.conf +++ /dev/null @@ -1,3 +0,0 @@ -LABEL_temp1=TS6_Temp -CRITHI_temp1=50000 -CRITLO_temp1=1000 diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@1c0/psu@58.conf b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@1c0/psu@58.conf deleted file mode 100644 index 944085d4d..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@1c0/psu@58.conf +++ /dev/null @@ -1,17 +0,0 @@ -LABEL_temp1= "PSU0_TEMP" -CRITHI_temp1=64000 - -LABEL_power2= "PSU0_POUTPUT" - -LABEL_fan1="PSU0_fan1" -CRITHI_fan1=20300 - -LABEL_in1= "PSU0_VINPUT" -LABEL_in2= "PSU0_VOUTPUT" - -LABEL_curr1= "PSU0_IINPUT" -LABEL_curr2= "PSU0_IOUTPUT" - -LABEL_power1= "PSU0_PINPUT" - -INTERVAL=10000000 diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@1c0/psu@59.conf b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@1c0/psu@59.conf deleted file mode 100644 index 15b965551..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/bus@1e78a000/i2c-bus@1c0/psu@59.conf +++ /dev/null @@ -1,17 +0,0 @@ -LABEL_temp1 = "PSU1_TEMP" -CRITHI_temp1=64000 - -LABEL_power2 = "PSU1_POUTPUT" - -LABEL_fan1 = "PSU1_fan1" -CRITHI_fan1=20300 - -LABEL_in1= "PSU1_VINPUT" -LABEL_in2= "PSU1_VOUTPUT" - -LABEL_curr1= "PSU1_IINPUT" -LABEL_curr2= "PSU1_IOUTPUT" - -LABEL_power1 = "PSU1_PINPUT" - -INTERVAL=10000000 diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/pwm-tacho-controller@1e786000.conf b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/pwm-tacho-controller@1e786000.conf deleted file mode 100644 index b14392bea..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/ahb/apb/pwm-tacho-controller@1e786000.conf +++ /dev/null @@ -1,60 +0,0 @@ -LABEL_fan5 = "FAN3_1" -CRITLO_fan5=500 -CRITHI_fan5=23100 - -LABEL_fan6 = "FAN3_2" -CRITLO_fan6=500 -CRITHI_fan6=23100 - -LABEL_fan7 = "FAN4_1" -CRITLO_fan7=500 -CRITHI_fan7=23100 - -LABEL_fan8 = "FAN4_2" -CRITLO_fan8=500 -CRITHI_fan8=23100 - -LABEL_fan9 = "FAN5_1" -CRITLO_fan9=500 -CRITHI_fan9=23100 - -LABEL_fan10 = "FAN5_2" -CRITLO_fan10=500 -CRITHI_fan10=23100 - -LABEL_fan11 = "FAN6_1" -CRITLO_fan11=500 -CRITHI_fan11=23100 - -LABEL_fan12 = "FAN6_2" -CRITLO_fan12=500 -CRITHI_fan12=23100 - -LABEL_fan13 = "FAN7_1" -CRITLO_fan13=500 -CRITHI_fan13=23100 - -LABEL_fan14 = "FAN7_2" -CRITLO_fan14=500 -CRITHI_fan14=23100 - -LABEL_fan15 = "FAN8_1" -CRITLO_fan15=500 -CRITHI_fan15=23100 - -LABEL_fan16 = "FAN8_2" -CRITLO_fan16=500 -CRITHI_fan16=23100 - -PWM_TARGET_fan5 = "3" -PWM_TARGET_fan6 = "3" -PWM_TARGET_fan7 = "4" -PWM_TARGET_fan8 = "4" -PWM_TARGET_fan9 = "5" -PWM_TARGET_fan10 = "5" -PWM_TARGET_fan11 = "6" -PWM_TARGET_fan12 = "6" -PWM_TARGET_fan13 = "7" -PWM_TARGET_fan14 = "7" -PWM_TARGET_fan15 = "8" -PWM_TARGET_fan16 = "8" diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/iio-hwmon-adc14.conf b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/iio-hwmon-adc14.conf deleted file mode 100644 index a5c5c2a45..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/iio-hwmon-adc14.conf +++ /dev/null @@ -1,4 +0,0 @@ -LABEL_in1=3V3_SB -GAIN_in1=3 -CRITHI_in1=3960 -CRITLO_in1=2320 diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/iio-hwmon-battery.conf b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/iio-hwmon-battery.conf deleted file mode 100644 index 3cc58229d..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/iio-hwmon-battery.conf +++ /dev/null @@ -1,11 +0,0 @@ -LABEL_in1=VBAT_RTC -GAIN_in1=3 -CRITHI_in1=3564 -CRITLO_in1=2106 - -# GPIOS4 needs to be pulled high for battery voltage reading -GPIOCHIP_in1=0 -GPIO_in1=148 - -# Read it every day so it does not impact battery life -INTERVAL=86400000000 diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/iio-hwmon.conf b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/iio-hwmon.conf deleted file mode 100644 index 4e46123ae..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon/obmc/mtjade/hwmon/iio-hwmon.conf +++ /dev/null @@ -1,123 +0,0 @@ -LABEL_in1=S0_0V8_VDDC_SOC -CRITHI_in1=960 -CRITLO_in1=560 - -LABEL_in2=S1_0V8_VDDC_SOC -CRITHI_in2=960 -CRITLO_in2=560 - -LABEL_in3=S0_0V75_PCP -CRITHI_in3=1323 -CRITLO_in3=504 - -LABEL_in4=S1_0V75_PCP -CRITHI_in4=1323 -CRITLO_in4=504 - -LABEL_in5=S0_1V2_VDDQ0123 -CRITHI_in5=1442 -CRITLO_in5=840 - -LABEL_in6=S1_1V2_VDDQ0123 -CRITHI_in6=1442 -CRITLO_in6=840 - -LABEL_in7=S0_0V6_VTT0123 -CRITHI_in7=720 -CRITLO_in7=420 - -LABEL_in8=S1_0V6_VTT0123 -CRITHI_in8=720 -CRITLO_in8=420 - -LABEL_in9=S0_2V5_VPP0123 -GAIN_in9=2 -CRITHI_in9=3000 -CRITLO_in9=1755 - -LABEL_in10=S1_2V5_VPP0123 -GAIN_in10=2 -CRITHI_in10=3000 -CRITLO_in10=1755 - -LABEL_in11=S0_1V2_VDDQ4567 -CRITHI_in11=1442 -CRITLO_in11=840 - -LABEL_in12=S1_1V2_VDDQ4567 -CRITHI_in12=1442 -CRITLO_in12=840 - -LABEL_in13=S0_0V6_VTT4567 -CRITHI_in13=720 -CRITLO_in13=420 - -LABEL_in14=S1_0V6_VTT4567 -CRITHI_in14=720 -CRITLO_in14=420 - -LABEL_in15=S0_2V5_VPP4567 -GAIN_in15=2 -CRITHI_in15=3000 -CRITLO_in15=1755 - -LABEL_in16=S1_2V5_VPP4567 -GAIN_in16=2 -CRITHI_in16=3000 -CRITLO_in16=1755 - -LABEL_in17=S0_0V85_RCA -CRITHI_in17=1080 -CRITLO_in17=630 - -LABEL_in18=S1_0V85_RCA -CRITHI_in18=1080 -CRITLO_in18=630 - -LABEL_in19=S0_1V8_VDDH -GAIN_in19=2 -CRITHI_in19=2156 -CRITLO_in19=1265 - -LABEL_in20=S1_1V8_VDDH -GAIN_in20=2 -CRITHI_in20=2156 -CRITLO_in20=1265 - -LABEL_in21=S0_1V5_VDDH -CRITHI_in21=1800 -CRITLO_in21=1053 - -LABEL_in22=S1_1V5_VDDH -CRITHI_in22=1800 -CRITLO_in22=1053 - -LABEL_in23=S0_1V8_SOC -GAIN_in23=2 -CRITHI_in23=2156 -CRITLO_in23=1265 - -LABEL_in24=S1_1V8_SOC -GAIN_in24=2 -CRITHI_in24=2156 -CRITLO_in24=1265 - -LABEL_in25=S0_1V8_PCP -GAIN_in25=2 -CRITHI_in25=2156 -CRITLO_in25=1265 - -LABEL_in26=S1_1V8_PCP -GAIN_in26=2 -CRITHI_in26=2156 -CRITLO_in26=1265 - -LABEL_in27=S0_3V3_SOC -GAIN_in27=3 -CRITHI_in27=3960 -CRITLO_in27=2320 - -LABEL_in28=S1_3V3_SOC -GAIN_in28=3 -CRITHI_in28=3960 -CRITLO_in28=2320 diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend deleted file mode 100644 index a77a59be0..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend +++ /dev/null @@ -1,31 +0,0 @@ -FILESEXTRAPATHS:append:mtjade := "${THISDIR}/${PN}:" - -EXTRA_OEMESON:append:mtjade = " -Dnegative-errno-on-fail=true" - -CHIPS:mtjade = " \ - bus@1e78a000/i2c-bus@100/tmp175@28 \ - bus@1e78a000/i2c-bus@100/tmp175@29 \ - bus@1e78a000/i2c-bus@100/tmp175@2a \ - bus@1e78a000/i2c-bus@100/tmp175@2b \ - bus@1e78a000/i2c-bus@100/tmp175@2c \ - bus@1e78a000/i2c-bus@100/tmp175@2d \ - bus@1e78a000/i2c-bus@1c0/psu@58 \ - bus@1e78a000/i2c-bus@1c0/psu@59 \ - pwm-tacho-controller@1e786000 \ - " - -ITEMSFMT = "ahb/apb/{0}.conf" - -ITEMS = "${@compose_list(d, 'ITEMSFMT', 'CHIPS:${MACHINE}')}" - -ITEMS += "iio-hwmon.conf iio-hwmon-adc14.conf iio-hwmon-battery.conf" - -ENVS = "obmc/${MACHINE}/hwmon/{0}" -SYSTEMD_ENVIRONMENT_FILE:${PN}:append:mtjade = " ${@compose_list(d, 'ENVS', 'ITEMS')}" - -do_install:append:mtjade() { - SOURCEDIR="${WORKDIR}/obmc/${MACHINE}/hwmon" - DESTDIR="${D}${sysconfdir}/default/obmc" - install -d ${DESTDIR} - cp -r ${SOURCEDIR} ${DESTDIR} -} diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-nvme/nvme_config.json b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-nvme/nvme_config.json new file mode 100644 index 000000000..9c2aade75 --- /dev/null +++ b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-nvme/nvme_config.json @@ -0,0 +1,118 @@ +{ + "config": [ + { + "NVMeDriveIndex": 0, + "NVMeDriveBusID": 50 + }, + { + "NVMeDriveIndex": 1, + "NVMeDriveBusID": 51 + }, + { + "NVMeDriveIndex": 2, + "NVMeDriveBusID": 52 + }, + { + "NVMeDriveIndex": 3, + "NVMeDriveBusID": 53 + }, + { + "NVMeDriveIndex": 4, + "NVMeDriveBusID": 54 + }, + { + "NVMeDriveIndex": 5, + "NVMeDriveBusID": 55 + }, + { + "NVMeDriveIndex": 6, + "NVMeDriveBusID": 56 + }, + { + "NVMeDriveIndex": 7, + "NVMeDriveBusID": 57 + }, + { + "NVMeDriveIndex": 8, + "NVMeDriveBusID": 60 + }, + { + "NVMeDriveIndex": 9, + "NVMeDriveBusID": 61 + }, + { + "NVMeDriveIndex": 10, + "NVMeDriveBusID": 62 + }, + { + "NVMeDriveIndex": 11, + "NVMeDriveBusID": 63 + }, + { + "NVMeDriveIndex": 12, + "NVMeDriveBusID": 64 + }, + { + "NVMeDriveIndex": 13, + "NVMeDriveBusID": 65 + }, + { + "NVMeDriveIndex": 14, + "NVMeDriveBusID": 66 + }, + { + "NVMeDriveIndex": 15, + "NVMeDriveBusID": 67 + }, + { + "NVMeDriveIndex": 16, + "NVMeDriveBusID": 70 + }, + { + "NVMeDriveIndex": 17, + "NVMeDriveBusID": 71 + }, + { + "NVMeDriveIndex": 18, + "NVMeDriveBusID": 72 + }, + { + "NVMeDriveIndex": 19, + "NVMeDriveBusID": 73 + }, + { + "NVMeDriveIndex": 20, + "NVMeDriveBusID": 74 + }, + { + "NVMeDriveIndex": 21, + "NVMeDriveBusID": 75 + }, + { + "NVMeDriveIndex": 22, + "NVMeDriveBusID": 76 + }, + { + "NVMeDriveIndex": 23, + "NVMeDriveBusID": 77 + }, + { + "NVMeDriveIndex": 24, + "NVMeDriveBusID": 80 + }, + { + "NVMeDriveIndex": 25, + "NVMeDriveBusID": 81 + } + ], + "threshold": [ + { + "criticalHigh": 80, + "criticalLow": 0, + "warningHigh": 70, + "warningLow": 5, + "maxValue": 127, + "minValue": -128 + } + ] +} diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-nvme_%.bbappend b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-nvme_%.bbappend new file mode 100644 index 000000000..5eadc25f7 --- /dev/null +++ b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-nvme_%.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI += " file://nvme_config.json" + +do_install:append() { + install -m 0644 -D ${WORKDIR}/nvme_config.json \ + ${D}/etc/nvme +} diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json index d0dc76782..abacb4f65 100644 --- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json +++ b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json @@ -8,12 +8,25 @@ "Threshold" : { }, + "Associations": + [ + [ + "chassis", + "all_sensors", + "/xyz/openbmc_project/inventory/system/chassis/Mt_Jade" + ], + [ + "inventory", + "sensors", + "/xyz/openbmc_project/inventory/system/chassis/Mt_Jade" + ] + ], "Params": { "DbusParam": [ { - "ParamName": "PSU0_POUTPUT", + "ParamName": "P0", "Desc": { "Name": "PSU0_POUTPUT", @@ -21,7 +34,7 @@ } }, { - "ParamName": "PSU1_POUTPUT", + "ParamName": "P1", "Desc": { "Name": "PSU1_POUTPUT", @@ -30,7 +43,206 @@ } ] }, - "Expression": "PSU0_POUTPUT + PSU1_POUTPUT" + "Expression": "(P0 + P1) >= 0 ? (P0 + P1) : NULL" + }, + { + "Desc":{ + "Name":"nvme_max", + "SensorType":"temperature" + }, + "Threshold":{ + "CriticalHigh": 80, + "CriticalLow": 0, + "WarningHigh": 70, + "WarningLow": 5 + }, + "Params":{ + "DbusParam": [ + { + "ParamName": "n0", + "Desc": { + "Name": "nvme0", + "SensorType": "temperature" + } + }, + { + "ParamName": "n1", + "Desc": { + "Name": "nvme1", + "SensorType": "temperature" + } + }, + { + "ParamName": "n2", + "Desc": { + "Name": "nvme2", + "SensorType": "temperature" + } + }, + { + "ParamName": "n3", + "Desc": { + "Name": "nvme3", + "SensorType": "temperature" + } + }, + { + "ParamName": "n4", + "Desc": { + "Name": "nvme4", + "SensorType": "temperature" + } + }, + { + "ParamName": "n5", + "Desc": { + "Name": "nvme5", + "SensorType": "temperature" + } + }, + { + "ParamName": "n6", + "Desc": { + "Name": "nvme6", + "SensorType": "temperature" + } + }, + { + "ParamName": "n7", + "Desc": { + "Name": "nvme7", + "SensorType": "temperature" + } + }, + { + "ParamName": "n8", + "Desc": { + "Name": "nvme8", + "SensorType": "temperature" + } + }, + { + "ParamName": "n9", + "Desc": { + "Name": "nvme9", + "SensorType": "temperature" + } + }, + { + "ParamName": "n10", + "Desc": { + "Name": "nvme10", + "SensorType": "temperature" + } + }, + { + "ParamName": "n11", + "Desc": { + "Name": "nvme11", + "SensorType": "temperature" + } + }, + { + "ParamName": "n12", + "Desc": { + "Name": "nvme12", + "SensorType": "temperature" + } + }, + { + "ParamName": "n13", + "Desc": { + "Name": "nvme13", + "SensorType": "temperature" + } + }, + { + "ParamName": "n14", + "Desc": { + "Name": "nvme14", + "SensorType": "temperature" + } + }, + { + "ParamName": "n15", + "Desc": { + "Name": "nvme15", + "SensorType": "temperature" + } + }, + { + "ParamName": "n16", + "Desc": { + "Name": "nvme16", + "SensorType": "temperature" + } + }, + { + "ParamName": "n17", + "Desc": { + "Name": "nvme17", + "SensorType": "temperature" + } + }, + { + "ParamName": "n18", + "Desc": { + "Name": "nvme18", + "SensorType": "temperature" + } + }, + { + "ParamName": "n19", + "Desc": { + "Name": "nvme19", + "SensorType": "temperature" + } + }, + { + "ParamName": "n20", + "Desc": { + "Name": "nvme20", + "SensorType": "temperature" + } + }, + { + "ParamName": "n21", + "Desc": { + "Name": "nvme21", + "SensorType": "temperature" + } + }, + { + "ParamName": "n22", + "Desc": { + "Name": "nvme22", + "SensorType": "temperature" + } + }, + { + "ParamName": "n23", + "Desc": { + "Name": "nvme23", + "SensorType": "temperature" + } + }, + { + "ParamName": "n24", + "Desc": { + "Name": "nvme24", + "SensorType": "temperature" + } + }, + { + "ParamName": "n25", + "Desc": { + "Name": "nvme25", + "SensorType": "temperature" + } + } + ] + }, + "Expression": "max(0,(n0 == n0) ? n0 : NULL,(n1 == n1) ? n1 : NULL,(n2 == n2) ? n2 : NULL,(n3 == n3) ? n3 : NULL,(n4 == n4) ? n4 : NULL,(n5 == n5) ? n5 : NULL,(n6 == n6) ? n6 : NULL,(n7 == n7) ? n7 : NULL,(n8 == n8) ? n8 : NULL,(n9 == n9) ? n9 : NULL,(n10 == n10) ? n10 : NULL,(n11 == n11) ? n11 : NULL,(n12 == n12) ? n12 : NULL,(n13 == n13) ? n13 : NULL,(n14 == n14) ? n14 : NULL,(n15 == n15) ? n15 : NULL,(n16 == n16) ? n16 : NULL,(n17 == n17) ? n17 : NULL,(n18 == n18) ? n18 : NULL,(n19 == n19) ? n19 : NULL,(n20 == n20) ? n20 : NULL,(n21 == n21) ? n21 : NULL,(n22 == n22) ? n22 : NULL,(n23 == n23) ? n23 : NULL,(n24 == n24) ? n24 : NULL,(n25 == n25) ? n25 : NULL)" } ] diff --git a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend index 3a1af4f3b..0d1b5e63c 100644 --- a/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend +++ b/meta-ampere/meta-jade/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend @@ -1,10 +1,10 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI:append:mtjade += " \ - file://virtual_sensor_config.json \ - " +SRC_URI:append += " \ + file://virtual_sensor_config.json \ + " -do_install:append:mtjade() { +do_install:append() { install -m 0644 ${WORKDIR}/virtual_sensor_config.json ${D}${datadir}/phosphor-virtual-sensor/ } diff --git a/meta-aspeed/conf/machine/distro/include/uboot-distrovars.inc b/meta-aspeed/conf/machine/distro/include/uboot-distrovars.inc new file mode 100644 index 000000000..81dcd3e5a --- /dev/null +++ b/meta-aspeed/conf/machine/distro/include/uboot-distrovars.inc @@ -0,0 +1 @@ +OVERRIDES .= ":uboot-flash-${FLASH_SIZE}" diff --git a/meta-aspeed/recipes-aspeed/python/socsec.inc b/meta-aspeed/recipes-aspeed/python/socsec.inc new file mode 100644 index 000000000..30ba30897 --- /dev/null +++ b/meta-aspeed/recipes-aspeed/python/socsec.inc @@ -0,0 +1,27 @@ +SUMMARY = "Secure-boot utilities for ASPEED BMC SoCs" +HOMEPAGE = "https://github.com/AspeedTech-BMC/socsec/" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d50b901333b4eedfee074ebcd6a6d611" + +BRANCH ?= "master" +SRC_URI = "git://github.com/AspeedTech-BMC/socsec.git;protocol=https;branch=${BRANCH}" + +S = "${WORKDIR}/git" + +inherit python3native setuptools3 + +DEPENDS += "${PYTHON_PN}-bitarray-native" +DEPENDS += "${PYTHON_PN}-ecdsa-native" +DEPENDS += "${PYTHON_PN}-pycryptodome-native" + +RDEPENDS:${PN} += "${PYTHON_PN}-bitarray" +RDEPENDS:${PN} += "${PYTHON_PN}-core" +RDEPENDS:${PN} += "${PYTHON_PN}-hexdump" +RDEPENDS:${PN} += "${PYTHON_PN}-jsonschema" +RDEPENDS:${PN} += "${PYTHON_PN}-jstyleson" +RDEPENDS:${PN} += "${PYTHON_PN}-pycryptodome" +RDEPENDS:${PN} += "${PYTHON_PN}-ecdsa" + +BBCLASSEXTEND = "native nativesdk" + diff --git a/meta-aspeed/recipes-aspeed/python/socsec_1.0.0.bb b/meta-aspeed/recipes-aspeed/python/socsec_1.0.0.bb new file mode 100644 index 000000000..a67c4c9dc --- /dev/null +++ b/meta-aspeed/recipes-aspeed/python/socsec_1.0.0.bb @@ -0,0 +1,4 @@ +include socsec.inc + +PV = "1.0.0+git${SRCPV}" +SRCREV = "2787a252988f4811097995ef9e807b1b433bde9f" diff --git a/meta-aspeed/recipes-aspeed/python/socsec_git.bb b/meta-aspeed/recipes-aspeed/python/socsec_git.bb deleted file mode 100644 index 6034b2982..000000000 --- a/meta-aspeed/recipes-aspeed/python/socsec_git.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "Secure-boot utilities for ASPEED BMC SoCs" -HOMEPAGE = "https://github.com/AspeedTech-BMC/socsec/" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d50b901333b4eedfee074ebcd6a6d611" - -SRC_URI = "git://github.com/AspeedTech-BMC/socsec/;protocol=https;branch=master" - -PV = "0.2.1+git${SRCPV}" -SRCREV = "51bd4504bffb5044264cfe4c63b8fe8d48a114a9" - -S = "${WORKDIR}/git" - -inherit python3native setuptools3 - -RDEPENDS:${PN} += "python3-bitarray" -RDEPENDS:${PN} += "python3-core" -RDEPENDS:${PN} += "python3-ecdsa" -RDEPENDS:${PN} += "python3-jsonschema" -RDEPENDS:${PN} += "python3-jstyleson" -RDEPENDS:${PN} += "python3-pycryptodome" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-aspeed/recipes-bsp/u-boot/files/fw_env_flash_64M_nor.config b/meta-aspeed/recipes-bsp/u-boot/files/fw_env_flash_64M_nor.config new file mode 100644 index 000000000..52d088266 --- /dev/null +++ b/meta-aspeed/recipes-bsp/u-boot/files/fw_env_flash_64M_nor.config @@ -0,0 +1,2 @@ +# MTD device name Device offset Env. size Flash sector size Number of sectors +/dev/mtd/u-boot-env 0x0000 0x20000 0x1000 diff --git a/meta-aspeed/recipes-bsp/u-boot/files/u-boot_flash_64M.cfg b/meta-aspeed/recipes-bsp/u-boot/files/u-boot_flash_64M.cfg new file mode 100644 index 000000000..b0f3f2891 --- /dev/null +++ b/meta-aspeed/recipes-bsp/u-boot/files/u-boot_flash_64M.cfg @@ -0,0 +1,2 @@ +CONFIG_ENV_SIZE=0x20000 +CONFIG_ENV_OFFSET=0xE0000 diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb b/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb index 8cf4a19fb..1b2820cb5 100644 --- a/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb +++ b/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb @@ -1,4 +1,5 @@ require u-boot-common-aspeed-sdk_${PV}.inc +require conf/machine/distro/include/uboot-distrovars.inc UBOOT_MAKE_TARGET ?= "DEVICE_TREE=${UBOOT_DEVICETREE}" @@ -7,6 +8,7 @@ require recipes-bsp/u-boot/u-boot.inc PROVIDES += "u-boot" DEPENDS += "bc-native dtc-native" +SRC_URI:append:uboot-flash-65536 = "file://u-boot_flash_64M.cfg" SRC_URI:append:df-phosphor-mmc = " file://u-boot-env-ast2600.txt" SRC_URI += " \ file://rsa_oem_dss_key.pem;sha256sum=64a379979200d39949d3e5b0038e3fdd5548600b2f7077a17e35422336075ad4 \ diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_2019.04.bb b/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_2019.04.bb index 90e120677..2708ae081 100644 --- a/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_2019.04.bb +++ b/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_2019.04.bb @@ -1,4 +1,5 @@ require u-boot-common-aspeed-sdk_${PV}.inc +require conf/machine/distro/include/uboot-distrovars.inc SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" DEPENDS += "mtd-utils" @@ -8,9 +9,11 @@ RPROVIDES:${PN} += "u-boot-fw-utils" SRC_URI += "file://fw_env_ast2600_nor.config" SRC_URI += "file://fw_env_ast2600_mmc.config" +SRC_URI += "file://fw_env_flash_64M_nor.config" ENV_CONFIG_FILE = "fw_env_ast2600_nor.config" ENV_CONFIG_FILE:df-phosphor-mmc = "fw_env_ast2600_mmc.config" +ENV_CONFIG_FILE:uboot-flash-65536 = "fw_env_flash_64M_nor.config" INSANE_SKIP:${PN} = "already-stripped" EXTRA_OEMAKE:class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' diff --git a/meta-aspeed/recipes-kernel/linux/linux-aspeed.inc b/meta-aspeed/recipes-kernel/linux/linux-aspeed.inc index aa060295f..6098885d5 100644 --- a/meta-aspeed/recipes-kernel/linux/linux-aspeed.inc +++ b/meta-aspeed/recipes-kernel/linux/linux-aspeed.inc @@ -12,6 +12,7 @@ SRC_URI += " \ file://defconfig \ file://rsa_oem_fitimage_key.key;sha256sum=eeb4ff2ebbfbd97b6254fe6dbaeea41067e54c65176c233ec7b2ab2decf1ddcd \ file://rsa_oem_fitimage_key.crt;sha256sum=45f5a55497cce8040999bf9f3214d471ac7b83ab7acef41c4425a34662e8372e \ + ${@bb.utils.contains('MACHINE_FEATURES', 'tpm2', 'file://tpm/tpm2.scc', '', d)} \ " LINUX_VERSION_EXTENSION ?= "-${SRCREV}" diff --git a/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g4/defconfig b/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g4/defconfig index 08ac6eb04..a9920dde4 100644 --- a/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g4/defconfig +++ b/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g4/defconfig @@ -3,6 +3,7 @@ CONFIG_KERNEL_XZ=y CONFIG_SYSVIPC=y CONFIG_NO_HZ_IDLE=y CONFIG_HIGH_RES_TIMERS=y +CONFIG_BPF_SYSCALL=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 @@ -17,7 +18,6 @@ CONFIG_BLK_DEV_INITRD=y # CONFIG_UID16 is not set # CONFIG_SYSFS_SYSCALL is not set # CONFIG_AIO is not set -CONFIG_BPF_SYSCALL=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_COMPAT_BRK is not set @@ -29,15 +29,10 @@ CONFIG_MACH_ASPEED_G4=y CONFIG_VMSPLIT_2G=y CONFIG_AEABI=y CONFIG_UACCESS_WITH_MEMCPY=y -CONFIG_SECCOMP=y # CONFIG_ATAGS is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_KEXEC=y -CONFIG_FIRMWARE_MEMMAP=y CONFIG_JUMP_LABEL=y CONFIG_STRICT_KERNEL_RWX=y -# CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEBUG_FS is not set # CONFIG_MQ_IOSCHED_DEADLINE is not set # CONFIG_MQ_IOSCHED_KYBER is not set @@ -69,6 +64,7 @@ CONFIG_NET_NCSI=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y # CONFIG_PREVENT_FIRMWARE_BUILD is not set +CONFIG_FIRMWARE_MEMMAP=y CONFIG_MTD=y CONFIG_MTD_BLOCK=y CONFIG_MTD_PARTITIONED_MASTER=y @@ -186,8 +182,6 @@ CONFIG_RTC_DRV_PCF8523=y CONFIG_RTC_DRV_RV8803=y # CONFIG_VIRTIO_MENU is not set # CONFIG_IOMMU_SUPPORT is not set -CONFIG_ASPEED_LPC_CTRL=y -CONFIG_ASPEED_LPC_SNOOP=y CONFIG_IIO=y CONFIG_ASPEED_ADC=y CONFIG_MAX1363=y @@ -226,6 +220,7 @@ CONFIG_DEBUG_INFO_DWARF4=y CONFIG_GDB_SCRIPTS=y CONFIG_STRIP_ASM_SYMS=y CONFIG_DEBUG_FS=y +CONFIG_DEBUG_WX=y CONFIG_SCHED_STACK_END_CHECK=y CONFIG_PANIC_ON_OOPS=y CONFIG_PANIC_TIMEOUT=-1 @@ -235,6 +230,5 @@ CONFIG_WQ_WATCHDOG=y # CONFIG_SCHED_DEBUG is not set CONFIG_DEBUG_LIST=y CONFIG_FUNCTION_TRACER=y -CONFIG_DEBUG_WX=y CONFIG_DEBUG_USER=y # CONFIG_RUNTIME_TESTING_MENU is not set diff --git a/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g5/defconfig b/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g5/defconfig index e194892f3..35eabcfe2 100644 --- a/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g5/defconfig +++ b/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g5/defconfig @@ -3,6 +3,7 @@ CONFIG_KERNEL_XZ=y CONFIG_SYSVIPC=y CONFIG_NO_HZ_IDLE=y CONFIG_HIGH_RES_TIMERS=y +CONFIG_BPF_SYSCALL=y CONFIG_PSI=y CONFIG_PSI_DEFAULT_DISABLED=y CONFIG_IKCONFIG=y @@ -19,7 +20,6 @@ CONFIG_BLK_DEV_INITRD=y # CONFIG_UID16 is not set # CONFIG_SYSFS_SYSCALL is not set # CONFIG_AIO is not set -CONFIG_BPF_SYSCALL=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_COMPAT_BRK is not set @@ -32,16 +32,11 @@ CONFIG_MACH_ASPEED_G5=y # CONFIG_CACHE_L2X0 is not set CONFIG_VMSPLIT_2G=y CONFIG_UACCESS_WITH_MEMCPY=y -CONFIG_SECCOMP=y # CONFIG_ATAGS is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_KEXEC=y # CONFIG_SUSPEND is not set -CONFIG_FIRMWARE_MEMMAP=y CONFIG_JUMP_LABEL=y CONFIG_STRICT_KERNEL_RWX=y -# CONFIG_BLK_DEV_BSG is not set # CONFIG_BLK_DEBUG_FS is not set # CONFIG_MQ_IOSCHED_DEADLINE is not set # CONFIG_MQ_IOSCHED_KYBER is not set @@ -73,6 +68,7 @@ CONFIG_NET_NCSI=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y # CONFIG_PREVENT_FIRMWARE_BUILD is not set +CONFIG_FIRMWARE_MEMMAP=y CONFIG_MTD=y CONFIG_MTD_BLOCK=y CONFIG_MTD_PARTITIONED_MASTER=y @@ -148,7 +144,6 @@ CONFIG_HW_RANDOM_TIMERIOMEM=y CONFIG_DEVMEM_BOOTPARAM=y # CONFIG_I2C_COMPAT is not set CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX=y CONFIG_I2C_MUX_PCA9541=y CONFIG_I2C_MUX_PCA954x=y CONFIG_I2C_ASPEED=y @@ -210,8 +205,6 @@ CONFIG_RTC_DRV_PCF8523=y CONFIG_RTC_DRV_RV8803=y # CONFIG_VIRTIO_MENU is not set # CONFIG_IOMMU_SUPPORT is not set -CONFIG_ASPEED_LPC_CTRL=y -CONFIG_ASPEED_LPC_SNOOP=y CONFIG_ASPEED_XDMA=y CONFIG_IIO=y CONFIG_ASPEED_ADC=y @@ -255,6 +248,7 @@ CONFIG_DEBUG_INFO_DWARF4=y CONFIG_GDB_SCRIPTS=y CONFIG_STRIP_ASM_SYMS=y CONFIG_DEBUG_FS=y +CONFIG_DEBUG_WX=y CONFIG_SCHED_STACK_END_CHECK=y CONFIG_PANIC_ON_OOPS=y CONFIG_PANIC_TIMEOUT=-1 @@ -264,6 +258,5 @@ CONFIG_WQ_WATCHDOG=y # CONFIG_SCHED_DEBUG is not set CONFIG_DEBUG_LIST=y CONFIG_FUNCTION_TRACER=y -CONFIG_DEBUG_WX=y CONFIG_DEBUG_USER=y # CONFIG_RUNTIME_TESTING_MENU is not set diff --git a/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g6/defconfig b/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g6/defconfig index fa3507d5d..451afd81a 100644 --- a/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g6/defconfig +++ b/meta-aspeed/recipes-kernel/linux/linux-aspeed/aspeed-g6/defconfig @@ -3,6 +3,7 @@ CONFIG_KERNEL_XZ=y CONFIG_SYSVIPC=y CONFIG_NO_HZ_IDLE=y CONFIG_HIGH_RES_TIMERS=y +CONFIG_BPF_SYSCALL=y CONFIG_PSI=y CONFIG_PSI_DEFAULT_DISABLED=y CONFIG_IKCONFIG=y @@ -19,7 +20,6 @@ CONFIG_BLK_DEV_INITRD=y # CONFIG_UID16 is not set # CONFIG_SYSFS_SYSCALL is not set # CONFIG_AIO is not set -CONFIG_BPF_SYSCALL=y CONFIG_EMBEDDED=y CONFIG_PERF_EVENTS=y # CONFIG_COMPAT_BRK is not set @@ -34,17 +34,12 @@ CONFIG_VMSPLIT_2G=y CONFIG_NR_CPUS=2 CONFIG_HIGHMEM=y CONFIG_UACCESS_WITH_MEMCPY=y -CONFIG_SECCOMP=y # CONFIG_ATAGS is not set -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_KEXEC=y CONFIG_VFP=y CONFIG_NEON=y CONFIG_KERNEL_MODE_NEON=y -CONFIG_FIRMWARE_MEMMAP=y CONFIG_JUMP_LABEL=y -# CONFIG_BLK_DEV_BSG is not set # CONFIG_MQ_IOSCHED_DEADLINE is not set # CONFIG_MQ_IOSCHED_KYBER is not set # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set @@ -75,6 +70,7 @@ CONFIG_NET_NCSI=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y # CONFIG_PREVENT_FIRMWARE_BUILD is not set +CONFIG_FIRMWARE_MEMMAP=y CONFIG_MTD=y CONFIG_MTD_BLOCK=y CONFIG_MTD_PARTITIONED_MASTER=y @@ -86,7 +82,6 @@ CONFIG_MTD_UBI_FASTMAP=y CONFIG_MTD_UBI_BLOCK=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_NBD=y -CONFIG_MCTP_LPC=y CONFIG_EEPROM_AT24=y CONFIG_EEPROM_AT25=y CONFIG_MD=y @@ -98,7 +93,6 @@ CONFIG_NETCONSOLE=y # CONFIG_NET_VENDOR_AMAZON is not set # CONFIG_NET_VENDOR_AQUANTIA is not set # CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_VENDOR_AURORA is not set # CONFIG_NET_VENDOR_BROADCOM is not set # CONFIG_NET_VENDOR_CADENCE is not set # CONFIG_NET_VENDOR_CAVIUM is not set @@ -155,14 +149,13 @@ CONFIG_SERIAL_8250_DW=y CONFIG_SERIAL_OF_PLATFORM=y CONFIG_ASPEED_KCS_IPMI_BMC=y CONFIG_IPMI_KCS_BMC_CDEV_IPMI=y -CONFIG_IPMI_KCS_BMC_CDEV_RAW=y CONFIG_IPMI_KCS_BMC_SERIO=y +CONFIG_IPMI_KCS_BMC_CDEV_RAW=y CONFIG_ASPEED_BT_IPMI_BMC=y CONFIG_HW_RANDOM_TIMERIOMEM=y CONFIG_DEVMEM_BOOTPARAM=y # CONFIG_I2C_COMPAT is not set CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MUX=y CONFIG_I2C_MUX_GPIO=y CONFIG_I2C_MUX_PCA9541=y CONFIG_I2C_MUX_PCA954x=y @@ -185,8 +178,6 @@ CONFIG_SENSORS_LM75=y CONFIG_SENSORS_NCT7904=y CONFIG_SENSORS_OCC_P8_I2C=y CONFIG_SENSORS_OCC_P9_SBE=y -CONFIG_SENSORS_PECI_CPUTEMP=y -CONFIG_SENSORS_PECI_DIMMTEMP=y CONFIG_PMBUS=y CONFIG_SENSORS_ADM1275=y CONFIG_SENSORS_IBM_CFFPS=y @@ -241,9 +232,6 @@ CONFIG_RTC_DRV_RV8803=y CONFIG_RTC_DRV_ASPEED=y # CONFIG_VIRTIO_MENU is not set # CONFIG_IOMMU_SUPPORT is not set -CONFIG_ASPEED_LPC_CTRL=y -CONFIG_ASPEED_LPC_SNOOP=y -CONFIG_ASPEED_P2A_CTRL=y CONFIG_ASPEED_XDMA=y CONFIG_IIO=y CONFIG_ASPEED_ADC=y @@ -257,8 +245,6 @@ CONFIG_FSI_MASTER_ASPEED=y CONFIG_FSI_SCOM=y CONFIG_FSI_SBEFIFO=y CONFIG_FSI_OCC=y -CONFIG_PECI=y -CONFIG_PECI_ASPEED=y CONFIG_EXT4_FS=y CONFIG_FANOTIFY=y CONFIG_OVERLAY_FS=y @@ -290,6 +276,7 @@ CONFIG_DEBUG_INFO_DWARF4=y CONFIG_GDB_SCRIPTS=y CONFIG_STRIP_ASM_SYMS=y CONFIG_DEBUG_FS=y +CONFIG_DEBUG_WX=y CONFIG_SCHED_STACK_END_CHECK=y CONFIG_PANIC_ON_OOPS=y CONFIG_PANIC_TIMEOUT=-1 @@ -300,6 +287,5 @@ CONFIG_WQ_WATCHDOG=y # CONFIG_SCHED_DEBUG is not set CONFIG_DEBUG_LIST=y CONFIG_FUNCTION_TRACER=y -CONFIG_DEBUG_WX=y CONFIG_DEBUG_USER=y # CONFIG_RUNTIME_TESTING_MENU is not set diff --git a/meta-aspeed/recipes-kernel/linux/linux-aspeed/tpm/tpm2.cfg b/meta-aspeed/recipes-kernel/linux/linux-aspeed/tpm/tpm2.cfg new file mode 100644 index 000000000..9479a7b41 --- /dev/null +++ b/meta-aspeed/recipes-kernel/linux/linux-aspeed/tpm/tpm2.cfg @@ -0,0 +1,6 @@ +CONFIG_HW_RANDOM_TPM=y +CONFIG_TCG_TPM=y +CONFIG_TCG_TIS_CORE=y +CONFIG_TCG_TIS=y +CONFIG_TCG_TIS_SPI=y +CONFIG_SECURITYFS=y diff --git a/meta-aspeed/recipes-kernel/linux/linux-aspeed/tpm/tpm2.scc b/meta-aspeed/recipes-kernel/linux/linux-aspeed/tpm/tpm2.scc new file mode 100644 index 000000000..088148fec --- /dev/null +++ b/meta-aspeed/recipes-kernel/linux/linux-aspeed/tpm/tpm2.scc @@ -0,0 +1,3 @@ +define KFEATURE_DESCRIPTION "Enable TPM 2.0" + +kconf hardware tpm2.cfg diff --git a/meta-aspeed/recipes-kernel/linux/linux-aspeed_git.bb b/meta-aspeed/recipes-kernel/linux/linux-aspeed_git.bb index a11f9ace0..f90c6278c 100644 --- a/meta-aspeed/recipes-kernel/linux/linux-aspeed_git.bb +++ b/meta-aspeed/recipes-kernel/linux/linux-aspeed_git.bb @@ -1,6 +1,6 @@ KBRANCH ?= "dev-5.15" -LINUX_VERSION ?= "5.15" +LINUX_VERSION ?= "5.15.10" -SRCREV="781a66e81bbb9081e74d9ba0fcee095fefa1048e" +SRCREV="dd1e40cecc7ca43ce22552e380bbc00b720575f5" require linux-aspeed.inc diff --git a/meta-asrock/meta-e3c246d4i/conf/bblayers.conf.sample b/meta-asrock/meta-e3c246d4i/conf/bblayers.conf.sample index 2f2b5f377..409a775a8 100644 --- a/meta-asrock/meta-e3c246d4i/conf/bblayers.conf.sample +++ b/meta-asrock/meta-e3c246d4i/conf/bblayers.conf.sample @@ -16,14 +16,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-asrock \ ##OEROOT##/meta-asrock/meta-e3c246d4i \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-poky \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-asrock \ - ##OEROOT##/meta-asrock/meta-e3c246d4i \ - " diff --git a/meta-bytedance/meta-g220a/conf/bblayers.conf.sample b/meta-bytedance/meta-g220a/conf/bblayers.conf.sample index 370d6456f..81b0a95f8 100644 --- a/meta-bytedance/meta-g220a/conf/bblayers.conf.sample +++ b/meta-bytedance/meta-g220a/conf/bblayers.conf.sample @@ -17,15 +17,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-bytedance \ ##OEROOT##/meta-bytedance/meta-g220a \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-bytedance \ - ##OEROOT##/meta-bytedance/meta-g220a \ - " diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control/power-config-host0.json b/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control/power-config-host0.json index c16564440..1ca0e613d 100644 --- a/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control/power-config-host0.json +++ b/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control/power-config-host0.json @@ -1,11 +1,46 @@ { - "gpio_configs": { - "NMIButton": "NMI_BUTTON", - "NMIOut": "NMI_OUT", - "PostComplete": "POST_COMPLETE", - "PwrButton": "POWER_BUTTON", - "PwrOK": "PS_PWROK", - "PwrOut": "POWER_OUT", - "RstOut": "RESET_OUT" - } + "gpio_configs": [ + { + "Name" : "NMIButton", + "LineName" : "NMI_BUTTON", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "NMIOut", + "LineName" : "NMI_OUT", + "Type" : "GPIO", + "Polarity" : "ActiveHigh" + }, + { + "Name" : "PostComplete", + "LineName" : "POST_COMPLETE", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "PowerButton", + "LineName" : "POWER_BUTTON", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "PowerOk", + "LineName" : "PS_PWROK", + "Type" : "GPIO", + "Polarity" : "ActiveHigh" + }, + { + "Name" : "PowerOut", + "LineName" : "POWER_OUT", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "ResetOut", + "LineName" : "RESET_OUT", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + } + ] } diff --git a/meta-evb/meta-evb-aspeed/meta-evb-ast2500/conf/bblayers.conf.sample b/meta-evb/meta-evb-aspeed/meta-evb-ast2500/conf/bblayers.conf.sample index 83c22c5b6..477be07f1 100644 --- a/meta-evb/meta-evb-aspeed/meta-evb-ast2500/conf/bblayers.conf.sample +++ b/meta-evb/meta-evb-aspeed/meta-evb-ast2500/conf/bblayers.conf.sample @@ -20,18 +20,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-evb/meta-evb-aspeed \ ##OEROOT##/meta-evb/meta-evb-aspeed/meta-evb-ast2500 \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-poky \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-openembedded/meta-webserver \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-evb \ - ##OEROOT##/meta-evb/meta-evb-aspeed \ - ##OEROOT##/meta-evb/meta-evb-aspeed/meta-evb-ast2500 \ - " diff --git a/meta-evb/meta-evb-aspeed/meta-evb-ast2600/conf/bblayers.conf.sample b/meta-evb/meta-evb-aspeed/meta-evb-ast2600/conf/bblayers.conf.sample index de8ab1312..145dac4f2 100644 --- a/meta-evb/meta-evb-aspeed/meta-evb-ast2600/conf/bblayers.conf.sample +++ b/meta-evb/meta-evb-aspeed/meta-evb-ast2600/conf/bblayers.conf.sample @@ -17,15 +17,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-aspeed \ ##OEROOT##/meta-evb/meta-evb-aspeed/meta-evb-ast2600 \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-poky \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-evb/meta-evb-aspeed/meta-evb-ast2600 \ - " diff --git a/meta-evb/meta-evb-nuvoton/meta-evb-npcm750/conf/bblayers.conf.sample b/meta-evb/meta-evb-nuvoton/meta-evb-npcm750/conf/bblayers.conf.sample index ee62cea41..96c16f311 100644 --- a/meta-evb/meta-evb-nuvoton/meta-evb-npcm750/conf/bblayers.conf.sample +++ b/meta-evb/meta-evb-nuvoton/meta-evb-npcm750/conf/bblayers.conf.sample @@ -19,17 +19,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-evb/meta-evb-nuvoton \ ##OEROOT##/meta-evb/meta-evb-nuvoton/meta-evb-npcm750 \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-poky \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-nuvoton \ - ##OEROOT##/meta-evb \ - ##OEROOT##/meta-evb/meta-evb-nuvoton \ - ##OEROOT##/meta-evb/meta-evb-nuvoton/meta-evb-npcm750 \ - " diff --git a/meta-evb/meta-evb-raspberrypi/conf/bblayers.conf.sample b/meta-evb/meta-evb-raspberrypi/conf/bblayers.conf.sample index 6e838d799..6c7bb92a6 100644 --- a/meta-evb/meta-evb-raspberrypi/conf/bblayers.conf.sample +++ b/meta-evb/meta-evb-raspberrypi/conf/bblayers.conf.sample @@ -17,15 +17,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-phosphor \ ##OEROOT##/meta-raspberrypi \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-poky \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-openembedded/meta-webserver \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-raspberrypi \ - " diff --git a/meta-facebook/conf/machine/include/facebook.inc b/meta-facebook/conf/machine/include/facebook.inc index 47b641dfc..c61237934 100644 --- a/meta-facebook/conf/machine/include/facebook.inc +++ b/meta-facebook/conf/machine/include/facebook.inc @@ -15,6 +15,7 @@ PREFERRED_PROVIDER_virtual/obmc-inventory-data ?= "${VIRTUAL-RUNTIME_skeleton_wo PREFERRED_PROVIDER_virtual/obmc-system-mgmt = "packagegroup-fb-apps" IMAGE_FEATURES:remove = "obmc-ikvm" +IMAGE_FEATURES:append = " allow-root-login" # Most of our hardware uses the default ttyS4 but at 57600. SERIAL_CONSOLES:facebook = "57600;ttyS4" diff --git a/meta-facebook/meta-bletchley/conf/bblayers.conf.sample b/meta-facebook/meta-bletchley/conf/bblayers.conf.sample index 3b24ed861..84dcddfbb 100644 --- a/meta-facebook/meta-bletchley/conf/bblayers.conf.sample +++ b/meta-facebook/meta-bletchley/conf/bblayers.conf.sample @@ -20,18 +20,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-facebook \ ##OEROOT##/meta-facebook/meta-bletchley \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-poky \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-openembedded/meta-webserver \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-security/meta-tpm \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-facebook \ - ##OEROOT##/meta-facebook/meta-bletchley \ - " diff --git a/meta-facebook/meta-bletchley/conf/machine/bletchley.conf b/meta-facebook/meta-bletchley/conf/machine/bletchley.conf index 9427df28a..6b7711a62 100644 --- a/meta-facebook/meta-bletchley/conf/machine/bletchley.conf +++ b/meta-facebook/meta-bletchley/conf/machine/bletchley.conf @@ -1,6 +1,5 @@ -#KMACHINE = "aspeed" -#KERNEL_DEVICETREE = "${KMACHINE}-bmc-facebook-${MACHINE}.dtb" -KERNEL_DEVICETREE = "aspeed-ast2600-evb.dtb" +KMACHINE = "aspeed" +KERNEL_DEVICETREE = "${KMACHINE}-bmc-facebook-${MACHINE}.dtb" UBOOT_MACHINE = "ast2600_openbmc_spl_defconfig" UBOOT_DEVICETREE = "ast2600a1-evb" @@ -12,3 +11,8 @@ require conf/machine/include/obmc-bsp-common.inc require conf/machine/include/facebook-tpm2.inc FLASH_SIZE = "131072" + +PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native = "bletchley-led-manager-config-native" + +OBMC_HOST_INSTANCES = "0 1 2 3 4 5 " + diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-poweroff@.service b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-poweroff@.service new file mode 100644 index 000000000..50cd53283 --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-poweroff@.service @@ -0,0 +1,10 @@ +[Unit] +Description=Power off System in Sled%i by Step Motor +Requires=motor-init-calibration@%i.service +After=motor-init-calibration@%i.service + +[Service] +Type=oneshot +ExecStart=/usr/sbin/power-ctrl sled%i off +SyslogIdentifier=power-ctrl + diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-poweron@.service b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-poweron@.service new file mode 100644 index 000000000..6ff11202d --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/host-poweron@.service @@ -0,0 +1,10 @@ +[Unit] +Description=Power on System in Sled%i by Step Motor +Requires=motor-init-calibration@%i.service +After=motor-init-calibration@%i.service + +[Service] +Type=oneshot +ExecStart=/usr/sbin/power-ctrl sled%i on +SyslogIdentifier=power-ctrl + diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/motor-ctrl b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/motor-ctrl new file mode 100755 index 000000000..3f8f2ca21 --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/motor-ctrl @@ -0,0 +1,101 @@ +#!/bin/bash -e +# +# Control step motor rotate of sled + +function set_gpio() +{ + NET_NAME=$1 + OUT_VAL=$2 + mapfile -t -d " " GPIO_INFO < <(gpiofind "$NET_NAME") + if [ "${#GPIO_INFO[@]}" -ne 2 ]; then + echo "set_gpio: can not find gpio, $NET_NAME" + return 1 + fi + echo -n "set_gpio: set $NET_NAME = $OUT_VAL" + if ! gpioset "${GPIO_INFO[0]}" "${GPIO_INFO[1]%$'\n'}"="$OUT_VAL"; then + echo " failed" + return 1 + fi + echo " success" + return 0 +} + +#Get i2c bus number for sledN +function get_bus_num() { + SLED_NUM=$1 + local bus=0 + + if [[ "$SLED_NUM" = [0-5] ]]; then + bus="$SLED_NUM" + fi + echo "$bus" +} + +#Enable sledN Motor VRef +function open_vref() { + i2cset -f -y "${1}" 0x67 0x06 0x95 +} + +#Disable sledN Motor VRef +function close_vref() { + i2cset -f -y "${1}" 0x67 0x06 0x55 +} + +####################################### +# Setting step motor control pins to start/stop motor +# Arguments: +# 1. SLED NUMBER +# 2. Value of STBY RESET PIN +# 3. Value of ENABLE PIN +# 4. Value of DIRECTION PIN +####################################### +function set_motor() { + STBY_PIN="SLED${1}_MD_STBY_RESET" + EN_PIN="SLED${1}_MD_IOEXP_EN_FAULT" + DIR_PIN="SLED${1}_MD_DIR" + set_gpio "$STBY_PIN" "$2" + set_gpio "$EN_PIN" "$3" + set_gpio "$DIR_PIN" "$4" +} + +function show_usage(){ + echo "Usage: motor-ctrl [sled0 | sled1 | sled2 | sled3 | sled4 | sled5] [f r s]" + echo " f : Step Motor go forward" + echo " r : Step Motor go reverse" + echo " s : Step Motor stop " +} + +if [ $# -ne 2 ]; then + show_usage + exit 1; +fi + +if [[ "$1" =~ ^(slot[0-5]{1})$ ]] || [[ "$1" =~ ^(sled[0-5]{1})$ ]]; then + SLED=$1 + SLED_NUM=${SLED:4} + I2C_NUM=$(get_bus_num "$SLED_NUM") + ACTION=$2 +else + echo "invalid sled name: $1" + exit 1; +fi + +if [[ "$ACTION" == "s" ]]; then + echo "stop motor" + set_motor "$SLED_NUM" 1 0 0 + close_vref "$I2C_NUM" +elif [[ "$ACTION" == "f" ]];then + echo "start motor, direction:forward" + set_motor "$SLED_NUM" 1 1 0 + open_vref "$I2C_NUM" +elif [[ "$ACTION" == "r" ]];then + echo "start motor, direction:reverse" + set_motor "$SLED_NUM" 1 1 1 + open_vref "$I2C_NUM" +else + echo "Error: Unknown action!" + exit 1 +fi + +exit 0 + diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/motor-init b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/motor-init new file mode 100755 index 000000000..cecb99618 --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/motor-init @@ -0,0 +1,185 @@ +#!/bin/bash -e + +# Initialize for step motor of sled: +# Enable pwm and setup pwm duty +# Setup gpio pins for step motor control +# Moving step motor back to initial position + +export PATH=$PATH:/usr/libexec + +PWM_BASE_ADDR="0x1e61" +DEV_FILE="/dev/mem" +CALIBRATE_TIMEOUT=120 + +#Get pwm register address for sledN +function get_pwm_offset() { + local offset=0 + case $1 in + 0) + offset="0080" + ;; + 1) + offset="0090" + ;; + 2) + offset="00a0" + ;; + 3) + offset="00b0" + ;; + 4) + offset="00c0" + ;; + 5) + offset="00d0" + ;; + esac + + echo ${PWM_BASE_ADDR}${offset} +} + +#Get pwm duty register address for sledN +function get_duty_offset() { + local offset=0 + case $1 in + 0) + offset="0084" + ;; + 1) + offset="0094" + ;; + 2) + offset="00a4" + ;; + 3) + offset="00b4" + ;; + 4) + offset="00c4" + ;; + 5) + offset="00d4" + ;; + esac + + echo ${PWM_BASE_ADDR}${offset} +} + +#Enable pwm for sledN +function open_pwm() { + local SLED_NUM="$1" + echo "Open pwm of sled$SLED_NUM" + #enable BMC PWM + if [ ! -c "$DEV_FILE" ]; then + mknod /dev/mem c 1 1 + fi + + PWM_OFFSET=$(get_pwm_offset "$SLED_NUM") + DUTY_OFFSET=$(get_duty_offset "$SLED_NUM") + echo "setting ${PWM_OFFSET} to 0x000113F3" + echo "setting ${DUTY_OFFSET} to 0xFF006400" + devmem "$PWM_OFFSET" 32 0x000113F3 + devmem "$DUTY_OFFSET" 32 0xFF006400 +} + +function set_gpio() +{ + NET_NAME=$1 + OUT_VAL=$2 + mapfile -t -d " " GPIO_INFO < <(gpiofind "$NET_NAME") + if [ "${#GPIO_INFO[@]}" -ne 2 ]; then + echo "set_gpio: can not find gpio, $NET_NAME" + return 1 + fi + echo -n "set_gpio: set $NET_NAME = $OUT_VAL" + if ! gpioset "${GPIO_INFO[0]}" "${GPIO_INFO[1]%$'\n'}"="$OUT_VAL"; then + echo " failed" + return 1 + fi + echo " success" + return 0 +} + +function get_gpio() +{ + NET_NAME=$1 + RET_VAL=2 + + mapfile -t -d " " GPIO_INFO < <(gpiofind "$NET_NAME") + if [ "${#GPIO_INFO[@]}" -ne 2 ]; then + echo "get_gpio: can not find gpio, $NET_NAME" >&2 + return 1 + fi + if ! RET_VAL=$(gpioget "${GPIO_INFO[0]}" "${GPIO_INFO[1]%$'\n'}") ; then + echo "get_gpio: get ${NET_NAME} failed" >&2 + return 1 + fi + echo "${RET_VAL}" + return 0 +} + +#Init gpio pins for step motor control +function init_gpios() { + echo "Init GPIOs:" + motor_ctrl_gpio_pins_names=( "SLED${1}_MD_STBY_RESET" + "SLED${1}_MD_IOEXP_EN_FAULT" + "SLED${1}_MD_DIR" + "SLED${1}_MD_DECAY" + "SLED${1}_MD_MODE1" + "SLED${1}_MD_MODE2" + "SLED${1}_MD_MODE3" ) + + for gpio_name in "${motor_ctrl_gpio_pins_names[@]}"; do + set_gpio "$gpio_name" 0 + done +} + +if [[ "$1" =~ ^(slot[0-5]{1})$ ]] || [[ "$1" =~ ^(sled[0-5]{1})$ ]]; then + SLED=$1 + SLED_NUM=${SLED:4} +else + #show_usage + echo "invalid sled name: ${1}" + exit 1; +fi + +#Check if sled is present +SLED_PRESENT=$(get_gpio "presence-sled${SLED_NUM}") +if [ "$SLED_PRESENT" != 0 ];then + echo "${SLED} is not present, skip motor initialize" + exit 1 +fi + +#Init gpios +init_gpios "$SLED_NUM" + +#enable pwm +open_pwm "$SLED_NUM" + +#SLED{N}_MS_DETECT1 (initial position) +DETECT_PIN1="SLED${SLED_NUM}_MS_DETECT1" +INIT_POS=$(get_gpio "$DETECT_PIN1") + +if [ "$INIT_POS" -eq 1 ];then + time_count=0 + echo "Making motor back to initial position..." + motor-ctrl "$SLED" r >/dev/null + while [ "$INIT_POS" -eq 1 ] ;do + INIT_POS=$(get_gpio "$DETECT_PIN1") + sleep 0.1 + time_count=$(( time_count + 1 )) + if [ $time_count -gt $CALIBRATE_TIMEOUT ];then + echo "Error: Step motor run over 1 cycle but switch never triggered" + break + fi + done + motor-ctrl "$SLED" s >/dev/null +fi + +if [ "$INIT_POS" -eq 0 ];then + echo "Motor calibrated to initial position." + exit 0 +else + echo "Find motor initial position failed" + exit 1 +fi diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/motor-init-calibration@.service b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/motor-init-calibration@.service new file mode 100644 index 000000000..aab61b7fe --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/motor-init-calibration@.service @@ -0,0 +1,11 @@ +[Unit] +Description=Motor Initialize for sled%i + +[Service] +ExecStart=/usr/libexec/motor-init sled%i +SyslogIdentifier=Motor Initialize sled%i +Type=oneshot +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/power-ctrl b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/power-ctrl new file mode 100755 index 000000000..111ce8bbc --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/files/power-ctrl @@ -0,0 +1,178 @@ +#!/bin/bash +# +# Power Control tool +# Enable/disable AC relay +# On/off System by step moter to press power key + +export PATH=$PATH:/usr/sbin:/usr/libexec + +DELAY_POWER_ON="0.5" +DELAY_POWER_OFF="5" +POWER_BTN_TIMEOUT_CNT=60 + +#Switch pull low while it be touched +function wait_for_switch() { + TARGET_PIN=$1 + TARGET_SWITCH=1 + TIME_CNT=0 + while [ "$TARGET_SWITCH" -eq 1 ] ;do + TARGET_SWITCH=$(get_gpio "$TARGET_PIN") + sleep 0.1 + TIME_CNT=$(( TIME_CNT +1)) + if [ $TIME_CNT -gt $POWER_BTN_TIMEOUT_CNT ];then + echo "Error: Too long to get target switch, force exit" >&2 + break + fi + done +} + +function trigger_power_button() { + local sled_num=$1 + local delay_time=$2 + + #SLED{N}_MS_DETECT1 (initial position) + GPIO_DETECT_PIN1="SLED${sled_num}_MS_DETECT1" + #SLED{N}_MS_DETECT0 (MAC position) + GPIO_DETECT_PIN0="SLED${sled_num}_MS_DETECT0" + + echo "Motor go forward to press Power key" + motor-ctrl "sled${sled_num}" f >/dev/null + wait_for_switch "${GPIO_DETECT_PIN0}" + motor-ctrl "sled${sled_num}" s >/dev/null + + if [ "$(get_gpio "$GPIO_DETECT_PIN0")" -eq 0 ];then + echo "Power key switch triggered" + echo "Press power key for Sled${1} ${delay_time} seconds..." + sleep "$delay_time" + else + echo "Power key switch not trigger, back motor to initail position" + fi + + motor-ctrl "sled${sled_num}" r >/dev/null + wait_for_switch "${GPIO_DETECT_PIN1}" + motor-ctrl "sled${sled_num}" s >/dev/null + if [ "$(get_gpio "$GPIO_DETECT_PIN1")" -eq 0 ];then + echo "Motor reverse to initial position successful" + else + echo "Initail position switch not trigger, force stop motor" + fi +} + +#Get i2c bus number for sledN +function get_bus_num() { + SLED_NUM=$1 + local bus=0 + + if [[ "$SLED_NUM" = [0-5] ]]; then + bus="$SLED_NUM" + fi + echo "$bus" +} + +function set_gpio() +{ + NET_NAME=$1 + OUT_VAL=$2 + mapfile -t -d " " GPIO_INFO < <(gpiofind "$NET_NAME") + if [ "${#GPIO_INFO[@]}" -ne 2 ]; then + echo "set_gpio: can not find gpio, $NET_NAME" + return 1 + fi + echo -n "set_gpio: set $NET_NAME = $OUT_VAL" + if ! gpioset "${GPIO_INFO[0]}" "${GPIO_INFO[1]%$'\n'}"="$OUT_VAL"; then + echo " failed" + return 1 + fi + echo " success" + return 0 +} + +function get_gpio() +{ + NET_NAME=$1 + RET_VAL=2 + + mapfile -t -d " " GPIO_INFO < <(gpiofind "$NET_NAME") + if [ "${#GPIO_INFO[@]}" -ne 2 ]; then + echo "get_gpio: can not find gpio, $NET_NAME" >&2 + return 1 + fi + if ! RET_VAL=$(gpioget "${GPIO_INFO[0]}" "${GPIO_INFO[1]%$'\n'}") ; then + echo "get_gpio: get ${NET_NAME} failed" >&2 + return 1 + fi + echo "${RET_VAL}" + return 0 +} + +function get_ac_status(){ + i2c_bus=$(get_bus_num "$1") + p1_output_reg=$(i2cget -f -y "$i2c_bus" 0x76 0x03) + p1_config_reg=$(i2cget -f -y "$i2c_bus" 0x76 0x07) + host_pwr="$(( (p1_output_reg & 0x80)>>7 ))" + is_output="$(( (~p1_config_reg & 0x80)>>7 ))" + + if [ "$(( host_pwr & is_output ))" -eq 1 ];then + echo "AC on" + else + echo "AC off" + fi +} + +function show_usage(){ + echo "Usage: power-ctrl [sled0 | sled1 | sled2 | sled3 | sled4 | sled5] [on off ac-on ac-off status]" + echo " power-ctrl chassis-cycle" +} + +if [ $# -eq 1 ]; then + if [ "$1" = "chassis-cycle" ];then + echo "chassis cycle...." + i2cset -y -f 12 0x11 0xd9 c + exit 0 + else + echo "Invalid argument: [ $1 ]" + show_usage + exit 1; + fi +fi + +if [ $# -gt 2 ]; then + echo "Too many arguments" + show_usage + exit 1; +fi + +if [[ "$1" =~ ^(slot[0-5]{1})$ ]] || [[ "$1" =~ ^(sled[0-5]{1})$ ]]; then + SLED=$1 + ACTION=$2 + SLED_NUM=${SLED:4} +else + echo "invalid sled name: ${1}" + show_usage + exit 1; +fi + +#Check if sled is present +SLED_PRESENT=$(get_gpio "presence-sled${SLED_NUM}") +if [ "$SLED_PRESENT" != 0 ];then + echo "${SLED} is not present!" + exit 1 +fi + +if [[ "$ACTION" == "on" ]]; then + echo "Power on ${SLED}" + trigger_power_button "$SLED_NUM" "$DELAY_POWER_ON" +elif [[ "$ACTION" == "off" ]];then + echo "Power off ${SLED}" + trigger_power_button "$SLED_NUM" "$DELAY_POWER_OFF" +elif [[ "$ACTION" == "status" ]];then + get_ac_status "$SLED_NUM" + #TODO : check or record Host(DC) power status +elif [[ "$ACTION" == "ac-on" ]];then + set_gpio "power-host${SLED_NUM}" 1 +elif [[ "$ACTION" == "ac-off" ]];then + set_gpio "power-host${SLED_NUM}" 0 +else + echo "Unknown action: [ ${ACTION} ]" + show_usage +fi diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/motor-ctrl_0.1.bb b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/motor-ctrl_0.1.bb new file mode 100644 index 000000000..2705eb850 --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-bletchley/motor-ctrl/motor-ctrl_0.1.bb @@ -0,0 +1,37 @@ +SUMMARY = "Bletchley Motor control" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit obmc-phosphor-systemd + +RDEPENDS:${PN} += "bash" +RDEPENDS:${PN} += "libgpiod-tools" +RDEPENDS:${PN} += "i2c-tools" + +S = "${WORKDIR}" +SRC_URI += "file://motor-init \ + file://motor-ctrl \ + file://power-ctrl " + +do_install() { + install -d ${D}${sbindir} + install -m 0755 ${WORKDIR}/power-ctrl ${D}${sbindir} + + install -d ${D}${libexecdir} + install -m 0755 ${WORKDIR}/motor-init ${D}${libexecdir} + install -m 0755 ${WORKDIR}/motor-ctrl ${D}${libexecdir} +} + +MOTOR_INIT_INSTFMT= "motor-init-calibration@{0}.service" +PWR_ON_INSTFMT="host-poweron@.service:host-poweron@{0}.service" +PWR_OFF_INSTFMT="host-poweroff@.service:host-poweroff@{0}.service" + +SYSTEMD_SERVICE:${PN} ="${@compose_list(d, 'MOTOR_INIT_INSTFMT', 'OBMC_HOST_INSTANCES')}" +FILES:${PN} += "${systemd_system_unitdir}/motor-init-calibration@.service" + +SYSTEMD_SERVICE:${PN} +="host-poweron@.service" +SYSTEMD_LINK:${PN} += "${@compose_list(d, 'PWR_ON_INSTFMT', 'OBMC_HOST_INSTANCES')}" + +SYSTEMD_SERVICE:${PN} +="host-poweroff@.service" +SYSTEMD_LINK:${PN} += "${@compose_list(d, 'PWR_OFF_INSTFMT', 'OBMC_HOST_INSTANCES')}" diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/plat-svc/files/bletchley-early-sys-init b/meta-facebook/meta-bletchley/recipes-bletchley/plat-svc/files/bletchley-early-sys-init new file mode 100755 index 000000000..90a3f72af --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-bletchley/plat-svc/files/bletchley-early-sys-init @@ -0,0 +1,82 @@ +#!/bin/bash -e + +set_gpio() +{ + NET_NAME=$1 + OUT_VAL=$2 + mapfile -t -d " " GPIO_INFO < <(gpiofind "$NET_NAME") + if [ "${#GPIO_INFO[@]}" -ne 2 ]; then + echo "set_gpio: can not find gpio, $NET_NAME" + return 1 + fi + + echo -n "set_gpio: set $NET_NAME = $OUT_VAL" + if ! gpioset "${GPIO_INFO[0]}" "${GPIO_INFO[1]%$'\n'}"="$OUT_VAL"; then + echo " failed" + return 1 + fi + + echo " success" + return 0 +} + +set_fan() +{ + FAN_ID=$1 + FAN_DUTY=$2 + SYSFA_PWM_PATH="" + + for file in /sys/devices/platform/pwm-fan"$FAN_ID"/hwmon/hwmon*/pwm1 + do + if [ -e "$file" ]; then + SYSFA_PWM_PATH="$file" + break + fi + done + + if [ -z "$SYSFA_PWM_PATH" ]; then + echo "set_fan: pwm file not found, chekc fan id ($FAN_ID)" + return 1 + fi + + if [ "$FAN_DUTY" -lt 0 ] || [ "$FAN_DUTY" -gt 100 ]; then + echo "set_fan: incorrect fan duty, $FAN_DUTY" + return 1 + fi + + # convert duty (0-100) to pwm value (0-255) + PWM_VAL=$(printf "%.0f" $((FAN_DUTY*255/100))) + + echo -n "set_fan: set fan$FAN_ID = $FAN_DUTY" + if ! echo "$PWM_VAL" > "$SYSFA_PWM_PATH"; then + echo " failed" + return 1 + fi + + echo " success" + return 0 +} + +# set initial value for GPIO output pins +set_gpio SEL_SPI2_MUX 1 +set_gpio SPI2_MUX1 1 +set_gpio SPI2_MUX2 1 +set_gpio SPI2_MUX3 1 +set_gpio SWITCH_FRU_MUX 1 +set_gpio BAT_DETECT 1 +set_gpio BMC_BT_WP0 1 +set_gpio BMC_BT_WP1 1 +set_gpio USB2_SEL0_A 1 +set_gpio USB2_SEL1_A 1 +set_gpio USB2_SEL0_B 1 +set_gpio USB2_SEL1_B 1 +set_gpio RST_FRONT_IOEXP 1 +set_gpio BSM_FLASH_LATCH 1 + +# set initial duty value for each fan +set_fan 0 70 +set_fan 1 70 +set_fan 2 70 +set_fan 3 70 + +exit 0; diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/plat-svc/files/bletchley-sys-init.service b/meta-facebook/meta-bletchley/recipes-bletchley/plat-svc/files/bletchley-sys-init.service new file mode 100644 index 000000000..481225990 --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-bletchley/plat-svc/files/bletchley-sys-init.service @@ -0,0 +1,11 @@ +[Unit] +Description=Bletchley Early System Init +Before=phosphor-pid-control.service + +[Service] +Type=oneshot +ExecStart=/usr/libexec/bletchley-early-sys-init +SyslogIdentifier=Bletchley Early Init + +[Install] +WantedBy=multi-user.target diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/plat-svc/plat-svc_0.1.bb b/meta-facebook/meta-bletchley/recipes-bletchley/plat-svc/plat-svc_0.1.bb new file mode 100644 index 000000000..dcbf6e88a --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-bletchley/plat-svc/plat-svc_0.1.bb @@ -0,0 +1,25 @@ +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit allarch systemd + +RDEPENDS:${PN} += "bash" +RDEPENDS:${PN} += "libgpiod-tools" + +SRC_URI += " \ + file://bletchley-early-sys-init \ + file://bletchley-sys-init.service \ + " + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN}:append = " \ + bletchley-sys-init.service \ + " + +do_install() { + install -d ${D}${libexecdir} + install -m 0755 ${WORKDIR}/bletchley-early-sys-init ${D}${libexecdir} + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/bletchley-sys-init.service ${D}${systemd_system_unitdir} +} diff --git a/meta-facebook/meta-bletchley/recipes-kernel/linux/linux-aspeed/bletchley.cfg b/meta-facebook/meta-bletchley/recipes-kernel/linux/linux-aspeed/bletchley.cfg new file mode 100644 index 000000000..49e07a291 --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-kernel/linux/linux-aspeed/bletchley.cfg @@ -0,0 +1,30 @@ +# aspeed-pwm driver +CONFIG_HAVE_CLK=y +CONFIG_PWM=y +CONFIG_OF=y +CONFIG_PWM_ASPEED_AST2600=y +# pwm-fan driver +CONFIG_SENSORS_PWM_FAN=y +# aspeed-tach driver +CONFIG_SENSORS_TACH_ASPEED_AST2600=y +# aspeed-adc driver +CONFIG_COMMON_CLK=y +CONFIG_ASPEED_ADC=y +# devmem +CONFIG_DEVMEM=y +# fixed-link feature +CONFIG_PHYLIB=y +CONFIG_FIXED_PHY=y +# humidity and temperature sensor +CONFIG_HDC100X=y +# interposer HSC driver +CONFIG_SENSORS_MP5023=y +# RTC +CONFIG_RTC_DRV_PCF85363=y +# FUSB302 driver +CONFIG_TYPEC=y +CONFIG_TYPEC_TCPM=y +CONFIG_TYPEC_FUSB302=y +# SPI GPIO +CONFIG_SPI_GPIO=y +CONFIG_SPI_BITBANG=y diff --git a/meta-facebook/meta-bletchley/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-facebook/meta-bletchley/recipes-kernel/linux/linux-aspeed_%.bbappend new file mode 100644 index 000000000..4727bdf73 --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-kernel/linux/linux-aspeed_%.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/linux-aspeed:" +SRC_URI += "file://bletchley.cfg" diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/configuration/bletchley-yaml-config.bb b/meta-facebook/meta-bletchley/recipes-phosphor/configuration/bletchley-yaml-config.bb new file mode 100644 index 000000000..7a8f8471c --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-phosphor/configuration/bletchley-yaml-config.bb @@ -0,0 +1,23 @@ +SUMMARY = "YAML configuration for bletchley" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit allarch + +SRC_URI = " \ + file://bletchley-ipmi-fru.yaml \ + " + +S = "${WORKDIR}" + +do_install() { + install -m 0644 -D bletchley-ipmi-fru.yaml \ + ${D}${datadir}/${BPN}/ipmi-fru-read.yaml +} + +FILES:${PN}-dev = " \ + ${datadir}/${BPN}/ipmi-fru-read.yaml \ + " + +ALLOW_EMPTY:${PN} = "1" diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/configuration/bletchley-yaml-config/bletchley-ipmi-fru.yaml b/meta-facebook/meta-bletchley/recipes-phosphor/configuration/bletchley-yaml-config/bletchley-ipmi-fru.yaml new file mode 100644 index 000000000..8c53a2a7c --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-phosphor/configuration/bletchley-yaml-config/bletchley-ipmi-fru.yaml @@ -0,0 +1,38 @@ +0: + /system/chassis/bmc: + entityID: 7 + entityInstance: 1 + interfaces: + xyz.openbmc_project.Inventory.Decorator.Asset: + BuildDate: + IPMIFruProperty: Mfg Date + IPMIFruSection: Board + SerialNumber: + IPMIFruProperty: Serial Number + IPMIFruSection: Board + PartNumber: + IPMIFruProperty: Part Number + IPMIFruSection: Board + Manufacturer: + IPMIFruProperty: Manufacturer + IPMIFruSection: Board + xyz.openbmc_project.Inventory.Item: + PrettyName: + IPMIFruProperty: Name + IPMIFruSection: Board + xyz.openbmc_project.Inventory.Decorator.Revision: + Version: + IPMIFruProperty: FRU File ID + IPMIFruSection: Board + xyz.openbmc_project.Inventory.Item.Board: + xyz.openbmc_project.Inventory.Item.Bmc: + + /system/chassis/bmc/ethernet: + entityID: 7 + entityInstance: 1 + interfaces: + xyz.openbmc_project.Inventory.Item.NetworkInterface: + MACAddress: + IPMIFruProperty: Custom Field 3 + IPMIFruSection: Board + xyz.openbmc_project.Inventory.Item.Ethernet:
\ No newline at end of file diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/images/fb-bletchley-phosphor-image.inc b/meta-facebook/meta-bletchley/recipes-phosphor/images/fb-bletchley-phosphor-image.inc new file mode 100644 index 000000000..6636f5090 --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-phosphor/images/fb-bletchley-phosphor-image.inc @@ -0,0 +1,5 @@ +OBMC_IMAGE_EXTRA_INSTALL:append = " \ + phosphor-nvme \ + plat-svc \ + motor-ctrl \ +" diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/bmc b/meta-facebook/meta-bletchley/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/bmc new file mode 100644 index 000000000..b1bd018a6 --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-phosphor/ipmi/phosphor-ipmi-fru/obmc/eeproms/system/chassis/bmc @@ -0,0 +1,2 @@ +SYSFS_PATH=/sys/bus/i2c/devices/7-0054/eeprom +FRUID=0
\ No newline at end of file diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend b/meta-facebook/meta-bletchley/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend new file mode 100644 index 000000000..0c78a8f52 --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-phosphor/ipmi/phosphor-ipmi-fru_%.bbappend @@ -0,0 +1,26 @@ +inherit obmc-phosphor-systemd + +FILESEXTRAPATHS:prepend:bletchley := "${THISDIR}/${PN}:" + +DEPENDS:append:bletchley = " bletchley-yaml-config" + +EXTRA_OECONF:bletchley = " \ + YAML_GEN=${STAGING_DIR_HOST}${datadir}/bletchley-yaml-config/ipmi-fru-read.yaml \ + " + +EEPROM_NAMES = "bmc" + +EEPROMFMT = "system/chassis/{0}" +EEPROM_ESCAPEDFMT = "system-chassis-{0}" +EEPROMS = "${@compose_list(d, 'EEPROMFMT', 'EEPROM_NAMES')}" +EEPROMS_ESCAPED = "${@compose_list(d, 'EEPROM_ESCAPEDFMT', 'EEPROM_NAMES')}" + +ENVFMT = "obmc/eeproms/{0}" +SYSTEMD_ENVIRONMENT_FILE:${PN}:append:bletchley := " ${@compose_list(d, 'ENVFMT', 'EEPROMS')}" + +TMPL = "obmc-read-eeprom@.service" +TGT = "${SYSTEMD_DEFAULT_TARGET}" +INSTFMT = "obmc-read-eeprom@{0}.service" +FMT = "../${TMPL}:${TGT}.wants/${INSTFMT}" + +SYSTEMD_LINK:${PN}:append:bletchley := " ${@compose_list(d, 'FMT', 'EEPROMS_ESCAPED')}" diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-facebook/meta-bletchley/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend new file mode 100644 index 000000000..fd303a04b --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend @@ -0,0 +1,5 @@ +DEPENDS:append:bletchley = " bletchley-yaml-config" + +EXTRA_OECONF:bletchley = " \ + FRU_YAML_GEN=${STAGING_DIR_HOST}${datadir}/bletchley-yaml-config/ipmi-fru-read.yaml \ + " diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/leds/bletchley-led-manager-config-native.bb b/meta-facebook/meta-bletchley/recipes-phosphor/leds/bletchley-led-manager-config-native.bb new file mode 100644 index 000000000..d06ec861e --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-phosphor/leds/bletchley-led-manager-config-native.bb @@ -0,0 +1,18 @@ +SUMMARY = "Phosphor LED Group Management for Bletchley" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit native + +PROVIDES += "virtual/phosphor-led-manager-config-native" + +SRC_URI += "file://led.yaml" +S = "${WORKDIR}" + +# Copies example led layout yaml file +do_install() { + SRC=${S} + DEST=${D}${datadir}/phosphor-led-manager + install -D ${SRC}/led.yaml ${DEST}/led.yaml +} diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/leds/bletchley-led-manager-config/led.yaml b/meta-facebook/meta-bletchley/recipes-phosphor/leds/bletchley-led-manager-config/led.yaml new file mode 100644 index 000000000..4fb482cca --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-phosphor/leds/bletchley-led-manager-config/led.yaml @@ -0,0 +1,89 @@ +bmc_booted: + sys_log_id: + Action: 'On' + +sys_identify: + sys_log_id: + Action: 'Blink' + DutyOn: 50 + Period: 1000 + +fan0_fault: + fan0_amber: + Action: 'On' + +fan0_good: + fan0_blue: + Action: 'On' + +fan1_fault: + fan1_amber: + Action: 'On' + +fan1_good: + fan1_blue: + Action: 'On' + +fan2_fault: + fan2_amber: + Action: 'On' + +fan2_good: + fan2_blue: + Action: 'On' + +fan3_fault: + fan3_amber: + Action: 'On' + +fan3_good: + fan3_blue: + Action: 'On' + +sled0_fault: + sled0_amber: + Action: 'On' + +sled0_good: + sled0_blue: + Action: 'On' + +sled1_fault: + sled1_amber: + Action: 'On' + +sled1_good: + sled1_blue: + Action: 'On' + +sled2_fault: + sled2_amber: + Action: 'On' + +sled2_good: + sled2_blue: + Action: 'On' + +sled3_fault: + sled3_amber: + Action: 'On' + +sled3_good: + sled3_blue: + Action: 'On' + +sled4_fault: + sled4_amber: + Action: 'On' + +sled4_good: + sled4_blue: + Action: 'On' + +sled5_fault: + sled5_amber: + Action: 'On' + +sled5_good: + sled5_blue: + Action: 'On' diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/network/phosphor-network/config.json b/meta-facebook/meta-bletchley/recipes-phosphor/network/phosphor-network/config.json new file mode 100644 index 000000000..52280a4e6 --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-phosphor/network/phosphor-network/config.json @@ -0,0 +1,3 @@ +{ + "eth0":"ethernet" +} diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/network/phosphor-network_%.bbappend b/meta-facebook/meta-bletchley/recipes-phosphor/network/phosphor-network_%.bbappend new file mode 100644 index 000000000..b91e82f91 --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-phosphor/network/phosphor-network_%.bbappend @@ -0,0 +1,12 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +PACKAGECONFIG:append = " sync-mac" +SRC_URI += " \ + file://config.json \ + " +FILES:${PN} += "${datadir}/network/*.json" + +do_install:append() { + install -d ${D}${datadir}/network/ + install -m 0644 ${WORKDIR}/config.json ${D}${datadir}/network/ +} diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/sensors/phosphor-nvme/nvme_config.json b/meta-facebook/meta-bletchley/recipes-phosphor/sensors/phosphor-nvme/nvme_config.json new file mode 100644 index 000000000..f64382e9c --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-phosphor/sensors/phosphor-nvme/nvme_config.json @@ -0,0 +1,36 @@ +{ + "config": [ + { + "NVMeDriveIndex": 0, + "NVMeDriveBusID": 0 + }, + { + "NVMeDriveIndex": 1, + "NVMeDriveBusID": 1 + }, + { + "NVMeDriveIndex": 2, + "NVMeDriveBusID": 2 + }, + { + "NVMeDriveIndex": 3, + "NVMeDriveBusID": 3 + }, + { + "NVMeDriveIndex": 4, + "NVMeDriveBusID": 4 + }, + { + "NVMeDriveIndex": 5, + "NVMeDriveBusID": 5 + } + ], + "threshold": [ + { + "criticalHigh": 75, + "criticalLow": 0, + "maxValue": 127, + "minValue": -127 + } + ] +} diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/sensors/phosphor-nvme_%.bbappend b/meta-facebook/meta-bletchley/recipes-phosphor/sensors/phosphor-nvme_%.bbappend new file mode 100644 index 000000000..919cef113 --- /dev/null +++ b/meta-facebook/meta-bletchley/recipes-phosphor/sensors/phosphor-nvme_%.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://nvme_config.json" + +do_install:append() { + install -d ${D}/${sysconfdir}/nvme/ + install -m 0644 ${WORKDIR}/nvme_config.json ${D}/${sysconfdir}/nvme/ +} diff --git a/meta-facebook/meta-tiogapass/conf/bblayers.conf.sample b/meta-facebook/meta-tiogapass/conf/bblayers.conf.sample index d8d02ae93..2d4f102a8 100644 --- a/meta-facebook/meta-tiogapass/conf/bblayers.conf.sample +++ b/meta-facebook/meta-tiogapass/conf/bblayers.conf.sample @@ -19,17 +19,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-facebook \ ##OEROOT##/meta-facebook/meta-tiogapass \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-poky \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-openembedded/meta-webserver \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-facebook \ - ##OEROOT##/meta-facebook/meta-tiogapass \ - " diff --git a/meta-facebook/meta-yosemitev2/conf/bblayers.conf.sample b/meta-facebook/meta-yosemitev2/conf/bblayers.conf.sample index 18dc94472..25e19f17f 100644 --- a/meta-facebook/meta-yosemitev2/conf/bblayers.conf.sample +++ b/meta-facebook/meta-yosemitev2/conf/bblayers.conf.sample @@ -19,17 +19,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-facebook \ ##OEROOT##/meta-facebook/meta-yosemitev2 \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-poky \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-openembedded/meta-webserver \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-facebook \ - ##OEROOT##/meta-facebook/meta-yosemitev2 \ - " diff --git a/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0001-board-aspeed-Add-Mux-for-yosemitev2.patch b/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0001-board-aspeed-Add-Mux-for-yosemitev2.patch index 5634ce936..9f2799f68 100644 --- a/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0001-board-aspeed-Add-Mux-for-yosemitev2.patch +++ b/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0001-board-aspeed-Add-Mux-for-yosemitev2.patch @@ -1,22 +1,21 @@ -From c2e01a4cc220b9a1c1a6bb52e5f58bcc8d2edc55 Mon Sep 17 00:00:00 2001 -From: manikandan-e <manikandan.hcl.ers.epl@gmail.com> -Date: Wed, 30 Oct 2019 19:43:51 +0530 -Subject: [PATCH 2/2] board-aspeed-Add-Mux-for-yosemitev2 - -Signed-off-by: manikandan-e <manikandan.hcl.ers.epl@gmail.com> +From f09b84e61569f2b991cc3e257c34517a222922d3 Mon Sep 17 00:00:00 2001 +From: Logananth Sundararaj <logananth.s@hcl.com> +Date: Fri, 3 Dec 2021 15:21:50 +0530 +Subject: [PATCH] board-aspeed-Add-Mux-for-yosemitev2 +Signed-off-by: Logananth Sundararaj <logananth.s@hcl.com> --- - arch/arm/mach-aspeed/platform_g5.S | 213 +++++++++++++++++++++++++++++++------ - 1 file changed, 183 insertions(+), 30 deletions(-) + arch/arm/mach-aspeed/platform_g5.S | 191 ++++++++++++++++++++++++----- + 1 file changed, 162 insertions(+), 29 deletions(-) diff --git a/arch/arm/mach-aspeed/platform_g5.S b/arch/arm/mach-aspeed/platform_g5.S -index 2ac1ca4..c3ce077 100644 +index 2ac1ca4721..e1c17ae4a3 100644 --- a/arch/arm/mach-aspeed/platform_g5.S +++ b/arch/arm/mach-aspeed/platform_g5.S @@ -302,6 +302,156 @@ TIME_TABLE_DDR4_1600: ldr r2, =0x00000800 .endm - + + .macro console_bmc + ldr r0, =0x1e780024 +ldr r1, [r0] @@ -149,8 +148,8 @@ index 2ac1ca4..c3ce077 100644 + mov r2, r2, lsr #12 + tst r2, #0x01 + ldr r0, =0x1E784000 -+ moveq r1, #0x0D @ Baudrate 115200 -+ movne r1, #0x01 @ Baudrate 115200, div13 ++ moveq r1, #0x1A @ Baudrate 57600 ++ movne r1, #0x02 @ Baudrate 57600, div13 + + str r1, [r0] + @@ -170,7 +169,7 @@ index 2ac1ca4..c3ce077 100644 .macro print_hex_char and r1, r1, #0xF cmp r1, #9 -@@ -324,6 +474,36 @@ init_dram: +@@ -324,6 +474,16 @@ init_dram: /******************************************** Initial Reset Procedure : Begin *******************************************/ @@ -180,26 +179,6 @@ index 2ac1ca4..c3ce077 100644 + + uart_console_setup + -+ /* Debug - UART console message */ -+ ldr r0, =0x1E784000 -+ mov r1, #0x0D @ '\r' -+ str r1, [r0] -+ mov r1, #0x0A @ '\n' -+ str r1, [r0] -+ mov r1, #0x54 @ 'S' -+ str r1, [r0] -+ mov r1, #0x50 @ 'P' -+ str r1, [r0] -+ mov r1, #0x4C @ 'L' -+ str r1, [r0] -+ mov r1, #0x0D @ '\r' -+ str r1, [r0] -+ mov r1, #0x0A @ '\n' -+ str r1, [r0] -+ /* End Debug - UART console message */ -+ -+ -+ + ldr r0, =0x1E720204 + mov r1, #0x0 + str r1, [r0] @@ -207,21 +186,19 @@ index 2ac1ca4..c3ce077 100644 /* Clear AHB bus lock condition */ ldr r0, =0x1e600000 ldr r1, =0xAEED1A03 -@@ -793,7 +973,9 @@ wait_ddr_reset: +@@ -793,6 +953,8 @@ wait_ddr_reset: clear_delay_timer /* end delay 10ms */ - --/* Debug - UART console message */ + + uart_console_setup + -+ /* Debug - UART console message */ + /* Debug - UART console message */ #ifdef CONFIG_DRAM_UART_TO_UART1 ldr r0, =0x1e78909c @ route UART5 to UART Port1, 2016.08.29 - ldr r1, =0x10000004 -@@ -806,35 +988,6 @@ wait_ddr_reset: +@@ -806,35 +968,6 @@ wait_ddr_reset: str r1, [r0] #endif - + - ldr r0, =0x1e78400c - mov r1, #0x83 - str r1, [r0] @@ -254,6 +231,6 @@ index 2ac1ca4..c3ce077 100644 ldr r0, =0x1e784000 mov r1, #0x0D @ '\r' str r1, [r0] --- -2.7.4 +-- +2.17.1 diff --git a/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0002-spl-host-console-handle.patch b/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0002-spl-host-console-handle.patch index cccdd04b5..b39659506 100755..100644 --- a/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0002-spl-host-console-handle.patch +++ b/meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0002-spl-host-console-handle.patch @@ -1,6 +1,6 @@ -From ca2c08a7e710e4beff2fdf17bba5a74adff13db8 Mon Sep 17 00:00:00 2001 -From: Manikandan Elumalai <manikandan.hcl.ers.epl@gmail.com> -Date: Wed, 10 Jun 2020 17:53:59 +0530 +From 99fdec9719987ce93e4582d31cb7d08c5beb51ef Mon Sep 17 00:00:00 2001 +From: Logananth Sundararaj <logananth.s@hcl.com> +Date: Mon, 20 Dec 2021 16:51:22 +0530 Subject: [PATCH] spl-host-console-handle This patch adds four 1S server console through debug card @@ -13,25 +13,25 @@ GPIOAA5 ---SW_ID2 GPIOAA4 ---SW_ID1 SW_ID8 SW_ID4 SW_ID2 SW_ID1 Position Descritpion -L L L L 1 1s server slot1 select +L L L L 1 1s server slot1 select -L L H 2 1s server slot2 select +L L L H 2 1s server slot2 select -L L H L 3 1s server slot3 select +L L H L 3 1s server slot3 select -L L H H 4 1s server slot4 select +L L H H 4 1s server slot4 select -L H L L 5 BMC Debug port select +L H L L 5 BMC Debug port select -L H L H 6 1s server slot1 select +L H L H 6 1s server slot1 select -L H H L 7 1s server slot2 select +L H H L 7 1s server slot2 select -L H H H 8 1s server slot3 select +L H H H 8 1s server slot3 select -H L L L 9 1s server slot4 select +H L L L 9 1s server slot4 select -H L L H 10 BMC Debug port select +H L L H 10 BMC Debug port select BMC and Hosts UART control flow GPIOE0 --- DEBUG_UART_SEL_0 @@ -40,25 +40,25 @@ GPIOE2 --- DEBUG_UART_SEL_2 GPIOE2 --- DEBUG_UART_RX_SEL_N SEL_2 SEL_1 SEL_0 RX_SEL_N CONSOLE -0 0 0 0 SLOT1 -0 0 1 0 SLOT2 -0 1 0 0 SLOT3 -0 1 1 0 SLOT4 -1 0 0 1 BMC Debug +0 0 0 0 SLOT1 +0 0 1 0 SLOT2 +0 1 0 0 SLOT3 +0 1 1 0 SLOT4 +1 0 0 1 BMC Debug -Signed-off-by: Manikandan Elumalai <manikandan.hcl.ers.epl@gmail.com> +Signed-off-by: Logananth Sundararaj <logananth.s@hcl.com> --- - arch/arm/mach-aspeed/platform_g5.S | 68 +++++++++++++++++++++++++++++++++----- - 1 file changed, 60 insertions(+), 8 deletions(-) + arch/arm/mach-aspeed/platform_g5.S | 69 ++++++++++++++++++++++++++---- + 1 file changed, 61 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-aspeed/platform_g5.S b/arch/arm/mach-aspeed/platform_g5.S -index c3ce077..29daa7a 100644 +index f14b5acc6b..340d7b2b91 100644 --- a/arch/arm/mach-aspeed/platform_g5.S +++ b/arch/arm/mach-aspeed/platform_g5.S -@@ -315,6 +315,58 @@ orr r1, r1, #0xC +@@ -315,6 +315,59 @@ orr r1, r1, #0xC str r1, [r0] .endm - + + .macro console_slot1 + ldr r0, =0x1e780024 + ldr r1, [r0] @@ -111,10 +111,11 @@ index c3ce077..29daa7a 100644 + str r1, [r0] + .endm + ++ .macro console_sel - + // Disable SoL UARTs[1-4] -@@ -354,28 +406,28 @@ dbg_card_pres\@: +@@ -354,28 +407,28 @@ dbg_card_pres\@: ldr r1, =0x00 cmp r0, r1 bne case_pos2\@ @@ -147,7 +148,7 @@ index c3ce077..29daa7a 100644 b case_end\@ case_pos5\@: //Test for position#5 -@@ -389,28 +441,28 @@ case_pos6\@: +@@ -389,28 +442,28 @@ case_pos6\@: ldr r1, =0x05 cmp r0, r1 bne case_pos7\@ @@ -181,4 +182,4 @@ index c3ce077..29daa7a 100644 case_pos10\@: //Test for position#10 -- -2.7.4 +2.17.1 diff --git a/meta-facebook/recipes-fb/ipmi/fb-ipmi-oem_git.bb b/meta-facebook/recipes-fb/ipmi/fb-ipmi-oem_git.bb index 5dc4a60c7..e76e94bbb 100755 --- a/meta-facebook/recipes-fb/ipmi/fb-ipmi-oem_git.bb +++ b/meta-facebook/recipes-fb/ipmi/fb-ipmi-oem_git.bb @@ -12,7 +12,7 @@ PV = "0.1+git${SRCPV}" DEPENDS = "boost phosphor-ipmi-host phosphor-logging systemd " -inherit cmake obmc-phosphor-ipmiprovider-symlink +inherit cmake pkgconfig obmc-phosphor-ipmiprovider-symlink EXTRA_OECMAKE="-DENABLE_TEST=0 -DYOCTO=1" EXTRA_OECMAKE:append:yosemitev2 = " -DBIC=1" diff --git a/meta-facebook/recipes-phosphor/datetime/phosphor-time-manager/bmc-set-time.service b/meta-facebook/recipes-phosphor/datetime/phosphor-time-manager/bmc-set-time.service new file mode 100644 index 000000000..e148b535f --- /dev/null +++ b/meta-facebook/recipes-phosphor/datetime/phosphor-time-manager/bmc-set-time.service @@ -0,0 +1,12 @@ +[Unit] +Description= Sync time from host via ipmb +Wants=ipmb.service xyz.openbmc_project.Network.service +After=ipmb.service xyz.openbmc_project.Network.service + +[Service] +Type=onshot +ExecStart=/usr/libexec/set-bmc-time-from-host +RemainAfterExit=no + +[Install] +WantedBy=multi-user.target diff --git a/meta-facebook/recipes-phosphor/datetime/phosphor-time-manager/set-bmc-time-from-host b/meta-facebook/recipes-phosphor/datetime/phosphor-time-manager/set-bmc-time-from-host new file mode 100644 index 000000000..40b3b8cbc --- /dev/null +++ b/meta-facebook/recipes-phosphor/datetime/phosphor-time-manager/set-bmc-time-from-host @@ -0,0 +1,116 @@ +#!/bin/bash +#BMC set time from host +set -e + +echo "set-bmc-time-from-host is started" +# Sync BMC's date with one of the four servers + +HOST_INSTANCES="HOST_INSTANCES_SED_REPLACEMENT_VALUE" +MAX_RETRY_LIMIT=6 + +check_NTP_status() +{ + timedatectl show --property=NTPSynchronized --value +} + +get_single_host_time() +{ + for (( retry=1; retry<=5; retry++ )) + do + #request the single host time via ipmb command + # which will be set as bmc time + # 0x01 - me channel | 0x0a - storage net fn | 0x00 - lun + # 0x48 - get SEL time + ipmi_cmd_output=$(busctl call xyz.openbmc_project.Ipmi.Channel.Ipmb \ + "/xyz/openbmc_project/Ipmi/Channel/Ipmb" org.openbmc.Ipmb sendRequest \ + yyyyay 0x01 0x0a 0x00 0x48 0) + ipmb_result=$? + if [ "$ipmb_result" == "0" ];then + sleep 1 + break + fi + done + + if [ "$retry" == "$MAX_RETRY_LIMIT" ];then + exit 1 + fi + + echo "$ipmi_cmd_output" + +} + +get_multi_host_datetime() +{ + ipmbAddr=$1 + for (( retry=1; retry<=5; retry++ )) + do + #request the multihost host time via ipmb command + # which will be set as bmc time + # 0x38 - oem net fn | 0x00 - lun | 0x02 - request to bridge ic cmd + # 0x6 - length | IANA id 0x15 0xA0 0x0 |0x48 - get SEL time + + ipmi_cmd_output=$(busctl call xyz.openbmc_project.Ipmi.Channel.Ipmb \ + /xyz/openbmc_project/Ipmi/Channel/Ipmb org.openbmc.Ipmb sendRequest \ + yyyyay "$ipmbAddr" 0x38 0 0x2 6 0x15 0xA0 0x0 0x1 0x28 0x48) + ipmb_result=$? + if [ $ipmb_result == 0 ];then + break + fi + sleep 1 + done + + echo "$ipmi_cmd_output" +} +sync_multi_host_datetime() +{ + for index in $HOST_INSTANCES + do + ipmb_addr=$(((index-1)*4)) + # Use standard IPMI command 'SendRequest method' to read RTC time + echo "chosen ipmb addr : "$ipmb_addr + multi_host_time_result=$(get_multi_host_datetime $ipmb_addr) + + if [[ $(echo "$multi_host_time_result" | awk '{ print NF }') -eq 18 ]]; + then + echo "syncing up host " $index " date time with bmc..." + date -s @$((0x$(echo "$multi_host_time_result" | \ + awk '{printf "%02x%02x%02x%02x",$18,$17,$16,$15}'))) + sync + break + fi + done + +} +sync_single_host_datetime() +{ + single_host_time_result=$(get_single_host_time) + + if [[ $(echo "$single_host_time_result" | awk '{ print NF }') -eq 11 ]]; + then + echo "Syncing up host date time with bmc..." + date -s @$((0x$(echo "$single_host_time_result" | \ + awk '{printf "%02x%02x%02x%02x",$11,$10,$9,$8}'))) + sync + fi + +} + +#wait for the NTP server start if available. +sleep 60 + +NTP_STATUS=$(check_NTP_status) + +echo "NTP status :""$NTP_STATUS" + +if [ "$NTP_STATUS" == "yes" ]; then + echo "NTP is running and system clock is in sync.skiping host time sync..." + exit 0 +fi + +if [ "$HOST_INSTANCES" == "0" ]; then + echo "single host instance" + sync_single_host_datetime +else + echo "multiple host instance" + sync_multi_host_datetime +fi diff --git a/meta-facebook/recipes-phosphor/datetime/phosphor-time-manager_%.bbappend b/meta-facebook/recipes-phosphor/datetime/phosphor-time-manager_%.bbappend new file mode 100644 index 000000000..97ea50d80 --- /dev/null +++ b/meta-facebook/recipes-phosphor/datetime/phosphor-time-manager_%.bbappend @@ -0,0 +1,19 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append:fb-withhost += "file://set-bmc-time-from-host" + + +RDEPENDS:${PN}:append:fb-withhost += "bash" + +do_install:append:fb-withhost(){ + + # Store the bitbake variable OBMC_HOST_INSTANCES inside time sync script as HOST_INSTANCES variable using sed. + sed -i -e "s,HOST_INSTANCES_SED_REPLACEMENT_VALUE,${OBMC_HOST_INSTANCES},g" ${WORKDIR}/set-bmc-time-from-host + + install -d ${D}$/lib/systemd/system + install -m 0644 ${WORKDIR}/bmc-set-time.service ${D}$/lib/systemd/system + install -d ${D}/usr/libexec + install -m 0777 ${WORKDIR}/set-bmc-time-from-host ${D}/usr/libexec +} + +SYSTEMD_SERVICE:${PN}:fb-withhost += "bmc-set-time.service" diff --git a/meta-facebook/recipes-phosphor/images/fb-phosphor-image.inc b/meta-facebook/recipes-phosphor/images/fb-phosphor-image.inc new file mode 100644 index 000000000..fbc80809c --- /dev/null +++ b/meta-facebook/recipes-phosphor/images/fb-phosphor-image.inc @@ -0,0 +1,9 @@ +IMAGE_FEATURES:remove:fb-nohost = "obmc-console" + +OBMC_IMAGE_EXTRA_INSTALL:append = "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'tpm', \ + bb.utils.contains('MACHINE_FEATURES', 'tpm2', 'packagegroup-security-tpm2', '', d), \ + '', d)} \ + " + +include recipes-phosphor/images/fb-${MACHINE}-phosphor-image.inc diff --git a/meta-facebook/recipes-phosphor/images/obmc-phosphor-image.bbappend b/meta-facebook/recipes-phosphor/images/obmc-phosphor-image.bbappend index 5755aa58b..23979e66d 100644 --- a/meta-facebook/recipes-phosphor/images/obmc-phosphor-image.bbappend +++ b/meta-facebook/recipes-phosphor/images/obmc-phosphor-image.bbappend @@ -1,9 +1,5 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" +require recipes-phosphor/images/fb-phosphor-image.inc -IMAGE_FEATURES:remove:fb-nohost = "obmc-console" - -OBMC_IMAGE_EXTRA_INSTALL:append = "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'tpm', \ - bb.utils.contains('MACHINE_FEATURES', 'tpm2', 'tpm2-tools', '', d), \ - '', d)} \ - " +# Please do not add any content directly to this file. Instead add it to +# the corresponding .inc file. Otherwise, builds from facebook/openbmc will +# not be able to pick up your content. diff --git a/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host1.json b/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host1.json index 8c8379e1e..708f95729 100644 --- a/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host1.json +++ b/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host1.json @@ -31,7 +31,7 @@ { "Name" : "PowerOk", "DbusName" : "xyz.openbmc_project.IpmbSensor", - "Path" : "/xyz/openbmc_project/gpio/volt/1_CPU_Good", + "Path" : "/xyz/openbmc_project/gpio/ipmbGpioState/1_CPU_Good", "Interface" : "xyz.openbmc_project.Chassis.Control.Power", "Property" : "PGood", "Type" : "DBUS" diff --git a/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host2.json b/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host2.json index ebf7bf029..2455c620c 100644 --- a/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host2.json +++ b/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host2.json @@ -2,28 +2,28 @@ "gpio_configs":[ { "Name" : "PostComplete", - "LineName" : "POST_COMPLETE", + "LineName" : "POST_COMPLETE2", "Type" : "GPIO", "Polarity" : "ActiveLow" }, { "Name" : "SlotPower", - "LineName" : "SLOT1_POWER", + "LineName" : "SLOT2_POWER", "Type" : "GPIO", "Polarity" : "ActiveLow" }, { "Name" : "PowerOut", - "LineName" : "POWER_OUT1", + "LineName" : "POWER_OUT2", "Type" : "GPIO", "Polarity" : "ActiveLow" }, { "Name" : "ResetOut", - "LineName" : "RESET_OUT1", + "LineName" : "RESET_OUT2", "Type" : "GPIO", "Polarity" : "ActiveLow" }, @@ -31,7 +31,7 @@ { "Name" : "PowerOk", "DbusName" : "xyz.openbmc_project.IpmbSensor", - "Path" : "/xyz/openbmc_project/gpio/volt/2_CPU_Good", + "Path" : "/xyz/openbmc_project/gpio/ipmbGpioState/2_CPU_Good", "Interface" : "xyz.openbmc_project.Chassis.Control.Power", "Property" : "PGood", "Type" : "DBUS" diff --git a/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host3.json b/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host3.json index 3631dc392..66077a238 100644 --- a/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host3.json +++ b/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host3.json @@ -2,28 +2,28 @@ "gpio_configs":[ { "Name" : "PostComplete", - "LineName" : "POST_COMPLETE", + "LineName" : "POST_COMPLETE3", "Type" : "GPIO", "Polarity" : "ActiveLow" }, { "Name" : "SlotPower", - "LineName" : "SLOT1_POWER", + "LineName" : "SLOT3_POWER", "Type" : "GPIO", "Polarity" : "ActiveLow" }, { "Name" : "PowerOut", - "LineName" : "POWER_OUT1", + "LineName" : "POWER_OUT3", "Type" : "GPIO", "Polarity" : "ActiveLow" }, { "Name" : "ResetOut", - "LineName" : "RESET_OUT1", + "LineName" : "RESET_OUT3", "Type" : "GPIO", "Polarity" : "ActiveLow" }, @@ -31,7 +31,7 @@ { "Name" : "PowerOk", "DbusName" : "xyz.openbmc_project.IpmbSensor", - "Path" : "/xyz/openbmc_project/gpio/volt/3_CPU_Good", + "Path" : "/xyz/openbmc_project/gpio/ipmbGpioState/3_CPU_Good", "Interface" : "xyz.openbmc_project.Chassis.Control.Power", "Property" : "PGood", "Type" : "DBUS" diff --git a/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host4.json b/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host4.json index dac58ae34..0e7bc3c1c 100644 --- a/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host4.json +++ b/meta-facebook/recipes-x86/chassis/x86-power-control/yosemitev2/power-config-host4.json @@ -2,28 +2,28 @@ "gpio_configs":[ { "Name" : "PostComplete", - "LineName" : "POST_COMPLETE", + "LineName" : "POST_COMPLETE4", "Type" : "GPIO", "Polarity" : "ActiveLow" }, { "Name" : "SlotPower", - "LineName" : "SLOT1_POWER", + "LineName" : "SLOT4_POWER", "Type" : "GPIO", "Polarity" : "ActiveLow" }, { "Name" : "PowerOut", - "LineName" : "POWER_OUT1", + "LineName" : "POWER_OUT4", "Type" : "GPIO", "Polarity" : "ActiveLow" }, { "Name" : "ResetOut", - "LineName" : "RESET_OUT1", + "LineName" : "RESET_OUT4", "Type" : "GPIO", "Polarity" : "ActiveLow" }, @@ -31,7 +31,7 @@ { "Name" : "PowerOk", "DbusName" : "xyz.openbmc_project.IpmbSensor", - "Path" : "/xyz/openbmc_project/gpio/volt/4_CPU_Good", + "Path" : "/xyz/openbmc_project/gpio/ipmbGpioState/4_CPU_Good", "Interface" : "xyz.openbmc_project.Chassis.Control.Power", "Property" : "PGood", "Type" : "DBUS" diff --git a/meta-facebook/recipes-x86/chassis/x86-power-control_%.bbappend b/meta-facebook/recipes-x86/chassis/x86-power-control_%.bbappend index 862f2f179..59f307877 100644 --- a/meta-facebook/recipes-x86/chassis/x86-power-control_%.bbappend +++ b/meta-facebook/recipes-x86/chassis/x86-power-control_%.bbappend @@ -1,5 +1,5 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -EXTRA_OECMAKE += "-DCHASSIS_SYSTEM_RESET=ON" +EXTRA_OEMESON += "-Dchassis-system-reset=enabled" SRC_URI:append:yosemitev2 = " file://power-config-host1.json" SRC_URI:append:yosemitev2 = " file://power-config-host2.json" diff --git a/meta-fii/meta-kudo/conf/bblayers.conf.sample b/meta-fii/meta-kudo/conf/bblayers.conf.sample index f8958b950..e16dfb9fa 100644 --- a/meta-fii/meta-kudo/conf/bblayers.conf.sample +++ b/meta-fii/meta-kudo/conf/bblayers.conf.sample @@ -17,15 +17,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-google \ ##OEROOT##/meta-fii/meta-kudo \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-nuvoton \ - ##OEROOT##/meta-google \ - ##OEROOT##/meta-fii/meta-kudo \ - " diff --git a/meta-fii/meta-kudo/conf/machine/kudo.conf b/meta-fii/meta-kudo/conf/machine/kudo.conf index b53cc46df..b6a99d813 100644 --- a/meta-fii/meta-kudo/conf/machine/kudo.conf +++ b/meta-fii/meta-kudo/conf/machine/kudo.conf @@ -29,7 +29,6 @@ MACHINE_FEATURES += " \ obmc-phosphor-chassis-mgmt \ " -PREFERRED_PROVIDER_virtual/obmc-fan-control = "phosphor-pid-control" PREFERRED_PROVIDER_virtual/obmc-system-mgmt = "packagegroup-kudo-apps" PREFERRED_PROVIDER_virtual/obmc-host-ipmi-hw = "phosphor-ipmi-ssif" PREFERRED_PROVIDER_virtual/obmc-flash-mgmt = "packagegroup-kudo-apps" diff --git a/meta-fii/meta-kudo/recipes-kudo/host/ampere-hostctrl.bb b/meta-fii/meta-kudo/recipes-kudo/host/ampere-hostctrl.bb index 327053cc9..5e41d6b9e 100644 --- a/meta-fii/meta-kudo/recipes-kudo/host/ampere-hostctrl.bb +++ b/meta-fii/meta-kudo/recipes-kudo/host/ampere-hostctrl.bb @@ -10,14 +10,13 @@ inherit obmc-phosphor-systemd S = "${WORKDIR}" SRC_URI = "file://ampere-host-shutdown.service \ - file://ampere-host-reset.service \ file://ampere_power_util.sh \ file://ampere-chassis-poweroff.service \ file://ampere-chassis-poweron.service \ file://ampere-chassis-powercycle.service \ file://ampere-host-shutdown-ack.service \ - file://ampere-host-force-reset.service \ file://ampere-host-power-cycle.service \ + file://ampere-host-reset.service \ " DEPENDS = "systemd" @@ -26,13 +25,12 @@ RDEPENDS:${PN} = "bash" SYSTEMD_PACKAGES = "${PN}" SYSTEMD_SERVICE:${PN} = " \ ampere-host-shutdown.service \ - ampere-host-reset.service \ ampere-chassis-poweroff.service \ ampere-chassis-poweron.service \ ampere-chassis-powercycle.service \ ampere-host-shutdown-ack.service \ - ampere-host-force-reset.service \ ampere-host-power-cycle.service \ + ampere-host-reset.service \ " # host power control # overwrite the host shutdown to graceful shutdown @@ -47,18 +45,6 @@ HOST_REBOOT_SVC_TGTFMT = "obmc-host-reboot@{0}.target" HOST_REBOOT_SVC_FMT = "../${HOST_REBOOT_SVC}:${HOST_REBOOT_SVC_TGTFMT}.requires/${HOST_REBOOT_SVC}" SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'HOST_REBOOT_SVC_FMT', 'OBMC_HOST_INSTANCES')}" -# overwrite the host reset to graceful reset -HOST_WARM_REBOOT_SOFT_SVC = "ampere-host-reset.service" -HOST_WARM_REBOOT_TGTFMT = "obmc-host-warm-reboot@{0}.target" -HOST_WARM_REBOOT_SOFT_SVC_FMT = "../${HOST_WARM_REBOOT_SOFT_SVC}:${HOST_WARM_REBOOT_TGTFMT}.requires/${HOST_WARM_REBOOT_SOFT_SVC}" -SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'HOST_WARM_REBOOT_SOFT_SVC_FMT', 'OBMC_HOST_INSTANCES')}" - -# overwrite force reboot -HOST_WARM_REBOOT_FORCE_TGT = "ampere-host-force-reset.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_TGT}" -SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'HOST_WARM_REBOOT_FORCE_TARGET_FMT', 'OBMC_HOST_INSTANCES')}" - # chassis power control CHASSIS_POWERON_SVC = "ampere-chassis-poweron.service" CHASSIS_POWERON_TGTFMT = "obmc-chassis-poweron@{0}.target" @@ -73,7 +59,7 @@ SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'CHASSIS_POWEROFF_FMT', 'OBMC_CHAS CHASSIS_POWERCYCLE_SVC = "ampere-chassis-powercycle.service" CHASSIS_POWERCYCLE_TGTFMT = "obmc-chassis-powercycle@{0}.target" CHASSIS_POWERCYCLE_FMT = "../${CHASSIS_POWERCYCLE_SVC}:${CHASSIS_POWERCYCLE_TGTFMT}.requires/${CHASSIS_POWERCYCLE_SVC}" -SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'CHASSIS_POWERCYCLE_FMT', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'CHASSIS_POWERCYCLE_FMT', 'OBMC_CHASSIS_INSTANCES')}" TMPL = "phosphor-gpio-monitor@.service" INSTFMT = "phosphor-gpio-monitor@{0}.service" @@ -85,4 +71,3 @@ do_install() { install -d ${D}/usr/sbin install -m 0755 ${WORKDIR}/ampere_power_util.sh ${D}/${sbindir}/ampere_power_util.sh } - diff --git a/meta-fii/meta-kudo/recipes-kudo/host/ampere-hostctrl/ampere-host-force-reset.service b/meta-fii/meta-kudo/recipes-kudo/host/ampere-hostctrl/ampere-host-force-reset.service deleted file mode 100644 index 8a40baf7b..000000000 --- a/meta-fii/meta-kudo/recipes-kudo/host/ampere-hostctrl/ampere-host-force-reset.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Ampere Computing LLC force reset host -Conflicts=obmc-chassis-poweroff@0.target -OnFailure=obmc-chassis-powerreset@0.target - -[Service] -RemainAfterExit=no -Type=oneshot -ExecStart=/usr/bin/env ampere_power_util.sh mb force_reset -SyslogIdentifier=ampere_power_util.sh - diff --git a/meta-fii/meta-kudo/recipes-kudo/host/ampere-hostctrl/ampere-host-power-cycle.service b/meta-fii/meta-kudo/recipes-kudo/host/ampere-hostctrl/ampere-host-power-cycle.service index 3e03e07df..b020aa3f2 100644 --- a/meta-fii/meta-kudo/recipes-kudo/host/ampere-hostctrl/ampere-host-power-cycle.service +++ b/meta-fii/meta-kudo/recipes-kudo/host/ampere-hostctrl/ampere-host-power-cycle.service @@ -8,6 +8,6 @@ After=kudo-bios-verify.service [Service] RemainAfterExit=no Type=oneshot -ExecStart=/usr/bin/env ampere_power_util.sh mb force_reset +ExecStart=/usr/bin/env ampere_power_util.sh mb host_cycle SyslogIdentifier=ampere_power_util.sh diff --git a/meta-fii/meta-kudo/recipes-kudo/host/ampere-hostctrl/ampere-host-reset.service b/meta-fii/meta-kudo/recipes-kudo/host/ampere-hostctrl/ampere-host-reset.service index 2deb24d4f..830fb4497 100644 --- a/meta-fii/meta-kudo/recipes-kudo/host/ampere-hostctrl/ampere-host-reset.service +++ b/meta-fii/meta-kudo/recipes-kudo/host/ampere-hostctrl/ampere-host-reset.service @@ -1,10 +1,12 @@ [Unit] -Description=Ampere Computing LLC warm reset host -Conflicts=obmc-chassis-poweroff@0.target +Description=Ampere Computing LLC power cycle service +Conflicts=obmc-host-start@0.target +OnFailure=obmc-chassis-powerreset@0.target +Wants=kudo-bios-verify.service +After=kudo-bios-verify.service [Service] RemainAfterExit=no Type=oneshot -ExecStart=/usr/bin/env ampere_power_util.sh mb graceful_reset -SyslogIdentifier=ampere_power_util.sh - +ExecStart=/usr/bin/env ampere_power_util.sh mb host_reset +SyslogIdentifier=ampere_power_util.sh
\ No newline at end of file diff --git a/meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh b/meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh index 19ccc0e8e..d9bcb0cf2 100644 --- a/meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh +++ b/meta-fii/meta-kudo/recipes-kudo/host/files/ampere_power_util.sh @@ -4,7 +4,7 @@ source /usr/sbin/kudo-lib.sh # Usage of this utility function usage() { - echo "usage: power-util mb [on|off|graceful_shutdown|force_reset|shutdown_ack|hotswap|power_button]"; + echo "usage: power-util mb [on|off|graceful_shutdown|host_reset|host_cycle|shutdown_ack|hotswap|power_button]"; } hotswap() { @@ -70,7 +70,7 @@ graceful_shutdown() { fi } -force_reset() { +host_reset() { if [ $(host_status) == "on" ]; then echo "Triggering sysreset pin" busctl set-property xyz.openbmc_project.Watchdog /xyz/openbmc_project/watchdog/host0 xyz.openbmc_project.State.Watchdog ExpireAction s xyz.openbmc_project.State.Watchdog.Action.None @@ -82,6 +82,13 @@ force_reset() { fi } +host_cycle() { + echo "DC cycling host" + force_off + sleep 2 + power_on +} + shutdown_ack() { echo "Receive shutdown ACK triggered" power_off @@ -141,8 +148,10 @@ elif [[ $2 == "hotswap" ]]; then hotswap elif [[ $2 == "graceful_shutdown" ]]; then graceful_shutdown -elif [ $2 == "force_reset" ]; then - force_reset +elif [ $2 == "host_reset" ]; then + host_reset +elif [ $2 == "host_cycle" ]; then + host_cycle elif [ $2 == "shutdown_ack" ]; then shutdown_ack elif [ $2 == "power_button" ]; then diff --git a/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service b/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service index 9586368b5..1baf4ca30 100644 --- a/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service +++ b/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service @@ -4,5 +4,5 @@ Description=Watchdog power state power cycle shutdown [Service] Type=oneshot RemainAfterExit=no -ExecStart=/usr/bin/env kudo.sh rst shutdown +ExecStart=/usr/bin/env ampere_power_util.sh mb off SyslogIdentifier=phosphor-watchdog diff --git a/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service b/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service index fb6614e49..b6d453f51 100644 --- a/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service +++ b/meta-fii/meta-kudo/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service @@ -4,5 +4,5 @@ Description=Watchdog power state reset system [Service] Type=oneshot RemainAfterExit=no -ExecStart=/usr/bin/env kudo.sh rst system +ExecStart=/usr/bin/env ampere_power_util.sh mb force_reset SyslogIdentifier=phosphor-watchdog diff --git a/meta-google/recipes-core/busybox/busybox_%.bbappend b/meta-google/recipes-core/busybox/busybox_%.bbappend index 0f2210d7f..fd7873cc1 100644 --- a/meta-google/recipes-core/busybox/busybox_%.bbappend +++ b/meta-google/recipes-core/busybox/busybox_%.bbappend @@ -1,2 +1,3 @@ FILESEXTRAPATHS:prepend:gbmc := "${THISDIR}/files:" SRC_URI:append:gbmc = " file://gbmc.cfg" +SRC_URI:remove:gbmc = "file://syslog.cfg" diff --git a/meta-google/recipes-core/busybox/files/gbmc.cfg b/meta-google/recipes-core/busybox/files/gbmc.cfg index 158f771b3..c76e4f0a7 100644 --- a/meta-google/recipes-core/busybox/files/gbmc.cfg +++ b/meta-google/recipes-core/busybox/files/gbmc.cfg @@ -19,3 +19,37 @@ CONFIG_FEATURE_UDHCPC6_RFC5970=y # Misc CONFIG_BC=y +CONFIG_TRUNCATE=y +CONFIG_BASE64=y +CONFIG_FEATURE_TOP_INTERACTIVE=y +CONFIG_FEATURE_TOP_SMP_CPU=y +CONFIG_FEATURE_TOP_SMP_PROCESS=y +CONFIG_FEATURE_TOPMEM=y + +# Remove unused things +CONFIG_BUNZIP2=n +CONFIG_BZIP2=n +CONFIG_UNZIP=n +CONFIG_ADDGROUP=n +CONFIG_ADDUSER=n +CONFIG_DELGROUP=n +CONFIG_DELUSER=n +CONFIG_LOGIN=n +CONFIG_SU=n +CONFIG_SULOGIN=n +CONFIG_FDISK=n +CONFIG_FSTRIM=n +CONFIG_MKSWAP=n +CONFIG_SWAPON=n +CONFIG_SWAPOFF=n +CONFIG_WATCHDOG=n +CONFIG_IFCONFIG=n +CONFIG_IFUP=n +CONFIG_IFDOWN=n +CONFIG_ROUTE=n +CONFIG_TFTP=n +CONFIG_TLS=n +CONFIG_TRACEROUTE=n +CONFIG_KLOGD=n +CONFIG_LOGREAD=n +CONFIG_SYSLOGD=n diff --git a/meta-google/recipes-core/os-release/os-release.bbappend b/meta-google/recipes-core/os-release/os-release.bbappend index f6b7cc152..635f7c5ae 100644 --- a/meta-google/recipes-core/os-release/os-release.bbappend +++ b/meta-google/recipes-core/os-release/os-release.bbappend @@ -8,4 +8,4 @@ python() { } IMAGE_TYPE = "${GBMC_CONFIG}" -OS_RELEASE_FIELDS:append = " BUILD_MEMO IMAGE_TYPE" +OS_RELEASE_FIELDS:append:gbmc = " BUILD_MEMO IMAGE_TYPE" diff --git a/meta-google/recipes-core/systemd/systemd_%.bbappend b/meta-google/recipes-core/systemd/systemd_%.bbappend index 59751059a..5185a5eaf 100644 --- a/meta-google/recipes-core/systemd/systemd_%.bbappend +++ b/meta-google/recipes-core/systemd/systemd_%.bbappend @@ -6,3 +6,6 @@ PACKAGECONFIG:remove:gbmc = "timesyncd" # We don't need any legacy sysv rc compatability PACKAGECONFIG:remove:gbmc = "sysvinit" + +# We don't enable kernel modules +PACKAGECONFIG:remove:gbmc = "kmod" diff --git a/meta-google/recipes-google/google-misc/google-misc.inc b/meta-google/recipes-google/google-misc/google-misc.inc index 49535873b..cd2c37975 100644 --- a/meta-google/recipes-google/google-misc/google-misc.inc +++ b/meta-google/recipes-google/google-misc/google-misc.inc @@ -6,7 +6,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://../../LICENSE;md5=34400b68072d710fecd0a2940a0d1658" SRC_URI += "git://github.com/openbmc/google-misc" -SRCREV = "379b061ffdd797d00c07acf0b5cb81e1f6513bca" +SRCREV = "ddf93d57c15ad453ba1498ab8553302c0361dfbe" S = "${WORKDIR}/git/subprojects/${GOOGLE_MISC_PROJ}" inherit meson diff --git a/meta-google/recipes-google/ncsi/files/25-gbmc-ncsi-clear-ip.sh.in b/meta-google/recipes-google/ncsi/files/25-gbmc-ncsi-clear-ip.sh.in new file mode 100644 index 000000000..e17a5e200 --- /dev/null +++ b/meta-google/recipes-google/ncsi/files/25-gbmc-ncsi-clear-ip.sh.in @@ -0,0 +1,26 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[ -z "${gbmc_ncsi_clear_ip-}" ] || exit + +source /usr/libexec/ncsid_lib.sh || exit + +gbmc_ncsi_clear_ip_hook() { + UpdateIP xyz.openbmc_project.Network '@NCSI_IF@' '0.0.0.0' '0' || true + UpdateIP xyz.openbmc_project.Network '@NCSI_IF@' '::' '0' || true +} + +GBMC_BR_DHCP_HOOKS+=(gbmc_ncsi_clear_ip_hook) + +gbmc_ncsi_clear_ip=1 diff --git a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-deprecated-ips.sh.in b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-deprecated-ips.sh.in new file mode 100644 index 000000000..9d9f7899e --- /dev/null +++ b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-deprecated-ips.sh.in @@ -0,0 +1,130 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[ -z "${gbmc_ncsi_br_deprecated_ips_lib-}" ] || return + +source /usr/share/network/lib.sh || exit + +gbmc_ncsi_br_deprecated_ips_init= +gbmc_ncsi_br_deprecated_ips_confip= +gbmc_ncsi_br_deprecated_ips_lastip= + +gbmc_ncsi_br_deprecated_ips_update() { + [ -n "$gbmc_ncsi_br_deprecated_ips_init" ] || return + [ "$gbmc_ncsi_br_deprecated_ips_confip" != "$gbmc_ncsi_br_deprecated_ips_lastip" ] || return + gbmc_ncsi_br_deprecated_ips_confip="$gbmc_ncsi_br_deprecated_ips_lastip" + + printf 'gBMC Bridge NCSI Deprecated Addrs: %s\n' \ + "${gbmc_ncsi_br_deprecated_ips_lastip:-(deleted)}" >&2 + + local contents= + local nfcontents= + if [ -n "$gbmc_ncsi_br_deprecated_ips_lastip" ]; then + local pfx_bytes=() + ip_to_bytes pfx_bytes "$gbmc_ncsi_br_deprecated_ips_lastip" + + local pfx="$(ip_bytes_to_str pfx_bytes)" + (( pfx_bytes[9] &= 0xf0 )) + local stateless_pfx="$(ip_bytes_to_str pfx_bytes)" + pfx_bytes[8]=0 + pfx_bytes[9]=0 + local host_pfx="$(ip_bytes_to_str pfx_bytes)" + read -r -d '' contents <<EOF +[Address] +Address=$pfx/128 +PreferredLifetime=0 +[Address] +Address=$stateless_pfx/128 +PreferredLifetime=0 +[Address] +Address=$host_pfx/128 +PreferredLifetime=0 +EOF + read -r -d '' nfcontents <<EOF +table inet filter { + chain ncsi_input { + ip6 saddr != $pfx/76 ip6 daddr $pfx/76 goto ncsi_gbmc_br_pub_input + } + chain ncsi_forward { + ip6 saddr != $pfx/76 ip6 daddr $pfx/76 accept + } +} +EOF + fi + + local file + for file in /run/systemd/network/{00,}-bmc-@NCSI_IF@.network.d/50-deprecated.conf; do + mkdir -p -m 755 "$(dirname "$file")" + if [ -z "$contents" ]; then + rm -f "$file" + else + printf '%s' "$contents" >"$file" + fi + done + + # Ensure that systemd-networkd performs a reconfiguration as it doesn't + # currently check the mtime of drop-in files. + touch -c /etc/systemd/network/*-bmc-@NCSI_IF@.network + + if [ "$(systemctl is-active systemd-networkd)" != 'inactive' ]; then + networkctl reload && networkctl reconfigure @NCSI_IF@ + fi + + local rfile=/run/nftables/40-gbmc-ncsi-br.rules + mkdir -p -m 755 "$(dirname "$rfile")" + if [ -z "$nfcontents" ]; then + rm -f "$rfile" + else + printf '%s' "$nfcontents" >"$rfile" + fi + systemctl reset-failed nftables && systemctl --no-block reload-or-restart nftables || true +} + +gbmc_ncsi_br_deprecated_ips_hook() { + if [ "$change" = 'init' ]; then + gbmc_ncsi_br_deprecated_ips_init=1 + gbmc_ip_monitor_defer + elif [ "$change" = 'defer' ]; then + gbmc_ncsi_br_deprecated_ips_update + elif [ "$change" = 'addr' -a "$intf" = 'gbmcbr' ] && + [ "$scope" = 'global' -a "$fam" = 'inet6' ]; then + local pfx_bytes=() + ip_to_bytes pfx_bytes "$ip" || return + # No ULA Addresses + if (( pfx_bytes[0] & 0xfe == 0xfc )); then + return + fi + # We only want to allow a <pfx>::fd0x address, where x>0 + if (( pfx_bytes[8] != 0xfd || pfx_bytes[9] & 0xf == 0 )); then + return + fi + for (( i = 10; i < 16; ++i )); do + if (( pfx_bytes[i] != 0 )); then + return + fi + done + if [ "$action" = 'add' -a "$ip" != "$gbmc_ncsi_br_deprecated_ips_lastip" ]; then + gbmc_ncsi_br_deprecated_ips_lastip="$ip" + gbmc_ip_monitor_defer + fi + if [ "$action" = 'del' -a "$ip" = "$gbmc_ncsi_br_deprecated_ips_lastip" ]; then + gbmc_ncsi_br_deprecated_ips_lastip= + gbmc_ip_monitor_defer + fi + fi +} + +GBMC_IP_MONITOR_HOOKS+=(gbmc_ncsi_br_deprecated_ips_hook) + +gbmc_ncsi_br_deprecated_ips_lib=1 diff --git a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-pub-addr.sh.in b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-pub-addr.sh.in index 5adc41328..793403348 100644 --- a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-pub-addr.sh.in +++ b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-br-pub-addr.sh.in @@ -63,6 +63,8 @@ Destination=$stateless_pfx/76 Type=unreachable Metric=1024 EOF + # Delete DHCP configured addresses if we have a host published address + rm -f /etc/systemd/network/{00,}-bmc-gbmcbr.network.d/50-public.conf fi local file diff --git a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in index 80bd34f04..2788f7f19 100755 --- a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in +++ b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-ip-from-ra.sh.in @@ -41,6 +41,9 @@ set_net() { echo "Found prefix $pfx from $rtr" >&2 + # We no longer need NCSId if we are in this configuration + systemctl stop --no-block ncsid@"$NCSI_IF" || true + # Delete any stale IP Addresses from the primary interface as we won't use them UpdateIP xyz.openbmc_project.Network "$NCSI_IF" '0.0.0.0' '0' || true UpdateIP xyz.openbmc_project.Network "$NCSI_IF" '::' '0' || true @@ -70,7 +73,6 @@ EOF touch -c /lib/systemd/network/*-bmc-gbmcbr.network || true contents='[Network]'$'\n' - contents+="Address=$pfx/128"$'\n' contents+="Gateway=$rtr"$'\n' for file in /run/systemd/network/{00,}-bmc-"$NCSI_IF".network.d/49-public-ra.conf; do mkdir -p -m 755 "$(dirname "$file")" @@ -81,21 +83,6 @@ EOF if [ "$(systemctl is-active systemd-networkd)" != 'inactive' ]; then networkctl reload && networkctl reconfigure gbmcbr "$NCSI_IF" || true fi - - read -r -d '' contents <<EOF -table inet filter { - chain ncsi_input { - ip6 saddr != $pfx/76 ip6 daddr $pfx/76 goto ncsi_gbmc_br_pub_input - } - chain ncsi_forward { - ip6 saddr != $pfx/76 ip6 daddr $pfx/76 accept - } -} -EOF - rfile=/run/nftables/40-gbmc-ncsi-ra.rules - mkdir -p -m 755 "$(dirname "$rfile")" - printf '%s' "$contents" >"$rfile" - systemctl reset-failed nftables && systemctl --no-block restart nftables || true } w=60 diff --git a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-nft.sh.in b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-nft.sh.in index 7a630f5fe..074ec5785 100644 --- a/meta-google/recipes-google/ncsi/files/gbmc-ncsi-nft.sh.in +++ b/meta-google/recipes-google/ncsi/files/gbmc-ncsi-nft.sh.in @@ -35,45 +35,18 @@ gbmc_ncsi_nft_update() { fi local ip6="$gbmc_ncsi_nft_lastip6" - local pfx= if [ -n "$ip6" ]; then contents+=" ip6 daddr $ip6/128 goto ncsi_legacy_input"$'\n' - - local ip_bytes=() - ip_to_bytes ip_bytes "$ip6" - # If our address has enough spare bits for appending the BMC suffix - # then we add a rule that allows the BMC subnet. That is, we need a /64 - # as input. - local i - for (( i = 8; i < 16; i++ )); do - if (( ip_bytes[$i] != 0 )); then - ip_bytes=() - break - fi - done - if (( ${#ip_bytes[@]} != 0 )); then - ip_bytes[8]=0xfd - pfx="$(ip_bytes_to_str ip_bytes)" - contents+=" ip6 saddr != $pfx/76 ip6 daddr" - contents+=" $pfx/76 goto ncsi_gbmc_br_pub_input"$'\n' - fi fi contents+=' }'$'\n' - contents+=' chain ncsi_forward {'$'\n' - if [ -n "$pfx" ]; then - contents+=" ip6 saddr != $pfx/76 ip6 daddr $pfx/76 accept"$'\n' - fi - contents+=' }'$'\n' contents+='}'$'\n' local rfile=/run/nftables/40-gbmc-ncsi-in.rules mkdir -p -m 755 "$(dirname "$rfile")" printf '%s' "$contents" >"$rfile" - echo 'Restarting nftables' >&2 - systemctl reset-failed nftables - systemctl --no-block restart nftables + systemctl reset-failed nftables && systemctl --no-block reload-or-restart nftables || true } gbmc_ncsi_nft_hook() { diff --git a/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb b/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb index 10ef56a76..0312f0502 100644 --- a/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb +++ b/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb @@ -18,7 +18,9 @@ SRC_URI += " \ file://gbmc-ncsi-sslh.service \ file://gbmc-ncsi-nft.sh.in \ file://gbmc-ncsi-br-pub-addr.sh.in \ + file://gbmc-ncsi-br-deprecated-ips.sh.in \ file://gbmc-ncsi-set-nicenabled.service.in \ + file://25-gbmc-ncsi-clear-ip.sh.in \ " S = "${WORKDIR}" @@ -35,6 +37,7 @@ RDEPENDS:${PN} += " \ " FILES:${PN} += " \ + ${datadir}/gbmc-br-dhcp \ ${datadir}/gbmc-ip-monitor \ ${systemd_unitdir} \ " @@ -100,6 +103,15 @@ do_install:append() { sed "s,@NCSI_IF@,$if_name,g" ${WORKDIR}/gbmc-ncsi-br-pub-addr.sh.in \ >${WORKDIR}/gbmc-ncsi-br-pub-addr.sh install -m644 ${WORKDIR}/gbmc-ncsi-br-pub-addr.sh $mondir + sed "s,@NCSI_IF@,$if_name,g" ${WORKDIR}/gbmc-ncsi-br-deprecated-ips.sh.in \ + >${WORKDIR}/gbmc-ncsi-br-deprecated-ips.sh + install -m644 ${WORKDIR}/gbmc-ncsi-br-deprecated-ips.sh $mondir + + dhcpdir=${D}${datadir}/gbmc-br-dhcp/ + install -d -m0755 $dhcpdir + sed "s,@NCSI_IF@,$if_name,g" ${WORKDIR}/25-gbmc-ncsi-clear-ip.sh.in \ + >${WORKDIR}/25-gbmc-ncsi-clear-ip.sh + install -m644 ${WORKDIR}/25-gbmc-ncsi-clear-ip.sh $dhcpdir sed "s,@NCSI_IF@,$if_name,g" ${WORKDIR}/gbmc-ncsi-set-nicenabled.service.in \ >${D}${systemd_system_unitdir}/gbmc-ncsi-set-nicenabled.service diff --git a/meta-google/recipes-google/networking/gbmc-bridge.bb b/meta-google/recipes-google/networking/gbmc-bridge.bb index dea14f00b..509d871d9 100644 --- a/meta-google/recipes-google/networking/gbmc-bridge.bb +++ b/meta-google/recipes-google/networking/gbmc-bridge.bb @@ -20,6 +20,8 @@ SRC_URI += " \ file://gbmc-br-ensure-ra.service \ file://gbmc-br-gw-src.sh \ file://gbmc-br-nft.sh \ + file://gbmc-br-dhcp.sh \ + file://gbmc-br-dhcp.service \ " FILES:${PN}:append = " \ @@ -37,7 +39,10 @@ RDEPENDS:${PN}:append = " \ ndisc6-rdisc6 \ " -SYSTEMD_SERVICE:${PN} += "gbmc-br-ensure-ra.service" +SYSTEMD_SERVICE:${PN} += " \ + gbmc-br-ensure-ra.service \ + gbmc-br-dhcp.service \ + " GBMC_BR_MAC_ADDR ?= "" @@ -94,8 +99,10 @@ do_install() { install -d -m0755 ${D}${libexecdir} install -m0755 ${WORKDIR}/gbmc-br-ensure-ra.sh ${D}${libexecdir}/ + install -m0755 ${WORKDIR}/gbmc-br-dhcp.sh ${D}${libexecdir}/ install -d -m0755 ${D}${systemd_system_unitdir} - install -m0755 ${WORKDIR}/gbmc-br-ensure-ra.service ${D}${systemd_system_unitdir}/ + install -m0644 ${WORKDIR}/gbmc-br-ensure-ra.service ${D}${systemd_system_unitdir}/ + install -m0644 ${WORKDIR}/gbmc-br-dhcp.service ${D}${systemd_system_unitdir}/ } do_rm_work:prepend() { diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.service b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.service new file mode 100644 index 000000000..7eb0ce075 --- /dev/null +++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.service @@ -0,0 +1,13 @@ +[Unit] +Description=gBMC DHCP Client +After=network.target +StartLimitIntervalSec=10 +StartLimitBurst=3 + +[Service] +Restart=always +RestartSec=5 +ExecStart=/usr/bin/udhcpc6 -f -q -O fqdn -O bootfile_url -O bootfile_param -i gbmcbr -s /usr/libexec/gbmc-br-dhcp.sh + +[Install] +WantedBy=multi-user.target diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.sh new file mode 100644 index 000000000..42a077d09 --- /dev/null +++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.sh @@ -0,0 +1,101 @@ +#!/bin/bash +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A list of functions which get executed for each bound DHCP lease. +# These are configured by the files included below. +GBMC_BR_DHCP_HOOKS=() + +# Load configurations from a known location in the filesystem to populate +# hooks that are executed after each event. +shopt -s nullglob +for conf in /usr/share/gbmc-br-dhcp/*.sh; do + # SC doesn't like dynamic source loading + # shellcheck disable=SC1090 + source "$conf" +done + +gbmc_br_dhcp_run_hooks() { + local hook + for hook in "${GBMC_BR_DHCP_HOOKS[@]}"; do + "$hook" || continue + done +} + +# SC can't find this path during repotest +# shellcheck disable=SC1091 +source /usr/share/network/lib.sh || exit + +if [ "$1" = bound ]; then + # Variable is from the environment via udhcpc6 + # shellcheck disable=SC2154 + echo "DHCPv6(gbmcbr): $ipv6/128" >&2 + + pfx_bytes=() + ip_to_bytes pfx_bytes "$ipv6" + # Ensure we are a BMC and have a suffix nibble, the 0th index is reserved + if (( pfx_bytes[8] != 0xfd || pfx_bytes[9] & 0xf == 0 )); then + echo "Invalid address" >&2 + exit + fi + # Ensure we don't have more than a /80 address + for (( i = 10; i < 16; ++i )); do + if (( pfx_bytes[i] != 0 )); then + echo "Invalid address" >&2 + exit + fi + done + + pfx="$(ip_bytes_to_str pfx_bytes)" + (( pfx_bytes[9] &= 0xf0 )) + stateless_pfx="$(ip_bytes_to_str pfx_bytes)" + read -r -d '' contents <<EOF +[Network] +Address=$pfx/128 +IPv6PrefixDelegation=yes +[IPv6PrefixDelegation] +RouterLifetimeSec=60 +[IPv6Prefix] +Prefix=$stateless_pfx/80 +PreferredLifetimeSec=60 +ValidLifetimeSec=60 +[IPv6RoutePrefix] +Route=$pfx/80 +LifetimeSec=60 +[Route] +Destination=$stateless_pfx/76 +Type=unreachable +Metric=1024 +EOF + + for file in /etc/systemd/network/{00,}-bmc-gbmcbr.network.d/50-public.conf; do + mkdir -p "$(dirname "$file")" + printf '%s' "$contents" >"$file" + done + + # Ensure that systemd-networkd performs a reconfiguration as it doesn't + # currently check the mtime of drop-in files. + touch -c /lib/systemd/network/*-bmc-gbmcbr.network + + if [ "$(systemctl is-active systemd-networkd)" != 'inactive' ]; then + networkctl reload && networkctl reconfigure gbmcbr + fi + + if [ -n "${fqdn-}" ]; then + echo "Using hostname $fqdn" >&2 + hostnamectl set-hostname "$fqdn" || true + fi + + gbmc_br_dhcp_run_hooks +fi diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh index 980f7b6d6..ca4e15a1f 100644 --- a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh +++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-nft.sh @@ -37,9 +37,7 @@ gbmc_br_nft_update() { mkdir -p -m 755 "$(dirname "$rfile")" printf '%s' "$contents" >"$rfile" - echo 'Restarting nftables' >&2 - systemctl reset-failed nftables - systemctl --no-block restart nftables + systemctl reset-failed nftables && systemctl --no-block reload-or-restart nftables || true } gbmc_br_nft_hook() { diff --git a/meta-google/recipes-google/nftables/files/nft-configure.sh b/meta-google/recipes-google/nftables/files/nft-configure.sh index 05bb23d8b..8c8e058b7 100644 --- a/meta-google/recipes-google/nftables/files/nft-configure.sh +++ b/meta-google/recipes-google/nftables/files/nft-configure.sh @@ -8,10 +8,14 @@ for dir in /run/nftables /etc/nftables /usr/share/nftables; do done let i+=1 done -rc=0 -nft flush ruleset || rc=$? + +rules="" +trap 'rm -f -- "$rules"' TERM INT EXIT ERR +rules="$(mktemp)" || exit +echo 'flush ruleset' >"$rules" for key in $(printf "%s\n" "${!basemap[@]}" | sort -r); do - echo "Executing ${basemap[$key]}" >&2 - nft -f "${basemap[$key]}" || rc=$? + echo "Loading ${basemap[$key]}" >&2 + echo '' >>"$rules" + cat "${basemap[$key]}" >>"$rules" done -exit $rc +nft -f "$rules" || exit diff --git a/meta-google/recipes-google/nftables/files/nftables.service b/meta-google/recipes-google/nftables/files/nftables.service index 770a3d3ac..1a93812b8 100644 --- a/meta-google/recipes-google/nftables/files/nftables.service +++ b/meta-google/recipes-google/nftables/files/nftables.service @@ -5,6 +5,7 @@ Before=network-pre.target Type=oneshot RemainAfterExit=yes ExecStart=/usr/libexec/nft-configure.sh +ExecReload=/usr/libexec/nft-configure.sh ExecStop=/usr/sbin/nft flush ruleset [Install] diff --git a/meta-google/recipes-google/systemd/files/40-system.conf b/meta-google/recipes-google/systemd/files/40-system.conf new file mode 100644 index 000000000..5f770d01f --- /dev/null +++ b/meta-google/recipes-google/systemd/files/40-system.conf @@ -0,0 +1,4 @@ +[Manager] +DefaultMemoryAccounting=yes +RuntimeWatchdogSec=10s +WatchdogDevice=/dev/watchdog diff --git a/meta-google/recipes-google/systemd/gbmc-systemd-config.bb b/meta-google/recipes-google/systemd/gbmc-systemd-config.bb index 6e26fc99d..843053bc8 100644 --- a/meta-google/recipes-google/systemd/gbmc-systemd-config.bb +++ b/meta-google/recipes-google/systemd/gbmc-systemd-config.bb @@ -11,11 +11,13 @@ SRC_URI:append = " \ file://firmware-updates.target \ file://firmware-updates-pre.target \ file://40-gbmc-forward.conf \ + file://40-system.conf \ " FILES:${PN}:append = " \ ${systemd_unitdir}/coredump.conf.d/40-gbmc-coredump.conf \ ${systemd_unitdir}/resolved.conf.d/40-gbmc-nomdns.conf \ + ${systemd_unitdir}/system.conf.d/40-system.conf \ ${libdir}/sysctl.d/40-gbmc-forward.conf \ " @@ -44,6 +46,9 @@ do_install() { install -d -m0755 ${D}${libdir}/sysctl.d install -m 0644 ${WORKDIR}/40-gbmc-forward.conf ${D}${libdir}/sysctl.d/ + + install -d -m 0755 ${D}${systemd_unitdir}/system.conf.d/ + install -D -m0644 ${WORKDIR}/40-system.conf ${D}${systemd_unitdir}/system.conf.d/ } do_install:append:dev() { diff --git a/meta-google/recipes-phosphor/flash/gbmc-update.bb b/meta-google/recipes-phosphor/flash/gbmc-update.bb new file mode 100644 index 000000000..2c0f51066 --- /dev/null +++ b/meta-google/recipes-phosphor/flash/gbmc-update.bb @@ -0,0 +1,17 @@ +SUMMARY = "Google BMC Update Utilities" +DESCRIPTION = "Google BMC Update Utilities" +PR = "r1" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI += " \ + file://75-gbmc-upgrade.sh \ +" + +FILES:${PN} += "${datadir}/gbmc-br-dhcp" + +do_install() { + install -d ${D}${datadir}/gbmc-br-dhcp + install -m 0644 ${WORKDIR}/75-gbmc-upgrade.sh ${D}${datadir}/gbmc-br-dhcp/ +} diff --git a/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh b/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh new file mode 100644 index 000000000..c94bf5bd0 --- /dev/null +++ b/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh @@ -0,0 +1,66 @@ +#!/bin/bash +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[ -z "${gbmc_upgrade-}" ] || exit + +: "${GBMC_UPGRADE_SIG=/tmp/bmc.sig}" + +gbmc_upgrade_hook() { + [ -n "${bootfile_url-}" ] || return + + local tmpdir + tmpdir="$(mktemp -d)" || return + gbmc_upgrade_internal || true + # SC doesn't know our variable is defined elsewhere + # shellcheck disable=SC2153 + rm -rf -- "$tmpdir" "$GBMC_UPGRADE_SIG" "$GBMC_UPGRADE_IMG" +} + +gbmc_upgrade_fetch() ( + echo "Fetching $bootfile_url" >&2 + + # We only support tarballs at the moment + if [[ "$bootfile_url" != *.tar ]]; then + echo "Unknown upgrade unpack method: $bootfile_url" >&2 + return 1 + fi + + # Ensure some sane output file limit + # Currently no BMC image is larger than 64M + ulimit -H -f $((96 * 1024 * 1024)) || return + wget "$bootfile_url" | tar -xC "$tmpdir" || true + + local sig + sig="$(find "$tmpdir" -name 'image-*.sig')" || return + local img="${sig%.sig}" + mv "$sig" "$GBMC_UPGRADE_SIG" || return + mv "$img" "$GBMC_UPGRADE_IMG" || return + + # Regular packages have a VERSION file with the image + local imgdir="${sig%/*}" + if [ -f "$imgdir/VERSION" ]; then + cat "$imgdir/VERSION" || return + fi + + # Staging packages have a directory named after the version + local vdir="${imgdir##*/}" + if [[ "$vdir" =~ ([0-9]+[.]){3}[0-9]+ ]]; then + echo "$vdir" + fi +) + +GBMC_BR_DHCP_HOOKS+=(gbmc_upgrade_hook) + +gbmc_upgrade=1 diff --git a/meta-google/recipes-phosphor/flash/inplace-gbmc-update.bb b/meta-google/recipes-phosphor/flash/inplace-gbmc-update.bb index 9e55afce5..418ee3932 100644 --- a/meta-google/recipes-phosphor/flash/inplace-gbmc-update.bb +++ b/meta-google/recipes-phosphor/flash/inplace-gbmc-update.bb @@ -10,8 +10,11 @@ inherit obmc-phosphor-systemd PROVIDES += "virtual/bmc-update" RPROVIDES:${PN} += "virtual/bmc-update" -RDEPENDS:${PN} += "google-key" -RDEPENDS:${PN} += "bash" +RDEPENDS:${PN} += " \ + bash \ + gbmc-update \ + google-key \ + " SRC_URI += " \ file://config-bmc.json \ @@ -19,12 +22,14 @@ SRC_URI += " \ file://inplace-gbmc-verify.sh \ file://inplace-gbmc-version.service \ file://inplace-gbmc-version.sh \ + file://75-inplace-gbmc-upgrade.sh \ " SYSTEMD_SERVICE:${PN} += "inplace-gbmc-verify.service" SYSTEMD_SERVICE:${PN} += "inplace-gbmc-version.service" FILES:${PN} += "${datadir}/phosphor-ipmi-flash" +FILES:${PN} += "${datadir}/gbmc-br-dhcp" do_install() { sed -i 's,@ALLOW_DEV@,,' ${WORKDIR}/inplace-gbmc-verify.sh @@ -37,6 +42,9 @@ do_install() { install -d ${D}${datadir}/phosphor-ipmi-flash install -m 0644 ${WORKDIR}/config-bmc.json ${D}${datadir}/phosphor-ipmi-flash + + install -d ${D}${datadir}/gbmc-br-dhcp + install -m 0644 ${WORKDIR}/75-inplace-gbmc-upgrade.sh ${D}${datadir}/gbmc-br-dhcp/ } do_install:prepend:dev() { diff --git a/meta-google/recipes-phosphor/flash/inplace-gbmc-update/75-inplace-gbmc-upgrade.sh b/meta-google/recipes-phosphor/flash/inplace-gbmc-update/75-inplace-gbmc-upgrade.sh new file mode 100644 index 000000000..df4662f6d --- /dev/null +++ b/meta-google/recipes-phosphor/flash/inplace-gbmc-update/75-inplace-gbmc-upgrade.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[ -z "${inplace_gbmc_upgrade-}" ] || exit + +# SC doesn't know another file depends on this variable +# shellcheck disable=SC2034 +GBMC_UPGRADE_IMG=/run/initramfs/bmc-image + +gbmc_upgrade_internal() { + local version + version="$(gbmc_upgrade_fetch)" || return + + echo "IMG Version: $version" >&2 + local active_version + active_version="$(inplace-gbmc-version.sh)" || return + echo "Active Version: $active_version" >&2 + if [[ "$version" == "$active_version" ]]; then + echo 'Version already active' >&2 + return 0 + fi + + echo 'Verifying image' >&2 + systemctl start inplace-gbmc-verify || return + echo 'Rebooting to perform update' >&2 + reboot || return +} + +inplace_gbmc_upgrade=1 diff --git a/meta-google/recipes-phosphor/images/obmc-phosphor-image.bbappend b/meta-google/recipes-phosphor/images/obmc-phosphor-image.bbappend index dce86826f..db3a2575c 100644 --- a/meta-google/recipes-phosphor/images/obmc-phosphor-image.bbappend +++ b/meta-google/recipes-phosphor/images/obmc-phosphor-image.bbappend @@ -17,7 +17,6 @@ OBMC_IMAGE_EXTRA_INSTALL:append:gbmc = \ # Include these useful utilities for all gbmc platforms OBMC_IMAGE_EXTRA_INSTALL:append:gbmc = " ipmitool" -OBMC_IMAGE_EXTRA_INSTALL:append:gbmc = " iotools" OBMC_IMAGE_EXTRA_INSTALL:append:gbmc = " lrzsz" # Add gBMC update recipes diff --git a/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend new file mode 100644 index 000000000..77fcbe079 --- /dev/null +++ b/meta-google/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend @@ -0,0 +1,3 @@ +# Neither of these are used in a gbmc configuration +RDEPENDS:${PN}:remove:gbmc = "clear-once" +RDEPENDS:${PN}:remove:gbmc = "${VIRTUAL-RUNTIME_obmc-bmc-updater}" diff --git a/meta-google/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend b/meta-google/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend new file mode 100644 index 000000000..8987adf3d --- /dev/null +++ b/meta-google/recipes-phosphor/sensors/phosphor-hwmon_%.bbappend @@ -0,0 +1,4 @@ +EXTRA_OEMESON:append:gbmc = " \ + -Dupdate-functional-on-fail=true \ + -Dnegative-errno-on-fail=false \ +" diff --git a/meta-hpe/README.md b/meta-hpe/README.md index d2960f4d7..ef07653e0 100644 --- a/meta-hpe/README.md +++ b/meta-hpe/README.md @@ -39,7 +39,7 @@ meta-hpe patches are reviewed using the Gerrit instance at https://gerrit.openbmc-project.xyz. Please submit patches to Gerrit. More information about using Gerrit can be found -[here](https://github.com/openbmc/docs/blob/meta-hpe/master/CONTRIBUTING.md#submitting-changes-via-gerrit-server). +[here](https://github.com/openbmc/docs/blob/master/CONTRIBUTING.md#submitting-changes-via-gerrit-server). https://github.com/openbmc/meta-hpe is a hosting mirror only. GitHub pull requests are not monitored and will not be accepted. diff --git a/meta-hpe/conf/layer.conf b/meta-hpe/conf/layer.conf index da14cfc28..1072f7d48 100644 --- a/meta-hpe/conf/layer.conf +++ b/meta-hpe/conf/layer.conf @@ -6,7 +6,7 @@ BBFILES += "${LAYERDIR}/meta-common/recipes-*/*/*.bb \ ${LAYERDIR}/meta-common/recipes-*/*/*.bbappend" BBFILE_COLLECTIONS += "hpe-layer" -BBFILE_PATTERN_hpe-layer := "^${LAYERDIR}/" +BBFILE_PATTERN_hpe-layer := "^${LAYERDIR}/meta-common/" LAYERSERIES_COMPAT_hpe-layer = "hardknott honister" # Provide a variable that points the base of the hpe layer. diff --git a/meta-hpe/meta-dl360poc/conf/bblayers.conf.sample b/meta-hpe/meta-dl360poc/conf/bblayers.conf.sample index ef28dc220..d75648063 100644 --- a/meta-hpe/meta-dl360poc/conf/bblayers.conf.sample +++ b/meta-hpe/meta-dl360poc/conf/bblayers.conf.sample @@ -18,16 +18,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-hpe \ ##OEROOT##/meta-hpe/meta-dl360poc \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-openembedded/meta-webserver \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-hpe/meta-gxp \ - ##OEROOT##/meta-hpe \ - ##OEROOT##/meta-hpe/meta-dl360poc \ - " diff --git a/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-common-gxp_2020.10.inc b/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-common-gxp_2020.10.inc index 2efeb9e09..d8f45ed78 100644 --- a/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-common-gxp_2020.10.inc +++ b/meta-hpe/meta-gxp/recipes-bsp/u-boot/u-boot-common-gxp_2020.10.inc @@ -7,7 +7,7 @@ PE = "1" # We use the revision in order to avoid having to fetch it from the # repo during parse -SRCREV = "b139a8a9e6e89e4115741498d454847d99239eda" +SRCREV = "7e035b9bf331426919aa993a6bb1de3c837e5d3c" UBRANCH = "v2020.10-gxp-openbmc" SRC_URI = "git://github.com/HewlettPackard/gxp-uboot.git;branch=${UBRANCH}" diff --git a/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc.inc b/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc.inc index 5d79797f7..dfa9e806f 100644 --- a/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc.inc +++ b/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc.inc @@ -21,4 +21,5 @@ require recipes-kernel/linux/linux-yocto.inc # From 4.16+ the COPYING file changed LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" +KERNEL_FEATURES:remove = "phosphor-gpio-keys" diff --git a/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc/defconfig b/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc/defconfig index cdd03e3f7..12e1eb636 100644 --- a/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc/defconfig +++ b/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc/defconfig @@ -216,6 +216,7 @@ CONFIG_HPE_GXP_FN2=y CONFIG_HPE_GXP_CSM=y CONFIG_HPE_GXP_SROM=y CONFIG_HPE_GXP_CHIF=y +CONFIG_HPE_GXP_DBG=y CONFIG_PECI=y CONFIG_PECI_CHARDEV=y CONFIG_PECI_GXP=y @@ -277,3 +278,5 @@ CONFIG_DEBUG_UART_VIRT=0xF00000F0 CONFIG_DEBUG_UART_8250_SHIFT=0 CONFIG_EARLY_PRINTK=y CONFIG_TEST_KSTRTOX=y +CONFIG_IPMI_KCS_BMC_CDEV_IPMI=y +CONFIG_FUSE_FS=y diff --git a/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc_5.10.bb b/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc_5.14.bb index d0b5407ae..030a6fa93 100644 --- a/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc_5.10.bb +++ b/meta-hpe/meta-gxp/recipes-kernel/linux/linux-obmc_5.14.bb @@ -1,6 +1,6 @@ -KBRANCH ?= "dev-5.10-gxp-openbmc" -LINUX_VERSION ?= "5.10.17" -SRCREV="8d942b456304d3a21597cda47387a45ace61a225" +KBRANCH ?= "dev-5.14-gxp-openbmc" +LINUX_VERSION ?= "5.14.0" +SRCREV="6f1a2c5c0cc59692d5beafe5ff8a4c7539b82d7d" require linux-obmc.inc require conf/machine/include/fitimage-sign.inc diff --git a/meta-ibm/conf/bblayers.conf.sample b/meta-ibm/conf/bblayers.conf.sample index 11b3f5980..4f70015be 100644 --- a/meta-ibm/conf/bblayers.conf.sample +++ b/meta-ibm/conf/bblayers.conf.sample @@ -18,16 +18,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-openpower \ ##OEROOT##/meta-ibm \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security/meta-tpm \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-openpower \ - ##OEROOT##/meta-ibm \ - " diff --git a/meta-ibm/conf/machine/witherspoon.conf b/meta-ibm/conf/machine/witherspoon.conf index 42844c1cc..e71992219 100644 --- a/meta-ibm/conf/machine/witherspoon.conf +++ b/meta-ibm/conf/machine/witherspoon.conf @@ -32,3 +32,5 @@ PREFERRED_PROVIDER_virtual/phosphor-fan-presence-config:df-mrw = \ # Inhibit phosphor-fan-control-fan-config-mrw-native PREFERRED_PROVIDER_virtual/phosphor-fan-control-fan-config:df-mrw = \ "phosphor-fan-control-fan-config" + +IMAGE_FEATURES:remove = "obmc-ikvm" diff --git a/meta-ibm/meta-palmetto/conf/bblayers.conf.sample b/meta-ibm/meta-palmetto/conf/bblayers.conf.sample index b5c268c64..750b4763c 100644 --- a/meta-ibm/meta-palmetto/conf/bblayers.conf.sample +++ b/meta-ibm/meta-palmetto/conf/bblayers.conf.sample @@ -17,15 +17,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-openpower \ ##OEROOT##/meta-ibm/meta-palmetto \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-openpower \ - ##OEROOT##/meta-ibm/meta-palmetto \ - " diff --git a/meta-ibm/meta-romulus/conf/bblayers.conf.sample b/meta-ibm/meta-romulus/conf/bblayers.conf.sample index 1bb30353e..bf1f4e986 100644 --- a/meta-ibm/meta-romulus/conf/bblayers.conf.sample +++ b/meta-ibm/meta-romulus/conf/bblayers.conf.sample @@ -17,15 +17,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-openpower \ ##OEROOT##/meta-ibm/meta-romulus \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-openpower \ - ##OEROOT##/meta-ibm/meta-romulus \ - " diff --git a/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,everest_associations.json b/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,everest_associations.json index 7405ce1fc..8693e7d1d 100644 --- a/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,everest_associations.json +++ b/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,everest_associations.json @@ -177,11 +177,34 @@ { "types": { + "rType": "fault_inventory_object", + "fType": "fault_led_group" + }, + "paths": + [ + "/xyz/openbmc_project/led/groups/enclosure_fault" + ] + }, + { + "types": + { + "rType": "identify_inventory_object", + "fType": "identify_led_group" + }, + "paths": + [ + "/xyz/openbmc_project/led/groups/enclosure_identify" + ] + }, + { + "types": + { "rType": "chassis", "fType": "all_sensors" }, "paths": [ + "/xyz/openbmc_project/sensors/altitude/Altitude", "/xyz/openbmc_project/sensors/fan_tach/fan0_0", "/xyz/openbmc_project/sensors/fan_tach/fan0_1", "/xyz/openbmc_project/sensors/fan_tach/fan1_0", @@ -256,6 +279,24 @@ ] }, { + "path": "system", + "endpoints": + [ + { + "types": + { + "rType": "fault_inventory_object", + "fType": "fault_led_group" + }, + "paths": + [ + "/xyz/openbmc_project/led/groups/partition_system_attention_indicator", + "/xyz/openbmc_project/led/groups/platform_system_attention_indicator" + ] + } + ] + }, + { "path": "system/chassis/motherboard/powersupply0", "endpoints": [ diff --git a/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-2u_associations.json b/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-2u_associations.json index 65f389998..2ea36bc67 100644 --- a/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-2u_associations.json +++ b/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-2u_associations.json @@ -258,11 +258,34 @@ { "types": { + "rType": "fault_inventory_object", + "fType": "fault_led_group" + }, + "paths": + [ + "/xyz/openbmc_project/led/groups/enclosure_fault" + ] + }, + { + "types": + { + "rType": "identify_inventory_object", + "fType": "identify_led_group" + }, + "paths": + [ + "/xyz/openbmc_project/led/groups/enclosure_identify" + ] + }, + { + "types": + { "rType": "chassis", "fType": "all_sensors" }, "paths": [ + "/xyz/openbmc_project/sensors/altitude/Altitude", "/xyz/openbmc_project/sensors/fan_tach/fan0_0", "/xyz/openbmc_project/sensors/fan_tach/fan0_1", "/xyz/openbmc_project/sensors/fan_tach/fan1_0", @@ -299,6 +322,24 @@ ] }, { + "path": "system", + "endpoints": + [ + { + "types": + { + "rType": "fault_inventory_object", + "fType": "fault_led_group" + }, + "paths": + [ + "/xyz/openbmc_project/led/groups/partition_system_attention_indicator", + "/xyz/openbmc_project/led/groups/platform_system_attention_indicator" + ] + } + ] + }, + { "path": "system/chassis/motherboard/powersupply0", "endpoints": [ diff --git a/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-4u_associations.json b/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-4u_associations.json index 5cda22d66..6d9bc42f1 100644 --- a/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-4u_associations.json +++ b/meta-ibm/recipes-phosphor/inventory/phosphor-inventory-manager/p10bmc/ibm,rainier-4u_associations.json @@ -252,11 +252,34 @@ { "types": { + "rType": "fault_inventory_object", + "fType": "fault_led_group" + }, + "paths": + [ + "/xyz/openbmc_project/led/groups/enclosure_fault" + ] + }, + { + "types": + { + "rType": "identify_inventory_object", + "fType": "identify_led_group" + }, + "paths": + [ + "/xyz/openbmc_project/led/groups/enclosure_identify" + ] + }, + { + "types": + { "rType": "chassis", "fType": "all_sensors" }, "paths": [ + "/xyz/openbmc_project/sensors/altitude/Altitude", "/xyz/openbmc_project/sensors/fan_tach/fan0_0", "/xyz/openbmc_project/sensors/fan_tach/fan1_0", "/xyz/openbmc_project/sensors/fan_tach/fan2_0", @@ -287,6 +310,24 @@ ] }, { + "path": "system", + "endpoints": + [ + { + "types": + { + "rType": "fault_inventory_object", + "fType": "fault_led_group" + }, + "paths": + [ + "/xyz/openbmc_project/led/groups/partition_system_attention_indicator", + "/xyz/openbmc_project/led/groups/platform_system_attention_indicator" + ] + } + ] + }, + { "path": "system/chassis/motherboard/powersupply0", "endpoints": [ diff --git a/meta-ibm/recipes-phosphor/state/phosphor-post-code-manager_%.bbappend b/meta-ibm/recipes-phosphor/state/phosphor-post-code-manager_%.bbappend index bee5a5ffa..e9f35d42d 100644 --- a/meta-ibm/recipes-phosphor/state/phosphor-post-code-manager_%.bbappend +++ b/meta-ibm/recipes-phosphor/state/phosphor-post-code-manager_%.bbappend @@ -1,4 +1,4 @@ # Set MaxBootCycleCount to 5 on IBM systems -EXTRA_OECMAKE:append:p10bmc = "-DMAX_BOOT_CYCLE_COUNT=5" -EXTRA_OECMAKE:append:witherspoon-tacoma = "-DMAX_BOOT_CYCLE_COUNT=5" +EXTRA_OEMESON:append:p10bmc = "-Dmax-boot-cycle-count=5" +EXTRA_OEMESON:append:witherspoon-tacoma = "-Dmax-boot-cycle-count=5" diff --git a/meta-ingrasys/meta-zaius/conf/bblayers.conf.sample b/meta-ingrasys/meta-zaius/conf/bblayers.conf.sample index 3ee615247..7a4e18983 100644 --- a/meta-ingrasys/meta-zaius/conf/bblayers.conf.sample +++ b/meta-ingrasys/meta-zaius/conf/bblayers.conf.sample @@ -18,16 +18,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-ingrasys \ ##OEROOT##/meta-ingrasys/meta-zaius \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-openpower \ - ##OEROOT##/meta-ingrasys \ - ##OEROOT##/meta-ingrasys/meta-zaius \ - " diff --git a/meta-inspur/meta-fp5280g2/conf/bblayers.conf.sample b/meta-inspur/meta-fp5280g2/conf/bblayers.conf.sample index 9f5c27cd4..b3fc4469f 100644 --- a/meta-inspur/meta-fp5280g2/conf/bblayers.conf.sample +++ b/meta-inspur/meta-fp5280g2/conf/bblayers.conf.sample @@ -19,17 +19,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-inspur \ ##OEROOT##/meta-inspur/meta-fp5280g2\ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-openembedded/meta-webserver \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-openpower \ - ##OEROOT##/meta-inspur \ - ##OEROOT##/meta-inspur/meta-fp5280g2 \ - " diff --git a/meta-inspur/meta-on5263m5/conf/bblayers.conf.sample b/meta-inspur/meta-on5263m5/conf/bblayers.conf.sample index 6d1e794a0..e95004453 100644 --- a/meta-inspur/meta-on5263m5/conf/bblayers.conf.sample +++ b/meta-inspur/meta-on5263m5/conf/bblayers.conf.sample @@ -14,7 +14,6 @@ BBLAYERS ?= " \ ##OEROOT##/meta-security \ ##OEROOT##/meta-phosphor \ ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-x86 \ ##OEROOT##/meta-inspur \ ##OEROOT##/meta-inspur/meta-on5263m5\ " diff --git a/meta-intel-openbmc/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend b/meta-intel-openbmc/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend index b27f9080b..e4d066bc6 100644 --- a/meta-intel-openbmc/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend +++ b/meta-intel-openbmc/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend @@ -1,2 +1,2 @@ # Use PLT_RST to detect warm resets -EXTRA_OECMAKE:intel += "-DUSE_PLT_RST=ON" +EXTRA_OEMESON:intel += "-Duse-plt-rst=enabled" diff --git a/meta-inventec/meta-transformers/conf/bblayers.conf.sample b/meta-inventec/meta-transformers/conf/bblayers.conf.sample index c779683e2..6469c50b5 100755 --- a/meta-inventec/meta-transformers/conf/bblayers.conf.sample +++ b/meta-inventec/meta-transformers/conf/bblayers.conf.sample @@ -15,24 +15,7 @@ BBLAYERS ?= " \ ##OEROOT##/meta-openembedded/meta-webserver \ ##OEROOT##/meta-phosphor \ ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-x86 \ ##OEROOT##/meta-openpower \ ##OEROOT##/meta-inventec \ ##OEROOT##/meta-inventec/meta-transformers \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-poky \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-openembedded/meta-webserver \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-x86 \ - ##OEROOT##/meta-openpower \ - ##OEROOT##/meta-inventec \ - ##OEROOT##/meta-inventec/meta-transformers \ -" - diff --git a/meta-nuvoton/recipes-bsp/u-boot/u-boot-common-nuvoton.inc b/meta-nuvoton/recipes-bsp/u-boot/u-boot-common-nuvoton.inc index 9236271c9..28c8b3360 100644 --- a/meta-nuvoton/recipes-bsp/u-boot/u-boot-common-nuvoton.inc +++ b/meta-nuvoton/recipes-bsp/u-boot/u-boot-common-nuvoton.inc @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" UBRANCH = "npcm7xx-v2019.01" SRC_URI = "git://github.com/Nuvoton-Israel/u-boot.git;branch=${UBRANCH}" -SRCREV = "c11d9a81eadfb9b3c4e53acba1a97a13924b6d88" +SRCREV = "7578a59e968d23eed2830f766d52cd4d3c7f95df" S = "${WORKDIR}/git" diff --git a/meta-openembedded/meta-oe/recipes-devtools/unifex/unifex_git.bb b/meta-openembedded/meta-oe/recipes-devtools/unifex/unifex_git.bb new file mode 100644 index 000000000..85fe39b6d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/unifex/unifex_git.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "C++ Unified Executors library" +HOMEPAGE = "https://github.com/facebookexperimental/libunifex" +SECTION = "libs" +LICENSE = "Apache-2.0-with-LLVM-exception" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5b86506074cb3cdc493b4f96b73b2909" + +SRC_URI = "git://github.com/facebookexperimental/libunifex.git;branch=main;protocol=https" +SRCREV = "9df21c58d34ce8a1cd3b15c3a7347495e29417a0" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +PACKAGECONFIG ??= "liburing" +PACKAGECONFIG[liburing] = ",,liburing" + +EXTRA_OECMAKE += " \ + -DBUILD_SHARED_LIBS=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_CXX_STANDARD=20 \ + -DUNIFEX_BUILD_EXAMPLES=OFF \ + " + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openpower/recipes-bsp/libekb/libekb_git.bb b/meta-openpower/recipes-bsp/libekb/libekb_git.bb index 7c6a7ad2d..ccaad5778 100644 --- a/meta-openpower/recipes-bsp/libekb/libekb_git.bb +++ b/meta-openpower/recipes-bsp/libekb/libekb_git.bb @@ -17,7 +17,7 @@ inherit autotools \ SRCREV_FORMAT = "libekb_ekb" -SRCREV_libekb = "5ac6a46364dc065e058f0886d3ae5717eb8a52f1" +SRCREV_libekb = "9a8b5a419f2058e7e1d4bb97a1f91bd2d343f86a" SRCREV_ekb = "${EKB_REV}" SRC_URI = "git://git@github.com/open-power/libekb_p10;branch="main";name=libekb \ diff --git a/meta-openpower/recipes-bsp/pdata/files/power-target.sh b/meta-openpower/recipes-bsp/pdata/files/power-target.sh index 10c985050..4a024195c 100755 --- a/meta-openpower/recipes-bsp/pdata/files/power-target.sh +++ b/meta-openpower/recipes-bsp/pdata/files/power-target.sh @@ -1,6 +1,7 @@ # Command line debug tools like pdbg and ecmd requires # PDBG_DTB environment variable. -# attributes tool required both PDBG_DTB and PDATA_INFODB. +# attributes tool required PDBG_DTB, PDATA_INFODB and PDATA_ATTR_OVERRIDE export PDBG_DTB=/var/lib/phosphor-software-manager/pnor/rw/DEVTREE export PDATA_INFODB=/usr/share/pdata/attributes_info.db +export PDATA_ATTR_OVERRIDE=/tmp/devtree_attr_override diff --git a/meta-openpower/recipes-bsp/pdata/pdata_git.bb b/meta-openpower/recipes-bsp/pdata/pdata_git.bb index 6ebfa3de6..65e73a311 100644 --- a/meta-openpower/recipes-bsp/pdata/pdata_git.bb +++ b/meta-openpower/recipes-bsp/pdata/pdata_git.bb @@ -13,7 +13,7 @@ inherit autotools \ perlnative SRC_URI = "git://git@github.com/open-power/pdata;branch="main"" -SRCREV = "9d6b94bcd5bc52c435175e8e2c05555df6271e7e" +SRCREV = "b2c92eff169e96a67db516f3ea29a4e9d601d89d" DEPENDS = "pdbg \ libxml-simple-perl-native \ diff --git a/meta-openpower/recipes-bsp/pdbg/pdbg_3.3.bb b/meta-openpower/recipes-bsp/pdbg/pdbg_3.4.bb index d7b3c31b9..ffbe0847b 100644 --- a/meta-openpower/recipes-bsp/pdbg/pdbg_3.3.bb +++ b/meta-openpower/recipes-bsp/pdbg/pdbg_3.4.bb @@ -4,7 +4,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" SRC_URI += "git://github.com/open-power/pdbg.git" -SRCREV = "v3.3" +SRCREV = "v3.4" DEPENDS += "dtc-native" diff --git a/meta-openpower/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-watchdog@.service b/meta-openpower/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-watchdog@.service index 6fc3fec82..6826764ff 100644 --- a/meta-openpower/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-watchdog@.service +++ b/meta-openpower/recipes-phosphor/debug/openpower-debug-collector/openpower-debug-collector-watchdog@.service @@ -1,6 +1,7 @@ [Unit] Description=OpenPOWER debug data collector for host watchdog timeout Before=obmc-host-quiesce@%i.target +After=op-stop-instructions@%i.service [Service] ExecStart=/usr/bin/env watchdog_timeout diff --git a/meta-openpower/recipes-phosphor/flash/openpower-software-manager_git.bb b/meta-openpower/recipes-phosphor/flash/openpower-software-manager_git.bb index 7b44d7840..eca81d800 100644 --- a/meta-openpower/recipes-phosphor/flash/openpower-software-manager_git.bb +++ b/meta-openpower/recipes-phosphor/flash/openpower-software-manager_git.bb @@ -67,7 +67,7 @@ S = "${WORKDIR}/git" SRC_URI += "git://github.com/openbmc/openpower-pnor-code-mgmt" -SRCREV = "9cbc06b10d2738f7c2e3472cd447612768739f1d" +SRCREV = "5e0b2375b20ea1e82f95770f68ae416a8c0de62f" DBUS_SERVICE:${PN} += "org.open_power.Software.Host.Updater.service" diff --git a/meta-openpower/recipes-phosphor/host/op-proc-control_git.bb b/meta-openpower/recipes-phosphor/host/op-proc-control_git.bb index 1a3fde452..a0dd2bab2 100644 --- a/meta-openpower/recipes-phosphor/host/op-proc-control_git.bb +++ b/meta-openpower/recipes-phosphor/host/op-proc-control_git.bb @@ -11,7 +11,7 @@ inherit meson obmc-phosphor-utils pkgconfig inherit systemd SRC_URI += "git://github.com/openbmc/openpower-proc-control" -SRCREV = "0ac7c38f64ce2c5a170ab6fe219d26e599713da3" +SRCREV = "db92472533b150dfbe7e60489b47cfc4791ec11c" DEPENDS += " \ phosphor-logging \ diff --git a/meta-openpower/recipes-phosphor/logging/openpower-hw-diags_git.bb b/meta-openpower/recipes-phosphor/logging/openpower-hw-diags_git.bb index 9bbba105e..040b26e06 100644 --- a/meta-openpower/recipes-phosphor/logging/openpower-hw-diags_git.bb +++ b/meta-openpower/recipes-phosphor/logging/openpower-hw-diags_git.bb @@ -15,7 +15,7 @@ PR = "r1" PV = "0.1+git${SRCPV}" SRC_URI = "git://github.com/openbmc/openpower-hw-diags" -SRCREV = "04f010abb7946c18d6bb68c714ca6a4417845d8d" +SRCREV = "15527a43fe309d3599d146d5a48607b14b426a37" S = "${WORKDIR}/git" diff --git a/meta-openpower/recipes-phosphor/occ/openpower-occ-control.inc b/meta-openpower/recipes-phosphor/occ/openpower-occ-control.inc index 93c2ae5bd..e10131436 100644 --- a/meta-openpower/recipes-phosphor/occ/openpower-occ-control.inc +++ b/meta-openpower/recipes-phosphor/occ/openpower-occ-control.inc @@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/openpower-occ-control" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI += "git://github.com/openbmc/openpower-occ-control" -SRCREV = "a7b74dc31001884243556e4433d0bbfda3c09083" +SRCREV = "432dc48607223e24250e1fc4fa6fb42456a6db62" diff --git a/meta-openpower/recipes-phosphor/occ/openpower-occ-control/org.open_power.OCC.Control.service b/meta-openpower/recipes-phosphor/occ/openpower-occ-control/org.open_power.OCC.Control.service index d16bcdce7..10ac0ee94 100644 --- a/meta-openpower/recipes-phosphor/occ/openpower-occ-control/org.open_power.OCC.Control.service +++ b/meta-openpower/recipes-phosphor/occ/openpower-occ-control/org.open_power.OCC.Control.service @@ -2,6 +2,9 @@ Description=OpenPOWER OCC controller Wants=mapper-wait@-xyz-openbmc_project-inventory.service After=mapper-wait@-xyz-openbmc_project-inventory.service +Wants=obmc-host-reset-running@0.target +After=obmc-host-reset-running@0.target +After=fsi-scan@0.service [Service] ExecStart=/usr/bin/env openpower-occ-control diff --git a/meta-openpower/recipes-phosphor/vpd/openpower-fru-vpd.inc b/meta-openpower/recipes-phosphor/vpd/openpower-fru-vpd.inc index c26dc27f6..3a590a8c8 100644 --- a/meta-openpower/recipes-phosphor/vpd/openpower-fru-vpd.inc +++ b/meta-openpower/recipes-phosphor/vpd/openpower-fru-vpd.inc @@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/openpower-vpd-parser" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI += "git://github.com/openbmc/openpower-vpd-parser" -SRCREV = "88d2ae82af7fd97086c60fa9e39e0b4ee31a5974" +SRCREV = "26d6c146d265de6f0b6b66baf3951298c0418a67" diff --git a/meta-phosphor/classes/license_static.bbclass b/meta-phosphor/classes/license_static.bbclass new file mode 100644 index 000000000..dd7301758 --- /dev/null +++ b/meta-phosphor/classes/license_static.bbclass @@ -0,0 +1,64 @@ +#### +# Copyright 2021 Intel Corporation +# +# Add a class to support serving license info through bmcweb. +# +# bmcweb serves static content from the /usr/share/www folder, so this class +# copies the license info from /usr/share/common-licenses to +# /usr/share/www/common-licenses so it will be statically served by bmcweb. +# +# Requires 'COPY_LIC_DIRS' to be enabled to create /usr/share/common-licenses. +# +# Class can be inherited in a project bbclass to copy the license info. +# +# Example: +# inherit license_static +#### + +STATIC_LICENSE_DIR = "${IMAGE_ROOTFS}/usr/share/www/common-licenses" + + +def add_index_html_header(f): + f.write("<!DOCTYPE html>") + f.write("<html>") + f.write("<body>") + f.write("<p>") + + +def add_index_html_footer(f): + f.write("</p>") + f.write("</body>") + f.write("</html>") + + +def create_index_files(d): + import os + + static_license_dir = d.getVar('STATIC_LICENSE_DIR') + for dirpath, dirnames, filenames in os.walk(static_license_dir): + with open(os.path.join(dirpath, "index.html"), "w") as f: + add_index_html_header(f) + full_list = filenames+dirnames + full_list.sort() + f.write("<br>".join(full_list)) + add_index_html_footer(f) + + +def copy_license_files(d): + import shutil + + rootfs_license_dir = d.getVar('ROOTFS_LICENSE_DIR') + static_license_dir = d.getVar('STATIC_LICENSE_DIR') + shutil.copytree(rootfs_license_dir, static_license_dir) + + +python do_populate_static_lic() { + copy_lic_dirs = d.getVar('COPY_LIC_DIRS') + if copy_lic_dirs == "1": + copy_license_files(d) + create_index_files(d) + else: + bb.warn("Static licenses not copied because 'COPY_LIC_DIRS' is disabled.") +} + +ROOTFS_POSTPROCESS_COMMAND:append = "do_populate_static_lic; " diff --git a/meta-phosphor/conf/bblayers.conf.sample b/meta-phosphor/conf/bblayers.conf.sample index 4c0c52e8c..d10e530a4 100644 --- a/meta-phosphor/conf/bblayers.conf.sample +++ b/meta-phosphor/conf/bblayers.conf.sample @@ -15,13 +15,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-security \ ##OEROOT##/meta-phosphor \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-poky \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - " diff --git a/meta-phosphor/conf/distro/include/phosphor-base.inc b/meta-phosphor/conf/distro/include/phosphor-base.inc index 64f293cf0..1de312f19 100644 --- a/meta-phosphor/conf/distro/include/phosphor-base.inc +++ b/meta-phosphor/conf/distro/include/phosphor-base.inc @@ -32,7 +32,7 @@ https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n" # The CONNECTIVITY_CHECK_URI's are used to test whether we can successfully # fetch from the network (and warn you if not). To disable the test set # the variable to be empty. -# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master +# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=https;rev=master CONNECTIVITY_CHECK_URIS ?= "https://www.example.com/" SANITY_TESTED_DISTROS ?= " \ diff --git a/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb b/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb index e5dbf4b50..6cfa03018 100644 --- a/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb +++ b/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb @@ -16,7 +16,6 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5 S="${WORKDIR}/git/tools" DEPENDS += " \ - autoconf-archive-native \ ${PYTHON_PN}-inflection-native \ ${PYTHON_PN}-mako-native \ ${PYTHON_PN}-pyyaml-native \ diff --git a/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc b/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc index 787e17325..8fa74450e 100644 --- a/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc +++ b/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc @@ -3,4 +3,4 @@ PR = "r1" PV = "1.0+git${SRCPV}" SRC_URI += "git://github.com/openbmc/sdbusplus" -SRCREV = "6d83cf539ac0613e5639ec484c4865317795cd75" +SRCREV = "6adfe948ee55ffde8457047042d0d55aa3d8b4a7" diff --git a/meta-phosphor/recipes-phosphor/bios/biosconfig-manager_git.bb b/meta-phosphor/recipes-phosphor/bios/biosconfig-manager_git.bb index bb433d677..cbb9c8403 100644 --- a/meta-phosphor/recipes-phosphor/bios/biosconfig-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/bios/biosconfig-manager_git.bb @@ -13,7 +13,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=bcd9ada3a943f58551867d72893cc9ab" SRC_URI = "git://github.com/openbmc/bios-settings-mgr" -SRCREV = "29656f07b7e81c0bb13ca119b4c6ef62f5e79a18" +SRCREV = "47453d77c728c297a665866c570c2d5fb356abb2" inherit meson pkgconfig systemd diff --git a/meta-phosphor/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb b/meta-phosphor/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb index b858958f0..ab49637a4 100644 --- a/meta-phosphor/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/certificate/phosphor-certificate-manager_git.bb @@ -9,14 +9,11 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" SRC_URI = "git://github.com/openbmc/phosphor-certificate-manager" -SRCREV = "7f7b47bea7bbd518d1ff5a306ecf3806cf8d0834" +SRCREV = "cf811c4309adbf164f6e040ea0216dbca7cf367f" -inherit autotools \ - pkgconfig \ - systemd +inherit meson pkgconfig systemd DEPENDS = " \ - autoconf-archive-native \ openssl \ phosphor-dbus-interfaces \ phosphor-logging \ @@ -26,14 +23,14 @@ DEPENDS = " \ S = "${WORKDIR}/git" -EXTRA_OECONF += "--disable-tests" +EXTRA_OEMESON += "-Dtests=disabled" SYSTEMD_SERVICE:${PN} = "phosphor-certificate-manager@.service" PACKAGECONFIG ??= "bmcweb-cert nslcd-authority-cert" -PACKAGECONFIG[ibm-hypervisor-cert] = "--enable-ca-cert-extension,," -PACKAGECONFIG[bmcweb-cert] = "--enable-bmcweb-cert-config,," -PACKAGECONFIG[nslcd-authority-cert] = "--enable-nslcd-authority-cert-config,," +PACKAGECONFIG[ibm-hypervisor-cert] = "-Dca-cert-extension=enabled,-Dca-cert-extension=disabled" +PACKAGECONFIG[bmcweb-cert] = "-Dconfig-bmcweb=enabled,-Dconfig-bmcweb=disabled" +PACKAGECONFIG[nslcd-authority-cert] = "-Dconfig-nslcd=enabled,-Dconfig-nslcd=disabled" SYSTEMD_SERVICE:${PN} = " \ phosphor-certificate-manager@.service \ diff --git a/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb b/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb index c1b56ea09..2a7e349c6 100644 --- a/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb +++ b/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" S = "${WORKDIR}/git" SRC_URI += "git://github.com/openbmc/phosphor-buttons.git" -SRCREV = "8381d5aa3525e15f1e4bd1f3a5af815107716872" +SRCREV = "dd5495cf40d5911fb9ad04acc6689ae8af054524" inherit cmake pkgconfig systemd diff --git a/meta-phosphor/recipes-phosphor/configuration/entity-manager_git.bb b/meta-phosphor/recipes-phosphor/configuration/entity-manager_git.bb index 17ad49b7e..9cb7a04e7 100644 --- a/meta-phosphor/recipes-phosphor/configuration/entity-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/configuration/entity-manager_git.bb @@ -3,7 +3,7 @@ DESCRIPTION = "Entity Manager provides d-bus configuration data \ and configures system sensors" SRC_URI = "git://github.com/openbmc/entity-manager.git file://blocklist.json" -SRCREV = "7939a765cb6f6e128c87ab61e2bd86d2cae0f9da" +SRCREV = "f466ccece5c08a028b173a017f7894aecfccdcde" PV = "0.1+git${SRCPV}" LICENSE = "Apache-2.0" diff --git a/meta-phosphor/recipes-phosphor/console/obmc-console_git.bb b/meta-phosphor/recipes-phosphor/console/obmc-console_git.bb index dccc05cc3..bda58aab7 100644 --- a/meta-phosphor/recipes-phosphor/console/obmc-console_git.bb +++ b/meta-phosphor/recipes-phosphor/console/obmc-console_git.bb @@ -38,24 +38,52 @@ SYSTEMD_SERVICE:${PN} += "obmc-console-ssh@.service \ FILES:${PN} += "${systemd_system_unitdir}/obmc-console-ssh@.service.d/use-socket.conf" +OBMC_CONSOLE_HOST_TTY ?= "ttyVUART0" + +# Support multiple TTY ports using space separated list. +# Ex. OBMC_CONSOLE_TTYS = "ttyS1 ttyS2" +OBMC_CONSOLE_TTYS ?= "${OBMC_CONSOLE_HOST_TTY}" + do_install:append() { # Install the server configuration install -m 0755 -d ${D}${sysconfdir}/${BPN} - if test -f "${WORKDIR}/${BPN}.conf"; then - # Remove the upstream-provided server configuration - rm -f ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf - # Install the old-style server configuration - install -m 0644 ${WORKDIR}/${BPN}.conf ${D}${sysconfdir}/ - # Link the custom configuration to the required location - ln -sr ${D}${sysconfdir}/${BPN}.conf ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf - elif test -f "${WORKDIR}/server.ttyVUART0.conf" ; then - # Remove the upstream-provided server configuration + + # If the OBMC_CONSOLE_TTYS variable is used without the default OBMC_CONSOLE_HOST_TTY + # the port specific config file should be provided. If it is just OBMC_CONSOLE_HOST_TTY, + # use the old style which supports both port specific or obmc-console.conf method. + if [[ "${OBMC_CONSOLE_TTYS}" != "${OBMC_CONSOLE_HOST_TTY}" ]]; then rm -f ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf - # Install the package-provided new-style configuration - install -m 0644 ${WORKDIR}/server.ttyVUART0.conf ${D}${sysconfdir}/${BPN}/ + + for CONSOLE in ${OBMC_CONSOLE_TTYS} + do + if test -f "${WORKDIR}/server.${CONSOLE}.conf" ; then + install -m 0644 ${WORKDIR}/server.${CONSOLE}.conf ${D}${sysconfdir}/${BPN}/ + else + bberror "Must provide port specific config files when using OBMC_CONSOLE_TTYS" \ + "Missing server.${CONSOLE}.conf" + fi + done else - # Otherwise, remove socket-id from the shipped configuration to - # align with the lack of a client configuration file - sed -ri '/^socket-id =/d' ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf + # Port specific config file is prioritized over generic conf file. + # If port specific config file is not present and generic "obmc-console.conf" + # exists, it will be used. + if test -f "${WORKDIR}/server.${OBMC_CONSOLE_TTYS}.conf" ; then + # Remove the upstream-provided server configuration + rm -f ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf + # Install the package-provided new-style configuration + install -m 0644 ${WORKDIR}/server.${OBMC_CONSOLE_TTYS}.conf ${D}${sysconfdir}/${BPN}/ + elif test -f "${WORKDIR}/${BPN}.conf"; then + # Remove the upstream-provided server configuration + rm -f ${D}${sysconfdir}/${BPN}/server.ttyVUART0.conf + # Install the old-style server configuration + install -m 0644 ${WORKDIR}/${BPN}.conf ${D}${sysconfdir}/ + # Link the custom configuration to the required location + ln -sr ${D}${sysconfdir}/${BPN}.conf ${D}${sysconfdir}/${BPN}/server.${OBMC_CONSOLE_TTYS}.conf + else + # Otherwise, remove socket-id from the shipped configuration to + # align with the lack of a client configuration file + sed -ri '/^socket-id =/d' ${D}${sysconfdir}/${BPN}/server.${OBMC_CONSOLE_TTYS}.conf + fi fi + } diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb index 119d17ffc..c3041db94 100644 --- a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb +++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb @@ -18,7 +18,7 @@ DEPENDS += " \ " SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces" -SRCREV = "e0764cf41d16b823a519e9d4f508b588e3e84aba" +SRCREV = "4f703341d9f9b1bf873d3aa93255573e9eb44bfa" # Process OBMC_ORG_YAML_SUBDIRS to create Meson config options. # ex. xyz/openbmc_project -> -Ddata_xyz_openbmc_project=true diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan.inc b/meta-phosphor/recipes-phosphor/fans/phosphor-fan.inc index cdd3e1f14..a24626f4f 100644 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan.inc +++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan.inc @@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/phosphor-fan-presence" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI += "git://github.com/openbmc/phosphor-fan-presence" -SRCREV = "c024d780229822fe4eb5a948b4e5d76a8e28f3f9" +SRCREV = "075fcd858f1bfb4ba8ca5cc41526495bf3df166a" diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb index ea62216c5..2fa711c60 100644 --- a/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb +++ b/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb @@ -13,7 +13,7 @@ inherit systemd S = "${WORKDIR}/git" SRC_URI = "git://github.com/openbmc/phosphor-pid-control" -SRCREV = "cca9c659889d149c06e95bab4b8808db4f1e3eab" +SRCREV = "457993f836338aa0c13a32af803fcbc5227c81f3" # Each platform will need a service file that starts # at an appropriate time per system. For instance, if diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc index d62a8c2c7..832818c13 100644 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc +++ b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager.inc @@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/phosphor-bmc-code-mgmt" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI += "git://github.com/openbmc/phosphor-bmc-code-mgmt" -SRCREV = "58e18979f54272cea7af1834011cd249902665c5" +SRCREV = "6d775e6448b57f42099ce71ebef41ed1c19c5479" diff --git a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb index f51319adf..da308bcc8 100644 --- a/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/flash/phosphor-software-manager_git.bb @@ -14,6 +14,7 @@ SOFTWARE_MGR_PACKAGES = " \ ${PN}-updater-ubi \ ${PN}-updater-mmc \ ${PN}-sync \ + ${PN}-usb \ " PACKAGE_BEFORE_PN += "${SOFTWARE_MGR_PACKAGES}" ALLOW_EMPTY:${PN} = "1" @@ -28,6 +29,7 @@ PACKAGECONFIG[verify_signature] = " \ -Dverify-full-signature=enabled, \ -Dverify-full-signature=disabled" PACKAGECONFIG[sync_bmc_files] = "-Dsync-bmc-files=enabled, -Dsync-bmc-files=disabled" +PACKAGECONFIG[usb_code_update] = "-Dusb-code-update=enabled, -Dusb-code-update=disabled, cli11" PACKAGECONFIG[ubifs_layout] = "-Dbmc-layout=ubi" PACKAGECONFIG[mmc_layout] = "-Dbmc-layout=mmc" PACKAGECONFIG[flash_bios] = "-Dhost-bios-upgrade=enabled, -Dhost-bios-upgrade=disabled" @@ -67,6 +69,10 @@ FILES:${PN}-sync += " \ ${bindir}/phosphor-sync-software-manager \ ${sysconfdir}/synclist \ " +FILES:${PN}-usb += "\ + ${base_libdir}/udev/rules.d/70-bmc-usb.rules \ + ${bindir}/phosphor-usb-code-update \ + " DBUS_SERVICE:${PN}-version += "xyz.openbmc_project.Software.Version.service" DBUS_SERVICE:${PN}-download-mgr += "xyz.openbmc_project.Software.Download.service" DBUS_SERVICE:${PN}-updater += "xyz.openbmc_project.Software.BMC.Updater.service" @@ -81,6 +87,7 @@ SYSTEMD_SERVICE:${PN}-updater += " \ " SYSTEMD_SERVICE:${PN}-updater += "${@bb.utils.contains('PACKAGECONFIG', 'flash_bios', 'obmc-flash-host-bios@.service', '', d)}" +SYSTEMD_SERVICE:${PN}-usb += "${@bb.utils.contains('PACKAGECONFIG', 'usb_code_update', 'usb-code-update@.service', '', d)}" S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/health/phosphor-health-monitor_git.bb b/meta-phosphor/recipes-phosphor/health/phosphor-health-monitor_git.bb index cf3f7ad12..8139bfd19 100644 --- a/meta-phosphor/recipes-phosphor/health/phosphor-health-monitor_git.bb +++ b/meta-phosphor/recipes-phosphor/health/phosphor-health-monitor_git.bb @@ -14,8 +14,8 @@ DEPENDS += "sdeventplus" DEPENDS += "phosphor-logging" DEPENDS += "nlohmann-json" -SRC_URI = "git://github.com/openbmc/phosphor-health-monitor.git;protocol=git" -SRCREV = "f5151879326e36880ddf2c46fe8c539ce721b0d6" +SRC_URI = "git://github.com/openbmc/phosphor-health-monitor.git;protocol=https" +SRCREV = "a6cd704bda72e39e1b94652a9eb0733da8498791" S = "${WORKDIR}/git" SYSTEMD_SERVICE:${PN} = "phosphor-health-monitor.service" diff --git a/meta-phosphor/recipes-phosphor/host/phosphor-host-postd_git.bb b/meta-phosphor/recipes-phosphor/host/phosphor-host-postd_git.bb index 5e320fe7e..fd2b4376f 100644 --- a/meta-phosphor/recipes-phosphor/host/phosphor-host-postd_git.bb +++ b/meta-phosphor/recipes-phosphor/host/phosphor-host-postd_git.bb @@ -20,7 +20,7 @@ DEPENDS += "systemd" S = "${WORKDIR}/git" SRC_URI = "git://github.com/openbmc/phosphor-host-postd" -SRCREV = "996facb65d554f7c0f14c10e3c9252d67a01e21a" +SRCREV = "6a5e0a1cba979c3c793e794c41481221da9a4e33" SNOOP_DEVICE ?= "aspeed-lpc-snoop0" POST_CODE_BYTES ?= "1" diff --git a/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb b/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb index e083eb460..88e89ceed 100644 --- a/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb +++ b/meta-phosphor/recipes-phosphor/interfaces/bmcweb_git.bb @@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=175792518e4ac015ab6696d16c4f607e" SRC_URI = "git://github.com/openbmc/bmcweb.git" PV = "1.0+git${SRCPV}" -SRCREV = "8682c5ad05a9dff8ba3575ff5c4e8ceb535f6c5e" +SRCREV = "b477fd4408bc0602cc86147121f03791d3f4824a" S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_git.bb index 45e393d0d..9e4b2a33f 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_git.bb +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-blobs-binarystore_git.bb @@ -20,7 +20,7 @@ PACKAGECONFIG[blobtool] = ",--disable-blobtool" S = "${WORKDIR}/git" SRC_URI = "git://github.com/openbmc/phosphor-ipmi-blobs-binarystore" -SRCREV = "d6f65a1b52d662dfe282ebddab840ce161be6c61" +SRCREV = "a21027dcb1a0396e57347ab1066821c4d8ba30b2" FILES:${PN}:append = " ${libdir}/ipmid-providers/lib*${SOLIBS}" FILES:${PN}:append = " ${libdir}/blob-ipmid/lib*${SOLIBS}" diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host.inc b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host.inc index 201f52b9f..d3aabc7ee 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host.inc +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host.inc @@ -2,4 +2,4 @@ HOMEPAGE = "http://github.com/openbmc/phosphor-host-ipmid" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc" SRC_URI += "git://github.com/openbmc/phosphor-host-ipmid" -SRCREV = "78fe1b14f60d55ae335369fb2c6e81ed9ac6d865" +SRCREV = "0ce6a5771d00f8c37f43daf722ed6774324342a8" diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb index 03d4e4f2f..bfc04f63c 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host_git.bb @@ -23,6 +23,7 @@ def ipmi_whitelists(d): PACKAGECONFIG ??= "" PACKAGECONFIG[dynamic-sensors] = "--enable-dynamic-sensors,--disable-dynamic-sensors" +PACKAGECONFIG[hybrid-sensors] = "--enable-hybrid-sensors,--disable-hybrid-sensors" DEPENDS += "autoconf-archive-native" DEPENDS += "nlohmann-json" diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_git.bb index 1db304c64..5c7e3e0e3 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_git.bb +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_git.bb @@ -18,5 +18,5 @@ DEPENDS = "sdbusplus \ nlohmann-json" S = "${WORKDIR}/git" -inherit cmake systemd +inherit cmake pkgconfig systemd FILES:${PN} += "/usr/share/ipmbbridge/ipmb-channels.json" diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb index c4fd449c9..3e2b955bf 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-net_git.bb @@ -18,7 +18,7 @@ DEPENDS += "phosphor-ipmi-host" RRECOMMENDS:${PN} = "pam-ipmi" SRC_URI += "git://github.com/openbmc/phosphor-net-ipmid" -SRCREV = "5819666c23ee1d01a54fc5fb2c068bb1da1f29c7" +SRCREV = "af23add2a2cf73226cdc72af4793fde6357e8932" S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-ssif_git.bb b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-ssif_git.bb index 73fea8ad4..a5459c88f 100644 --- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-ssif_git.bb +++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-ssif_git.bb @@ -20,6 +20,6 @@ DEPENDS += "sdbusplus" DEPENDS += "cli11" S = "${WORKDIR}/git" -SRC_URI = "git://github.com/openbmc/ssifbridge.git;protocol=git;branch=master" +SRC_URI = "git://github.com/openbmc/ssifbridge.git;protocol=https;branch=master" SRCREV= "2c2b8280584d05d16a4d0c180be8c3a6ee37aec2" diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc index 5132e45c4..c740185d9 100644 --- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc +++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager.inc @@ -2,4 +2,4 @@ HOMEPAGE = "http://github.com/openbmc/phosphor-led-manager" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI += "git://github.com/openbmc/phosphor-led-manager" -SRCREV = "d1fdc4f48dfa3f156a61ce06b13b40913eef63e8" +SRCREV = "db6d763891a8526197478c24616b8740f92742d5" diff --git a/meta-phosphor/recipes-phosphor/libmctp/libmctp_git.bb b/meta-phosphor/recipes-phosphor/libmctp/libmctp_git.bb index 214677690..e2a1b90be 100644 --- a/meta-phosphor/recipes-phosphor/libmctp/libmctp_git.bb +++ b/meta-phosphor/recipes-phosphor/libmctp/libmctp_git.bb @@ -11,7 +11,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=0d30807bb7a4f16d36e96b78f9ed8fae" SRC_URI = "git://github.com/openbmc/libmctp \ file://default" -SRCREV = "663ec39ea107c2a736f9bcb20cbfdfa623092ab1" +SRCREV = "983cc3fa49dcac2e640e814500221c6acc177eff" DEPENDS += "autoconf-archive-native \ systemd \ @@ -26,6 +26,7 @@ PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemdsystemunitdir,systemd" PACKAGECONFIG[astlpc-raw-kcs] = "--enable-astlpc-raw-kcs,--disable-astlpc-raw-kcs,udev,udev" +PACKAGECONFIG[pcap] = "--enable-capture,--disable-capture,libpcap," CONFFILES:${PN} = "${sysconfdir}/default/mctp" diff --git a/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb b/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb index 891f295b0..6e112538e 100644 --- a/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb +++ b/meta-phosphor/recipes-phosphor/logging/phosphor-logging_git.bb @@ -54,7 +54,7 @@ FILES:phosphor-rsyslog-config += " \ " SRC_URI += "git://github.com/openbmc/phosphor-logging" -SRCREV = "c1ba04f2a6dc2269b8acfb289adaa72f3288a86d" +SRCREV = "f928c4a260f8fc3e7b72d0786e1f6a8345ebcaac" S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/network/phosphor-network_git.bb b/meta-phosphor/recipes-phosphor/network/phosphor-network_git.bb index 137e737c2..627f59899 100644 --- a/meta-phosphor/recipes-phosphor/network/phosphor-network_git.bb +++ b/meta-phosphor/recipes-phosphor/network/phosphor-network_git.bb @@ -11,7 +11,7 @@ inherit python3native inherit systemd SRC_URI += "git://github.com/openbmc/phosphor-networkd" -SRCREV = "26c40a43b2fde3898ba6786ab28af01cd9125805" +SRCREV = "b353ba0dcf4aec7f68b8ff08800679f7f150fb81" DEPENDS += "systemd" DEPENDS += "sdbusplus ${PYTHON_PN}-sdbus++-native" diff --git a/meta-phosphor/recipes-phosphor/network/phosphor-snmp_git.bb b/meta-phosphor/recipes-phosphor/network/phosphor-snmp_git.bb index 9f5c0b262..10ce8944a 100644 --- a/meta-phosphor/recipes-phosphor/network/phosphor-snmp_git.bb +++ b/meta-phosphor/recipes-phosphor/network/phosphor-snmp_git.bb @@ -12,7 +12,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" SRC_URI += "git://github.com/openbmc/phosphor-snmp" -SRCREV = "d560529eb7e22c0b78fb0def20f57c6f35be9dfe" +SRCREV = "7350c77aa635cff08c5f1ee32e10679de7c5afda" DBUS_SERVICE:${PN} += "xyz.openbmc_project.Network.SNMP.service" diff --git a/meta-phosphor/recipes-phosphor/pldm/pldm.inc b/meta-phosphor/recipes-phosphor/pldm/pldm.inc index 61962233c..bbaa6349c 100644 --- a/meta-phosphor/recipes-phosphor/pldm/pldm.inc +++ b/meta-phosphor/recipes-phosphor/pldm/pldm.inc @@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/pldm" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" SRC_URI = "git://github.com/openbmc/pldm" -SRCREV = "77aef218a514d34c03bc024d83f83e334035792e" +SRCREV = "81c045183b0ea6d2c857777858a29ed10650bc56" diff --git a/meta-phosphor/recipes-phosphor/power/phosphor-power.inc b/meta-phosphor/recipes-phosphor/power/phosphor-power.inc index 7f0d7b4d5..31644a25c 100644 --- a/meta-phosphor/recipes-phosphor/power/phosphor-power.inc +++ b/meta-phosphor/recipes-phosphor/power/phosphor-power.inc @@ -2,4 +2,4 @@ HOMEPAGE = "https://github.com/openbmc/phosphor-power" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI += "git://github.com/openbmc/phosphor-power" -SRCREV = "2916ea52b3d4c9ba0d0d90c1e33f333aeb720047" +SRCREV = "925c0263d0bfdccfa6fc6511679f2d6c27afa08c" diff --git a/meta-phosphor/recipes-phosphor/sel-logger/phosphor-sel-logger_git.bb b/meta-phosphor/recipes-phosphor/sel-logger/phosphor-sel-logger_git.bb index 6c10cb7c5..a80b3e7e8 100644 --- a/meta-phosphor/recipes-phosphor/sel-logger/phosphor-sel-logger_git.bb +++ b/meta-phosphor/recipes-phosphor/sel-logger/phosphor-sel-logger_git.bb @@ -21,7 +21,7 @@ DEPENDS += " \ systemd \ " -SRC_URI = "git://github.com/openbmc/phosphor-sel-logger.git;protocol=git" +SRC_URI = "git://github.com/openbmc/phosphor-sel-logger.git;protocol=https" SRCREV = "87e3fcf439f2b943272365e1d294984f39bb52b8" PV = "0.1+git${SRCPV}" diff --git a/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb b/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb index c6b4df23d..4da518d0c 100644 --- a/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb +++ b/meta-phosphor/recipes-phosphor/sensors/dbus-sensors_git.bb @@ -2,7 +2,7 @@ SUMMARY = "dbus-sensors" DESCRIPTION = "Dbus Sensor Services Configured from D-Bus" SRC_URI = "git://github.com/openbmc/dbus-sensors.git" -SRCREV = "cb5af73f5ddf48c5f9455f41a39b44517089352f" +SRCREV = "0b207a624f925460797a51974b77b275d4c05e30" PV = "0.1+git${SRCPV}" diff --git a/meta-phosphor/recipes-phosphor/sensors/phosphor-nvme_git.bb b/meta-phosphor/recipes-phosphor/sensors/phosphor-nvme_git.bb index 7928b2bcd..d9749a636 100644 --- a/meta-phosphor/recipes-phosphor/sensors/phosphor-nvme_git.bb +++ b/meta-phosphor/recipes-phosphor/sensors/phosphor-nvme_git.bb @@ -14,7 +14,7 @@ DEPENDS += "sdeventplus" DEPENDS += "phosphor-logging" DEPENDS += "nlohmann-json" -SRC_URI = "git://github.com/openbmc/phosphor-nvme.git;protocol=git" +SRC_URI = "git://github.com/openbmc/phosphor-nvme.git;protocol=https" SRCREV = "5022a4ee5cd4d3eaeabc4e991507e71b35b26a16" S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/sensors/phosphor-virtual-sensor_git.bb b/meta-phosphor/recipes-phosphor/sensors/phosphor-virtual-sensor_git.bb index 9590c4db8..5b57f865c 100644 --- a/meta-phosphor/recipes-phosphor/sensors/phosphor-virtual-sensor_git.bb +++ b/meta-phosphor/recipes-phosphor/sensors/phosphor-virtual-sensor_git.bb @@ -15,8 +15,8 @@ DEPENDS += "phosphor-logging" DEPENDS += "nlohmann-json" DEPENDS += "exprtk" -SRC_URI = "git://github.com/openbmc/phosphor-virtual-sensor.git;protocol=git" -SRCREV = "333e5bf60cdc34450617994f29901b6b131111fa" +SRC_URI = "git://github.com/openbmc/phosphor-virtual-sensor.git;protocol=https" +SRCREV = "190e4bf8a434a04c7426d7ea30a8ba2171a61741" S = "${WORKDIR}/git" SYSTEMD_SERVICE:${PN} = "phosphor-virtual-sensor.service" diff --git a/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb b/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb index b3c491883..175e73556 100644 --- a/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb @@ -4,7 +4,7 @@ d-bus objects to represent various user settings." PR = "r1" PV = "1.0+git${SRCPV}" -inherit autotools +inherit autotools pkgconfig inherit obmc-phosphor-dbus-service inherit python3native inherit phosphor-settings-manager diff --git a/meta-phosphor/recipes-phosphor/smbios/smbios-mdr_git.bb b/meta-phosphor/recipes-phosphor/smbios/smbios-mdr_git.bb index bfa69e9c3..945637d54 100644 --- a/meta-phosphor/recipes-phosphor/smbios/smbios-mdr_git.bb +++ b/meta-phosphor/recipes-phosphor/smbios/smbios-mdr_git.bb @@ -8,7 +8,7 @@ PV = "1.0+git${SRCPV}" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" -inherit cmake systemd +inherit cmake pkgconfig systemd inherit obmc-phosphor-ipmiprovider-symlink DEPENDS += " \ @@ -28,7 +28,7 @@ EXTRA_OECMAKE = "-DYOCTO=ON" S = "${WORKDIR}/git" SRC_URI = "git://github.com/openbmc/smbios-mdr.git" -SRCREV = "631388e621abad855abbe4abbfb20111da9056f1" +SRCREV = "5f2d627553b6d8fbe4472eb0c15cbff6bc2888d3" SYSTEMD_SERVICE:${PN} += "smbios-mdrv2.service" SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'cpuinfo', 'xyz.openbmc_project.cpuinfo.service', '', d)}" diff --git a/meta-phosphor/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb b/meta-phosphor/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb index a033239d9..041969304 100644 --- a/meta-phosphor/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/srvcfg-manager/srvcfg-manager_git.bb @@ -10,7 +10,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=7becf906c8f8d03c237bad13bc3dac53" SRC_URI = "git://github.com/openbmc/service-config-manager" -SRCREV = "a1fe1a284df3b652bbf55e69945e2fd2b4c7aded" +SRCREV = "fa5d5ca73024c6be6a011184edad79a6cf2c7630" inherit meson pkgconfig systemd diff --git a/meta-phosphor/recipes-phosphor/state/phosphor-post-code-manager_git.bb b/meta-phosphor/recipes-phosphor/state/phosphor-post-code-manager_git.bb index d5d81f8ba..483b8fe03 100644 --- a/meta-phosphor/recipes-phosphor/state/phosphor-post-code-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/state/phosphor-post-code-manager_git.bb @@ -4,7 +4,7 @@ interface /xyz/openbmc_project/state/boot/raw by snoopd daemon and save them \ in a file under /var/lib for history." SRC_URI = "git://github.com/openbmc/phosphor-post-code-manager.git" -SRCREV = "9ce5a645f50c0ab94e582abbf95474f636aba678" +SRCREV = "f5e52db77cb580b2a6e9b95d06e26bfd185627d9" S = "${WORKDIR}/git" @@ -13,14 +13,15 @@ PV = "1.0+git${SRCPV}" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" -inherit cmake pkgconfig systemd +inherit meson pkgconfig systemd def get_service(d): + service_list = "xyz.openbmc_project.State.Boot.PostCode.service xyz.openbmc_project.State.Boot.PostCode@.service " if(d.getVar('OBMC_HOST_INSTANCES') == '0'): - return "xyz.openbmc_project.State.Boot.PostCode.service" + return service_list else: - return " ".join(["xyz.openbmc_project.State.Boot.PostCode@{}.service".format(x) for x in d.getVar('OBMC_HOST_INSTANCES').split()]) + return service_list+" ".join(["xyz.openbmc_project.State.Boot.PostCode@{}.service".format(x) for x in d.getVar('OBMC_HOST_INSTANCES').split()]) SYSTEMD_SERVICE:${PN} = "${@get_service(d)}" @@ -28,7 +29,6 @@ DEPENDS += " \ sdbusplus \ phosphor-dbus-interfaces \ phosphor-logging \ + libcereal \ " -FILES:${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.State.Boot.PostCode@.service" -FILES:${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.State.Boot.PostCode.service" diff --git a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb index 5f76096ec..c9b14dc93 100644 --- a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb @@ -187,6 +187,6 @@ SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list(d, 'QUIESCE_FMT', 'HOST_ERRO SRC_URI += "git://github.com/openbmc/phosphor-state-manager" -SRCREV = "1e89e62283ea037823319244fc2de6c351c18538" +SRCREV = "68a8c31d820718588a583625e88ba2626ef64526" S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/storage/estoraged.bb b/meta-phosphor/recipes-phosphor/storage/estoraged.bb new file mode 100644 index 000000000..c6675959a --- /dev/null +++ b/meta-phosphor/recipes-phosphor/storage/estoraged.bb @@ -0,0 +1,20 @@ +SUMMARY = "Encrypted storage management daemon" +DESCRIPTION = "Provides a D-Bus interface to manage an encrypted storage device" +PR = "r1" +PV = "0.1+git${SRCPV}" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" +inherit meson pkgconfig + +DEPENDS += "phosphor-dbus-interfaces" +DEPENDS += "cryptsetup" +DEPENDS += "openssl" +DEPENDS += "phosphor-logging" +DEPENDS += "sdbusplus" +DEPENDS += "stdplus" + +RDEPENDS:${PN} += "e2fsprogs" + +S = "${WORKDIR}/git" +SRC_URI = "git://github.com/openbmc/estoraged.git" +SRCREV = "972c3faae9092f8a513222d0b24c36ad79f4119f" diff --git a/meta-phosphor/recipes-phosphor/telemetry/telemetry_git.bb b/meta-phosphor/recipes-phosphor/telemetry/telemetry_git.bb index 31e821618..97a400d4c 100644 --- a/meta-phosphor/recipes-phosphor/telemetry/telemetry_git.bb +++ b/meta-phosphor/recipes-phosphor/telemetry/telemetry_git.bb @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI = "git://github.com/openbmc/telemetry" PV = "1.0+git${SRCPV}" -SRCREV = "e28aa53dc1492f09a64dc9f1dbfd5b6dba06e31f" +SRCREV = "31db7f71ec023eb6b0e630fa18048b6fd9ae7430" S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/users/phosphor-user-manager_git.bb b/meta-phosphor/recipes-phosphor/users/phosphor-user-manager_git.bb index 21d1c814f..fe9d515ef 100644 --- a/meta-phosphor/recipes-phosphor/users/phosphor-user-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/users/phosphor-user-manager_git.bb @@ -41,5 +41,5 @@ DBUS_SERVICE:phosphor-ldap = " \ xyz.openbmc_project.LDAP.PrivilegeMapper.service \ " SRC_URI += "git://github.com/openbmc/phosphor-user-manager" -SRCREV = "ce4e1aa087ca4ce62069106482285c1acf13499b" +SRCREV = "b01e2fe760eb04ae9d0d13716a127056949e2601" S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/video/uart-render-controller_git.bb b/meta-phosphor/recipes-phosphor/video/uart-render-controller_git.bb index 62d19ec82..d3ad3c0a5 100644 --- a/meta-phosphor/recipes-phosphor/video/uart-render-controller_git.bb +++ b/meta-phosphor/recipes-phosphor/video/uart-render-controller_git.bb @@ -16,7 +16,7 @@ DEPENDS += "autoconf-archive-native" DEPENDS += "systemd" RDEPENDS:${PN} += "fbterm" -SRCREV = "26ac7f7bd6af52db63451d3633bcf1b167eea3d1" +SRCREV = "08e854a6c425011d029e4e02241afee5060f15eb" PV = "0.1+git${SRCPV}" S = "${WORKDIR}/git" diff --git a/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog_git.bb b/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog_git.bb index 4ef5f0cc5..785dd9c4f 100644 --- a/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog_git.bb +++ b/meta-phosphor/recipes-phosphor/watchdog/phosphor-watchdog_git.bb @@ -20,7 +20,7 @@ DEPENDS += "phosphor-logging" DEPENDS += "systemd" SRC_URI += "git://github.com/openbmc/phosphor-watchdog" -SRCREV = "6a54155eab9bab579bc9493199a4272676563b5f" +SRCREV = "658527bbdde8b88ca798527f03c3c67ad7f1c080" S = "${WORKDIR}/git" EXTRA_OEMESON = " \ diff --git a/meta-phosphor/recipes-phosphor/webui/webui-vue_git.bb b/meta-phosphor/recipes-phosphor/webui/webui-vue_git.bb index 1a3feedbe..8b4a72f5d 100644 --- a/meta-phosphor/recipes-phosphor/webui/webui-vue_git.bb +++ b/meta-phosphor/recipes-phosphor/webui/webui-vue_git.bb @@ -6,7 +6,7 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" SRC_URI = "git://github.com/openbmc/webui-vue.git" -SRCREV = "2a2e1021f48e2a939859ba7f4ae86c5de6df5655" +SRCREV = "f4328edf86b284fe8836717251ce6696670dbdd5" S = "${WORKDIR}/git" DEPENDS:prepend = "nodejs-native nlf-native " diff --git a/meta-phosphor/recipes-support/cjson/cjson_git.bb b/meta-phosphor/recipes-support/cjson/cjson_git.bb index 1b83dd1bc..67512ffe9 100644 --- a/meta-phosphor/recipes-support/cjson/cjson_git.bb +++ b/meta-phosphor/recipes-support/cjson/cjson_git.bb @@ -8,7 +8,7 @@ SRCREV = "cbc05de76fbd4dfff17b5626d5cfe9ec922b1f4a" S = "${WORKDIR}/git" -inherit cmake +inherit cmake pkgconfig FILES:${PN}-dev += "${libdir}/cmake/cJSON/*" diff --git a/meta-phosphor/recipes-support/gnupg/gnupg_%.bbappend b/meta-phosphor/recipes-support/gnupg/gnupg_%.bbappend new file mode 100644 index 000000000..3f2f4f94f --- /dev/null +++ b/meta-phosphor/recipes-support/gnupg/gnupg_%.bbappend @@ -0,0 +1,2 @@ +# Remove unneeded gnupg help files to save space +EXTRA_OECONF:append:gbmc = " --disable-doc" diff --git a/meta-phosphor/recipes-x86/chassis/x86-power-control_git.bb b/meta-phosphor/recipes-x86/chassis/x86-power-control_git.bb index 04fd5dc63..424ad28de 100755 --- a/meta-phosphor/recipes-x86/chassis/x86-power-control_git.bb +++ b/meta-phosphor/recipes-x86/chassis/x86-power-control_git.bb @@ -1,8 +1,8 @@ SUMMARY = "Chassis Power Control service for Intel based platforms" DESCRIPTION = "Chassis Power Control service for Intel based platforms" -SRC_URI = "git://github.com/openbmc/x86-power-control.git;protocol=ssh" -SRCREV = "48c94c59728023cdbff3bd62f203de3434af8b8a" +SRC_URI = "git://github.com/openbmc/x86-power-control.git;protocol=https" +SRCREV = "c46ebb493f0e0cc1ccc5525d5484465bba69551f" PV = "1.0+git${SRCPV}" @@ -11,7 +11,7 @@ S = "${WORKDIR}/git" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" -inherit cmake systemd +inherit meson systemd pkgconfig inherit obmc-phosphor-dbus-service def get_service(d): @@ -33,4 +33,4 @@ DEPENDS += " \ sdbusplus \ phosphor-logging \ " -FILES:${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.Chassis.Control.Power@.service"
\ No newline at end of file +FILES:${PN} += "${systemd_system_unitdir}/xyz.openbmc_project.Chassis.Control.Power@.service" diff --git a/meta-phosphor/recipes-x86/peci-pcie/peci-pcie_git.bb b/meta-phosphor/recipes-x86/peci-pcie/peci-pcie_git.bb index cf1d6b136..fc734558f 100644 --- a/meta-phosphor/recipes-x86/peci-pcie/peci-pcie_git.bb +++ b/meta-phosphor/recipes-x86/peci-pcie/peci-pcie_git.bb @@ -4,14 +4,14 @@ and provides it on D-Bus" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=7becf906c8f8d03c237bad13bc3dac53" -inherit cmake systemd +inherit cmake pkgconfig systemd SRC_URI = "git://github.com/openbmc/peci-pcie" DEPENDS = "boost sdbusplus libpeci" PV = "0.1+git${SRCPV}" -SRCREV = "de624395a587be555463a14a3db90500b4e0521c" +SRCREV = "bb5efe7b3ecfd56584cef10739b3395ef3017dd4" S = "${WORKDIR}/git" diff --git a/meta-quanta/meta-f0b/conf/bblayers.conf.sample b/meta-quanta/meta-f0b/conf/bblayers.conf.sample index db7f86a0d..252c26bc3 100644 --- a/meta-quanta/meta-f0b/conf/bblayers.conf.sample +++ b/meta-quanta/meta-f0b/conf/bblayers.conf.sample @@ -17,15 +17,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-quanta \ ##OEROOT##/meta-quanta/meta-f0b \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-quanta \ - ##OEROOT##/meta-quanta/meta-f0b \ - " diff --git a/meta-quanta/meta-gbs/conf/bblayers.conf.sample b/meta-quanta/meta-gbs/conf/bblayers.conf.sample index 903833258..22757391f 100644 --- a/meta-quanta/meta-gbs/conf/bblayers.conf.sample +++ b/meta-quanta/meta-gbs/conf/bblayers.conf.sample @@ -18,16 +18,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-quanta \ ##OEROOT##/meta-quanta/meta-gbs \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-nuvoton \ - ##OEROOT##/meta-google \ - ##OEROOT##/meta-quanta \ - ##OEROOT##/meta-quanta/meta-gbs \ - " diff --git a/meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-update.sh b/meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-update.sh index 36dfa452c..bf71e9452 100644 --- a/meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-update.sh +++ b/meta-quanta/meta-gbs/recipes-gbs/gbs-bios-update/files/bios-update.sh @@ -75,14 +75,14 @@ main() { fi echo "${KERNEL_FIU_ID}" > "${KERNEL_SYSFS_FIU}"/bind - # BIOS flash is labelled 'pnor' - pnor_mtd=$(findmtd pnor) - if [ -z "${pnor_mtd}" ]; then + # BIOS flash is labelled 'bios-primary' + bios_mtd=$(findmtd bios-primary) + if [ -z "${bios_mtd}" ]; then echo "Cannot find bios flash mtd partition!" exit 1 fi - flashcp -v $IMAGE_FILE /dev/"${pnor_mtd}" + flashcp -v $IMAGE_FILE /dev/"${bios_mtd}" if [ $? -eq 0 ]; then echo "bios update successfully..." else diff --git a/meta-quanta/meta-gsj/conf/bblayers.conf.sample b/meta-quanta/meta-gsj/conf/bblayers.conf.sample index 1c895ea00..2746d9af1 100644 --- a/meta-quanta/meta-gsj/conf/bblayers.conf.sample +++ b/meta-quanta/meta-gsj/conf/bblayers.conf.sample @@ -18,16 +18,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-quanta \ ##OEROOT##/meta-quanta/meta-gsj \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-nuvoton \ - ##OEROOT##/meta-google \ - ##OEROOT##/meta-quanta \ - ##OEROOT##/meta-quanta/meta-gsj \ - " diff --git a/meta-quanta/meta-olympus-nuvoton/conf/bblayers.conf.sample b/meta-quanta/meta-olympus-nuvoton/conf/bblayers.conf.sample index f7b4c2210..eb6cb8059 100644 --- a/meta-quanta/meta-olympus-nuvoton/conf/bblayers.conf.sample +++ b/meta-quanta/meta-olympus-nuvoton/conf/bblayers.conf.sample @@ -18,16 +18,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-quanta \ ##OEROOT##/meta-quanta/meta-olympus-nuvoton \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-nuvoton \ - ##OEROOT##/meta-google \ - ##OEROOT##/meta-quanta \ - ##OEROOT##/meta-quanta/meta-olympus-nuvoton \ - " diff --git a/meta-quanta/meta-q71l/conf/bblayers.conf.sample b/meta-quanta/meta-q71l/conf/bblayers.conf.sample index 880ce33b1..2ede49eed 100644 --- a/meta-quanta/meta-q71l/conf/bblayers.conf.sample +++ b/meta-quanta/meta-q71l/conf/bblayers.conf.sample @@ -15,21 +15,6 @@ BBLAYERS ?= " \ ##OEROOT##/meta-security \ ##OEROOT##/meta-phosphor \ ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-x86 \ - ##OEROOT##/meta-quanta \ - ##OEROOT##/meta-quanta/meta-q71l \ - " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-openembedded/meta-webserver \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-x86 \ ##OEROOT##/meta-quanta \ ##OEROOT##/meta-quanta/meta-q71l \ " diff --git a/meta-tyan/OWNERS b/meta-tyan/OWNERS new file mode 100644 index 000000000..3080f8540 --- /dev/null +++ b/meta-tyan/OWNERS @@ -0,0 +1,3 @@ +owners: +- aaelhaj@google.com +- osk@google.com diff --git a/meta-tyan/conf/layer.conf b/meta-tyan/conf/layer.conf new file mode 100644 index 000000000..e0bd4cac7 --- /dev/null +++ b/meta-tyan/conf/layer.conf @@ -0,0 +1,11 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/meta-common/recipes-*/*/*.bb \ + ${LAYERDIR}/meta-common/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "tyan-layer" +BBFILE_PATTERN_tyan-layer = "^${LAYERDIR}/" +LAYERSERIES_COMPAT_tyan-layer = "hardknott honister" + diff --git a/meta-tyan/conf/machine/include/tyan.inc b/meta-tyan/conf/machine/include/tyan.inc new file mode 100644 index 000000000..3180704c2 --- /dev/null +++ b/meta-tyan/conf/machine/include/tyan.inc @@ -0,0 +1,20 @@ +MACHINE_FEATURES += "\ + obmc-bmc-state-mgmt \ + obmc-chassis-state-mgmt \ + obmc-host-ipmi \ + obmc-host-state-mgmt \ + obmc-phosphor-chassis-mgmt \ + obmc-phosphor-fan-mgmt \ + obmc-phosphor-flash-mgmt \ + " + +VIRTUAL-RUNTIME_obmc-inventory-manager = "entity-manager" +PREFERRED_PROVIDER_virtual/obmc-inventory-data = "entity-manager" + +VIRTUAL-RUNTIME_obmc-host-state-manager ?= "x86-power-control" +VIRTUAL-RUNTIME_obmc-chassis-state-manager ?= "x86-power-control" + +PREFERRED_PROVIDER_virtual/obmc-chassis-mgmt = "packagegroup-tyan-apps" +PREFERRED_PROVIDER_virtual/obmc-flash-mgmt = "packagegroup-tyan-apps" +PREFERRED_PROVIDER_virtual/obmc-host-ipmi-hw ?= "phosphor-ipmi-kcs" +PREFERRED_PROVIDER_virtual/obmc-system-mgmt = "packagegroup-tyan-apps" diff --git a/meta-tyan/meta-common/recipes-phosphor/console/obmc-console/obmc-console.conf b/meta-tyan/meta-common/recipes-phosphor/console/obmc-console/obmc-console.conf new file mode 100644 index 000000000..8491f5365 --- /dev/null +++ b/meta-tyan/meta-common/recipes-phosphor/console/obmc-console/obmc-console.conf @@ -0,0 +1,3 @@ +baud = 115200 +local-tty = ttyS3 +local-tty-baud = 115200 diff --git a/meta-tyan/meta-common/recipes-phosphor/console/obmc-console_%.bbappend b/meta-tyan/meta-common/recipes-phosphor/console/obmc-console_%.bbappend new file mode 100644 index 000000000..18bcfe350 --- /dev/null +++ b/meta-tyan/meta-common/recipes-phosphor/console/obmc-console_%.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS:append := "${THISDIR}/${PN}:" +OBMC_CONSOLE_HOST_TTY = "ttyS2" diff --git a/meta-tyan/meta-common/recipes-phosphor/dummy/tyan-dummy.bb b/meta-tyan/meta-common/recipes-phosphor/dummy/tyan-dummy.bb new file mode 100644 index 000000000..54b93855a --- /dev/null +++ b/meta-tyan/meta-common/recipes-phosphor/dummy/tyan-dummy.bb @@ -0,0 +1,8 @@ +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +ALLOW_EMPTY_${PN} = "1" + +PROVIDES += "virtual/obmc-fan-mgmt" +RPROVIDES:${PN} += "virtual-obmc-fan-mgmt" + diff --git a/meta-tyan/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-tyan/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend new file mode 100644 index 000000000..bc70432fd --- /dev/null +++ b/meta-tyan/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG:append = " dynamic-sensors" diff --git a/meta-tyan/meta-common/recipes-phosphor/packagegroups/packagegroup-tyan-apps.bb b/meta-tyan/meta-common/recipes-phosphor/packagegroups/packagegroup-tyan-apps.bb new file mode 100644 index 000000000..b29cca434 --- /dev/null +++ b/meta-tyan/meta-common/recipes-phosphor/packagegroups/packagegroup-tyan-apps.bb @@ -0,0 +1,39 @@ +SUMMARY = "OpenBMC for TYAN - Applications" +PR = "r1" + +inherit packagegroup + +PROVIDES = "${PACKAGES}" +PACKAGES = " \ + ${PN}-chassis \ + ${PN}-flash \ + ${PN}-system \ + " + +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" + +SUMMARY:${PN}-chassis = "TYAN Chassis" +RDEPENDS:${PN}-chassis = " \ + x86-power-control \ + " + +SUMMARY:${PN}-flash = "TYAN Flash" +RDEPENDS:${PN}-flash = " \ + phosphor-software-manager \ + " + +SUMMARY:${PN}-system = "TYAN System" +RDEPENDS:${PN}-system = " \ + dbus-sensors \ + phosphor-hostlogger \ + phosphor-sel-logger \ + ipmitool \ + phosphor-post-code-manager \ + phosphor-host-postd \ + " diff --git a/meta-tyan/meta-common/recipes-x86/chassis/x86-power-control/power-config-host0.json b/meta-tyan/meta-common/recipes-x86/chassis/x86-power-control/power-config-host0.json new file mode 100644 index 000000000..bbeea06c6 --- /dev/null +++ b/meta-tyan/meta-common/recipes-x86/chassis/x86-power-control/power-config-host0.json @@ -0,0 +1,69 @@ +{ + "gpio_configs":[ + { + "Name" : "IdButton", + "LineName" : "id-button", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "NMIButton", + "LineName" : "nmi-button", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "NMIOut", + "LineName" : "nmi-control", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "PostComplete", + "LineName" : "post-complete", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "PowerButton", + "LineName" : "power-button", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "PowerOk", + "LineName" : "power-chassis-good", + "Type" : "GPIO", + "Polarity" : "ActiveHigh" + }, + { + "Name" : "PowerOut", + "LineName" : "power-chassis-control", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "ResetButton", + "LineName" : "reset-button", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + }, + { + "Name" : "ResetOut", + "LineName" : "reset-control", + "Type" : "GPIO", + "Polarity" : "ActiveLow" + } + ], + "timing_configs":{ + "PowerPulseMs": 200, + "ForceOffPulseMs": 15000, + "ResetPulseMs": 500, + "PowerCycleMs": 5000, + "SioPowerGoodWatchdogMs": 1000, + "PsPowerOKWatchdogMs": 8000, + "GracefulPowerOffS": 300, + "WarmResetCheckMs": 500, + "PowerOffSaveMs": 7000 + } +} diff --git a/meta-tyan/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend b/meta-tyan/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend new file mode 100644 index 000000000..c0fe1dd72 --- /dev/null +++ b/meta-tyan/meta-common/recipes-x86/chassis/x86-power-control_%.bbappend @@ -0,0 +1,11 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" +SRC_URI:append = " \ + file://power-config-host0.json \ +" + +RDEPENDS:${PN}:append = " bash" + +do_install:append() { + install -d ${D}${datadir}/${PN} + install -m 0644 ${WORKDIR}/power-config-host0.json ${D}${datadir}/${PN} +} diff --git a/meta-tyan/meta-s7106/conf/bblayers.conf.sample b/meta-tyan/meta-s7106/conf/bblayers.conf.sample new file mode 100644 index 000000000..956b2a759 --- /dev/null +++ b/meta-tyan/meta-s7106/conf/bblayers.conf.sample @@ -0,0 +1,19 @@ +# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +LCONF_VERSION = "8" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ##OEROOT##/meta \ + ##OEROOT##/meta-openembedded/meta-oe \ + ##OEROOT##/meta-openembedded/meta-networking \ + ##OEROOT##/meta-openembedded/meta-perl \ + ##OEROOT##/meta-openembedded/meta-python \ + ##OEROOT##/meta-security \ + ##OEROOT##/meta-phosphor \ + ##OEROOT##/meta-aspeed \ + ##OEROOT##/meta-tyan \ + ##OEROOT##/meta-tyan/meta-s7106 \ +" diff --git a/meta-tyan/meta-s7106/conf/conf-notes.txt b/meta-tyan/meta-s7106/conf/conf-notes.txt new file mode 100644 index 000000000..43d4ab099 --- /dev/null +++ b/meta-tyan/meta-s7106/conf/conf-notes.txt @@ -0,0 +1,2 @@ +Common targets are: + obmc-phosphor-image diff --git a/meta-tyan/meta-s7106/conf/layer.conf b/meta-tyan/meta-s7106/conf/layer.conf new file mode 100644 index 000000000..dae8f08f5 --- /dev/null +++ b/meta-tyan/meta-s7106/conf/layer.conf @@ -0,0 +1,11 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "s7106-layer" +BBFILE_PATTERN_s7106-layer = "^${LAYERDIR}/" +BBFILE_PRIORITY_s7106-layer = "5" +LAYERSERIES_COMPAT_s7106-layer = "hardknott honister" diff --git a/meta-tyan/meta-s7106/conf/local.conf.sample b/meta-tyan/meta-s7106/conf/local.conf.sample new file mode 100644 index 000000000..ec1b849eb --- /dev/null +++ b/meta-tyan/meta-s7106/conf/local.conf.sample @@ -0,0 +1,17 @@ +MACHINE ??= "s7106" +DISTRO ?= "openbmc-phosphor" +PACKAGE_CLASSES ?= "package_rpm" +SANITY_TESTED_DISTROS:append ?= " *" +EXTRA_IMAGE_FEATURES = "debug-tweaks" +USER_CLASSES ?= "buildstats image-prelink" +PATCHRESOLVE = "noop" +BB_DISKMON_DIRS = "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + ABORT,${TMPDIR},100M,1K \ + ABORT,${DL_DIR},100M,1K \ + ABORT,${SSTATE_DIR},100M,1K \ + ABORT,/tmp,10M,1K" +CONF_VERSION = "2" diff --git a/meta-tyan/meta-s7106/conf/machine/s7106.conf b/meta-tyan/meta-s7106/conf/machine/s7106.conf new file mode 100644 index 000000000..0244ebd76 --- /dev/null +++ b/meta-tyan/meta-s7106/conf/machine/s7106.conf @@ -0,0 +1,16 @@ +KMACHINE = "aspeed" +KERNEL_DEVICETREE = "${KMACHINE}-bmc-tyan-${MACHINE}.dtb" + +UBOOT_MACHINE = "ast_g5_phy_config" + +require conf/machine/include/ast2500.inc +require conf/machine/include/obmc-bsp-common.inc +require conf/machine/include/tyan.inc + +FLASH_SIZE = "32768" + +# We don't have configuration for these components yet, so remove them. +PREFERRED_PROVIDER_virtual/obmc-fan-mgmt = "tyan-dummy" +IMAGE_FEATURES:remove = "obmc-fan-control" +IMAGE_FEATURES:remove = "obmc-fan-mgmt" +IMAGE_FEATURES:remove = "obmc-flash-mgmt" diff --git a/meta-tyan/meta-s7106/recipes-kernel/linux/linux-aspeed/s7106.cfg b/meta-tyan/meta-s7106/recipes-kernel/linux/linux-aspeed/s7106.cfg new file mode 100644 index 000000000..c427a19be --- /dev/null +++ b/meta-tyan/meta-s7106/recipes-kernel/linux/linux-aspeed/s7106.cfg @@ -0,0 +1,20 @@ +CONFIG_ASPEED_UART_ROUTING=y +CONFIG_DEVMEM=y +CONFIG_I2C_MUX_GPIO=y +CONFIG_SENSORS_NCT7802=y + +# Support for virtual USB NIC +CONFIG_USB_U_ETHER=y +CONFIG_USB_F_ECM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_ECM_SUBSET=y + +# Enable PECI +CONFIG_PECI=y +CONFIG_PECI_CHARDEV=y +CONFIG_PECI_ASPEED=y +CONFIG_SENSORS_PECI_CPUTEMP=y +CONFIG_SENSORS_PECI_DIMMTEMP=y +CONFIG_SENSORS_PECI_CPUPOWER=y +CONFIG_SENSORS_PECI_DIMMPOWER=y +CONFIG_IPMB_DEVICE_INTERFACE=y diff --git a/meta-tyan/meta-s7106/recipes-kernel/linux/linux-aspeed_%.bbappend b/meta-tyan/meta-s7106/recipes-kernel/linux/linux-aspeed_%.bbappend new file mode 100644 index 000000000..6307e1bb6 --- /dev/null +++ b/meta-tyan/meta-s7106/recipes-kernel/linux/linux-aspeed_%.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" +SRC_URI:append = " \ + file://s7106.cfg \ + " diff --git a/meta-tyan/meta-s7106/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend b/meta-tyan/meta-s7106/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend new file mode 100644 index 000000000..9f7857036 --- /dev/null +++ b/meta-tyan/meta-s7106/recipes-phosphor/ipmi/phosphor-ipmi-kcs_%.bbappend @@ -0,0 +1 @@ +KCS_DEVICE = "ipmi-kcs1" diff --git a/meta-x86/conf/layer.conf b/meta-x86/conf/layer.conf deleted file mode 100644 index aab9a63e2..000000000 --- a/meta-x86/conf/layer.conf +++ /dev/null @@ -1,6 +0,0 @@ -# We have a conf and classes directory, add to BBPATH -BBPATH .= ":${LAYERDIR}" - -BBFILE_COLLECTIONS += "obmc_machines_x86" -BBFILE_PATTERN_obmc_machines_x86 = "" -LAYERSERIES_COMPAT_obmc_machines_x86 = "hardknott honister" diff --git a/meta-yadro/meta-nicole/conf/bblayers.conf.sample b/meta-yadro/meta-nicole/conf/bblayers.conf.sample index 776b1a90b..3ceae4949 100644 --- a/meta-yadro/meta-nicole/conf/bblayers.conf.sample +++ b/meta-yadro/meta-nicole/conf/bblayers.conf.sample @@ -18,16 +18,3 @@ BBLAYERS ?= " \ ##OEROOT##/meta-yadro \ ##OEROOT##/meta-yadro/meta-nicole \ " -BBLAYERS_NON_REMOVABLE ?= " \ - ##OEROOT##/meta \ - ##OEROOT##/meta-openembedded/meta-oe \ - ##OEROOT##/meta-openembedded/meta-networking \ - ##OEROOT##/meta-openembedded/meta-perl \ - ##OEROOT##/meta-openembedded/meta-python \ - ##OEROOT##/meta-security \ - ##OEROOT##/meta-phosphor \ - ##OEROOT##/meta-aspeed \ - ##OEROOT##/meta-openpower \ - ##OEROOT##/meta-yadro \ - ##OEROOT##/meta-yadro/meta-nicole \ - " diff --git a/meta-yadro/recipes-yadro/cli/obmc-yadro-cli_git.bb b/meta-yadro/recipes-yadro/cli/obmc-yadro-cli_git.bb index 2564ce38e..2131774d1 100644 --- a/meta-yadro/recipes-yadro/cli/obmc-yadro-cli_git.bb +++ b/meta-yadro/recipes-yadro/cli/obmc-yadro-cli_git.bb @@ -14,6 +14,7 @@ RDEPENDS:${PN} = " \ ${VIRTUAL-RUNTIME_base-utils} \ bash \ obmc-yadro-fwupdate \ + obmc-yadro-lsinventory \ obmc-yadro-lssensors \ obmc-yadro-netconfig \ phosphor-debug-collector-dreport \ @@ -42,4 +43,4 @@ do_install() { # Source code repository S = "${WORKDIR}/git" SRC_URI = "git://github.com/YADRO-KNS/obmc-yadro-cli" -SRCREV = "76743c3706516bae6b2bb8749706b4ea673e9358" +SRCREV = "ce70f4f732114b1989c63792907b84a3f6e91f84" diff --git a/meta-yadro/recipes-yadro/cli/obmc-yadro-fwupdate_git.bb b/meta-yadro/recipes-yadro/cli/obmc-yadro-fwupdate_git.bb index 161c54bf0..eac6c962c 100644 --- a/meta-yadro/recipes-yadro/cli/obmc-yadro-fwupdate_git.bb +++ b/meta-yadro/recipes-yadro/cli/obmc-yadro-fwupdate_git.bb @@ -22,5 +22,5 @@ PACKAGECONFIG ??= " obmc-phosphor-image reboot-guard-support " PACKAGECONFIG:append_df-openpower = "openpower-support" SRC_URI = "git://github.com/YADRO-KNS/obmc-yadro-fwupdate" -SRCREV = "0e3c0714f344a2f7f289c851434955360e6f075b" +SRCREV = "388f4a004e4fe29ee55b964527088714c55f8c70" S = "${WORKDIR}/git" diff --git a/meta-yadro/recipes-yadro/cli/obmc-yadro-lsinventory_git.bb b/meta-yadro/recipes-yadro/cli/obmc-yadro-lsinventory_git.bb index 2e66a7d95..0d1a57ab8 100644 --- a/meta-yadro/recipes-yadro/cli/obmc-yadro-lsinventory_git.bb +++ b/meta-yadro/recipes-yadro/cli/obmc-yadro-lsinventory_git.bb @@ -12,11 +12,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" # Dependencies DEPENDS += " \ - json-c \ + nlohmann-json \ sdbusplus \ " # Source code repository S = "${WORKDIR}/git" SRC_URI = "git://github.com/YADRO-KNS/obmc-yadro-lsinventory.git" -SRCREV = "d0bdf0ddd192b9d41c5c5d4af9385122b08c7608" +SRCREV = "d8e25f82ff29c7b2c6d1888e9fe28307f173b078" diff --git a/meta-yadro/recipes-yadro/cli/obmc-yadro-lssensors_git.bb b/meta-yadro/recipes-yadro/cli/obmc-yadro-lssensors_git.bb index f202ab89f..3741ed279 100644 --- a/meta-yadro/recipes-yadro/cli/obmc-yadro-lssensors_git.bb +++ b/meta-yadro/recipes-yadro/cli/obmc-yadro-lssensors_git.bb @@ -13,4 +13,4 @@ DEPENDS += "sdbusplus" S = "${WORKDIR}/git" SRC_URI = "git://github.com/YADRO-KNS/obmc-yadro-lssensors.git" -SRCREV = "39c37655bb777f1876cdddc4b624b38d75105b8e" +SRCREV = "dcaac17c62c9dd21499c4c5e9eb8070f10786560" diff --git a/poky/meta/recipes-support/libpcre/libpcre2_10.37.bb b/poky/meta/recipes-support/libpcre/libpcre2_10.37.bb index e0ead59da..ccedf688d 100644 --- a/poky/meta/recipes-support/libpcre/libpcre2_10.37.bb +++ b/poky/meta/recipes-support/libpcre/libpcre2_10.37.bb @@ -10,7 +10,9 @@ SECTION = "devel" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENCE;md5=6b3022283c9a79238d521848ea9dcb4d" -SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre2-${PV}.tar.bz2" +SRC_URI = "https://github.com/PhilipHazel/pcre2/releases/download/pcre2-${PV}/pcre2-${PV}.tar.bz2" + +UPSTREAM_CHECK_URI = "https://github.com/PhilipHazel/pcre2/releases" SRC_URI[sha256sum] = "4d95a96e8b80529893b4562be12648d798b957b1ba1aae39606bbc2ab956d270" diff --git a/poky/meta/recipes-support/libpcre/libpcre_8.45.bb b/poky/meta/recipes-support/libpcre/libpcre_8.45.bb index 76b20f5f0..46fedbae4 100644 --- a/poky/meta/recipes-support/libpcre/libpcre_8.45.bb +++ b/poky/meta/recipes-support/libpcre/libpcre_8.45.bb @@ -7,7 +7,7 @@ HOMEPAGE = "http://www.pcre.org" SECTION = "devel" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENCE;md5=b5d5d1a69a24ea2718263f1ff85a1c58" -SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre-${PV}.tar.bz2 \ +SRC_URI = "${SOURCEFORGE_MIRROR}/pcre/pcre-${PV}.tar.bz2 \ file://run-ptest \ file://Makefile \ " |