* [meta-oe][PATCH v2] ledmon: upgrade to 0.93
@ 2019-11-01 9:34 Zheng Ruoqin
2019-11-01 17:06 ` Khem Raj
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Ruoqin @ 2019-11-01 9:34 UTC (permalink / raw)
To: openembedded-devel
1) inherit autotools as new version use autotools.
2) Add a patch to fix compile error.
0001-Don-t-build-with-Werror-to-fix-compile-error.patch
3) Modify do_install_append() function to fix do_package error as follows:
ledmon-git-r0 do_package: SYSTEMD_SERVICE_ledmon value ledmon.service does not exist
4) Add ${S}/config in CFLAGS.
Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
---
...-t-build-with-Werror-to-fix-compile-error.patch | 29 ++++++++++++++++++++++
meta-oe/recipes-bsp/ledmon/ledmon_git.bb | 17 +++++++++----
2 files changed, 41 insertions(+), 5 deletions(-)
create mode 100644 meta-oe/recipes-bsp/ledmon/ledmon/0001-Don-t-build-with-Werror-to-fix-compile-error.patch
diff --git a/meta-oe/recipes-bsp/ledmon/ledmon/0001-Don-t-build-with-Werror-to-fix-compile-error.patch b/meta-oe/recipes-bsp/ledmon/ledmon/0001-Don-t-build-with-Werror-to-fix-compile-error.patch
new file mode 100644
index 0000000..b65f1a7
--- /dev/null
+++ b/meta-oe/recipes-bsp/ledmon/ledmon/0001-Don-t-build-with-Werror-to-fix-compile-error.patch
@@ -0,0 +1,29 @@
+Subject: [PATCH] Don't build with -Werror to fix compile error.
+
+| 550 | _dump_sgpio_amd(&amd_reg->amd);
+| | ^~~~~~~~~~~~~
+| amd_sgpio.c: In function '_write_amd_register':
+| amd_sgpio.c:558:18: error: taking address of packed member of 'struct amd_register' may result in an unaligned pointer value [-Werror=address-of-packed-member]
+
+Upstream-Status: Pending
+
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ configure.ac | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7bc20f8..7e01bd5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -22,7 +22,6 @@ AX_AM_CFLAGS_ADD([-Werror=format-truncation=1])
+ AX_AM_CFLAGS_ADD([-Werror=shift-negative-value])
+ AX_AM_CFLAGS_ADD([-Werror=alloca])
+ AX_AM_CFLAGS_ADD([-Werror=missing-field-initializers])
+-AX_AM_CFLAGS_ADD([-Werror])
+ AX_AM_CFLAGS_ADD([-Werror=format-signedness])
+
+ AC_SUBST([AM_CFLAGS])
+--
+2.7.4
+
diff --git a/meta-oe/recipes-bsp/ledmon/ledmon_git.bb b/meta-oe/recipes-bsp/ledmon/ledmon_git.bb
index 74ae56c..f9ae9aa 100644
--- a/meta-oe/recipes-bsp/ledmon/ledmon_git.bb
+++ b/meta-oe/recipes-bsp/ledmon/ledmon_git.bb
@@ -11,15 +11,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
DEPENDS = "sg3-utils udev"
-inherit systemd
+inherit autotools systemd
SYSTEMD_SERVICE_${PN} = "ledmon.service"
+# 0.93
SRC_URI = "git://github.com/intel/ledmon;branch=master \
file://0002-include-sys-select.h-and-sys-types.h.patch \
+ file://0001-Don-t-build-with-Werror-to-fix-compile-error.patch \
"
-SRCREV = "ad1304ca1363d727425a1f23703c523e21feae4f"
+SRCREV = "1d72f9cb5c9163b2ecdf19709935720e65f5b90e"
COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
COMPATIBLE_HOST_libc-musl = "null"
@@ -27,8 +29,13 @@ COMPATIBLE_HOST_libc-musl = "null"
S = "${WORKDIR}/git"
EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'"
+# The ledmon sources include headers in ${S}/config to build but not in CFLAGS.
+# We need to add this include path in CFLAGS.
+CFLAGS += "-I${S}/config"
+
do_install_append() {
- install -d ${D}/${systemd_unitdir}/system
- oe_runmake DESTDIR=${D} install
- oe_runmake DESTDIR=${D}${systemd_unitdir}/system install-systemd
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0755 ${S}/systemd/ledmon.service ${D}${systemd_unitdir}/system
+ fi
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [meta-oe][PATCH v2] ledmon: upgrade to 0.93
2019-11-01 9:34 [meta-oe][PATCH v2] ledmon: upgrade to 0.93 Zheng Ruoqin
@ 2019-11-01 17:06 ` Khem Raj
0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2019-11-01 17:06 UTC (permalink / raw)
To: Zheng Ruoqin; +Cc: openembeded-devel
On Thu, Oct 31, 2019 at 10:55 PM Zheng Ruoqin
<zhengrq.fnst@cn.fujitsu.com> wrote:
>
> 1) inherit autotools as new version use autotools.
>
> 2) Add a patch to fix compile error.
> 0001-Don-t-build-with-Werror-to-fix-compile-error.patch
>
> 3) Modify do_install_append() function to fix do_package error as follows:
> ledmon-git-r0 do_package: SYSTEMD_SERVICE_ledmon value ledmon.service does not exist
>
> 4) Add ${S}/config in CFLAGS.
>
> Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
> ---
> ...-t-build-with-Werror-to-fix-compile-error.patch | 29 ++++++++++++++++++++++
> meta-oe/recipes-bsp/ledmon/ledmon_git.bb | 17 +++++++++----
> 2 files changed, 41 insertions(+), 5 deletions(-)
> create mode 100644 meta-oe/recipes-bsp/ledmon/ledmon/0001-Don-t-build-with-Werror-to-fix-compile-error.patch
>
> diff --git a/meta-oe/recipes-bsp/ledmon/ledmon/0001-Don-t-build-with-Werror-to-fix-compile-error.patch b/meta-oe/recipes-bsp/ledmon/ledmon/0001-Don-t-build-with-Werror-to-fix-compile-error.patch
> new file mode 100644
> index 0000000..b65f1a7
> --- /dev/null
> +++ b/meta-oe/recipes-bsp/ledmon/ledmon/0001-Don-t-build-with-Werror-to-fix-compile-error.patch
> @@ -0,0 +1,29 @@
> +Subject: [PATCH] Don't build with -Werror to fix compile error.
> +
> +| 550 | _dump_sgpio_amd(&amd_reg->amd);
> +| | ^~~~~~~~~~~~~
> +| amd_sgpio.c: In function '_write_amd_register':
> +| amd_sgpio.c:558:18: error: taking address of packed member of 'struct amd_register' may result in an unaligned pointer value [-Werror=address-of-packed-member]
> +
> +Upstream-Status: Pending
this was submitted isnt it? if so then please put the right status
here. One line patches are easy to
be mistaken and carried forward even when upstreamed.
> +
> +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
> +---
> + configure.ac | 1 -
> + 1 file changed, 1 deletion(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 7bc20f8..7e01bd5 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -22,7 +22,6 @@ AX_AM_CFLAGS_ADD([-Werror=format-truncation=1])
> + AX_AM_CFLAGS_ADD([-Werror=shift-negative-value])
> + AX_AM_CFLAGS_ADD([-Werror=alloca])
> + AX_AM_CFLAGS_ADD([-Werror=missing-field-initializers])
> +-AX_AM_CFLAGS_ADD([-Werror])
> + AX_AM_CFLAGS_ADD([-Werror=format-signedness])
> +
> + AC_SUBST([AM_CFLAGS])
> +--
> +2.7.4
> +
> diff --git a/meta-oe/recipes-bsp/ledmon/ledmon_git.bb b/meta-oe/recipes-bsp/ledmon/ledmon_git.bb
> index 74ae56c..f9ae9aa 100644
> --- a/meta-oe/recipes-bsp/ledmon/ledmon_git.bb
> +++ b/meta-oe/recipes-bsp/ledmon/ledmon_git.bb
> @@ -11,15 +11,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
>
> DEPENDS = "sg3-utils udev"
>
> -inherit systemd
> +inherit autotools systemd
>
> SYSTEMD_SERVICE_${PN} = "ledmon.service"
>
> +# 0.93
> SRC_URI = "git://github.com/intel/ledmon;branch=master \
> file://0002-include-sys-select.h-and-sys-types.h.patch \
> + file://0001-Don-t-build-with-Werror-to-fix-compile-error.patch \
> "
>
> -SRCREV = "ad1304ca1363d727425a1f23703c523e21feae4f"
> +SRCREV = "1d72f9cb5c9163b2ecdf19709935720e65f5b90e"
>
> COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
> COMPATIBLE_HOST_libc-musl = "null"
> @@ -27,8 +29,13 @@ COMPATIBLE_HOST_libc-musl = "null"
> S = "${WORKDIR}/git"
> EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'"
>
> +# The ledmon sources include headers in ${S}/config to build but not in CFLAGS.
> +# We need to add this include path in CFLAGS.
> +CFLAGS += "-I${S}/config"
> +
> do_install_append() {
> - install -d ${D}/${systemd_unitdir}/system
> - oe_runmake DESTDIR=${D} install
> - oe_runmake DESTDIR=${D}${systemd_unitdir}/system install-systemd
> + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
> + install -d ${D}${systemd_unitdir}/system
> + install -m 0755 ${S}/systemd/ledmon.service ${D}${systemd_unitdir}/system
> + fi
> }
> --
> 2.7.4
>
>
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-01 17:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-01 9:34 [meta-oe][PATCH v2] ledmon: upgrade to 0.93 Zheng Ruoqin
2019-11-01 17:06 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.