* [Buildroot] [PATCH 1/2] Add pifmrds package
@ 2014-06-19 22:00 Eric Limpens
2014-06-19 22:00 ` [Buildroot] [PATCH 2/2] Change Makefile into a crosscompile friendly version Eric Limpens
2014-06-20 22:02 ` [Buildroot] [PATCH 1/2] Add pifmrds package Arnout Vandecappelle
0 siblings, 2 replies; 5+ messages in thread
From: Eric Limpens @ 2014-06-19 22:00 UTC (permalink / raw)
To: buildroot
Signed-off-by: Eric Limpens <limpens@gmail.com>
---
package/Config.in | 1 +
package/pifmrds/Config.in | 9 +++++++++
package/pifmrds/pifmrds.mk | 19 +++++++++++++++++++
3 files changed, 29 insertions(+)
create mode 100644 package/pifmrds/Config.in
create mode 100644 package/pifmrds/pifmrds.mk
diff --git a/package/Config.in b/package/Config.in
index f43e985..0cefbc0 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -336,6 +336,7 @@ endif
source "package/owl-linux/Config.in"
source "package/parted/Config.in"
source "package/pciutils/Config.in"
+ source "package/pifmrds/Config.in"
source "package/picocom/Config.in"
source "package/read-edid/Config.in"
source "package/rng-tools/Config.in"
diff --git a/package/pifmrds/Config.in b/package/pifmrds/Config.in
new file mode 100644
index 0000000..1269d64
--- /dev/null
+++ b/package/pifmrds/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_PIFMRDS
+ bool "pifmrds"
+ depends on BR2_arm
+ depends on BR2_LARGEFILE #libsndfile
+ select BR2_PACKAGE_LIBSNDFILE
+ help
+ pifmrds, FM-RDS transmitter using the Raspberry Pi's PWM
+
+ https://github.com/ChristopheJacquet/PiFmRds
diff --git a/package/pifmrds/pifmrds.mk b/package/pifmrds/pifmrds.mk
new file mode 100644
index 0000000..9365424
--- /dev/null
+++ b/package/pifmrds/pifmrds.mk
@@ -0,0 +1,19 @@
+PIFMRDS_VERSION = c67306ea9b8d827f45e0d90279d367e97119bcb1
+PIFMRDS_SITE = $(call github,ChristopheJacquet,PiFmRds,$(PIFMRDS_VERSION))
+PIFMRDS_INSTALL_TARGET = YES
+PIFMRDS_AUTORECONF = YES
+PIFMRDS_DEPENDENCIES += libsndfile
+PIFMRDS_LICENSE = GPLv3+
+PIFMRDS_LICENSE_FILES = LICENSE
+
+define PIFMRDS_BUILD_CMDS
+ $(MAKE) -C $(@D)/src CC=$(TARGET_CC) LDFLAGS="$(TARGET_LDFLAGS)" CFLAGS="$(TARGET_CFLAGS) -std=gnu99 -c"
+endef
+
+define PIFMRDS_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 0755 $(@D)/src/pi_fm_rds $(TARGET_DIR)/usr/bin/pi_fm_rds
+ $(INSTALL) -D -m 0755 $(@D)/src/rds_wav $(TARGET_DIR)/usr/bin/rds_wav
+ $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/pifmrds/
+endef
+
+$(eval $(generic-package))
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] Change Makefile into a crosscompile friendly version
2014-06-19 22:00 [Buildroot] [PATCH 1/2] Add pifmrds package Eric Limpens
@ 2014-06-19 22:00 ` Eric Limpens
2014-06-20 22:16 ` Arnout Vandecappelle
2014-06-20 22:02 ` [Buildroot] [PATCH 1/2] Add pifmrds package Arnout Vandecappelle
1 sibling, 1 reply; 5+ messages in thread
From: Eric Limpens @ 2014-06-19 22:00 UTC (permalink / raw)
To: buildroot
Signed-off-by: Eric Limpens <limpens@gmail.com>
---
...ifmrds-000-Makefile-crosscompile-friendly.patch | 25 ++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 package/pifmrds/pifmrds-000-Makefile-crosscompile-friendly.patch
diff --git a/package/pifmrds/pifmrds-000-Makefile-crosscompile-friendly.patch b/package/pifmrds/pifmrds-000-Makefile-crosscompile-friendly.patch
new file mode 100644
index 0000000..8b8cd49
--- /dev/null
+++ b/package/pifmrds/pifmrds-000-Makefile-crosscompile-friendly.patch
@@ -0,0 +1,25 @@
+diff -purN PiFmRds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile
+--- PiFmRds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile 2014-05-04 18:21:40.000000000 +0200
++++ pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile 2014-06-19 21:21:14.220328601 +0200
+@@ -1,20 +1,8 @@
+-CC = gcc
+-STD_CFLAGS = -Wall -std=gnu99 -c -g -O3
+-
+-# Enable ARM-specific options only on ARM, and compilation of the app only on ARM
+-UNAME := $(shell uname -m)
+-
+-ifeq ($(UNAME), armv6l)
+- CFLAGS = $(STD_CFLAGS) -march=armv6 -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -ffast-math
++all: app rds_wav
+
+ app: rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o
+ $(CC) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o -lm -lsndfile
+
+-else
+- CFLAGS = $(STD_CFLAGS)
+-endif
+-
+-
+ rds_wav: rds.o waveforms.o rds_wav.o fm_mpx.o
+ $(CC) -o rds_wav rds_wav.o rds.o waveforms.o fm_mpx.o -lm -lsndfile
+
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] Change Makefile into a crosscompile friendly version
2014-06-19 22:00 ` [Buildroot] [PATCH 2/2] Change Makefile into a crosscompile friendly version Eric Limpens
@ 2014-06-20 22:16 ` Arnout Vandecappelle
2014-06-21 10:06 ` Yann E. MORIN
0 siblings, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle @ 2014-06-20 22:16 UTC (permalink / raw)
To: buildroot
Hi Eric,
If this patch fixes a build issue, then it should be squashed with the previous
patch. You can do that by doing 'git rebase -i origin/master' and then replacing
the 'pick' of this patch with 'fixup'.
On 20/06/14 00:00, Eric Limpens wrote:
> Signed-off-by: Eric Limpens <limpens@gmail.com>
> ---
> ...ifmrds-000-Makefile-crosscompile-friendly.patch | 25 ++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
> create mode 100644 package/pifmrds/pifmrds-000-Makefile-crosscompile-friendly.patch
>
> diff --git a/package/pifmrds/pifmrds-000-Makefile-crosscompile-friendly.patch b/package/pifmrds/pifmrds-000-Makefile-crosscompile-friendly.patch
> new file mode 100644
> index 0000000..8b8cd49
> --- /dev/null
> +++ b/package/pifmrds/pifmrds-000-Makefile-crosscompile-friendly.patch
> @@ -0,0 +1,25 @@
The patch should start with a description, like a normal commit message. This
description should also contain your Signed-off-by tag (its meaning is different
because it implies publication under the upstream's GPLv3 license, not under
buildroot's GPLv2 license).
Also, it would be good to upstream this patch.
> +diff -purN PiFmRds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile
> +--- PiFmRds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile 2014-05-04 18:21:40.000000000 +0200
> ++++ pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile 2014-06-19 21:21:14.220328601 +0200
> +@@ -1,20 +1,8 @@
> +-CC = gcc
> +-STD_CFLAGS = -Wall -std=gnu99 -c -g -O3
> +-
> +-# Enable ARM-specific options only on ARM, and compilation of the app only on ARM
> +-UNAME := $(shell uname -m)
> +-
> +-ifeq ($(UNAME), armv6l)
> +- CFLAGS = $(STD_CFLAGS) -march=armv6 -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -ffast-math
> ++all: app rds_wav
> +
> + app: rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o
> + $(CC) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o -lm -lsndfile
Actually, moving this outside the condition and adding the 'all' target is all
that is really necessary to make cross-compilation possible. The rest maybe
makes it nicer, but is not really necessary. It also won't be acceptable
upstream because it makes native compilation more difficult.
Regards,
Arnout
> +
> +-else
> +- CFLAGS = $(STD_CFLAGS)
> +-endif
> +-
> +-
> + rds_wav: rds.o waveforms.o rds_wav.o fm_mpx.o
> + $(CC) -o rds_wav rds_wav.o rds.o waveforms.o fm_mpx.o -lm -lsndfile
> +
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] Change Makefile into a crosscompile friendly version
2014-06-20 22:16 ` Arnout Vandecappelle
@ 2014-06-21 10:06 ` Yann E. MORIN
0 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2014-06-21 10:06 UTC (permalink / raw)
To: buildroot
Arnout, Eric, All,
On 2014-06-21 00:16 +0200, Arnout Vandecappelle spake thusly:
> If this patch fixes a build issue, then it should be squashed with the previous
> patch. You can do that by doing 'git rebase -i origin/master' and then replacing
> the 'pick' of this patch with 'fixup'.
Yep, Eric said on IRC he made a mistake when sending the patches.
> On 20/06/14 00:00, Eric Limpens wrote:
> > Signed-off-by: Eric Limpens <limpens@gmail.com>
> > ---
> > ...ifmrds-000-Makefile-crosscompile-friendly.patch | 25 ++++++++++++++++++++++
> > 1 file changed, 25 insertions(+)
> > create mode 100644 package/pifmrds/pifmrds-000-Makefile-crosscompile-friendly.patch
> >
> > diff --git a/package/pifmrds/pifmrds-000-Makefile-crosscompile-friendly.patch b/package/pifmrds/pifmrds-000-Makefile-crosscompile-friendly.patch
> > new file mode 100644
> > index 0000000..8b8cd49
> > --- /dev/null
> > +++ b/package/pifmrds/pifmrds-000-Makefile-crosscompile-friendly.patch
> > @@ -0,0 +1,25 @@
>
> The patch should start with a description, like a normal commit message. This
> description should also contain your Signed-off-by tag (its meaning is different
> because it implies publication under the upstream's GPLv3 license, not under
> buildroot's GPLv2 license).
>
> Also, it would be good to upstream this patch.
>
>
> > +diff -purN PiFmRds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile
> > +--- PiFmRds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile 2014-05-04 18:21:40.000000000 +0200
> > ++++ pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile 2014-06-19 21:21:14.220328601 +0200
> > +@@ -1,20 +1,8 @@
> > +-CC = gcc
> > +-STD_CFLAGS = -Wall -std=gnu99 -c -g -O3
> > +-
> > +-# Enable ARM-specific options only on ARM, and compilation of the app only on ARM
> > +-UNAME := $(shell uname -m)
> > +-
> > +-ifeq ($(UNAME), armv6l)
> > +- CFLAGS = $(STD_CFLAGS) -march=armv6 -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -ffast-math
> > ++all: app rds_wav
> > +
> > + app: rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o
> > + $(CC) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o -lm -lsndfile
>
> Actually, moving this outside the condition and adding the 'all' target is all
> that is really necessary to make cross-compilation possible. The rest maybe
> makes it nicer, but is not really necessary. It also won't be acceptable
> upstream because it makes native compilation more difficult.
I think we do not want the Makefile to override the CFLAGS. Buildroot
already pases appropriate CFLAGS, and keeping the ones above would be
only confusing, especially since it forces the float ABI and use of the
VFP.
Maybe we should however carry the -ffast-math flag, however.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] Add pifmrds package
2014-06-19 22:00 [Buildroot] [PATCH 1/2] Add pifmrds package Eric Limpens
2014-06-19 22:00 ` [Buildroot] [PATCH 2/2] Change Makefile into a crosscompile friendly version Eric Limpens
@ 2014-06-20 22:02 ` Arnout Vandecappelle
1 sibling, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2014-06-20 22:02 UTC (permalink / raw)
To: buildroot
Hi Eric,
Thank you for your contribution. There are a few things that Yann missed in his
earlier review...
On 20/06/14 00:00, Eric Limpens wrote:
> Signed-off-by: Eric Limpens <limpens@gmail.com>
> ---
> package/Config.in | 1 +
> package/pifmrds/Config.in | 9 +++++++++
> package/pifmrds/pifmrds.mk | 19 +++++++++++++++++++
> 3 files changed, 29 insertions(+)
> create mode 100644 package/pifmrds/Config.in
> create mode 100644 package/pifmrds/pifmrds.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index f43e985..0cefbc0 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -336,6 +336,7 @@ endif
> source "package/owl-linux/Config.in"
> source "package/parted/Config.in"
> source "package/pciutils/Config.in"
> + source "package/pifmrds/Config.in"
> source "package/picocom/Config.in"
We keep the Config.in entries alphabetical, so pifmrds should come after picocom.
> source "package/read-edid/Config.in"
> source "package/rng-tools/Config.in"
> diff --git a/package/pifmrds/Config.in b/package/pifmrds/Config.in
> new file mode 100644
> index 0000000..1269d64
> --- /dev/null
> +++ b/package/pifmrds/Config.in
> @@ -0,0 +1,9 @@
> +config BR2_PACKAGE_PIFMRDS
> + bool "pifmrds"
> + depends on BR2_arm
> + depends on BR2_LARGEFILE #libsndfile
> + select BR2_PACKAGE_LIBSNDFILE
> + help
> + pifmrds, FM-RDS transmitter using the Raspberry Pi's PWM
> +
> + https://github.com/ChristopheJacquet/PiFmRds
When there is a toolchain dependency, there should also be a comment when the
dependency is not met:
comment "pifmrds needs a toolchain w/ largefile"
depends on !BR2_LARGEFILE
(cfr. http://buildroot.org/downloads/manual/manual.html#depends-on-vs-select )
> diff --git a/package/pifmrds/pifmrds.mk b/package/pifmrds/pifmrds.mk
> new file mode 100644
> index 0000000..9365424
> --- /dev/null
> +++ b/package/pifmrds/pifmrds.mk
> @@ -0,0 +1,19 @@
> +PIFMRDS_VERSION = c67306ea9b8d827f45e0d90279d367e97119bcb1
> +PIFMRDS_SITE = $(call github,ChristopheJacquet,PiFmRds,$(PIFMRDS_VERSION))
> +PIFMRDS_INSTALL_TARGET = YES
This is the default so not necessary.
> +PIFMRDS_AUTORECONF = YES
Since it's a generic package, not an autotools package, this is pointless.
> +PIFMRDS_DEPENDENCIES += libsndfile
Minor: we usually don't use += here.
> +PIFMRDS_LICENSE = GPLv3+
> +PIFMRDS_LICENSE_FILES = LICENSE
> +
> +define PIFMRDS_BUILD_CMDS
> + $(MAKE) -C $(@D)/src CC=$(TARGET_CC) LDFLAGS="$(TARGET_LDFLAGS)" CFLAGS="$(TARGET_CFLAGS) -std=gnu99 -c"
There should be quotes around $(TARGET_CC) because it may contain ccache.
The line is a bit too long, better split it.
> +endef
> +
> +define PIFMRDS_INSTALL_TARGET_CMDS
> + $(INSTALL) -D -m 0755 $(@D)/src/pi_fm_rds $(TARGET_DIR)/usr/bin/pi_fm_rds
> + $(INSTALL) -D -m 0755 $(@D)/src/rds_wav $(TARGET_DIR)/usr/bin/rds_wav
> + $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/pifmrds/
If you're not copying anything into that directory, why do you create it?
Regards,
Arnout
> +endef
> +
> +$(eval $(generic-package))
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-21 10:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-19 22:00 [Buildroot] [PATCH 1/2] Add pifmrds package Eric Limpens
2014-06-19 22:00 ` [Buildroot] [PATCH 2/2] Change Makefile into a crosscompile friendly version Eric Limpens
2014-06-20 22:16 ` Arnout Vandecappelle
2014-06-21 10:06 ` Yann E. MORIN
2014-06-20 22:02 ` [Buildroot] [PATCH 1/2] Add pifmrds package Arnout Vandecappelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox