blob: b2d3b5ef36aed73fc71238d006404e4b8e77829e [file] [log] [blame]
Brad Bishop93fb5352015-09-09 03:59:20 +00001# Common code for generating Phosphor OpenBMC images.
2
3# Additional IMAGE_FEATURES available with Phosphor OpenBMC:
4#
Brad Bishop51ca97e2017-01-26 10:49:22 -05005# - obmc-bmc-state-mgmt - OpenBMC BMC state management
Brad Bishopb52116a2020-08-10 20:45:15 -04006# - obmc-bmcweb - OpenBMC webserver
Brad Bishop51ca97e2017-01-26 10:49:22 -05007# - obmc-chassis-mgmt - OpenBMC chassis management
8# - obmc-chassis-state-mgmt - OpenBMC chassis state management
Brad Bishop8c09b142020-08-11 08:20:31 -04009# - obmc-console - OpenBMC serial over LAN
Brad Bishopb52116a2020-08-10 20:45:15 -040010# - obmc-dbus-monitor - OpenBMC dbus monitoring
Brad Bishope3fe5782020-08-10 20:20:47 -040011# - obmc-devtools - OpenBMC development and debugging tools
Brad Bishop4824d4c2017-05-01 11:54:34 -040012# - obmc-fan-control - OpenBMC fan management
13# - obmc-fan-mgmt - Deprecated - use obmc-fan-control instead
Brad Bishop51ca97e2017-01-26 10:49:22 -050014# - obmc-flash-mgmt - OpenBMC flash management
Brad Bishopc1371fd2020-08-18 19:30:11 -040015# - obmc-fru-ipmi - OpenBMC IPMI FRU EEPROM support
Vijay Khemkad549dee2020-09-08 11:56:19 -070016# - obmc-health-monitor - OpenBMC health monitoring
Brad Bishop51ca97e2017-01-26 10:49:22 -050017# - obmc-host-ctl - OpenBMC host control
18# - obmc-host-ipmi - OpenBMC host IPMI
19# - obmc-host-state-mgmt - OpenBMC host state management
Brad Bishopb52116a2020-08-10 20:45:15 -040020# - obmc-ikvm - OpenBMC KVM over IP
Brad Bishop4f12f722017-02-01 21:04:14 -050021# - obmc-inventory - OpenBMC inventory support
22# - obmc-leds - OpenBMC LED support
Brad Bishop51ca97e2017-01-26 10:49:22 -050023# - obmc-logging-mgmt - OpenBMC logging management
Brad Bishop0f1b05d2018-10-16 11:02:54 -050024# - obmc-remote-logging-mgmt - OpenBMC remote logging management
Brad Bishop8c09b142020-08-11 08:20:31 -040025# - obmc-rng - OpenBMC random number generator
Brad Bishop4f12f722017-02-01 21:04:14 -050026# - obmc-sensors - OpenBMC sensor support
Adriana Kobylak1ffadd92016-08-25 10:07:34 -050027# - obmc-settings-mgmt - OpenBMC settings management
Gunnar Mills058788a2017-02-15 16:01:45 -060028# - obmc-software - OpenBMC software management
Brad Bishop51ca97e2017-01-26 10:49:22 -050029# - obmc-system-mgmt - OpenBMC system management
30# - obmc-user-mgmt - OpenBMC user management
Brad Bishopb52116a2020-08-10 20:45:15 -040031# - obmc-user-mgmt-ldap - OpenBMC LDAP users
Jayanth Othayoth9be81b12017-05-08 09:25:05 -050032# - obmc-debug-collector - OpenBMC debug collector
Brad Bishop93fb5352015-09-09 03:59:20 +000033
34inherit core-image
Jean-Marie Verdunf2f4f122020-10-26 11:17:06 -070035inherit obmc-phosphor-utils
36inherit phosphor-deploy-ssh-keys
Brad Bishop93fb5352015-09-09 03:59:20 +000037
Brad Bishopdb32a7c2017-03-01 16:16:06 -050038FEATURE_PACKAGES_obmc-bmc-state-mgmt ?= "packagegroup-obmc-apps-bmc-state-mgmt"
Brad Bishopb52116a2020-08-10 20:45:15 -040039FEATURE_PACKAGES_obmc-bmcweb ?= "packagegroup-obmc-apps-bmcweb"
Brad Bishopff92bb62020-07-09 16:59:54 -040040FEATURE_PACKAGES_obmc-chassis-mgmt ?= "${@bb.utils.contains('COMBINED_FEATURES', 'obmc-phosphor-chassis-mgmt', 'virtual-obmc-chassis-mgmt', '', d)}"
Brad Bishopdb32a7c2017-03-01 16:16:06 -050041FEATURE_PACKAGES_obmc-chassis-state-mgmt ?= "packagegroup-obmc-apps-chassis-state-mgmt"
Brad Bishop8c09b142020-08-11 08:20:31 -040042FEATURE_PACKAGES_obmc-console ?= "packagegroup-obmc-apps-console"
Brad Bishopb52116a2020-08-10 20:45:15 -040043FEATURE_PACKAGES_obmc-dbus-monitor ?= "packagegroup-obmc-apps-dbus-monitor"
Brad Bishope3fe5782020-08-10 20:20:47 -040044FEATURE_PACKAGES_obmc-devtools ?= "packagegroup-obmc-apps-devtools"
Brad Bishop4824d4c2017-05-01 11:54:34 -040045FEATURE_PACKAGES_obmc-fan-control ?= "packagegroup-obmc-apps-fan-control"
Brad Bishopff92bb62020-07-09 16:59:54 -040046FEATURE_PACKAGES_obmc-fan-mgmt ?= "${@bb.utils.contains('COMBINED_FEATURES', 'obmc-phosphor-fan-mgmt', 'virtual-obmc-fan-mgmt', '', d)}"
47FEATURE_PACKAGES_obmc-flash-mgmt ?= "${@bb.utils.contains('COMBINED_FEATURES', 'obmc-phosphor-flash-mgmt', 'virtual-obmc-flash-mgmt', '', d)}"
Brad Bishopc1371fd2020-08-18 19:30:11 -040048FEATURE_PACKAGES_obmc-fru-ipmi ?= "packagegroup-obmc-apps-fru-ipmi"
Vijay Khemkad549dee2020-09-08 11:56:19 -070049FEATURE_PACKAGES_obmc-health-monitor ?= "packagegroup-obmc-apps-health-monitor"
Brad Bishopff92bb62020-07-09 16:59:54 -040050FEATURE_PACKAGES_obmc-host-ctl ?= "${@bb.utils.contains('COMBINED_FEATURES', 'obmc-host-ctl', 'virtual-obmc-host-ctl', '', d)}"
51FEATURE_PACKAGES_obmc-host-ipmi ?= "${@bb.utils.contains('COMBINED_FEATURES', 'obmc-host-ipmi', 'virtual-obmc-host-ipmi-hw', '', d)}"
Brad Bishopdb32a7c2017-03-01 16:16:06 -050052FEATURE_PACKAGES_obmc-host-state-mgmt ?= "packagegroup-obmc-apps-host-state-mgmt"
Brad Bishopb52116a2020-08-10 20:45:15 -040053FEATURE_PACKAGES_obmc-ikvm ?= "packagegroup-obmc-apps-ikvm"
Brad Bishop4f12f722017-02-01 21:04:14 -050054FEATURE_PACKAGES_obmc-inventory ?= "packagegroup-obmc-apps-inventory"
55FEATURE_PACKAGES_obmc-leds ?= "packagegroup-obmc-apps-leds"
Brad Bishop8298e182020-03-19 16:23:43 -040056FEATURE_PACKAGES_obmc-logging-mgmt ?= "packagegroup-obmc-apps-logging"
Brad Bishop0f1b05d2018-10-16 11:02:54 -050057FEATURE_PACKAGES_obmc-remote-logging-mgmt ?= "packagegroup-obmc-apps-remote-logging"
Brad Bishop8c09b142020-08-11 08:20:31 -040058FEATURE_PACKAGES_obmc-rng ?= "packagegroup-obmc-apps-rng"
Brad Bishop211ccf32018-03-23 00:18:53 -040059FEATURE_PACKAGES_obmc-net-ipmi ?= "phosphor-ipmi-net"
Brad Bishop4f12f722017-02-01 21:04:14 -050060FEATURE_PACKAGES_obmc-sensors ?= "packagegroup-obmc-apps-sensors"
Gunnar Mills058788a2017-02-15 16:01:45 -060061FEATURE_PACKAGES_obmc-software ?= "packagegroup-obmc-apps-software"
Brad Bishopff92bb62020-07-09 16:59:54 -040062FEATURE_PACKAGES_obmc-system-mgmt ?= "${@bb.utils.contains('DISTRO_FEATURES', 'obmc-phosphor-system-mgmt', 'virtual-obmc-system-mgmt', '', d)}"
Jayanth Othayoth2a5d91e2017-05-31 06:25:55 -050063FEATURE_PACKAGES_obmc-debug-collector ?= "packagegroup-obmc-apps-debug-collector"
Andrew Geisslera36894f2018-02-05 12:02:35 -080064FEATURE_PACKAGES_obmc-settings-mgmt ?= "packagegroup-obmc-apps-settings"
Ratan Guptad3c61642017-07-06 21:09:14 +053065FEATURE_PACKAGES_obmc-network-mgmt ?= "packagegroup-obmc-apps-network"
Vishwanatha Subbanna0ea6f632017-10-18 15:47:54 +053066FEATURE_PACKAGES_obmc-user-mgmt ?= "packagegroup-obmc-apps-user-mgmt"
Brad Bishopb52116a2020-08-10 20:45:15 -040067FEATURE_PACKAGES_obmc-user-mgmt-ldap ?= "packagegroup-obmc-apps-user-mgmt-ldap"
Brad Bishop93fb5352015-09-09 03:59:20 +000068
Brad Bishop211ccf32018-03-23 00:18:53 -040069# FIXME: phosphor-net-ipmi depends on phosphor-ipmi-host !?!? and
70# cannot be built on core-qemu machines because of the dependency
71# tree under phosphor-ipmi-host
72FEATURE_PACKAGES_obmc-net-ipmi_qemuall = ""
73
Brad Bishop8c09b142020-08-11 08:20:31 -040074# Add new packages to be installed to a package group in
75# packagegroup-obmc-apps, not here.
76OBMC_IMAGE_BASE_INSTALL = " \
Brad Bishop3077a7f2017-01-12 21:44:51 -050077 packagegroup-obmc-apps-extras \
Brad Bishopadb60e82016-06-14 15:24:22 -040078 ${OBMC_IMAGE_EXTRA_INSTALL} \
Brad Bishopbd082172016-02-29 10:18:47 -050079 "
Brad Bishop327bfd62016-02-29 10:21:51 -050080
Brad Bishopadb60e82016-06-14 15:24:22 -040081OBMC_IMAGE_EXTRA_INSTALL ?= ""
82
Brad Bishop8c09b142020-08-11 08:20:31 -040083CORE_IMAGE_EXTRA_INSTALL += "${OBMC_IMAGE_BASE_INSTALL}"
84
Patrick Williamsd0380a62017-03-02 22:24:41 -060085remove_etc_version() {
86 rm ${IMAGE_ROOTFS}${sysconfdir}/version
87}
Tom Joseph8c548d22018-07-03 11:47:40 -050088
Andrew Jefferye60ab2a2020-01-24 14:51:54 +103089disable_systemd_pager() {
Andrew Jefferyf41bd762020-02-17 10:35:35 +103090 echo "SYSTEMD_PAGER=" >> ${IMAGE_ROOTFS}${sysconfdir}/profile
91 echo "export SYSTEMD_PAGER" >> ${IMAGE_ROOTFS}${sysconfdir}/profile
Andrew Jefferye60ab2a2020-01-24 14:51:54 +103092}
Brad Bishop92b518c2020-08-29 08:51:50 -040093
94enable_ldap_nsswitch() {
95 sed -i 's/\(\(passwd\|group\|shadow\):\s*\).*/\1files ldap/' \
96 "${IMAGE_ROOTFS}${sysconfdir}/nsswitch.conf"
97}
98
99ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('IMAGE_FEATURES', 'obmc-user-mgmt-ldap', 'enable_ldap_nsswitch ;', '', d)}"
100