From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package: add socketcan package
Date: Tue, 19 Apr 2011 22:36:12 +0200 [thread overview]
Message-ID: <20110419223612.77112a72@surf> (raw)
In-Reply-To: <1303145560-11520-1-git-send-email-kevin.joly@armadeus.com>
Hello Kevin,
Thanks for this submission. A couple of comments below.
On Mon, 18 Apr 2011 18:52:40 +0200
kevin.joly at armadeus.com wrote:
> diff --git a/package/socketcan/Config.in b/package/socketcan/Config.in
> new file mode 100644
> index 0000000..e8d7a39
> --- /dev/null
> +++ b/package/socketcan/Config.in
> @@ -0,0 +1,15 @@
> +config BR2_PACKAGE_SOCKETCAN
> + bool "Socket CAN"
> + help
> + The socketcan package is an implementation of CAN protocols
> + (Controller Area Network) for Linux. CAN is a networking technology
> + which has wide-spread use in automation, embedded devices, and
> + automotive fields.
> +
> + While there have been other CAN implementations for Linux based on
> + character devices, Socket CAN uses the Berkeley socket API,
> + the Linux network stack and implements the CAN device drivers as
> + network interfaces. The CAN socket API has been designed as similar
> + as possible to the TCP/IP protocols to allow programmers, familiar
> + with network programming, to easily learn how to use CAN sockets.
Maybe this package should be called SOCKETCANUTILS or something like
that ? It isn't the Socket CAN implementation by itself, since that
thing is inside the kernel.
Moreover, we typically insert the project URL as a last line of the
help text.
> @@ -0,0 +1,33 @@
> +#############################################################
> +#
> +# Socket CAN
> +#
> +#############################################################
> +PROGRAMS_ISOTP = isotpdump,isotprecv,isotpsend,isotpsniffer,isotptun,isotpserver
> +PROGRAMS_CANGW = cangw
> +PROGRAMS_SLCAN = slcan_attach,slcand
> +PROGRAMS_CAN_UTILS = can-calc-bit-timing,candump,cansniffer,cansend,canplayer,cangen,canbusload,log2long,log2asc,asc2log,canlogserver,bcmserver,slcanpty,canfdtest
> +PROGRAMS = {$(PROGRAMS_ISOTP),$(PROGRAMS_CANGW),$(PROGRAMS_SLCAN),$(PROGRAMS_CAN_UTILS)}
This program list is only used for stripping and it's useless, see
below.
> +SOCKETCAN_VERSION = 1235
> +SOCKETCAN_SOURCE = socketcan-svn-rev$(SOCKETCAN_VERSION).tar.gz
> +SOCKETCAN_SITE = http://svn.berlios.de/svnroot/repos/socketcan/trunk/
> +SOCKETCAN_SITE_METHOD = svn
> +
> +define SOCKETCAN_BUILD_CMDS
> + $(MAKE) -C $(SOCKETCAN_DIR)/can-utils CC="$(TARGET_CC)"
> +endef
Replace $(SOCKETCAN_DIR) with $(@D).
If you pass TARGET_CC, you also probably want to pass TARGET_CFLAGS
somehow, so that the code gets compiled for the proper sub-architecture.
> +define SOCKETCAN_INSTALL_TARGET_CMDS
> + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(SOCKETCAN_DIR)/can-utils install
SOCKETCAN_DIR -> @D
> + $(TARGET_STRIP) $(TARGET_DIR)/usr/local/bin/$(PROGRAMS)
This is not needed, Buildroot will automagically strip all binaries
from the target filesystem. So just remove this line.
However, I see that things are installed into usr/local/bin in the
target filesystem, which is unusual. Could you tweak the think so that
it gets installed in usr/bin ?
> +define SOCKETCAN_CLEAN_CMDS
> + $(MAKE) -C $(SOCKETCAN_DIR)/can-utils clean
> +endef
> +
> +define SOCKETCAN_UNINSTALL_TARGET_CMDS
> + rm -rf $(SOCKETCAN_DIR)
> +endef
@D and @D here as well.
Thanks again!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2011-04-19 20:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-18 16:52 [Buildroot] [PATCH] package: add socketcan package kevin.joly at armadeus.com
2011-04-19 20:36 ` Thomas Petazzoni [this message]
[not found] ` <4DAE88BF.6070301@armadeus.com>
2011-04-20 8:15 ` Thomas Petazzoni
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=20110419223612.77112a72@surf \
--to=thomas.petazzoni@free-electrons.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox