Adding pifmrds package
PATCH 1/1 Adding pifmrds package
--- package/Config.in | 1 + package/pifmrds/Config.in | 9 +++++++++ package/pifmrds/pifmrds.mk | 18 ++++++++++++++++++ package/pifmrds/pifmrds.patch | 25 +++++++++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 package/pifmrds/Config.in create mode 100644 package/pifmrds/pifmrds.mk create mode 100644 package/pifmrds/pifmrds.patch
package/Config.in +1 -0
@@ -337,6 +337,7 @@ endif source "package/parted/Config.in" source "package/pciutils/Config.in" source "package/picocom/Config.in" + source "package/pifmrds/Config.in" source "package/read-edid/Config.in" source "package/rng-tools/Config.in" source "package/rpi-userland/Config.in"
package/pifmrds/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_PIFMRDS + bool "pifmrds" + depends on BR2_arm + depends on BR2_PACKAGE_LIBSNDFILE + help + pifmrds, FM-RDS transmitter using the Raspberry Pi's PWM + + comment "pifmrds requires libsndfile" + depends on !BR2_PACKAGE_LIBSNDFILE
package/pifmrds/pifmrds.mk new file +18 -0
@@ -0,0 +1,18 @@ +PIFMRDS_VERSION = c67306ea9b8d827f45e0d90279d367e97119bcb1 +PIFMRDS_SITE = $(call github,ChristopheJacquet,PiFmRds,$(PIFMRDS_VERSION)) +PIFMRDS_INSTALL_TARGET = YES +PIFMRDS_AUTORECONF = YES +PIFMRDS_DEPENDENCIES += libsndfile + +define PIFMRDS_BUILD_CMDS + $(MAKE) -C $(@D)/src CC=$(TARGET_CC) 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/ + $(INSTALL) -D -m 0644 $(@D)/src/*.wav $(TARGET_DIR)/usr/share/pifmrds/ +endef + +$(eval $(generic-package))
package/pifmrds/pifmrds.patch new file +25 -0
@@ -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 +
Signature · 1 line
1.9.1
PATCH 1/1 Adding pifmrds package
Eric, All,
On 2014-06-19 22:44 +0200, Eric Limpens spake thusly:
Quoted 1 line
Signed-off-by Eric Limpens <[email protected]>
[--SNIP--]
package/pifmrds/Config.in line 6
Quoted 12 lines
package/pifmrds/Config.in new file +6
-0@@ -0,0 +1,9 @@ +config BR2_PACKAGE_PIFMRDS + bool "pifmrds" + depends on BR2_arm + depends on BR2_PACKAGE_LIBSNDFILE + help + pifmrds, FM-RDS transmitter using the Raspberry Pi's PWM
The format for help text is: one tab, two spaces, the help text.
Also, it is customary to include the upstream location for the package. If there is no 'homepage', then pointing to the git repo is OK.
package/pifmrds/Config.in line 8
Quoted 2 lines
package/pifmrds/Config.in new file +2
-0+ + comment "pifmrds requires libsndfile"
This 'comment' should not be indented.
package/pifmrds/Config.in line 9
Quoted 1 line
package/pifmrds/Config.in new file +1
-0+ depends on !BR2_PACKAGE_LIBSNDFILE
We usally do not 'depends on' libraries, we 'select' them. If the selected library has dependencies, we inherit the dependencies from that library. So, you'd get something like:
config BR2_PACKAGE_PIFMRDS
bool "pifmrds"
depends on BR2_arm
depends on BR2_LARGEFILE # libsndfile
select BR2_PACKAGE_LIBSNDFILE
help
FM-RDS transmitter using the Raspberry Pi's PWM.
Quoted 6 lines
package/pifmrds/pifmrds.mk new file +0
-0
package/pifmrds/pifmrds.mk line 8
Quoted 8 lines
package/pifmrds/pifmrds.mk new file +8
-0@@ -0,0 +1,18 @@ +PIFMRDS_VERSION = c67306ea9b8d827f45e0d90279d367e97119bcb1 +PIFMRDS_SITE = $(call github,ChristopheJacquet,PiFmRds,$(PIFMRDS_VERSION)) +PIFMRDS_INSTALL_TARGET = YES +PIFMRDS_AUTORECONF = YES +PIFMRDS_DEPENDENCIES += libsndfile + +define PIFMRDS_BUILD_CMDS + $(MAKE) -C $(@D)/src CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS) -std=gnu99 -c"
(see below) Also pass $(TARGET_LDFLAGS).
package/pifmrds/pifmrds.mk line 15
Quoted 7 lines
package/pifmrds/pifmrds.mk new file +7
-0+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/ + $(INSTALL) -D -m 0644 $(@D)/src/*.wav $(TARGET_DIR)/usr/share/pifmrds/
Are the .wav files really necessary, or are they not just for testing purposes? If only for testing, do not install them; let the user provide his own collection of files to play.
package/pifmrds/pifmrds.patch
Quoted 8 lines
package/pifmrds/pifmrds.mk new file +3
-0+endef + +$(eval $(generic-package))package/pifmrds/pifmrds.patch new file +0
-0
Patches should be named package-number-title.patch, so something like:
pifmrds-0000-Makefile-make-it-cross-compile-friendly.patch
Also, patches should contain a standard commit log, something like:
Makefile: make it cross-compile friendly
The current Makefile makes heavy assumption that it is natively compiled on the RPi.
Fix that so it plays nicely in Buildroot.
Quoted 7 lines
package/pifmrds/pifmrds.patch new file +6
-0@@ -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
package/pifmrds/pifmrds.patch line 16
Quoted 10 lines
package/pifmrds/pifmrds.patch new file +10
-0+- +-# 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
You may want to pass the $(LDFLAGS) here:
$(CC) $(LDFLAGS) -o [.....]
and pass LDFLAGS the same way you pass CFLAGS, in the .mk file.
Regards,
Yann E. MORIN.
Quoted 16 lines
package/pifmrds/pifmrds.patch new file +9
-0+ +-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 +Signature · 6 lines
1.9.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 Adding pifmrds package
In reply to Eric LimpensEric, All,
I forgot a few things...
On 2014-06-19 22:44 +0200, Eric Limpens spake thusly:
Quoted 1 line
Signed-off-by Eric Limpens <[email protected]>
[--SNIP--]
package/pifmrds/pifmrds.mk line 5
Quoted 11 lines
package/pifmrds/pifmrds.mk new file +5
-0@@ -0,0 +1,18 @@ +PIFMRDS_VERSION = c67306ea9b8d827f45e0d90279d367e97119bcb1 +PIFMRDS_SITE = $(call github,ChristopheJacquet,PiFmRds,$(PIFMRDS_VERSION)) +PIFMRDS_INSTALL_TARGET = YES +PIFMRDS_AUTORECONF = YES +PIFMRDS_DEPENDENCIES += libsndfile
You forgot the licensing terms:
PIFMRDS_LICENSE = GPLv3+
PIFMRDS_LICENSE_FILES = LICENSE
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'