All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH meta-oe] rtc-tool: Add a recipe
@ 2022-01-23 15:03 Fabio Estevam
  2022-01-24  9:57 ` [OE-core] " Christian Eggers
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2022-01-23 15:03 UTC (permalink / raw)
  To: openembedded-core; +Cc: otavio.salvador, hs, alexandre.belloni, Fabio Estevam

From: Fabio Estevam <festevam@denx.de>

rtc-tools is a useful utility developed by Alexandre Belloni
for testing RTC kernel drivers, such as y2038 support.

Based on the initial recipe from Heiko Schocher <hs@denx.de>.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 .../0001-rtc-tools-Add-a-Makefile.patch       | 52 +++++++++++++++++++
 .../rtc-tools/rtc-tools_1.0.0.bb              | 19 +++++++
 2 files changed, 71 insertions(+)
 create mode 100644 meta-oe/recipes-support/rtc-tools/rtc-tools/0001-rtc-tools-Add-a-Makefile.patch
 create mode 100644 meta-oe/recipes-support/rtc-tools/rtc-tools_1.0.0.bb

diff --git a/meta-oe/recipes-support/rtc-tools/rtc-tools/0001-rtc-tools-Add-a-Makefile.patch b/meta-oe/recipes-support/rtc-tools/rtc-tools/0001-rtc-tools-Add-a-Makefile.patch
new file mode 100644
index 000000000000..a372e390efb9
--- /dev/null
+++ b/meta-oe/recipes-support/rtc-tools/rtc-tools/0001-rtc-tools-Add-a-Makefile.patch
@@ -0,0 +1,52 @@
+From faa6dd2e4d063afcaa19f16740a3fc413a399e60 Mon Sep 17 00:00:00 2001
+From: Fabio Estevam <festevam@denx.de>
+Date: Sun, 23 Jan 2022 09:22:19 -0300
+Subject: [PATCH rtc-tools] rtc-tools: Add a Makefile
+
+Add a Makefile to make installation and uninstallation
+process easier.
+
+Upstream-Status: Submitted [https://marc.info/?l=linux-rtc&m=164294073129803&w=2]
+Signed-off-by: Fabio Estevam <festevam@denx.de>
+---
+ Makefile | 29 +++++++++++++++++++++++++++++
+ 1 file changed, 29 insertions(+)
+ create mode 100644 Makefile
+
+diff --git a/Makefile b/Makefile
+new file mode 100644
+index 000000000000..4f244d9289f1
+--- /dev/null
++++ b/Makefile
+@@ -0,0 +1,29 @@
++prefix ?= /usr
++bindir ?= $(prefix)/bin
++
++EXEC = rtc-range rtc rtc-sync
++
++all: $(EXEC)
++
++rtc-range: rtc-range.c
++	$(CC) $(CFLAGS) -o $@ rtc-range.c
++
++rtc: rtc.c
++	$(CC) $(CFLAGS) -o $@ rtc.c
++
++rtc-sync: rtc-sync.c
++	$(CC) $(CFLAGS) -o $@ rtc-sync.c
++
++clean:
++	rm -f $(EXEC)
++
++install: rtc-range rtc rtc-sync
++	mkdir -p '$(DESTDIR)$(bindir)'
++	install -m755 rtc-range '$(DESTDIR)$(bindir)/rtc-range'
++	install -m755 rtc '$(DESTDIR)$(bindir)/rtc'
++	install -m755 rtc-sync '$(DESTDIR)$(bindir)/rtc-sync'
++
++uninstall:
++	rm -rf '$(DESTDIR)$(bindir)/rtc-range'
++	rm -rf '$(DESTDIR)$(bindir)/rtc'
++	rm -rf '$(DESTDIR)$(bindir)/rtc-sync'
+--
+2.25.1
diff --git a/meta-oe/recipes-support/rtc-tools/rtc-tools_1.0.0.bb b/meta-oe/recipes-support/rtc-tools/rtc-tools_1.0.0.bb
new file mode 100644
index 000000000000..8f0326829d8c
--- /dev/null
+++ b/meta-oe/recipes-support/rtc-tools/rtc-tools_1.0.0.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "Useful programs to test rtc drivers"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=74274e8a218423e49eefdea80bc55038"
+
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/rtc-tools.git;protocol=https;branch=master \
+           file://0001-rtc-tools-Add-a-Makefile.patch \
+           "
+SRCREV ?= "acc442e7af4e1e783432a43d37f1a7938c692659"
+
+S = "${WORKDIR}/git"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+EXTRA_OEMAKE = " \
+	DESTDIR=${D} \
+	all \
+	"
+do_install() {
+	oe_runmake install
+}
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH meta-oe] rtc-tool: Add a recipe
  2022-01-23 15:03 [PATCH meta-oe] rtc-tool: Add a recipe Fabio Estevam
@ 2022-01-24  9:57 ` Christian Eggers
  2022-01-24 19:18   ` Fabio Estevam
  0 siblings, 1 reply; 6+ messages in thread
From: Christian Eggers @ 2022-01-24  9:57 UTC (permalink / raw)
  To: openembedded-core
  Cc: otavio.salvador, hs, alexandre.belloni, Fabio Estevam, Fabio Estevam


[-- Attachment #1.1: Type: text/plain, Size: 4435 bytes --]

Hi Fabio,

from my experience, custom build systems (including "bare" Makefiles)
are often hard to integrate/maintain for distributors.

What about using CMake instead?

regards
Christian

On Sunday, 23 January 2022, 16:03:58 CET, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
>
> rtc-tools is a useful utility developed by Alexandre Belloni
> for testing RTC kernel drivers, such as y2038 support.
>
> Based on the initial recipe from Heiko Schocher <hs@denx.de>.
>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>  .../0001-rtc-tools-Add-a-Makefile.patch       | 52 +++++++++++++++++++
>  .../rtc-tools/rtc-tools_1.0.0.bb              | 19 +++++++
>  2 files changed, 71 insertions(+)
>  create mode 100644 meta-oe/recipes-support/rtc-tools/rtc-tools/0001-rtc-tools-Add-a-Makefile.patch
>  create mode 100644 meta-oe/recipes-support/rtc-tools/rtc-tools_1.0.0.bb
>
> diff --git a/meta-oe/recipes-support/rtc-tools/rtc-tools/0001-rtc-tools-Add-a-Makefile.patch b/meta-oe/recipes-support/rtc-tools/rtc-tools/0001-rtc-tools-Add-a-Makefile.patch
> new file mode 100644
> index 000000000000..a372e390efb9
> --- /dev/null
> +++ b/meta-oe/recipes-support/rtc-tools/rtc-tools/0001-rtc-tools-Add-a-Makefile.patch
> @@ -0,0 +1,52 @@
> +From faa6dd2e4d063afcaa19f16740a3fc413a399e60 Mon Sep 17 00:00:00 2001
> +
_______________________________________________________
Christian
Eggers
Software Engineer
​
ARRI
Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
Arriweg 17,
83071
Stephanskirchen
www.arri.com

+49 8036 3009-3118
CEggers@arri.de

​
Get all the latest information from www.arri.com, Facebook, Twitter, Instagram and YouTube.

Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
Sitz: München - Registergericht: Amtsgericht München - Handelsregisternummer: HRA 57918
Persönlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
Sitz: München - Registergericht: Amtsgericht München - Handelsregisternummer: HRB 54477
Geschäftsführer: Dr. Michael Neuhäuser; Stephan Schenk; Walter Trauninger; Markus Zeiler

​
From: Fabio Estevam <festevam@denx.de>
> +Date: Sun, 23 Jan 2022 09:22:19 -0300
> +Subject: [PATCH rtc-tools] rtc-tools: Add a Makefile
> +
> +Add a Makefile to make installation and uninstallation
> +process easier.
> +
> +Upstream-Status: Submitted [https://marc.info/?l=linux-rtc&m=164294073129803&w=2]
> +Signed-off-by: Fabio Estevam <festevam@denx.de>
> +---
> + Makefile | 29 +++++++++++++++++++++++++++++
> + 1 file changed, 29 insertions(+)
> + create mode 100644 Makefile
> +
> +diff --git a/Makefile b/Makefile
> +new file mode 100644
> +index 000000000000..4f244d9289f1
> +--- /dev/null
> ++++ b/Makefile
> +@@ -0,0 +1,29 @@
> ++prefix ?= /usr
> ++bindir ?= $(prefix)/bin
> ++
> ++EXEC = rtc-range rtc rtc-sync
> ++
> ++all: $(EXEC)
> ++
> ++rtc-range: rtc-range.c
> ++	$(CC) $(CFLAGS) -o $@ rtc-range.c
> ++
> ++rtc: rtc.c
> ++	$(CC) $(CFLAGS) -o $@ rtc.c
> ++
> ++rtc-sync: rtc-sync.c
> ++	$(CC) $(CFLAGS) -o $@ rtc-sync.c
> ++
> ++clean:
> ++	rm -f $(EXEC)
> ++
> ++install: rtc-range rtc rtc-sync
> ++	mkdir -p '$(DESTDIR)$(bindir)'
> ++	install -m755 rtc-range '$(DESTDIR)$(bindir)/rtc-range'
> ++	install -m755 rtc '$(DESTDIR)$(bindir)/rtc'
> ++	install -m755 rtc-sync '$(DESTDIR)$(bindir)/rtc-sync'
> ++
> ++uninstall:
> ++	rm -rf '$(DESTDIR)$(bindir)/rtc-range'
> ++	rm -rf '$(DESTDIR)$(bindir)/rtc'
> ++	rm -rf '$(DESTDIR)$(bindir)/rtc-sync'
> +--
> +2.25.1
> diff --git a/meta-oe/recipes-support/rtc-tools/rtc-tools_1.0.0.bb b/meta-oe/recipes-support/rtc-tools/rtc-tools_1.0.0.bb
> new file mode 100644
> index 000000000000..8f0326829d8c
> --- /dev/null
> +++ b/meta-oe/recipes-support/rtc-tools/rtc-tools_1.0.0.bb
> @@ -0,0 +1,19 @@
> +DESCRIPTION = "Useful programs to test rtc drivers"
> +LICENSE = "GPLv2"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=74274e8a218423e49eefdea80bc55038"
> +
> +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/rtc-tools.git;protocol=https;branch=master \
> +           file://0001-rtc-tools-Add-a-Makefile.patch \
> +           "
> +SRCREV ?= "acc442e7af4e1e783432a43d37f1a7938c692659"
> +
> +S = "${WORKDIR}/git"
> +
> +TARGET_CC_ARCH += "${LDFLAGS}"
> +EXTRA_OEMAKE = " \
> +	DESTDIR=${D} \
> +	all \
> +	"
> +do_install() {
> +	oe_runmake install
> +}
>





[-- Attachment #1.2: Type: text/html, Size: 13914 bytes --]

[-- Attachment #2: image458720.png --]
[-- Type: image/png, Size: 528 bytes --]

[-- Attachment #3: image140513.png --]
[-- Type: image/png, Size: 824 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH meta-oe] rtc-tool: Add a recipe
  2022-01-24  9:57 ` [OE-core] " Christian Eggers
