summaryrefslogtreecommitdiff
path: root/meta-ampere/meta-common
AgeCommit message (Collapse)AuthorFilesLines
2021-08-04meta-ampere: power control: refactor power soft/off functionsThuBaNguyen5-59/+51
The current ampere-hostctl package removes the power off/on services of phosphor-state-manager and uses Ampere services. This solution is not correct. Ampere platform should use power control functions of phosphor-state-manager. And only appends or overides the default services by Ampere's services if need. By default, to handle power soft action, phosphor-state-manager will trigger obmc-host-shutdown@0.target. This target then call xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service to request OS shutdown. When the host OS shutdown is already done, the target will trigger obmc-chassis-poweroff@0.target to turn off the chassis. The default xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service uses Ipmi inband to communicate with the host. It is different with Ampere Mt.Jade platform. We use the GPIO pin SHD_REQ to request shutdown the host OS. The host will trigger SHD_ACK when shutdown is done. So *.Ipmi.Internal.SoftPowerOff.service will be overide by Ampere service named ampere.*.Ipmi.Internal.SoftPowerOff.service. This service will trigger SHD_REQ pin and wait for SHD_ACK before start obmc-chassis-poweroff@0.target. This commit removes ampere-chassis-poweroff, ampere-host-shutdown serives which handle power off/soft actions and restore phosphor-state-manager's services. It also supports ampere.xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service which will overide xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service. Tested: 1. Create "power soft" actions use ipmitool, redfish and BMC web. 2. Make sure the power order will be shutdown the host then power of the chassis. 3. Create "power off" actions use ipmitool, redfish and BMC web. 4. Make sure the power action will be power off the chassis. Signed-off-by: ThuBaNguyen <thu@os.amperecomputing.com> Change-Id: Ibc0dc8c62408e8282520c9b70e41ab75c10137f6
2021-07-30meta-ampere: phosphor-sel-logger: Use packageconfigWilliam A. Kennington III1-2/+1
This makes it possible for us to change out build specific settings. Change-Id: I862366d8efa97c4c3181b842662bf28dd5bec270 Signed-off-by: William A. Kennington III <wak@google.com>
2021-07-28meta-ampere: network: enable nic-ethtoolHieu Huynh1-0/+1
The SpeedMbds of ethernet interface is implemented in getInterfaceInfo() from the phosphor-networkd repo. It is disabled by NIC_SUPPORTS_ETHTOOL conditional compilation. The default compile mode is to omit the getInterfaceInfo() which causes the SpeedMbps not set. This commit supports enable the NIC_SUPPORTS_ETHTOOL to report correct speed. Tested: 1.Get SpeedMbps via rest: $ curl -XGET --user root:0penBmc -H "Content-Type: application/json" \ -H "If-match: *" --insecure \ https://10.38.14.2/redfish/v1/Managers/bmc/EthernetInterfaces/eth1 \ grep | "SpeedMbps" 2.Get speed of eth1 interface on BMC console $ cat /sys/class/net/eth1/speed The value getting from openbmc#1 and openbmc#2 match together. Signed-off-by: Hieu Huynh <hieuh@os.amperecomputing.com> Change-Id: I57047151fc4eea08c857b95c0770d89ba95f9bc7
2021-06-13meta-ampere: mtjade: support PSU present detection via GPIOChanh Nguyen1-0/+1
It checks GPIO key for powersupply presence, and creates the inventory object. Tested: 1. Plug the PSU, check busctl command for Present attribute 2. Plug out the PSU, check busctl command for Present attribute $ busctl --no-pager introspect xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0 Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com> Change-Id: I4520d537d425249debe5c0d8c6bf8b0f6e3c5b34
2021-02-09meta-ampere: Set BMC MAC Address from FRU inventoryThang Q. Nguyen3-0/+81
Support to get BMC MAC address from FRU over the FRU inventory information (/xyz/openbmc_project/inventory/system/chassis/motherboard) and update to the eth0 Ethernet interface and set the eth1addr u-boot variable. Tested: 1. Boot to u-boot, clear the eth1addr variable, save and reboot. 2. Boot to Linux: - Check if the eth0 interface uses the MAC address in FRU. root@mtjade:~# ip addr show dev eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 70:e2:84:86:76:ba brd ff:ff:ff:ff:ff:ff - Check if the eth1addr u-boot variable uses the MAC address in FRU root@mtjade:~# fw_printenv eth1addr eth1addr=70:E2:84:86:76:BA Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com> Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: Ifb7eefbb17257545d026005f859d37ef562289b7
2021-02-01meta-ampere: support Redfish event logThang Q. Nguyen9-0/+132
Enable system event log for Redfish. It includes the setting to: - Enable sel-logger module which logs the sensor event into the systemd log. - Enable the rsyslog (intel module) to sync the sensor events from systemd to /var/log/redfish. The file will be used by Redfish. - Configure the backend and redfish to get the system log from the /var/log/redfish instead of system d-bus - Enable Redfish journal log Tested: Verify event logs appear in: 1. Redfish: /redfish/v1/Systems/system/LogServices/EventLog/Entries 2. Redfish: /redfish/v1/Managers/bmc/LogServices/Journal/Entries 3. WebUI: /server-health/sys-log at Event type. Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I3753e2932ec1dc83cdbe0708173531930df65254
2021-02-01meta-ampere: mtjade: Add Host firmware update supportThang Q. Nguyen3-0/+22
Enable flash_bios feature and configure to use backend script to flash UEFI firmware via Redfish, WebUI and Rest. Tested: 1. Flash UEFI firmware via WebUI. 2. Flash UEFI firmware via Redfish UpdateService 3. Flash UEFI firmware via Rest interface. Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I772e6a409414e374ed01e72e3c69985d0b413cb5
2021-02-01meta-ampere: Support virtual Ethernet over USB deviceThang Q. Nguyen4-0/+143
Implement systemd service to create an Ethernet over USB interface for communication between CPU and BMC. Tested: 1. Check usb0 ethernet interface in BMC console root@mtjade:~# ifconfig usb0 usb0 Link encap:Ethernet HWaddr DA:F7:E9:A3:5A:0C inet addr:192.168.0.10 Bcast:192.168.255.255 Mask:255.255.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:2 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:412 (412.0 B) 2. Check USB Ethernet device on Host Linux $ lsusb | grep Ethernet Bus 001 Device 004: ID 1d6b:0103 Linux Foundation NCM (Ethernet) Gadget Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com> Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: Icb7c096df426233e8f2ee7318f2a1805f07ab3a7
2021-02-01meta-ampere: Support Ampere power controlTung Nguyen14-0/+325
Implement the Ampere power control requirements for Altra system. Tested: - Check the ipmi commands: ipmi power on/off/soft/reset/cycle - Check the redfish commands: On, Off, ForceOn, ForceOff, GracefulShutdown, GracefulRestart, ForceRestart, PowerCycle Signed-off-by: Tung Nguyen <tungnguyen@os.amperecomputing.com> Change-Id: Id0c64c1284a6338ce47ca720d0ef75e99d21aa3c