LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 01-13-2016, 02:49 PM   #1
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 487
Blog Entries: 13

Rep: Reputation: 47
building wiringPi gpio utility on slackwarearm


While I was building native on my AC100 for my Pi (currently none of them have compiler) I came across a few issues as I wanted to keep the AC100 as clean as possible.
By editing a few of the #include directives and just putting devLib and wiringPi libs in /lib I was able to build the gpio tool.
I've put the patch here and the ready-built binary tarball here for anyone that might find them handy.

BTW: the tarball is not a slackware package but if you extract it in the root it will put the content in the right places.

Last edited by louigi600; 01-17-2016 at 01:23 AM.
 
Old 01-17-2016, 12:09 AM   #2
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 752

Rep: Reputation: 92
You are ever ambitious!!

I'm wondering if this could be adapted for WiringLMK, Lemakers fork of wiringPI

Last edited by justwantin; 01-17-2016 at 12:13 AM. Reason: confused :^{
 
Old 01-17-2016, 12:51 AM   #3
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 487

Original Poster
Blog Entries: 13

Rep: Reputation: 47
Since both my Allwinner based tables have had their screens broken I don't use them much ... and I've no other Allwinner based devices so I don't really know. But you can try if you like
Does wiringlmk have the same build problems as wiringpi ?

Last edited by louigi600; 01-17-2016 at 12:55 AM.
 
Old 01-17-2016, 02:46 AM   #4
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 752

Rep: Reputation: 92
I was just wondering, not sure if it is necessary (for me), I'm running crash and burn right now and let it install where it wanted to go, once I know what I'm doing I'll get official. It builds from a script which appears to be Gordon's original build script: download using git, cd into root directory, chmod +x build, and ./build.
Code:
ls -l /usr/local/lib  
total 100
lrwxrwxrwx 1 root root    18 Jan 10 19:45 libwiringPi.so -> libwiringPi.so.2.0
-rwxr-xr-x 1 root root 70464 Jan 10 19:45 libwiringPi.so.2.0
lrwxrwxrwx 1 root root    21 Jan 17 18:27 libwiringPiDev.so -> libwiringPiDev.so.2.0
-rwxr-xr-x 1 root root 24048 Jan 17 18:27 libwiringPiDev.so.2.0
drwxr-xr-x 2 root root  4096 Nov 18 19:48 perl5
Don't know where that perl5 came from I'll have to check that out someday.
Code:
# ls /usr/local/include
drcSerial.h  lcd128x64.h  mcp23008.h  mcp23s17.h  mcp4802.h  piGlow.h	softTone.h     wiringPiSPI.h
ds1302.h     max31855.h   mcp23016.h  mcp3002.h   pcf8574.h  piNes.h	sr595.h        wiringSerial.h
gertboard.h  max5322.h	  mcp23017.h  mcp3004.h   pcf8591.h  sn3218.h	wiringPi.h     wiringShift.h
lcd.h	     maxdetect.h  mcp23s08.h  mcp3422.h   piFace.h   softPwm.h	wiringPiI2C.h
Code:
# ls /usr/local/bin    
gpio
Code:
# ls /usr/local/man/man1
gpio.1
I just built WiringLMK into ~/build on a BananaPro. I had to mkdir /usr /usr/bin /usr/include /usr/lib but not /usr/man/man1. There are make files in ./wiringLMK, ./gpio and ./devLib that need DESTDIR and PREFIX edited to suit. The build will fail if you don't add $(PREFIX) to the paths of the two commands that create symbolic links in /usr/lib. Line 119 in ./wiringLMK/Makefile and line 96 in ./libDev/Makefile.

There were no perls in there.
 
Old 01-17-2016, 10:36 AM   #5
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 487

Original Poster
Blog Entries: 13

Rep: Reputation: 47
I did not use the build script because it did not work for me, and after looking into it and seeing that not only it builds but also installs I was actually glad it did not work.
I then tried building just the piece I wanted (goip) and just went on from there until I had all the pieces required ti build it. Did not bother with anything else including man pages (the RPi2 where it's going doesn't have man).
In the patch you may notice that I create readme.slack ... I wrote that right after successfully compiling gpio.

Sorry I couldn't help any more then that.
 
Old 09-26-2016, 02:18 AM   #6
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 487

Original Poster
Blog Entries: 13

Rep: Reputation: 47
Just an update if it's handy for anyone.
I hadto rebuild gpio from wiringpi again (on hardfloat this time) so I double checked the notes and did a little mending on them. I'll update them here asap ... for the time being here's the revised building notes:

Code:
tar zf wiringPi-b0a60c3.tar.gz
cd wiringPi-b0a60c3
cat ../wiringpi_build_on_slack.diff | patch -p1
cd devLib
ln -s ../wiringPi/wiringPiI2C.h .
make
cd ../wiringPi
make
cd ..
cp wiringPi/libwiringPi.so.2.31 /lib/
cp devLib/libwiringPiDev.so.2.31 /lib/
ldconfig
cd gpio
make
cp gpio /usr/local/bin

Last edited by louigi600; 09-26-2016 at 12:24 PM.
 
Old 09-26-2016, 11:13 AM   #7
ppencho
Member
 
Registered: Jan 2004
Location: Bulgaria
Distribution: Slackware64-current
Posts: 94

Rep: Reputation: Disabled
Quote:
Originally Posted by louigi600 View Post
Code:
tar zf wiringPi-b0a60c3.tar.gz
cd wiringPi-b0a60c3
cat ../wiringpi_build_on_slack.diff | patch -p1
cd devLib
ln -s ../wiringPi/wiringPiI2C.h .
make
cd ../wiringPi
make
cd ..
cp wiringPi/libwiringPi.so.2.31 /lib/
cd devLib/libwiringPiDev.so.2.31 /lib/
ldconfig
cd gpio
make
cp gpio /usr/local/bin
I do not use wiringPi to check the file existence but I guess that the operation should be 'cp' (copy)?
 
Old 09-26-2016, 12:24 PM   #8
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 487

Original Poster
Blog Entries: 13

Rep: Reputation: 47
Yes ... cp ... that's a typo
 
Old 08-18-2019, 04:39 AM   #9
louigi600
Member
 
Registered: Dec 2013
Location: Italy
Distribution: Slackware
Posts: 487

Original Poster
Blog Entries: 13

Rep: Reputation: 47
Quote:
Originally Posted by louigi600 View Post
While I was building native on my AC100 for my Pi (currently none of them have compiler) I came across a few issues as I wanted to keep the AC100 as clean as possible.
By editing a few of the #include directives and just putting devLib and wiringPi libs in /lib I was able to build the gpio tool.
I've put the patch here and the ready-built binary tarball here for anyone that might find them handy.

BTW: the tarball is not a slackware package but if you extract it in the root it will put the content in the right places.
With a more recent version I had to also create these 2 links:
Code:
bash-5.0# pwd
/usr/src/WiringPi-master/devLib
bash-5.0# ln -s ../wiringPi/wiringPiI2C.h .
bash-5.0# ln -s ../wiringPi/wiringPiI2C.c .
I will make a new patch asap.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Presented for feedback wiringPi, RPi.GPIO nelsonm Slackware - ARM 0 11-04-2015 04:44 AM
Slackwarearm on the Raspberry Pi onebuck Linux - Embedded & Single-board computer 0 02-24-2013 08:44 PM
GPIO access on a Fujitsu Mini-ITX Industrial Mainboard, PCI Driver for GPIO mechatrix Linux - Embedded & Single-board computer 3 11-20-2011 03:57 PM
gnome-disk-utility-0.4: building with the source NicAx64 Linux - Software 1 02-24-2010 05:58 PM
Using GPIO (from kernel GPIO support) in MY application DannyGilbert Linux - Kernel 2 03-16-2009 07:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 12:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration