From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] wiringpi: New package
Date: Sat, 3 Oct 2015 18:02:43 +0100 [thread overview]
Message-ID: <56100A33.10209@imgtec.com> (raw)
In-Reply-To: <1440708202-19616-1-git-send-email-root@renaud.io>
Dear Renaud AUBIN,
first of all, thanks for your contribution. I have written some comments
below; please keep reading.
On 27/08/15 21:43, Renaud AUBIN wrote:
> Enable Raspberry Pi GPIO access through the WiringPi library.
>
> Git http backend is not enabled on the official repo. There is no
> official release tarball. As a consequence, this packaging uses an
> unofficial repo hosted on github.
Your Signed-of-by tag is missing here.
> ---
> package/Config.in | 4 ++++
> package/wiringpi/Config.in | 11 +++++++++++
> package/wiringpi/wiringpi.mk | 40 ++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 55 insertions(+)
> create mode 100644 package/wiringpi/Config.in
> create mode 100644 package/wiringpi/wiringpi.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 783fbb4..0c08fc2 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1502,4 +1502,8 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
> endif
> endmenu
>
> +menu "Raspberry Pi"
> + source "package/wiringpi/Config.in"
> +endmenu
> +
You are creating a new menu for Raspberry Pi. I think this is not
correct. This package should be placed under "Libraries -> Hardware
handling" instead.
> endmenu
> diff --git a/package/wiringpi/Config.in b/package/wiringpi/Config.in
> new file mode 100644
> index 0000000..46141d4
> --- /dev/null
> +++ b/package/wiringpi/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_WIRINGPI
> + bool "wiringpi"
> + help
> + WiringPi is a GPIO access library written in C for the
> + BCM2835 used in the Raspberry Pi. It?s released under the
> + GNU LGPLv3 license and is usable from C and C++ and many
> + other languages with suitable wrappers (See below) It?s
> + designed to be familiar to people who have used the
> + Arduino ?wiring? system
> +
> + http://wiringpi.com/
Please do not use spaces for indentation, use tabs instead. Remember
that text in the help section should be wrapped at 72 characters.
> diff --git a/package/wiringpi/wiringpi.mk b/package/wiringpi/wiringpi.mk
> new file mode 100644
> index 0000000..4340a4f
> --- /dev/null
> +++ b/package/wiringpi/wiringpi.mk
> @@ -0,0 +1,40 @@
> +################################################################################
> +#
> +# wiringpi
> +#
> +################################################################################
> +
> +WIRINGPI_VERSION = 2.25
Upstream released a 2.29 version. Maybe is worth to use that one instead.
> +WIRINGPI_SITE = $(call github,nibua-r,unofficial-wiringpi,v$(WIRINGPI_VERSION))
I'm not a fan of using unofficial repositories. I know that upstream not
even adds tags when they release a new version, but anyway, I would
prefer to just use the official git repository and the commit ID as a
version.
By the way, I have sent an email upstream to request tags.
> +WIRINGPI_INSTALL_STAGING = YES
> +WIRINGPI_LICENSE = LGPLv3
> +WIRINGPI_LICENSE_FILES = COPYING.LESSER
> +
> +define WIRINGPI_BUILD_CMDS
> + $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D)/wiringPi
> + $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D)/wiringPi static
> + $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D)/devLib
> + $(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D)/devLib static
> + $(MAKE) LDFLAGS="-L$(@D)/devLib -L$(@D)/wiringPi" INCLUDE="-I$(@D)/devLib -I$(@D)/wiringPi" CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D)/gpio all
> +endef
Again, don't use spaces for indentation, use tabs instead.
Please add $(TARGET_MAKE_ENV) before $(MAKE) every time you use it.
$(TARGET_CONFIGURE_OPTS) already defines CC=$(TARGET_CC) and
LD=$(TARGET_LD) among other things. Have you tried to use it?
> +define WIRINGPI_INSTALL_STAGING_CMDS
> + $(INSTALL) -D -m 0755 $(@D)/wiringPi/libwiringPi.so.$(WIRINGPI_VERSION) $(STAGING_DIR)/usr/lib
> + $(INSTALL) -D -m 0644 $(@D)/wiringPi/*.h $(STAGING_DIR)/usr/include/
> + $(INSTALL) -D -m 0755 $(@D)/wiringPi/libwiringPi.a $(STAGING_DIR)/usr/lib
> + cd $(STAGING_DIR)/usr/lib; ln -sf libwiringPi.so.$(WIRINGPI_VERSION) libwiringPi.so
> + $(INSTALL) -D -m 0755 $(@D)/devLib/libwiringPiDev.so.$(WIRINGPI_VERSION) $(STAGING_DIR)/usr/lib
> + $(INSTALL) -D -m 0644 $(@D)/devLib/*.h $(STAGING_DIR)/usr/include/
> + $(INSTALL) -D -m 0755 $(@D)/devLib/libwiringPiDev.a $(STAGING_DIR)/usr/lib
> + cd $(STAGING_DIR)/usr/lib; ln -sf libwiringPiDev.so.$(WIRINGPI_VERSION) libwiringPiDev.so
> +endef
> +
> +define WIRINGPI_INSTALL_TARGET_CMDS
> + $(INSTALL) -D -m 0755 $(@D)/wiringPi/libwiringPi.so.$(WIRINGPI_VERSION) $(TARGET_DIR)/usr/lib
> + cd $(TARGET_DIR)/usr/lib; ln -sf libwiringPi.so.$(WIRINGPI_VERSION) libwiringPi.so
> + $(INSTALL) -D -m 0755 $(@D)/devLib/libwiringPiDev.so.$(WIRINGPI_VERSION) $(TARGET_DIR)/usr/lib
> + cd $(TARGET_DIR)/usr/lib; ln -sf libwiringPiDev.so.$(WIRINGPI_VERSION) libwiringPiDev.so
> + $(INSTALL) -D -m 0755 $(@D)/gpio/gpio $(TARGET_DIR)/usr/bin
> +endef
No spaces for indentation. Use tabs.
Regards,
Vincent.
> +$(eval $(generic-package))
>
next prev parent reply other threads:[~2015-10-03 17:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 20:43 [Buildroot] [PATCH] wiringpi: New package Renaud AUBIN
2015-10-03 17:02 ` Vicente Olivert Riera [this message]
2015-10-03 17:17 ` Vincent Olivert Riera
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56100A33.10209@imgtec.com \
--to=vincent.riera@imgtec.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.