Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: ygil on November 25, 2021, 06:35:45 AM

Title: Adding Shared Libraries
Post by: ygil on November 25, 2021, 06:35:45 AM
Hi,

I am using piCorePlayer in which I want to run an application, that I developed, in background.
My application is using wiringPi (libwiringPi.so) to do so and need this library to be in /lib, or anywhere in the path that can be found.
The issue is that if I copy it there, it won"t survive a reboot. How can i do it permanently ?

best regards

yves
Title: Re: Adding Shared Libraries
Post by: Rich on November 25, 2021, 07:59:23 AM
Hi ygil
First install  squashfs-tools.tcz.

Now place the library and any links to it into an extension:
Code: [Select]
mkdir package/usr/local/lib
cp libwiringPi.so* package/usr/local/lib
mksquashfs package libwiringPi.tcz -noappend

Then copy the  libwiringPi.tcz  extension you just created to your  tce  directory and add it to your  onboot.lst  file.
Title: Re: Adding Shared Libraries
Post by: Rich on November 25, 2021, 08:02:52 AM
Hi ygil
Or you could check if  https://www.picoreplayer.org/  has  wiringpi.tcz  available and install that.
Title: Re: Adding Shared Libraries
Post by: ygil on November 25, 2021, 12:36:36 PM
Perfect.. this is working...

But something I cannot catch.. I could install squashfs-tools.tcz with tce-load.. I could create my extension.. after testing i wanted to redo all the things with a brand new image.. and tce-load was on the repo of picoreplayer.. and couldn't reinstall it..  I have no idea what i did taht permits to install it.

Thank you again.

yves
Title: Re: Adding Shared Libraries
Post by: Greg Erskine on November 25, 2021, 12:43:46 PM
It's best to ask piCorePlayer questions at https://forums.slimdevices.com/forum.php

https://docs.picoreplayer.org/faq/my_changes_disappeared/

Note: wiringPi was depreciated many years ago (although recently a third party started updating it again). pCP changed over to pigpio.