Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: str4ng3r on January 26, 2013, 09:30:47 PM
-
Hi guys.
If I compile my applications, where do the compiled apps go to when i reboot?
I'm not having persistency on them.
Example: i like nano. so i downloaded the source and compiled it. After compilation i'm able to run it, but after reboot it's gone.
Repo is no option, since i'm using piCore and nano isn't there.
Thanks for your help.
Cheers.
-
Hi str4ng3r
You need to use some form of persistence. Convert nano to a tcz and place it with your other extensions, or add
the nano files to your backup.
-
Creating a .tcz
If the program supports DESTDIR (most do) the files will be installed in /tmp/package, but configured for /usr/local. In this case, create extension like this:
cd /tmp
mksquashfs package program_name.tcz
cd /tmp/package
Next create the list of files in the extension, it will be submitted with the extension:
find usr -not -type d > program_name.tcz.list
As a final step, remove the packed files from /tmp/package:
rm -rf usr
Is this all i need to create an extension? If yes... i'm still getting my head around it.
-
Hi str4ng3r
Yes, that looks correct. I would change the find command to:
find usr -not -type d > ../program_name.tcz.list
so it winds up in the same directory as program_name.tcz
-
Hi str4ng3r
Yes, that looks correct. I would change the find command to:
find usr -not -type d > ../program_name.tcz.list
so it winds up in the same directory as program_name.tcz
Great.
So, i compile the source code and then use the commands above. Is that it?
-
Hi str4ng3r
And copy the files to your tce/optional directory.
-
Hi str4ng3r
And copy the files to your tce/optional directory.
Rich, i don't know if you mind, but i'll be reporting the extension creation progress.
Created Downloads directory in partition 2.
wget nano
tar nano
./configure
make
make install
cd /tmp, but i couldn't find files relating to nano ( there's only aberr, appserr, k5_skip files and then 2 directories, tce and tcloop)
flew to usr/local, and still couldn't find a thing...
I don't know where the compilation result went... lol ;D
-
Hi str4ng3r
Enter
which nano
to find out where it wound up.
-
Hi str4ng3r
Enter
which nano
to find out where it wound up.
Should have drilled down a bit further... which result: usr/local/bin/nano
4 a.m. on my side of the world taking it's toll....
-
Hi str4ng3r
Go to:
http://forum.tinycorelinux.net/index.php/topic,14737.msg83763.html#msg83763
and download one of the attached scripts, doesn't matter which one, they are all based on the same template.
Look through it. It converts a compressed tarball into a set of extension files including an archive that can be
submitted to the repo. When run, it creates a subdirectory called EXTENSION_NAME-VERSION in the
directory it's in, and everything winds up in that subdirectory.
-
Hi str4ng3r
Go to:
http://forum.tinycorelinux.net/index.php/topic,14737.msg83763.html#msg83763
and download one of the attached scripts, doesn't matter which one, they are all based on the same template.
Look through it. It converts a compressed tarball into a set of extension files including an archive that can be
submitted to the repo. When run, it creates a subdirectory called EXTENSION_NAME-VERSION in the
directory it's in, and everything winds up in that subdirectory.
Can't understand it... :(
This is getting way too complicated... this persistency thing...
Need to find some motivation.
Edit: DONE! ;D
-
Hi str4ng3r
Maybe this will work for you:
export CFLAGS="-Os -pipe"
export CXXFLAGS="-Os -pipe"
export LDFLAGS="-Wl,-O1"
mkdir -p nano-2.3.1/tmp/package
tar xf nano-2.3.1.tar.gz
cd nano-2.3.1
./configure --prefix=/usr/local
make install DESTDIR=`pwd`/tmp/package
cd tmp
find . | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded
mksquashfs package/ my_nano.tcz -noappend
cp my_nano.tcz /mnt/mmcblk0p1/tce/optional
tce-load -i /mnt/mmcblk0p1/tce/optional/my_nano.tcz
Notes/assumptions:
1. The source package is called nano-2.3.1.tar.gz
2. Your tce/optional directory is on /mnt/mmcblk0p1/tce/optional
3. You may have to add one or more of the following to CFLAGS and CXXFLAGS (I'm not familiar with ARM)
-march=armv6
-mfpu=vfp
-mfloat-abi=hard
If all went well, enter nano and the editor should start.
If nano works, create a file called my_nano.tcz.dep containing:
ncurses-common.tcz
ncurses.tcz
Then:
cp my_nano.tcz.dep /mnt/mmcblk0p1/tce/optional
-
Thanks for everything Rich.
After my breakdown yesterday, i managed to solve the problem later that day.
I now know how to create my tcz's and i'm dealing with the persistence concept.
Once again, thanks for all your help. ;)