Skip to contentSkip to conversation

devtools: Add recipe for Chromium Embedded Controller utilities

PATCH Superseded Moritz Fischer 4 participants 5 messages Dec 28, 2016

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 devtools: Add recipe for Chromium Embedded Controller utilities

Add a recipe to build 'ectool', a utility to interact with the embedded controller on Google's Chromebooks (and other platforms using it).

---
 .../chromium-utils/chromium-utils.bb               | 26 ++++++++++++++++++++++
 .../0001-build-Add-HOST_LDFLAGS.patch              | 26 ++++++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 meta/recipes-devtools/chromium-utils/chromium-utils.bb
 create mode 100644 meta/recipes-devtools/chromium-utils/chromium-utils/0001-build-Add-HOST_LDFLAGS.patch
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +26 -0
new file mode 100644
index 0000000..c351717
@@ -0,0 +1,26 @@
+DESCRIPTION = "Chromium EC utilities"
+DEPENDS = "libftdi"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=562c740877935f40b262db8af30bca36"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
+
+SRCREV = "b19bb1f22a3fd0102030485d324c0321a18827e8"
+SRC_URI = "git://chromium.googlesource.com/chromiumos/platform/ec;protocol=https \
+           file://0001-build-Add-HOST_LDFLAGS.patch \
+	  "
+
+PV="1.1.9999-${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+	oe_runmake HOSTCC="${CC}" HOSTCFLAGS="${CFLAGS}" HOST_LDFLAGS="${LDFLAGS}" utils
+}
+
+do_install() {
+	install -m 0755 -d ${D}${bindir}
+	install -m 0755 ${S}/build/bds/util/ectool ${D}${bindir}/ectool
+}
+
+FILES_${PN} = "${bindir}"
meta/recipes-devtools/chromium-utils/chromium-utils/0001-build-Add-HOST_LDFLAGS.patch new file +26 -0
new file mode 100644
index 0000000..46e8cad
@@ -0,0 +1,26 @@
+From 56ffeeffea735a6a8f69fc111278ebabe3c7e2d8 Mon Sep 17 00:00:00 2001
+From: Moritz Fischer <[email protected]>
+Date: Tue, 27 Dec 2016 22:24:07 -0800
+Subject: [PATCH] build Add HOST_LDFLAGS
+
+Signed-off-by: Moritz Fischer <[email protected]>
+---
+ Makefile.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.rules b/Makefile.rules
+index 404454d..0057ba9 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -60,7 +60,7 @@ cmd_c_to_build = $(BUILDCC) $(BUILD_CFLAGS) \
+ 	         $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c)) $*.c) \
+ 	         $(BUILD_LDFLAGS) \
+ 	         -MMD -MF [email protected] -o $@
+-cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) -MMD -MF [email protected]  -o $@ \
++cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -MMD -MF [email protected]  -o $@ \
+ 	         $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c)) $*.c)
+ cmd_cxx_to_host = $(HOSTCXX) -std=c++0x $(COMMON_WARN) $(HOST_CXXFLAGS)\
+ 	-I ./$($(notdir $@)_ROOT) -o $@ $(filter %.cc,$^) $($(notdir $@)_LIBS)
+-- 
+2.4.11
+
Signature · 1 line
2.7.4
#1 lore raw
Quoted 5 lines · Moritz Fischer

Add a recipe to build 'ectool', a utility to interact with the embedded controller on Google's Chromebooks (and other platforms using it).

Thanks for your contribution, they’re always appreciated. In the future, try to keep in mind that the subject line needs a correct prefix for oe commit message standards (prefix with recipe name, not recipes subdir name), and the email subject should mention which layer you want it applied to (though one can determine it based on context, best practice is to include it). I’ll leave it to the layer maintainer to determine whether you need to re-send or just keep it in mind for future patches.

Thanks again,

Signature · 4 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
#2 lore raw
In reply to Moritz Fischer
Quoted 22 lines · Moritz Fischer

Add a recipe to build 'ectool', a utility to interact with the embedded controller on Google's Chromebooks (and other platforms using it).

