Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@systec-electronic.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org,
	Alexandre Courbot <acourbot@nvidia.com>,
	Michael Welling <mwelling@ieee.org>,
	Markus Pargmann <mpa@pengutronix.de>,
	Lee Campbell <leecam@google.com>,
	Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>,
	Grant Likely <grant.likely@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>, Mark Brown <broonie@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Johan Hovold <johan@kernel.org>
Subject: Re: [PATCH 2/2] tools/gpio: add the gpio-hammer tool
Date: Thu, 28 Apr 2016 09:47:53 +0200	[thread overview]
Message-ID: <5064400.LUANRz9U0Y@ws-stein> (raw)
In-Reply-To: <1461660866-18683-2-git-send-email-linus.walleij@linaro.org>

On Tuesday 26 April 2016 10:54:26, Linus Walleij wrote:
> The gpio-hammer is used from userspace as an example of how
> to retrieve a GPIO handle for one or several GPIO lines and
> hammer the outputs from low to high and back again. It will
> pulse the selected lines once per second for a specified
> number of times or indefinitely if no loop count is
> supplied.
> 
> Example output:
> $ gpio-hammer -n gpiochip0 -o5 -o6 -o7
> Hammer lines [5, 6, 7] on gpiochip0, initial states: [1, 1, 1]
> [-] [5: 0, 6: 0, 7: 0]
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

This might be a stupid question, but how do I build those tools? I've never 
done this before and failed with the following command:
> ARCH=arm CROSS_COMPILE=/opt/OSELAS.Toolchain-2013.12.2/arm-cortexa8-linux-
gnueabi/gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/bin/arm-
cortexa8-linux-gnueabi- make O=build_arm V=1 tools/gpio

results:

make -C /home/alex/repo/linux/build_arm KBUILD_SRC=/home/alex/repo/linux \
-f /home/alex/repo/linux/Makefile tools/gpio
make[1]: Verzeichnis „/home/alex/repo/linux/build_arm“ wird betreten
mkdir -p ./tools
make LDFLAGS= MAKEFLAGS="" O=/home/alex/repo/linux/build_arm subdir=tools -C 
../tools/ gpio
mkdir -p /home/alex/repo/linux/build_arm/tools/gpio && make 
O=/home/alex/repo/linux/build_arm subdir=tools/gpio --no-print-directory -C 
gpio 
/opt/OSELAS.Toolchain-2013.12.2/arm-cortexa8-linux-gnueabi/gcc-4.8.3-
glibc-2.18-binutils-2.24-kernel-3.12-sanitized/bin/arm-cortexa8-linux-gnueabi-
gcc -O2 -Wall -g -D_GNU_SOURCE   -c -o lsgpio.o lsgpio.c
lsgpio.c:25:24: fatal error: linux/gpio.h: No such file or directory
 #include <linux/gpio.h>

Apparently the includes to $(srcdir)/include and 
$(srcdir)/arch/${ARCH}/include are missing.

Best regards,
Alexander

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-04-28  7:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26  8:54 [PATCH 1/2] gpio: userspace ABI for reading/writing GPIO lines Linus Walleij
2016-04-26  8:54 ` [PATCH 2/2] tools/gpio: add the gpio-hammer tool Linus Walleij
2016-04-27 16:00   ` Michael Welling
2016-05-31 11:59     ` Linus Walleij
2016-06-01  3:43       ` Michael Welling
2016-06-01 17:35         ` Linus Walleij
2016-06-01 18:09           ` Michael Welling
2016-06-01 21:40             ` Linus Walleij
2016-06-02 14:59               ` Michael Welling
2016-06-15  9:48                 ` Linus Walleij
2016-04-28  7:47   ` Alexander Stein [this message]
2016-04-26 16:44 ` [PATCH 1/2] gpio: userspace ABI for reading/writing GPIO lines Dmitry Torokhov
2016-05-27 13:22   ` Linus Walleij
2016-05-27 17:36     ` Dmitry Torokhov

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=5064400.LUANRz9U0Y@ws-stein \
    --to=alexander.stein@systec-electronic.com \
    --cc=acourbot@nvidia.com \
    --cc=arnd@arndb.de \
    --cc=bamvor.zhangjian@linaro.org \
    --cc=broonie@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=johan@kernel.org \
    --cc=leecam@google.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mpa@pengutronix.de \
    --cc=mwelling@ieee.org \
    /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