summaryrefslogtreecommitdiff
path: root/meta-openpower/recipes-bsp
diff options
context:
space:
mode:
authorLakshminarayana R. Kammath <lkammath@in.ibm.com>2020-03-07 19:14:07 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-03-26 00:11:38 +0300
commit706fff9a6711363b41c6fd68907f579815b44741 (patch)
tree5f4dcec25c7be8d781fd40ec177ea2de27012a39 /meta-openpower/recipes-bsp
parent81e9ee0bf0a3cf373ed354fb1687b5ddebc6150c (diff)
downloadopenbmc-706fff9a6711363b41c6fd68907f579815b44741.tar.xz
openpower: Build libecmd, capi, ext and stub libraries
1) ecmd-pdbg(edbg) will use this as depends 2) All the ecmd, stub, capi & ext headers are copied to standard location instead of module specific path 3) help text files are copied under /usr/share/libecmd/help (From meta-openpower rev: 7814d18487f8836b40fb6fedb7c001250400cbc4) Signed-off-by: Lakshminarayana R. Kammath <lkammath@in.ibm.com> Change-Id: Id1e516873a1d6a2c4c24e7b709861a274d8cc6b2 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-openpower/recipes-bsp')
-rw-r--r--meta-openpower/recipes-bsp/ecmd/libecmd_git.bb61
1 files changed, 61 insertions, 0 deletions
diff --git a/meta-openpower/recipes-bsp/ecmd/libecmd_git.bb b/meta-openpower/recipes-bsp/ecmd/libecmd_git.bb
new file mode 100644
index 000000000..c2e43a4ce
--- /dev/null
+++ b/meta-openpower/recipes-bsp/ecmd/libecmd_git.bb
@@ -0,0 +1,61 @@
+SUMMARY = "eCMD"
+DESCRIPTION = "eCMD is a hardware access API for POWER Systems"
+LICENSE= "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/NOTICE;md5=fee220301a2af3faf8f211524b4248ea"
+
+SRC_URI = "git://github.com/open-power/eCMD.git;branch=ecmd15;protocol=git"
+SRCREV = "15e382180d49f7ea4117ccc341ca91e361721fd4"
+
+inherit python3native
+DEPENDS = "zlib"
+
+S = "${WORKDIR}/git"
+
+export LD="${CXX}"
+export SLDFLAGS="${LDFLAGS}"
+
+# use native config.py to build required ecmd extensions
+do_configure() {
+ ${S}/config.py --without-swig --without-python --without-python3 --without-perl \
+ --without-pyecmd --install-path ${D}${prefix} --output-root ${B} --target ${TARGET_ARCH} \
+ --extensions "cmd cip"
+}
+
+do_compile() {
+ oe_runmake all
+}
+
+do_install() {
+ oe_runmake install
+
+ # we don't need the target scripts or ecmd setup
+ rm ${D}${bindir}/target.* ${D}${bindir}/ecmdsetup.pl
+
+ # ecmd installs to atypical places in the filesystem.
+ # move all the installed files to more conventional directories.
+ install -d ${D}${includedir} ${D}${datadir}/${BPN}/help ${D}${bindir} ${D}${libdir}
+ mv ${D}${prefix}/help/** ${D}${datadir}/${BPN}/help
+ mv ${D}${prefix}/${TARGET_ARCH}/bin/** ${D}${bindir}
+ mv ${D}${prefix}/${TARGET_ARCH}/lib/** ${D}${libdir}
+
+ rm ${D}${bindir}/ecmdVersion
+
+ rmdir ${D}${prefix}/help \
+ ${D}${prefix}/${TARGET_ARCH}/lib \
+ ${D}${prefix}/${TARGET_ARCH}/bin \
+ ${D}${prefix}/${TARGET_ARCH}/perl \
+ ${D}${prefix}/${TARGET_ARCH}
+}
+
+# ecmd makefile assumes that dependencies are built from left to right.
+PARALLEL_MAKE = ""
+
+# ecmd doesn't have proper library versioning
+FILES_${PN}-dev_remove = "${libdir}/lib*.so"
+FILES_${PN} += "${libdir}/lib*.so"
+
+RDEPENDS_${PN}-bin = "libecmd"
+
+# This allows someone to easily use ecmd bins, even if you don’t want them.
+PACKAGE_BEFORE_PN = "libecmd-bin"
+FILES_${PN}-bin += "${bindir}"