Re: [PATCH 2/2] tools/gpio: add the gpio-hammer tool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux