summaryrefslogtreecommitdiff
path: root/meta-ampere/meta-common
AgeCommit message (Collapse)AuthorFilesLines
2023-10-23meta-ampere: mtmitchell: enable MCTP/PLDMThang Q. Nguyen4-0/+50
Enable MCTP in kernel support with Mt.Mitchell MCTP configuration. Tested: 1. Check for mctpi2c3 in ifconfig command. 2. Check for mctpd.service service started and is in running state. 3. Check for pldmd.service service started and is in running state. Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I699e9bc93ae5815b8454a8cc42ec22d4cfd735e1
2023-10-16meta-ampere: mtjade: update scripts with new gpio linenameThu Nguyen2-0/+14
Mt.Jade GPIO line-names are updated to follow naming convention at https://github.com/openbmc/docs/blob/master/designs/device-tree-gpio-naming.md. This commit updates related scripts to use the correct linenames. Tested: Check below features to work as before: + UEFI and SCP firmware update. + Host power control + Ampere UART mux switch + SCP failover Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I080f844047618327042a7742d3fa6423b62be744
2023-10-14meta-ampere: mtmitchell: use standard gpio commandsThang Q. Nguyen1-12/+10
Change to use gpioset and gpioget to set value for output GPIOs and read value for input GPIOs. This commit also corrects GPIO base numbers which are changed in Linux kernel 6.5 Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I802f9d777537ff28f94945006b6582b15523e3a8
2023-07-31meta-ampere: bmcweb: replace deprecated schemas with new schemasThang Tran1-0/+2
In the Redfish Data Model Specification, it deprecated Power and Thermal schemas from v1.7 version (release on 2020.4). It used PowerSubsystem and ThermalSubsystem instead. This commit replaces deprecated Power/Thermal schemas with PowerSubsystem/ThermalSubsystem schemas. Tested: 1. The /redfish/v1/Chassis/<ChassisId>/<Power | Thermal> schemas have been removed. 2. The /redfish/v1/Chassis/<ChassisId>/<PowerSubsystem | ThermalSubsystem> schemas have been added. Change-Id: I4868cde726c07f68fc94986d9659fc9377bdaf5e Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
2023-07-06meta-ampere: gpio-monitor: move services to meta-commonThang Q. Nguyen5-0/+38
Move services that are used across Ampere platform to meta-ampere/meta-common to prevent duplicate codes. Tested: 1. Compile Mt.Jade and Mt.Mitchell without error. 2. From Host OS run 'reboot' command and check if the BMC handles correctly. 3. From Host OS run 'shutdown' command and check if the BMC handles correctly Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I678d9a19fea0a531ad59d54ea9386cb177af18c6
2023-06-09meta-ampere: mtmitchell: ipmi: support on-board sensor reportHieu Huynh1-0/+2
Support to report sensor information via IPMI for on-board sensors Tested: 1. Check sensor report using IPMI sdr command: $ ipmitool sdr list OutletTemp | 28 degrees C | ok Psu1InletTemp2 | 32 degrees C | ok PcieZoneTemp1 | 30 degrees C | ok Psu0InletTemp2 | 29 degrees C | ok PcieZoneTemp2 | 28 degrees C | ok Signed-off-by: Hieu Huynh <hieuh@os.amperecomputing.com> Change-Id: Ia38519c79596f65f780fe105ee25e8890825a44f
2023-06-09meta-ampere: mtmitchell: add some helper utilsThang Q. Nguyen3-0/+345
Add some help scripts to help users easier to debug systems from BMC console. Tested: 1. New helper scripts are available from BMC console. 2. Manually check script execution Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: Ibe93547d1299768ae8d67440f161c86c29dbb61e
2023-05-29meta-ampere: fix postinstall scriptlets errorThang Q. Nguyen1-3/+0
Fix compilation error after subtree update: ERROR: obmc-phosphor-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['ampere-sysfw-hang-handler'] have failed. If the intention is to defer them to first boot, then please place them into pkg_postinst_ontarget:${PN} (). Deferring to first boot via 'exit 1' is no longer supported. Tested: 1. Compile Mt.Jade and Mt.Mitchell without error 2. Check ampere-boot-progress and ampere-sysfw-hang-handler work. Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I5d692cb4078df05ac20ace34429463ea4e9c18ca
2023-05-12meta-ampere: state: enable checkACLoss while recoveringThang Tran1-0/+1
Commit phosphor-state-manager@e960184 corrects the code logic that relates to only-run-apr-on-power-loss option build. Users have to set only-run-apr-on-power-loss=true to enable checking AC loss while recovering Host. This commit enables this option. Tested: 1. Set chassis policy to always-on. $ipmitool chassis policy always-on 2. Power off the HOST $ipmitool power off 3. AC power. 4. Host is turned on after BMC has been rebooted 5. Set chassis policy to always-off. $ipmitool chassis policy always-off 6. Power on the HOST $ipmitool power on 7. AC power. 8. Host is turned off after BMC has been rebooted 9. Set chassis policy to previous $ipmitool chassis policy previous 10. Power off the HOST $ipmitool power ff 11. AC power. 12. Host is turned off after BMC has been rebooted 13. Power on the HOST $ipmitool power on 14. AC power. 15. Host is turned on after BMC has been rebooted Change-Id: Ic7bdcdfebc0df415232fc2677e464cca3f341366 Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
2023-05-12meta-ampere: ipmi: disable dynamic-sensorsThang Q. Nguyen1-3/+0
Both Mt.Jade and Mt.Mitchell platforms use yaml to declare IPMI configuration, not dynamically calculated via entity-manager's minValue and maxValue. So, having dynamic-sensors enabled by default is not correct. Instead of enabling dynamic-sensors for ipmitool fru print to use information from EM, should add more option for this feature instead. Tested: 1. Verify if ipmitool sdr list can report sensor information correctly Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I3d7d4a692e059367e9edea38a6230b4a2112d602
2023-05-11meta-ampere: move ipmi config to commonThang Q. Nguyen3-0/+182
The same channel_config.json and power_reading.json are used across Ampere platforms so move to meta-ampere/meta-common to avoid duplicate. Tested: 1. Check if "ipmitool lan print 1/2/3" works. 2. On Mt.Jade, check if "ipmitool dcmi power reading" works Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I77f401d0b74455c3951fb746f8bea2ddb1c3667b
2023-05-10meta-ampere: ac01: fix boot progress service warningThang Q. Nguyen1-2/+0
Fix below warning when starting the ampere-boot-progress.service service: [ 12.365381] systemd[1]: /lib/systemd/system/ampere-boot-progress.service:7: Failed to parse service restart specifier, ignoring: simple Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I0b7aa013b27e23f995745f7a5bebbaa39024eea2
2023-05-08meta-ampere: add fault monitor supportThang Q. Nguyen3-0/+47
Support to detect GPIO, PSU, FAN, ... faults and turn ON/OFF fault LED. Tested: 1. Unplug a PSU and check if Fault LED is turned ON. 2. Unplug a FAN and check if Fault LED is turned ON. 3. Stimulate GPIO fault pattern and check if the BMC can detect Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Signed-off-by: Hieu Huynh <hieuh@os.amperecomputing.com> Signed-off-by: Quang Nguyen <quangn@amperecomputing.com> Change-Id: Idfcd32953cf811fbe9299a162f604cb8fd028962
2023-05-04Update to libpam 1.5.2Joseph Reynolds6-53/+16
This updates to libpam 1.5.2. This version removes support for pam_cracklib and pam_tally2. They are replaced by pam_pwquality and pam_faillock respectively. Since parameters of pam_cracklb and pam_tally2 are configurable through Redfish, it's possible that they will remain in the overlay of /etc/pam.d with the old module names preventing PAM from working correctly. To avoid this, this commit includes a script that will detect if the old modules are in the overlay and update the overlay with the new modules and configuration. The script will allow updates from libpam 1.3.1 to libpam 1.5.2, but if there are configured parameters during a downgrade from libpam 1.5.2 to libpam 1.3.1, it will require a factory reset before the downgrade. pam_pwquality was selected over pam_passwdqc because of better security and compatibility with pam_cracklib. Note pam_faillock is necessarily configured into the pam module stack differently than pam_tally2. This patchset causes a BMC operational change: - The pam_tally2 command (invoked from the BMC's command line) is no longer present. If you used the "pam_tally2 -u USER -r" command to unlock a user after repeated authentication failures, change to use: faillock --user USER --reset Compatibility note / migration issue. If your BMC cannot authenticate users after installing this change, the cause might be an overlayfs file hiding the new /etc/pam.d/common-auth file. To find out, use `grep deny= /etc/pam.d/common-auth` on your BMC. If it shows "tally2" then your BMC is affected. The recovery is to delete the overlay file, to factory reset the BMC, or manually-install the changed files. The convert-pam-configs service is intended to handle this problem. Tested: as follows, for local users only (not tested with LDAP) Note OpenBMC configuration defaults to an AccountLockoutThreshold value of 0 which does not lock account passwords no matter how many consecutive failed authentication attempts. To configure this on the BMC, for example, use: curl -X PATCH https://${bmc}/redfish/v1/AccountService -d '{"AccountLockoutThreshold": 3, "AccountLockoutDuration": 60}' Tested update scenarios: 1. Install from scratch. Success. 2. Install over firmware which had old PAM configs. Success. Tested update scenarios for the convert-pam-configs service. Tested changing the password via various interfaces: - the passwd command - the PATCH Refish AccountService {Password: NEW} - SSH (accessible only when the password is expired) - IPMI user set password (accessible for unexpired password) Tested both good and bad (unacceptable) passwords. Tested account lockout after N bad passwords Tested unlock via Redfish. Also, because its implementation changed, ensure reading and writing the D-Bus User AccountPolicy RememberOldPasswordTimes property continues to work. There is no Redfish API for this. Signed-off-by: Joseph Reynolds <joseph-reynolds@charter.net> Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com> Change-Id: I7b712cf7cfbf7b0bc79da42f822540baee66ca4f
2023-04-21meta-ampere: usbnet: explicit configure usb0 as static IPThang Q. Nguyen1-0/+1
usb0 is a virtual USB Ethernet which is configured to static IP 192.168.0.10 in /etc/systemd/network/00-bmc-usb0.network without DHCP parameter with expecting that DHCP=no. However, IPMI and Redfish report IP source as DHCP, not static. This commit explicitly specifies in network configuration as DHCP=no so that IPMI and Redfish report correctly. Tested: 1. Check address source for usb0 via IPMI # ipmitool lan print 3 | grep "IP Address Source" IP Address Source : Static Address 2. Check address source for usb0 via Redfish Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: Id14bfc289da6d36552bd37448ec1e4c30ff32a0a
2023-04-16meta-ampere: ac01: boot-progress: update dimm training fail logThang Q. Nguyen4-4/+201
This commit is to log DIMM training fail information in case DDR initialized is fail. Tested: Inject DDR error and verify with Redfish and/or sel log: 1. IPMI chassis power off 2. tweak nvparam to inject DDR error 3. IPMI chassis power on 4. Read sel log and/or Redfish to confirm correct DDR event is logged Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I2a87c9b775faf17b8112d08eff4df44286a444bc
2023-04-10meta-ampere: remove env call from service fileThang Q. Nguyen1-1/+1
We are suppose to use direct executable calls in service files rather than indirections through /bin/env (See Anti-patterns). Tested: - Check related services to work like before Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: Idb494ce781fa1bdcac176cd89612e6016e6e04d9
2023-03-15meta-ampere: phosphor-fan: Use monitor package configurationsChau Ly1-0/+8
This commit enables package configurations delay-host-control=20 and monitor-use-host-state, in order to delay and rescan before turning host off when fan sensors are not detected after power state changes from Off to On; and use CurrentHostState to decide host state for phosphor-fan-monitor instead of pgood state. Tested: 1. Host is ON, reboot BMC => Host is not turned off unexpectedly during BMC boot up 2. Power cycle host => fan sensors are not marked as non-functional Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: Iea6ed195a42e41bee23066e670b67c19bcfda722
2023-03-08meta-ampere: pam: set default unlock time to 1800Thang Q. Nguyen1-1/+1
Ampere account lockout policy is defined as: 'Five consecutive failed login attempts will lock the account for 30 minutes". While the login attempt was set to 5 already, the 30-minute lock period (auto-unlock) has not been set. This commit adds the missing 30-minute lockout by default. Tested: 1. Enter WebUI -> User management 2. Click on Account policy settings and check if: - Max failed login attempts: 5 - User unlock method: Automatic after timeout - Timeout duration (seconds): 1800 Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: Ieed9a719c424a289687e66314f4c68de5d108b6e
2023-02-21meta-ampere: mac-update: MAC update with static IPHuyLe1-0/+23
When the IP Address is configured to static IP, changing BMC MAC Address in FRU does not change the MAC address in eth0. This commit fixes the issue by adding IPMI MAC address update and some other configuration via ipmitool lan set commands to ampere_update_mac.sh to ensure the update is taking effect. Signed-off-by: HuyLe <hule@amperecomputing.com> Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: Ib0466ee130af6d294fed03587c4d96328221d017
2023-02-21meta-ampere: support software revision using Ampere formatHieu Vu1-0/+17
OpenBMC uses os-release.bbappend to control the FW version, which is the output of 'git describe --dirty --long'. The format of this command's output is: {annotated-tag-name}-{num-commits-to-tag}-{current-commit-hash}. '-dirty' will be appended to the output if the working space is not clean. In addition, git describe --dirty --long only find an annotated tag, not lightweight tag which will miss internal release. This commit updates the rule to extract the right revision from Ampere build and release tag. Tested: tag with v1.02.100-ampere and check WebUI display revision 1.02.100. Signed-off-by: Thu Cao <thcao@os.amperecomputing.com> Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: I6d5e6d2dcdb4988809f71d48a5b0e2710e7810d2
2023-01-30meta-ampere: Change login attempt default thresholdChau Ly2-0/+22
The default login attempt threshold is currently 0. This patch changes the value to 5 to match with Ampere's functional specification. Test: 1. Login via web and check Account policy settings 2. Default value at "Max failed login attempts Value must be between 0 – 65535" is 5 Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: I3b46d23f02b8c64ce27fd68cda335fe4550f926f
2023-01-13meta-ampere: mtjade: Support host consoles loggerChau Ly3-0/+138
This commit supports phosphor-hostlogger in STREAM mode, to forward the byte stream from obmc-console to rsyslog via the imuxsock module. The logs can be obtained in /var/log/. The logs are rotated by logrotate. The size threshold of cpu console is 256KB and the others are 64KB. Each log is polled every 1 minute to check if its file size exceeds the threshold to rotate it to the new file. Each console can be saved in up to 2 log files. Tested (CPU console): 1. Change the mux of CPU console to BMC $ ampere_uartmux_ctrl.sh 1 2 2. Connect to CPU SOL console $ ssh root@<BMC_IP> -p 2200 3. Execute commands in the CPU SOL console => The console output on CPU SOL console will all be logged to /var/log/obmc-console-cpu.log => The log will be rotated to /var/log/obmc-console-cpu.log.1 if the original log file size exceeds 256KB every 1min poll Signed-off-by: Chau Ly <chaul@amperecomputing.com> Change-Id: I5586d1c634ec0f244069b868bd48b75560520dc1
2022-12-09meta-ampere: mtjade: fix target dependencyThang Q. Nguyen2-3/+3
Some targets were changed in phosphor-state-manager at commit 86a1ebf9 "move chassis power services to phosphor-state-manager" which makes our dependency incorrect. This commit fixes the target dependency to work with new change Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I2c2b321161db367a86b5c1dc86071abab04f03b9
2022-11-24meta-ampere: mtjade: bind smpro driverThang Q. Nguyen1-0/+4
Add script to bind smpro driver when the Host is available but it is not bound before. This helps applications that use smpro driver works. Tested: 1. Do A/C the system. 2. Turn ON the Host 3. Check if smpro nodes are available # ls /sys/bus/i2c/drivers/smpro-core/ 2-004e 2-004f bind uevent unbind Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I6f96dc1f78ab77dae29bdc266949dcf7845de68c
2022-11-18meta-ampere: support Altra Boot Progress handlingThang Q. Nguyen4-0/+248
Handle Altra Boot Progress reported from SCP regiter map by the use of smpro-misc driver. Tested: check boot progress is updated in Redfish for: 1. Reboot Host. 2. IPMI chassis power reset 3. IPMI chassis power cycle 4. IPMI chassis power off, then on 5. WebUI Orderly – OS shuts down, then server reboots 6. WebUI Immediate – Server reboots without OS shutting down Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I9483328ccf5731904d0e6e71074561f7dd743bed
2022-11-08ampere-ipmi-oem: srcrev bump db24557c20..2a19152956Andrew Geissler1-1/+1
Thang Tran (1): Support IPMI OEM command to edit BMC MAC Address Change-Id: I0429e47d9831f2cd49bdda344760b28a33c41a19 Signed-off-by: Andrew Geissler <openbmcbump-github@yahoo.com>
2022-11-02Remove PACKAGECONFIG for nic-ethtoolJason M. Bills1-1/+0
The nic-ethtool option was removed from phosphor-network, so we also need to remove the PACKAGECONFIG option to build the phosphor-network bump. Tested: Confirmed that the latest phosphor-network builds successfully. Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com> Change-Id: Id1e12f3f2af2450500ec6c0b2acef284cb69d0a7
2022-10-25meta-ampere: mtmitchell: support Host firmware updateChanh Nguyen1-21/+27
Support Host firmware update for HostFW, EEPROM and FRU via BMC console and Redfish. Tested: 1. Flash firmwares via BMC console. 2. Flash firmware via Redfish 3. Get MB CPLD firmware revision $ ampere_firmware_version.sh mb_cpld MB CPLD CPLD Version: 22060268 CPLD DeviceID: 612BE043 Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com> Change-Id: I1cfbe4832b7d57168e2ea1df0059e23ada1b3b6d
2022-10-10meta-ampere: bmcweb: set http-body-limit to 65Thang Q. Nguyen1-0/+1
Ampere Mt.Jade platform has 64MB SPI-NOR but the default http-body-limit is just 30. It makes firmware update via WebUI or Redfish is fail to work when many features added. This commit increases the http-body-limit value to 65 to avoid firmware update failure. Tested: 1. Add full Mt.Jade features and verify if firmware update works well Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: If042a29aea8fe274194578326e2868e084d626e6
2022-10-06meta-ampere: refactor drivers binder servicesThu Nguyen3-0/+58
Use obmc-power-already-on target to trigger ampere-power-on-driver-binder scripts instead of intergrating code to ampere-host-check service. Use obmc-host-already-running target to trigger ampere-host-on-driver-binder scripts. Add ampere-power-on-driver-binder service. Tested: 1. ampere-power-on-driver-binder scripst should be called when the chassis-power-control pin is triggered and only when the drivers are not bound. 2. ampere-host-on-driver-binder scripts will be called when the host is already on, right after host0-ready. Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I02f83d60a603dbc8d214534a13162f504c8c7deb
2022-10-06meta-ampere: support ampere power/host already on targetsThu Nguyen5-0/+48
There are no targets to identity the already on of power state and the already running of host state. This commit adds those targets. The targets will be the check points to start ampere services such as drivers binder, hang detection... obmc-power-already-on@.target will be always activated when chassis-power-control is asserted. It will be deactivated before deasserting chassis-power-control. obmc-host-already-on@.target will be activated when the host%i-ready is triggered. The target will be deactivated before turning off/reseting the host. Tested: 1. The targets should be activated/deactivated as designing. Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I09a8b94d8043f31f7cee83b29765f7e2c7a5c35a
2022-08-16ampere-ipmi-oem: srcrev bump 14b2feea99..db24557c20Andrew Geissler1-1/+1
Thang Q. Nguyen (1): MAINTAINERS: remove file Change-Id: I8d759bba932e9727c4baa0bf914e7e553ef12d24 Signed-off-by: Andrew Geissler <openbmcbump-github@yahoo.com>
2022-08-09meta-ampere: ampere-ipmi-oem: convert cmake to mesonHieu Huynh1-4/+2
Change build option from cmake to meson as the ampere-ipmi-oem repository already changed to meson build. Tested: - Support Get System Interface Capabilities command - Support Clear Message Flags command - Support IPMI Sync RTC time to BMC command Signed-off-by: Hieu Huynh <hieuh@os.amperecomputing.com> Change-Id: Ibf9036145069f5867849222c9925720f2c19e00f
2022-08-05ampere-ipmi-oem: srcrev bump 90a4fb85e8..14b2feea99Andrew Geissler1-1/+1
Thang Q. Nguyen (1): OWNERS: switch 'matches' to 'matchers' Change-Id: I36f1b6afb4dc3f569162672028f2506451f26091 Signed-off-by: Andrew Geissler <openbmcbump-github@yahoo.com>
2022-08-05ampere-ipmi-oem: srcrev bump 4c556399c7..90a4fb85e8Andrew Geissler1-1/+1
Hieu Huynh (1): Convert project to meson and C++20 Change-Id: If7bd84c84c24774f4f310119e6178d987776ae85 Signed-off-by: Andrew Geissler <openbmcbump-github@yahoo.com>
2022-07-15meta-ampere: flash: enable dual-imageThang Q. Nguyen1-1/+1
Ampere reference platforms all have 2 SPI-NOR for BMC. This commit enables static-dual-image feature inside phosphor-software-manager so that the WebUI reports BMC revision for both BMC images. Tested: 1. Flash 2 different BMC firmware images with different versions into 2 SPI-NOR devices. 2. Check on WebUI for BMC Firmware information for correct version reported. Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: Iee585ed5089d73e5160d94122f160b3d18a122d5
2022-07-14meta-ampere: mac-update: validate MAC AddressThang Q. Nguyen3-4/+95
All Ampere developed platforms have BMC MAC Address specified in the FRU EEPROM at Board Extra. This commit moves the script to get MAC Address from FRU EEPROM to common folder so that later platforms can use it. It also adds checking for valid MAC Address before using. Tested: 1. Update BMC MAC Address using IPMI OEM Write BMC MAC Address command. Reboot BMC and ensure the new MAC is used. 2. Write the FRU with invalid value at Board Extra. Reboot BMC and check for BMC still uses old MAC Address Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I29a44a9b4965bea1b6d8d7d55536d25bb0dd924c
2022-07-08obmc-phosphor-button: switch to meson buildGeorge Liu1-1/+1
George Liu (5): meson: Add subprojects file meson: Add meson build logging: switch to lg2 meson: Update LONG_PRESS_TIME_MS Fix meson build Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I4facd30b1c25e3b1bf60190ed5477ea75ee0c2b5
2022-06-22meta-ampere: state-manager: disable host boot retryThu Ba Nguyen1-1/+4
Ampere system supports host EEPROM failover which switches boot EEPROM from main to secondary EEPROM when the system is failed to boot. This causes trying to reboot the system after the first failure of power on is unnecessary. This commit changes boot retry from 3 to 1. Tested: 1. Make sure BMC does not retry to power on the host after first failure. Signed-off-by: Thu Ba Nguyen <tbnguyen@amperecomputing.com> Change-Id: I3bfdabc7ab968a9b673ffec9ae5dc208966a548a
2022-06-21meta-ampere: mtjade: enable button with long press 5sThang Q. Nguyen1-0/+1
Enable Power and Reset button support with configuring long press time for Power button is 5s. Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I940f4549b9a1c50ebc96dc6a063cea3bad95daa8
2022-06-03meta-ampere: refine code structureThang Q. Nguyen14-40/+90
Restructure Ampere recipes to better reuse existing resource for multiple platforms later. Tested: 1. Compile without error. 2. Run regression test for related features without error. Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I5d034d21273b99be651f20dc2eb5549c1092f079
2022-05-11meta-ampere: adjust phosphor-ipmi-host PACKAGECONFIGPatrick Williams1-1/+1
The bbappend was previously defining a PACKAGECONFIG but that PACKAGECONFIG was already defined in the base recipe. I suspect the intention was to _enable_ the existing PACKAGECONFIG. Adjust accordingly. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9f88451454fc1de8b6bb43caa3657c65cafd3b0d
2022-03-18meta-ampere: remove creating host@%i-on fileThang Tran2-4/+0
The /run/openbmc/host@0-on file is created/removed by phosphor-state-manager, platform should not touch to this file. Host-on-host-check service is called by obmc-host-startmin target, it is not depended on the /run/openbmc/host@0-on file. This file is only used during BMC booting phase. Tested: 1. Turn off/on the host 100 times. 2. Check the sel log. ipmitool sel list 3. BMC does not display any log relate to over threshold. 4. Check the host-on-check service is called before host'state is running Signed-off-by: Thang Tran <thuutran@amperecomputing.com> Change-Id: I1ec90a00a7685007e31b89876ff2a5d57191fc53
2022-03-18meta-ampere: move IPMI power soft to commonThang Q. Nguyen3-0/+39
Ampere processor uses ACPI graceful shutdown which is triggered from BMC via a GPIO pin named SHD_REQ. This feature is common for all Ampere platforms. This commit moves the configuration for IPMI power soft to meta-ampere/meta-common so other platforms can use without changes Tested: 1. Do A/C power the system and boot the Host to OS. 2. Run ipmitool chassis power soft 3. Check if the Host is graceful shutdown. Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I8a3425c859c4be077075e6a51f12d50283eacdf7
2022-03-17meta-ampere: fix parameters in power control servicesThang Tran1-0/+1
When HOST is turned on/off, ampere-gpio-poweroff/on@.service is called. They should not call op-wait-power-off/on@.service, just wait for them. Remove redundant "Requires" and "Wants" in service files. Add timeout to obmc-flash-host-bios@.service to avoid blocking power control. Tested: 1. Turn on/off the HOST power. 2. Check journalctl log to ensure that op-wait-power-off/on@.service are not called by ampere-gpio-poweroff/on@.service. Signed-off-by: Thang Tran <thuutran@amperecomputing.com> Change-Id: If9403891b2e57c73c4fd8e0ea1b24314b7b0c3f8
2022-03-13meta-ampere: Support Ampere password policyHieu Huynh2-0/+34
Implement Ampere password policy as followings: - Password must between 9-20 characters, 1 lower case, 1 upper case, one digit and 1 special character. - No more than 3 consecutive identical characters. Signed-off-by: Hieu Huynh <hieuh@os.amperecomputing.com> Change-Id: I20134f51e06ef0aabeddfc4d1560acfa7483deab
2022-03-01meta-ampere: use watchdog status to check A/C powerThang Q. Nguyen2-6/+0
With the removal of u-boot patch that adds resetreason to /proc/cmdline no information to check if the BMC is booted from A/C power or cold reboot. This commit removes the dependency of resetreason on the phosphor-discover-system-state application and updates the A/C power check in the ampere_platform_init.sh script to use information from /sys/class/watchdog/watchdog0/bootstatus. Tested: 1. Check power restore policy feature work well. 2. Check ampere_platform_init.sh works properly in both A/C and D/C power. Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I4f2e7a241f9ddebf21b2b8c021b9ce87a1c8b26c
2022-02-19meta-ampere: enable Host check GPIO interfaceThang Q. Nguyen5-6/+61
Enable host-gpios option in phosphor-state-manager to support Host state checking when BMC reboots. Also updateampere_host_check.sh to check Host State via GPIO interface Tested: 1. Define host0-ready into device tree. 2. Power On the Host. Reboot BMC, then check if CurrentHostState shows Running. 3. Power OFF the Host. Reboot BMC, then check if CurrentHostState shows Off. Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Signed-off-by: Thang Tran <thuutran@amperecomputing.com> Change-Id: I0331dfa340eb5bba201475ab9cada42e0946c8f8
2022-02-18meta-ampere: ipmi-oem: add missing pkgconfig dependencyThang Q. Nguyen1-1/+1
Add inherit contrain pkgconfig on the ampere-ipmi-oem application so that it can be compiled successfully. Tested: 1. Compile Mt.Jade OpenBMC without error. Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com> Change-Id: I62c93fbd6f9789e03a961d03c2801e04237b302b