---
 .../chromium-utils/chromium-utils.bb               | 26
++++++++++++++++++++++
 .../0001-build-Add-HOST_LDFLAGS.patch              | 26
++++++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 meta/recipes-devtools/chromium-utils/chromium-utils.bb
 create mode 100644 meta/recipes-devtools/chromium-utils/chromium-utils/

0001-build-Add-HOST_LDFLAGS.patch

meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +0 -0
new file mode 100644
index 0000000..c351717

meta/recipes-devtools/chromium-utils/chromium-utils.bb line 1

Quoted 1 line
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +1 -0
@@ -0,0 +1,26 @@
+DESCRIPTION = "Chromium EC utilities"

Use SUMMARY for short description like this.

meta/recipes-devtools/chromium-utils/chromium-utils.bb line 6

Quoted 6 lines
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +5 -0
+DEPENDS = "libftdi"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=562c740877935f40b262db8af30bca36"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"

Why is this needed?

meta/recipes-devtools/chromium-utils/chromium-utils.bb line 13

Quoted 9 lines
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +3 -0
+
+SRCREV = "b19bb1f22a3fd0102030485d324c0321a18827e8"
+SRC_URI = "git://chromium.googlesource.com/chromiumos/platform/ec;

protocol=https \

meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +4 -0
+           file://0001-build-Add-HOST_LDFLAGS.patch \
+         "
+
+PV="1.1.9999-${SRCPV}"

We usually use something like:
PV = "1.1.9999+gitr${SRCPV}"

+

Quoted 6 lines
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +4 -0
+S = "${WORKDIR}/git"
+
+do_compile() {
+       oe_runmake HOSTCC="${CC}" HOSTCFLAGS="${CFLAGS}"

HOST_LDFLAGS="${LDFLAGS}" utils

Why not use EXTRA_OEMAKE for these added variables?

Quoted 50 lines
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +8 -0
+}
+
+do_install() {
+       install -m 0755 -d ${D}${bindir}
+       install -m 0755 ${S}/build/bds/util/ectool ${D}${bindir}/ectool
+}
+
+FILES_${PN} = "${bindir}"
(quoted diff) +0 -0

0001-build-Add-HOST_LDFLAGS.patch b/meta/recipes-devtools/ chromium-utils/chromium-utils/0001-build-Add-HOST_LDFLAGS.patch new file mode 100644
index 0000000..46e8cad

meta/recipes-devtools/chromium-utils/chromium-utils/ new file +0 -0

0001-build-Add-HOST_LDFLAGS.patch

meta/recipes-devtools/chromium-utils/chromium-utils/ new file +16 -0
@@ -0,0 +1,26 @@
+From 56ffeeffea735a6a8f69fc111278ebabe3c7e2d8 Mon Sep 17 00:00:00 2001
+From: Moritz Fischer <[email protected]>
+Date: Tue, 27 Dec 2016 22:24:07 -0800
+Subject: [PATCH] build Add HOST_LDFLAGS
+
+Signed-off-by: Moritz Fischer <[email protected]>
+---
+ Makefile.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.rules b/Makefile.rules
+index 404454d..0057ba9 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -60,7 +60,7 @@ cmd_c_to_build = $(BUILDCC) $(BUILD_CFLAGS) \
+                $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c))

$*.c) \

meta/recipes-devtools/chromium-utils/chromium-utils/ new file +7 -1
+                $(BUILD_LDFLAGS) \
+                -MMD -MF [email protected] -o $@
+-cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) -MMD -MF [email protected]  -o $@ \
++cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -MMD -MF [email protected]
-o $@ \
+                $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c)) $*.c)
+ cmd_cxx_to_host = $(HOSTCXX) -std=c++0x $(COMMON_WARN) $(HOST_CXXFLAGS)\
+       -I ./$($(notdir $@)_ROOT) -o $@ $(filter %.cc,$^) $($(notdir

$@)_LIBS)
+--
+2.4.11
+
--
2.7.4

#3 lore raw
Quoted 1 line

the email subject should mention which layer you want it applied