@ 2022-01-24 19:18   ` Fabio Estevam
  2022-01-24 19:47     ` Christian Eggers
  2022-01-26 13:54     ` Alexandre Belloni
  0 siblings, 2 replies; 6+ messages in thread
From: Fabio Estevam @ 2022-01-24 19:18 UTC (permalink / raw)
  To: Christian Eggers, Alexandre Belloni
  Cc: openembedded-core, Otavio Salvador, Heiko Schocher, Fabio Estevam

Hi Christian,

On Mon, Jan 24, 2022 at 6:57 AM Christian Eggers <ceggers@arri.de> wrote:
>
> Hi Fabio,
>
> from my experience, custom build systems (including "bare" Makefiles)
> are often hard to integrate/maintain for distributors.

rtc-tools is a straightforward package and I have sent the Makefile
patch upstream.

Not sure why it can be hard to integrate or maintain it.

> What about using CMake instead?

I can do that if needed, but it is up to the rtc-tools maintainer, Alexandre.

Alexandre, any advice?

Thanks


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH meta-oe] rtc-tool: Add a recipe
  2022-01-24 19:18   ` Fabio Estevam
@ 2022-01-24 19:47     ` Christian Eggers
  2022-01-26 13:54     ` Alexandre Belloni
  1 sibling, 0 replies; 6+ messages in thread
