Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: phillip.toone on May 24, 2013, 06:00:36 PM
-
I would like to use the wiringpi library with piCore. It would be nice if this library were available in the tce repository but it isn't so I decided I would learn how to install this library and package it as a tcz for other's convince. I am a bit of a novice and thought this would be me a good oportunity to learn the piCore/persistence/tce process better. One should be able to install wiring pi with the following:
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build
But I get the following error attempting to build:
-sh: ./build: not found
So I try this:
sudo ./build
and get this error:
sudo: unable to execute ./build: No such file or directory
I've also tried this:
sudo -s
./build
And get this error:
/bin/sh: ./build: not found
I've even tried using:
sudo -i
which restarts the system but I still get the same errors as before.
A few weeks ago I was able to install wiringpi by using git as follows:
git clone git://git.drogon.net/wiringPi
cd wiringPi/wiringPi
sudo make install
When I try this now I get a compile error regarding mcp3422.c using the function 'myAnalogRead' and the variable 'b3' but it seems to compile. I used to just copy the libwiringPi.so.1.0 file to the examples directory and compile my code from there. This seems to no longer work and I see that the file libwiringPi.so.2.0 is used in place of the earlier version. I realize now that I should have been installing this library as follows:
cd wiringPi/wiringPi
make
sudo make install
cd ../ gpio
make
sudo make install
cd ../examples
make blink
sudo ./blink
But I get this error:
gpio.c:39:23: fatal error: gertboard.h: no such file or directory
compilation terminated.
make: *** [gpio.o] Error 1
I would like to understand what I am doing wrong so that I can create a tcz file for others to use. Any help will be appreciated. Thanks.
-
It install here without any problem using ./build.
Did you install bash.tcz? build is a bash script.
-
wiringpi.tcz is added to repo
-
Did you install bash.tcz? build is a bash script.
You are right, that was the problem. The build script work perfectly with bash.
-
wiringpi.tcz is added to repo
Ok, I installed wiringpi.tcz with tce homing that this would make everything persistent. But when I try to compile something, like the blink.c example program, I get this error.
blink.c:27:22: fatal error: wiringPi.h: No such file or directory
compilation terminated.
make: *** [blink.o] Error 1
When I install wiringPi with the ./build script I don't get this error. Am I doing something wrong?
-
Is wiringpi-dev loaded?
-
Is wiringpi-dev loaded?
No, and I actually just realized that I don't want it loaded by default. Most of the time I will be using the compiled binary and will not need or want to be able to compile the code. When I am doing development I can just build that functionality for that session. I'm coming to understand the concept of Tiny Core and I think I like it. Thanks again for all your help.