to (though one can determine it based on context, best practice is to include it).

From the path starting with meta/ it looks like oe-core, then it needs to be sent to openembedded-core ML, not openembedded-devel.

Quoted 119 lines · Martin Jansa
Quoted 23 lines · Moritz Fischer

Add a recipe to build 'ectool', a utility to interact with the embedded controller on Google's Chromebooks (and other platforms using it).

---
 .../chromium-utils/chromium-utils.bb               | 26
++++++++++++++++++++++
 .../0001-build-Add-HOST_LDFLAGS.patch              | 26
++++++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 meta/recipes-devtools/chromium-utils/
chromium-utils.bb
 create mode 100644 meta/recipes-devtools/chromium
(quoted diff) +0 -1
-utils/chromium-utils/0001-build-Add-HOST_LDFLAGS.patch
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +0 -0
new file mode 100644
index 0000000..c351717

meta/recipes-devtools/chromium-utils/chromium-utils.bb line 1

Quoted 1 line
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +1 -0
@@ -0,0 +1,26 @@
+DESCRIPTION = "Chromium EC utilities"

Use SUMMARY for short description like this.

meta/recipes-devtools/chromium-utils/chromium-utils.bb line 6

Quoted 6 lines
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +5 -0
+DEPENDS = "libftdi"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=562c740877935f40b262db8af30bca36"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"

Why is this needed?

meta/recipes-devtools/chromium-utils/chromium-utils.bb line 13

Quoted 9 lines
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +3 -0
+
+SRCREV = "b19bb1f22a3fd0102030485d324c0321a18827e8"
+SRC_URI = "git://chromium.googlesource.com/chromiumos/platform/ec;prot

ocol=https \

meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +4 -0
+           file://0001-build-Add-HOST_LDFLAGS.patch \
+         "
+
+PV="1.1.9999-${SRCPV}"

We usually use something like:
PV = "1.1.9999+gitr${SRCPV}"

+

Quoted 6 lines
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +4 -0
+S = "${WORKDIR}/git"
+
+do_compile() {
+       oe_runmake HOSTCC="${CC}" HOSTCFLAGS="${CFLAGS}"

HOST_LDFLAGS="${LDFLAGS}" utils

Why not use EXTRA_OEMAKE for these added variables?

Quoted 51 lines
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +8 -0
+}
+
+do_install() {
+       install -m 0755 -d ${D}${bindir}
+       install -m 0755 ${S}/build/bds/util/ectool ${D}${bindir}/ectool
+}
+
+FILES_${PN} = "${bindir}"
meta/recipes-devtools/chromium-utils/chromium-utils/0001- renamed from meta/recipes-devtools/chromium-utils/chromium-utils/0001-build-Add-HOST_LDFLAGS.patch +0 -0

build-Add-HOST_LDFLAGS.patch
new file mode 100644
index 0000000..46e8cad

meta/recipes-devtools/chromium-utils/chromium-utils/0001- new file +0 -0

build-Add-HOST_LDFLAGS.patch

meta/recipes-devtools/chromium-utils/chromium-utils/0001- new file +16 -0
@@ -0,0 +1,26 @@
+From 56ffeeffea735a6a8f69fc111278ebabe3c7e2d8 Mon Sep 17 00:00:00 2001
+From: Moritz Fischer <[email protected]>
+Date: Tue, 27 Dec 2016 22:24:07 -0800
+Subject: [PATCH] build Add HOST_LDFLAGS
+
+Signed-off-by: Moritz Fischer <[email protected]>
+---
+ Makefile.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.rules b/Makefile.rules
+index 404454d..0057ba9 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -60,7 +60,7 @@ cmd_c_to_build = $(BUILDCC) $(BUILD_CFLAGS) \
+                $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c))

$*.c) \

meta/recipes-devtools/chromium-utils/chromium-utils/0001- new file +5 -1
+                $(BUILD_LDFLAGS) \
+                -MMD -MF [email protected] -o $@
+-cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) -MMD -MF [email protected]  -o $@ \
++cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -MMD -MF [email protected]
-o $@ \
+                $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c))