From: Christian Eggers @ 2022-01-24 19:47 UTC (permalink / raw)
  To: Alexandre Belloni, Fabio Estevam
  Cc: openembedded-core, Otavio Salvador, Heiko Schocher, Fabio Estevam


[-- Attachment #1.1: Type: text/plain, Size: 2637 bytes --]

Hi Fabio, hi Alexandre,

On Monday, 24 January 2022, 20:18:34 CET, Fabio Estevam wrote:
> Hi Christian,
>

_______________________________________________________
Christian
Eggers
Software Engineer
​
ARRI
Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
Arriweg 17,
83071
Stephanskirchen
www.arri.com

+49 8036 3009-3118
CEggers@arri.de

​
Get all the latest information from www.arri.com, Facebook, Twitter, Instagram and YouTube.

Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
Sitz: München - Registergericht: Amtsgericht München - Handelsregisternummer: HRA 57918
Persönlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
Sitz: München - Registergericht: Amtsgericht München - Handelsregisternummer: HRB 54477
Geschäftsführer: Dr. Michael Neuhäuser; Stephan Schenk; Walter Trauninger; Markus Zeiler

​
> On Mon, Jan 24, 2022 at 6:57 AM Christian Eggers <ceggers@arri.de> wrote:
> >
> > Hi Fabio,
> >
> > from my experience, custom build systems (including "bare" Makefiles)
> > are often hard to integrate/maintain for distributors.
>
> rtc-tools is a straightforward package and I have sent the Makefile
> patch upstream.
>
> Not sure why it can be hard to integrate or maintain it.
ok, maybe my statement was a little bit opinion based. It is likely
that the OE/Yocto maintainers have a different position to this.

I remember that I've read an article (but cannot find it again) that
custom build systems regularly causes headaches for distributors
(because they usually use custom/no ways for setting compiler switches
and installation directories which normally the distributor want to
control).

Well known systems like autotools (I don't fully understand them) or
cmake (I use it) have a standardized interface for setting
important switches. Additionally they provide common features like
cross-compiling, platform specific stuff, removing build artifacts
(clean), installation of generated files or out-of-tree builds.

Doing the same in bare Makefiles is possible, but requires much hand-crafted
code. Often Makefiles consist of a lot of repetitive code. You can use
macros for this. After putting everything into macros, you will have
reinvented either cmake or kbuild.

>
> > What about using CMake instead?
>
> I can do that if needed, but it is up to the rtc-tools maintainer, Alexandre.
I am not involved into rtc-tools and also not much into OE/Yocto.
So don't count too much on my opinion and choose the best solution
yourself.

regards
Christia
(having created hand-written Makefiles for 13 years)




[-- Attachment #1.2: Type: text/html, Size: 11477 bytes --]

[-- Attachment #2: image558382.png --]
[-- Type: image/png, Size: 528 bytes --]

[-- Attachment #3: image912385.png --]
[-- Type: image/png, Size: 824 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH meta-oe] rtc-tool: Add a recipe
  2022-01-24 19:18   ` Fabio Estevam
  2022-01-24 19:47     ` Christian Eggers
@ 2022-01-26 13:54     ` Alexandre Belloni
  2022-01-26 18:15       ` Khem Raj
  1 sibling, 1 reply; 6+ messages in thread
From: Alexandre Belloni @ 2022-01-26 13:54 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Christian Eggers, openembedded-core, Otavio Salvador,
	Heiko Schocher, Fabio Estevam

Hello Fabio,

On 24/01/2022 16:18:34-0300, Fabio Estevam wrote:
> Hi Christian,
> 
> On Mon, Jan 24, 2022 at 6:57 AM Christian Eggers <ceggers@arri.de> wrote:
> >
> > Hi Fabio,
> >
> > from my experience, custom build systems (including "bare" Makefiles)
> > are often hard to integrate/maintain for distributors.
> 
> rtc-tools is a straightforward package and I have sent the Makefile
> patch upstream.
> 
> Not sure why it can be hard to integrate or maintain it.
> 
> > What about using CMake instead?
> 
> I can do that if needed, but it is up to the rtc-tools maintainer, Alexandre.
> 
> Alexandre, any advice?
> 

My plan is to probably go for the Makefile. I don't think it will cause
any issue and this doesn't care about portability to other systems as
the tool is Linux only.

I'm just checking with buildroot whether they prefer having all the
binaries installed with a single target or if rtc-range has to be
separated out.

rtc-range is supposed to be a debugging tool. I'd also separate it in a
different package.

Note that there is a daemon that should be coming up (well when I will
have time) with the goal of monitoring both battery status and clock
drift.

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OE-core] [PATCH meta-oe] rtc-tool: Add a recipe
  2022-01-26 13:54     ` Alexandre Belloni
@ 2022-01-26 18:15       ` Khem Raj
  0 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2022-01-26 18:15 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Fabio Estevam, Christian Eggers,
	Patches and discussions about the oe-core layer, Otavio Salvador,
	Heiko Schocher, Fabio Estevam

please send it to oe-devel ml if you intend to propose it for meta-oe

On Wed, Jan 26, 2022 at 5:54 AM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
>
> Hello Fabio,
>
> On 24/01/2022 16:18:34-0300, Fabio Estevam wrote:
> > Hi Christian,
> >
> > On Mon, Jan 24, 2022 at 6:57 AM Christian Eggers <ceggers@arri.de> wrote:
> > >
> > > Hi Fabio,
> > >
> > > from my experience, custom build systems (including "bare" Makefiles)
> > > are often hard to integrate/maintain for distributors.
> >
> > rtc-tools is a straightforward package and I have sent the Makefile
> > patch upstream.
> >
> > Not sure why it can be hard to integrate or maintain it.
> >
> > > What about using CMake instead?
> >
> > I can do that if needed, but it is up to the rtc-tools maintainer, Alexandre.
> >
> > Alexandre, any advice?
> >
>
> My plan is to probably go for the Makefile. I don't think it will cause
> any issue and this doesn't care about portability to other systems as
> the tool is Linux only.

thats fine, well written makefiles can do cross compilation just fine.
>
> I'm just checking with buildroot whether they prefer having all the
> binaries installed with a single target or if rtc-range has to be
> separated out.
>
> rtc-range is supposed to be a debugging tool. I'd also separate it in a
> different package.
>
> Note that there is a daemon that should be coming up (well when I will
> have time) with the goal of monitoring both battery status and clock
> drift.
>
> --
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#160987): https://lists.openembedded.org/g/openembedded-core/message/160987
> Mute This Topic: https://lists.openembedded.org/mt/88625470/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-01-26 18:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-23 15:03 [PATCH meta-oe] rtc-tool: Add a recipe Fabio Estevam
2022-01-24  9:57 ` [OE-core] " Christian Eggers
2022-01-24 19:18   ` Fabio Estevam
2022-01-24 19:47     ` Christian Eggers
2022-01-26 13:54     ` Alexandre Belloni
2022-01-26 18:15       ` 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.