summaryrefslogtreecommitdiff
path: root/meta-ampere/meta-common
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ampere/meta-common')
-rwxr-xr-xmeta-ampere/meta-common/recipes-ampere/host/ac01-boot-progress/ampere_boot_progress.sh4
-rw-r--r--meta-ampere/meta-common/recipes-ampere/host/ac01-boot-progress/dimm_train_fail_log.sh2
-rw-r--r--meta-ampere/meta-common/recipes-ampere/network/ampere-usbnet/ampere-usbnet.service10
-rw-r--r--meta-ampere/meta-common/recipes-ampere/network/ampere-usbnet/ampere_usbnet.sh26
-rw-r--r--meta-ampere/meta-common/recipes-ampere/platform/ampere-utils/ampere_add_redfishevent.sh8
-rw-r--r--meta-ampere/meta-common/recipes-phosphor/fans/phosphor-fan_%.bbappend2
-rwxr-xr-xmeta-ampere/meta-common/recipes-phosphor/flash/phosphor-software-manager/firmware_update.sh30
-rw-r--r--meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup.bb17
-rw-r--r--meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml16
-rw-r--r--meta-ampere/meta-common/recipes-phosphor/ipmi/ampere-ipmi-oem.bb2
-rw-r--r--meta-ampere/meta-common/recipes-phosphor/network/phosphor-network_%.bbappend2
11 files changed, 44 insertions, 75 deletions
diff --git a/meta-ampere/meta-common/recipes-ampere/host/ac01-boot-progress/ampere_boot_progress.sh b/meta-ampere/meta-common/recipes-ampere/host/ac01-boot-progress/ampere_boot_progress.sh
index 7c5edbf68c..c24cc4a0be 100755
--- a/meta-ampere/meta-common/recipes-ampere/host/ac01-boot-progress/ampere_boot_progress.sh
+++ b/meta-ampere/meta-common/recipes-ampere/host/ac01-boot-progress/ampere_boot_progress.sh
@@ -122,7 +122,7 @@ function set_boot_progress()
function log_redfish_biosboot_ok_event()
{
- logger-systemd --journald << EOF
+ logger --journald << EOF
MESSAGE=
PRIORITY=2
SEVERITY=
@@ -135,7 +135,7 @@ function log_redfish_bios_panic_event()
{
boot_state_str=$(get_boot_stage_string "$1" "$2")
- logger-systemd --journald << EOF
+ logger --journald << EOF
MESSAGE=
PRIORITY=2
SEVERITY=
diff --git a/meta-ampere/meta-common/recipes-ampere/host/ac01-boot-progress/dimm_train_fail_log.sh b/meta-ampere/meta-common/recipes-ampere/host/ac01-boot-progress/dimm_train_fail_log.sh
index f1f64c1155..1a65647120 100644
--- a/meta-ampere/meta-common/recipes-ampere/host/ac01-boot-progress/dimm_train_fail_log.sh
+++ b/meta-ampere/meta-common/recipes-ampere/host/ac01-boot-progress/dimm_train_fail_log.sh
@@ -16,7 +16,7 @@ function log_ampere_oem_redfish_event()
msgArgs1=$5
msgArgs2=$6
-logger-systemd --journald << EOF
+logger --journald << EOF
MESSAGE=${msg}
PRIORITY=${priority}
SEVERITY=${severity}
diff --git a/meta-ampere/meta-common/recipes-ampere/network/ampere-usbnet/ampere-usbnet.service b/meta-ampere/meta-common/recipes-ampere/network/ampere-usbnet/ampere-usbnet.service
index 3499543258..461d423ad4 100644
--- a/meta-ampere/meta-common/recipes-ampere/network/ampere-usbnet/ampere-usbnet.service
+++ b/meta-ampere/meta-common/recipes-ampere/network/ampere-usbnet/ampere-usbnet.service
@@ -1,12 +1,14 @@
[Unit]
Description=Ampere Ethernet over USB gadget device
-After=phosphor-ipmi-host.service
+After=multi-user.target
+StartLimitIntervalSec=20
+StartLimitBurst=3
[Service]
-Type=oneshot
-RemainAfterExit=yes
ExecStart=/usr/sbin/ampere_usbnet.sh
-ExecStop=/usr/bin/usb-ctrl ecm usbnet off
+Restart=on-failure
+RestartMode=direct
+RestartSec=5
[Install]
WantedBy=multi-user.target
diff --git a/meta-ampere/meta-common/recipes-ampere/network/ampere-usbnet/ampere_usbnet.sh b/meta-ampere/meta-common/recipes-ampere/network/ampere-usbnet/ampere_usbnet.sh
index ca9357fa3a..fb886c2eab 100644
--- a/meta-ampere/meta-common/recipes-ampere/network/ampere-usbnet/ampere_usbnet.sh
+++ b/meta-ampere/meta-common/recipes-ampere/network/ampere-usbnet/ampere_usbnet.sh
@@ -1,18 +1,22 @@
#!/bin/bash
-ENV_MAC_ADDR=$(fw_printenv ethaddr eth1addr)
+# Get MAC Address from uboot, or fallback to a random
+ENV_MAC_ADDR=
+ENV_MAC_ADDR=${ENV_MAC_ADDR:-"$(fw_printenv -n ethaddr)"}
+ENV_MAC_ADDR=${ENV_MAC_ADDR:-"$(fw_printenv -n eth1addr)"}
+MAC_ADDR=${ENV_MAC_ADDR:-"F8:C2:49:A6:09:3B"}
-MAC_ADDR=$(echo "$ENV_MAC_ADDR" | cut -d "=" -f 2)
-
-if [ -n "$MAC_ADDR" ]; then
- # Generate MAC Address from eth1addr using locally administered MAC
- # https://en.wikipedia.org/wiki/MAC_address#Universal_vs._local_(U/L_bit
- SUBMAC=$(echo "$MAC_ADDR" | cut -d ":" -f 2-6)
- /usr/bin/usb-ctrl ecm usbnet on "06:$SUBMAC" "02:$SUBMAC"
-else
- /usr/bin/usb-ctrl ecm usbnet on
-fi
+# Generate MAC Address using locally administered MAC
+# https://en.wikipedia.org/wiki/MAC_address#Universal_vs._local_(U/L_bit
+SUBMAC=$(echo "$MAC_ADDR" | cut -d ":" -f 2-5)
+/usr/bin/usb-ctrl ecm usbnet off
+/usr/bin/usb-ctrl ecm usbnet on "06:$SUBMAC:01" "06:$SUBMAC:00"
# Use NCM (Ethernet) Gadget instead of FunctionFS Gadget
echo 0x0103 > /sys/kernel/config/usb_gadget/usbnet/idProduct
echo "OpenBMC usbnet Device" > /sys/kernel/config/usb_gadget/usbnet/strings/0x409/product
+
+if [ "$MAC_ADDR" != "$ENV_MAC_ADDR" ]; then
+ # fail and wait for systemd to restart this service
+ exit 1
+fi
diff --git a/meta-ampere/meta-common/recipes-ampere/platform/ampere-utils/ampere_add_redfishevent.sh b/meta-ampere/meta-common/recipes-ampere/platform/ampere-utils/ampere_add_redfishevent.sh
index 1170c6a7ca..ddbf8d7f84 100644
--- a/meta-ampere/meta-common/recipes-ampere/platform/ampere-utils/ampere_add_redfishevent.sh
+++ b/meta-ampere/meta-common/recipes-ampere/platform/ampere-utils/ampere_add_redfishevent.sh
@@ -9,15 +9,15 @@ if [ -z "$registry" ]; then
exit
fi
-# Check if logger-systemd exist. Do nothing if not exists
-if ! command -v logger-systemd;
+# Check if logger exist. Do nothing if not exists
+if ! logger --help | grep journald
then
- echo "logger-systemd does not exist. Skip log events for $registry $msgarg"
+ echo "logger does not support the journald option. Skip log events for $registry $msgarg"
exit
fi
# Log events
-logger-systemd --journald << EOF
+logger --journald << EOF
MESSAGE=
PRIORITY=
SEVERITY=
diff --git a/meta-ampere/meta-common/recipes-phosphor/fans/phosphor-fan_%.bbappend b/meta-ampere/meta-common/recipes-phosphor/fans/phosphor-fan_%.bbappend
index 5a3a67826c..524b5f8ed9 100644
--- a/meta-ampere/meta-common/recipes-phosphor/fans/phosphor-fan_%.bbappend
+++ b/meta-ampere/meta-common/recipes-phosphor/fans/phosphor-fan_%.bbappend
@@ -4,5 +4,5 @@ FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
# To use CurrentHostState to decide host state for phosphor-fan-monitor
PACKAGECONFIG:append = " delay-host-control monitor-use-host-state"
-PACKAGECONFIG[delay-host-control] = "-Ddelay-host-control=20"
+PACKAGECONFIG[delay-host-control] = "-Ddelay-host-control=150"
PACKAGECONFIG[monitor-use-host-state] = "-Dmonitor-use-host-state=enabled"
diff --git a/meta-ampere/meta-common/recipes-phosphor/flash/phosphor-software-manager/firmware_update.sh b/meta-ampere/meta-common/recipes-phosphor/flash/phosphor-software-manager/firmware_update.sh
index c23f2502aa..6e2f12b275 100755
--- a/meta-ampere/meta-common/recipes-phosphor/flash/phosphor-software-manager/firmware_update.sh
+++ b/meta-ampere/meta-common/recipes-phosphor/flash/phosphor-software-manager/firmware_update.sh
@@ -44,22 +44,12 @@ case ${EXTENDED_VERSION} in
CMD="/usr/sbin/ampere_flash_bios.sh $IMAGE 2"
;;
- "scp-primary")
- IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.img" -o -name "*.slim" -o -name "*.rom" \))
- CMD="/usr/sbin/ampere_firmware_upgrade.sh smpmpro $IMAGE 1"
- ;;
-
- "scp-secondary")
- IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.img" -o -name "*.slim" -o -name "*.rom" \))
- CMD="/usr/sbin/ampere_firmware_upgrade.sh smpmpro $IMAGE 2"
- ;;
-
- "eeprom" | "eeprom-primary")
+ "eeprom" | "eeprom-primary" | "scp-primary")
IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.img" -o -name "*.slim" -o -name "*.rom" -o -name "*.bin" \))
CMD="/usr/sbin/ampere_firmware_upgrade.sh eeprom $IMAGE 1"
;;
- "eeprom-secondary")
+ "eeprom-secondary" | "scp-secondary")
IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.img" -o -name "*.slim" -o -name "*.rom" -o -name "*.bin" \))
CMD="/usr/sbin/ampere_firmware_upgrade.sh eeprom $IMAGE 2"
;;
@@ -76,14 +66,18 @@ case ${EXTENDED_VERSION} in
;;
"mbcpld")
- IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.jed" \))
- CMD="/usr/bin/ampere_firmware_upgrade.sh mb_cpld $IMAGE"
+ IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.jed" -o -name "*.bin" \))
+ CMD="/usr/sbin/ampere_firmware_upgrade.sh mb_cpld $IMAGE"
;;
"bmccpld")
- IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.jed" \))
- CMD="/usr/bin/ampere_firmware_upgrade.sh bmc_cpld $IMAGE"
+ IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.jed" -o -name "*.bin" \))
+ CMD="/usr/sbin/ampere_firmware_upgrade.sh bmc_cpld $IMAGE"
+ ;;
+ "bpcpld"*)
+ IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.jed" -o -name "*.bin" \))
+ TARGET="${EXTENDED_VERSION:6}"
+ CMD="/usr/sbin/ampere_firmware_upgrade.sh bp_cpld $IMAGE $TARGET"
;;
-
*)
echo "Invalid ExtendedVersion: ${EXTENDED_VERSION}. Please check MANIFEST file!"
exit 1
@@ -99,6 +93,6 @@ fi
if ! eval "$CMD";
then
- echo "ERROR: The firmware update not successfull"
+ echo "ERROR: The firmware update not successful"
exit 1
fi
diff --git a/meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup.bb b/meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup.bb
deleted file mode 100644
index 1b5a119b1b..0000000000
--- a/meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Copy the inventory cleanup yaml for inventory manager"
-PR = "r1"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
-
-inherit allarch
-inherit phosphor-inventory-manager
-
-S = "${WORKDIR}"
-
-SRC_URI = "file://inventory-cleanup.yaml"
-
-do_install() {
- install -D inventory-cleanup.yaml ${D}${base_datadir}/events.d/inventory-cleanup.yaml
-}
-
-FILES:${PN} += "${base_datadir}/events.d/inventory-cleanup.yaml"
diff --git a/meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml b/meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml
deleted file mode 100644
index 23f54e3319..0000000000
--- a/meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-description: >
- Ampere inventory fixups
-
-events:
- - name: Add Chassis interface
- description: >
- Add the chassis interface on the chassis inventory path
- type: startup
- actions:
- - name: createObjects
- objs:
- /system/chassis:
- xyz.openbmc_project.Inventory.Item.Chassis:
- Type:
- value: "xyz.openbmc_project.Inventory.Item.Chassis.ChassisType.RackMount"
- type: string
diff --git a/meta-ampere/meta-common/recipes-phosphor/ipmi/ampere-ipmi-oem.bb b/meta-ampere/meta-common/recipes-phosphor/ipmi/ampere-ipmi-oem.bb
index 593a3dfe80..a19146d531 100644
--- a/meta-ampere/meta-common/recipes-phosphor/ipmi/ampere-ipmi-oem.bb
+++ b/meta-ampere/meta-common/recipes-phosphor/ipmi/ampere-ipmi-oem.bb
@@ -14,7 +14,7 @@ LIBRARY_NAMES = "libzampoemcmds.so"
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/openbmc/ampere-ipmi-oem.git;branch=master;protocol=https"
-SRCREV = "2491e06d4a832d34dfd439ff11d6edd5ca4fb443"
+SRCREV = "ee2e1df6ca5fd87b401d4eb15b80224f3025a612"
HOSTIPMI_PROVIDER_LIBRARY += "${LIBRARY_NAMES}"
NETIPMI_PROVIDER_LIBRARY += "${LIBRARY_NAMES}"
diff --git a/meta-ampere/meta-common/recipes-phosphor/network/phosphor-network_%.bbappend b/meta-ampere/meta-common/recipes-phosphor/network/phosphor-network_%.bbappend
new file mode 100644
index 0000000000..74a5fb2aef
--- /dev/null
+++ b/meta-ampere/meta-common/recipes-phosphor/network/phosphor-network_%.bbappend
@@ -0,0 +1,2 @@
+PACKAGECONFIG:append = " sync-mac"
+EXTRA_OEMESON:append = " -Dforce-sync-mac=false"