$*.c)
+ cmd_cxx_to_host = $(HOSTCXX) -std=c++0x $(COMMON_WARN) $(HOST_CXXFLAGS)\
+ -I ./$($(notdir $@)_ROOT) -o $@ $(filter %.cc,$^) $($(notdir
$@)_LIBS)
+--
+2.4.11
+
--
2.7.4

#4 lore raw
In reply to Moritz Fischer
Quoted 17 lines · Moritz Fischer

Add a recipe to build 'ectool', a utility to interact with the embedded controller on Google's Chromebooks (and other platforms using it).

---
 .../chromium-utils/chromium-utils.bb               | 26 ++++++++++++++++++++++
 .../0001-build-Add-HOST_LDFLAGS.patch              | 26 ++++++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 meta/recipes-devtools/chromium-utils/chromium-utils.bb
 create mode 100644 meta/recipes-devtools/chromium-utils/chromium-utils/0001-build-Add-HOST_LDFLAGS.patch
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +0 -0
new file mode 100644
index 0000000..c351717

meta/recipes-devtools/chromium-utils/chromium-utils.bb line 6

Quoted 6 lines
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +6 -0
@@ -0,0 +1,26 @@
+DESCRIPTION = "Chromium EC utilities"
+DEPENDS = "libftdi"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=562c740877935f40b262db8af30bca36"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"

this is probably not needed. Move the files to pre-defined search paths e.g. files/

meta/recipes-devtools/chromium-utils/chromium-utils.bb line 13

Quoted 7 lines
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +7 -0
+
+SRCREV = "b19bb1f22a3fd0102030485d324c0321a18827e8"
+SRC_URI = "git://chromium.googlesource.com/chromiumos/platform/ec;protocol=https \
+           file://0001-build-Add-HOST_LDFLAGS.patch \
+         "
+
+PV="1.1.9999-${SRCPV}"

why minus ? usually we say 1.1.9999+${SRCPV}

meta/recipes-devtools/chromium-utils/chromium-utils.bb line 26

Quoted 13 lines
meta/recipes-devtools/chromium-utils/chromium-utils.bb new file +13 -0
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+       oe_runmake HOSTCC="${CC}" HOSTCFLAGS="${CFLAGS}" HOST_LDFLAGS="${LDFLAGS}" utils
+}
+
+do_install() {
+       install -m 0755 -d ${D}${bindir}
+       install -m 0755 ${S}/build/bds/util/ectool ${D}${bindir}/ectool
+}
+
+FILES_${PN} = "${bindir}"

this should not be needed.

Quoted 40 lines
meta/recipes-devtools/chromium-utils/chromium-utils/0001-build-Add-HOST_LDFLAGS.patch new file +26 -1
new file mode 100644
index 0000000..46e8cad
@@ -0,0 +1,26 @@
+From 56ffeeffea735a6a8f69fc111278ebabe3c7e2d8 Mon Sep 17 00:00:00 2001
+From: Moritz Fischer <[email protected]>
+Date: Tue, 27 Dec 2016 22:24:07 -0800
+Subject: [PATCH] build Add HOST_LDFLAGS
+
+Signed-off-by: Moritz Fischer <[email protected]>
+---
+ Makefile.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.rules b/Makefile.rules
+index 404454d..0057ba9 100644
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -60,7 +60,7 @@ cmd_c_to_build = $(BUILDCC) $(BUILD_CFLAGS) \
+                $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c)) $*.c) \
+                $(BUILD_LDFLAGS) \
+                -MMD -MF [email protected] -o $@
+-cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) -MMD -MF [email protected]  -o $@ \
++cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -MMD -MF [email protected]  -o $@ \
+                $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c)) $*.c)
+ cmd_cxx_to_host = $(HOSTCXX) -std=c++0x $(COMMON_WARN) $(HOST_CXXFLAGS)\
+       -I ./$($(notdir $@)_ROOT) -o $@ $(filter %.cc,$^) $($(notdir $@)_LIBS)
+--
+2.4.11
+
--

2.7.4

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel