mbox: Use MACHINE_FEATURES for virtual-pnor
Define MACHINE_FEATURE openpower-ubi-fs to enable the
virtual-pnor functionality and enable on Witherspoon.
Change-Id: I57a6a39cf36501cf6c638df13b4e4b08a70fec26
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/conf/machine/witherspoon.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/conf/machine/witherspoon.conf
index 62aca43..c253bf0 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/conf/machine/witherspoon.conf
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/conf/machine/witherspoon.conf
@@ -3,7 +3,7 @@
UBOOT_MACHINE = "ast_g5_ncsi_config"
-OBMC_MACHINE_FEATURES += "obmc-mrw"
+OBMC_MACHINE_FEATURES += "obmc-mrw openpower-ubi-fs"
PREFERRED_PROVIDER_virtual/p9-vcs-workaround = 'vcs-pre-post'
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/mboxd/mboxd.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/mboxd/mboxd.bbappend
index 594a6ed..8b6248a 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/mboxd/mboxd.bbappend
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/mboxd/mboxd.bbappend
@@ -1,3 +1 @@
MBOXD_FLASH_SIZE = "64M"
-
-PACKAGECONFIG_append = "virtual-pnor"
diff --git a/meta-phosphor/common/recipes-phosphor/mboxd/mboxd.bb b/meta-phosphor/common/recipes-phosphor/mboxd/mboxd.bb
index 8915dd7..b6118e4 100644
--- a/meta-phosphor/common/recipes-phosphor/mboxd/mboxd.bb
+++ b/meta-phosphor/common/recipes-phosphor/mboxd/mboxd.bb
@@ -46,6 +46,6 @@
SYSTEMD_SERVICE_${PN} += "mboxd-reload@.service"
SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}"
-# Disable virtual-pnor by default.
-PACKAGECONFIG ??= ""
+# Enable virtual-pnor by MACHINE_FEATURE openpower-ubi-fs.
+PACKAGECONFIG_append = "${@mf_enabled(d, 'openpower-ubi-fs', 'virtual-pnor')}"
PACKAGECONFIG[virtual-pnor] = "--enable-virtual-pnor,--disable-virtual-pnor"