diff options
4 files changed, 58 insertions, 3 deletions
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem.bb index ff3b814a7..75bda3049 100644 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem.bb +++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/ipmi/openpower-ipmi-oem.bb @@ -5,6 +5,8 @@ PR = "r1" inherit autotools pkgconfig inherit obmc-phosphor-license +inherit obmc-phosphor-ipmiprovider-symlink +inherit obmc-phosphor-utils DEPENDS += "phosphor-ipmi-host" DEPENDS += "autoconf-archive-native" @@ -14,7 +16,10 @@ TARGET_CFLAGS += "-fpic" SRC_URI += "git://github.com/openbmc/openpower-host-ipmi-oem" SRCREV = "70dbc5871c6da23f7f14046ce9d356600992f6a8" +HOSTIPMI_PROVIDER_LIBRARY += "liboemhandler.so" + S = "${WORKDIR}/git" +FILES_${PN}_append = " ${libdir}/ipmid-providers/lib*${SOLIBS}" FILES_${PN}_append = " ${libdir}/host-ipmid/lib*${SOLIBS}" -FILES_${PN}-dev_append = " ${libdir}/host-ipmid/lib*${SOLIBSDEV} ${libdir}/host-ipmid/*.la" +FILES_${PN}-dev_append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la" diff --git a/meta-phosphor/classes/obmc-phosphor-ipmiprovider-symlink.bbclass b/meta-phosphor/classes/obmc-phosphor-ipmiprovider-symlink.bbclass new file mode 100644 index 000000000..f2570fd6f --- /dev/null +++ b/meta-phosphor/classes/obmc-phosphor-ipmiprovider-symlink.bbclass @@ -0,0 +1,37 @@ +# Common code for recipes that create IPMI provider libraries + +LIBDIR = "${D}/${libdir}/ipmid-providers/" +HOSTIPMI_LIBDIR = "${D}/${libdir}/host-ipmid/" +NETIPMI_LIBDIR = "${D}/${libdir}/net-ipmid/" + +python symlink_create_postinstall() { + def install_symlink(d, libname, install_dir): + import glob; + + if not os.path.exists(install_dir): + os.makedirs(install_dir) + + lib_dir = d.getVar('LIBDIR', True) + + # find the library extension libxxx.so.? + install_file = lib_dir + libname + ".?" + + filelist = glob.glob(install_file); + + # get the library name + path, file = os.path.split(filelist[0]) + os.chdir(install_dir) + source = "../ipmid-providers/" + file + + # create the symlink + os.symlink(source, file) + + for libname in listvar_to_list(d, 'HOSTIPMI_PROVIDER_LIBRARY'): + install_dir = d.getVar('HOSTIPMI_LIBDIR', True) + install_symlink(d, libname, install_dir) + + for libname in listvar_to_list(d, 'NETIPMI_PROVIDER_LIBRARY'): + install_dir = d.getVar('NETIPMI_LIBDIR', True) + install_symlink(d, libname, install_dir) +} +do_install[postfuncs] += "symlink_create_postinstall"
\ No newline at end of file diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru.bb index d053bce66..e0fcb0f20 100644 --- a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru.bb +++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-fru.bb @@ -4,6 +4,7 @@ PR = "r1" inherit autotools pkgconfig inherit obmc-phosphor-systemd +inherit obmc-phosphor-ipmiprovider-symlink require ${PN}.inc @@ -21,5 +22,8 @@ SYSTEMD_SERVICE_${PN} += "obmc-read-eeprom@.service" S = "${WORKDIR}/git" +HOSTIPMI_PROVIDER_LIBRARY += "libstrgfnhandler.so" + +FILES_${PN}_append = " ${libdir}/ipmid-providers/lib*${SOLIBS}" FILES_${PN}_append = " ${libdir}/host-ipmid/lib*${SOLIBS}" -FILES_${PN}-dev_append = " ${libdir}/host-ipmid/lib*${SOLIBSDEV} ${libdir}/host-ipmid/*.la" +FILES_${PN}-dev_append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la" diff --git a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb index 8b986e6bc..0c1e4c710 100644 --- a/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb +++ b/meta-phosphor/common/recipes-phosphor/ipmi/phosphor-ipmi-host.bb @@ -8,6 +8,7 @@ RRECOMMENDS_${PN} += "packagegroup-obmc-ipmid-providers-libs" inherit autotools pkgconfig inherit obmc-phosphor-license inherit obmc-phosphor-sdbus-service +inherit obmc-phosphor-ipmiprovider-symlink DEPENDS += "phosphor-mapper" DEPENDS += "autoconf-archive-native" @@ -23,8 +24,16 @@ SRCREV = "a640b775491bff926ac759ffd6e13ec2bcc80d26" S = "${WORKDIR}/git" +HOSTIPMI_PROVIDER_LIBRARY += "libapphandler.so" +HOSTIPMI_PROVIDER_LIBRARY += "libhostservice.so" +HOSTIPMI_PROVIDER_LIBRARY += "libsysintfcmds.so" + +NETIPMI_PROVIDER_LIBRARY += "libapphandler.so" + +FILES_${PN}_append = " ${libdir}/ipmid-providers/lib*${SOLIBS}" FILES_${PN}_append = " ${libdir}/host-ipmid/lib*${SOLIBS}" -FILES_${PN}-dev_append = " ${libdir}/host-ipmid/lib*${SOLIBSDEV} ${libdir}/host-ipmid/*.la" +FILES_${PN}_append = " ${libdir}/net-ipmid/lib*${SOLIBS}" +FILES_${PN}-dev_append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la" DBUS_SERVICE_${PN} += "org.openbmc.HostServices.service" |