WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: I just compiled it and then rebooted... where did it go?!  (Read 3409 times)

Offline str4ng3r

  • Newbie
  • *
  • Posts: 48
I just compiled it and then rebooted... where did it go?!
« 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.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: I just compiled it and then rebooted... where did it go?!
« Reply #1 on: January 26, 2013, 09:42:23 PM »
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.

Offline str4ng3r

  • Newbie
  • *
  • Posts: 48
Re: I just compiled it and then rebooted... where did it go?!
« Reply #2 on: January 26, 2013, 09:56:20 PM »
Quote
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.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: I just compiled it and then rebooted... where did it go?!
« Reply #3 on: January 26, 2013, 10:04:16 PM »
Hi str4ng3r
Yes, that looks correct. I would change the find command to:
Code: [Select]
find usr -not -type d > ../program_name.tcz.listso it winds up in the same directory as  program_name.tcz

Offline str4ng3r

  • Newbie
  • *
  • Posts: 48
Re: I just compiled it and then rebooted... where did it go?!
« Reply #4 on: January 26, 2013, 10:09:12 PM »
Hi str4ng3r
Yes, that looks correct. I would change the find command to:
Code: [Select]
find usr -not -type d > ../program_name.tcz.listso 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?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: I just compiled it and then rebooted... where did it go?!
« Reply #5 on: January 26, 2013, 10:12:38 PM »
Hi str4ng3r
And copy the files to your  tce/optional  directory.

Offline str4ng3r

  • Newbie
  • *
  • Posts: 48
Re: I just compiled it and then rebooted... where did it go?!
« Reply #6 on: January 26, 2013, 10:40:04 PM »
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

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: I just compiled it and then rebooted... where did it go?!
« Reply #7 on: January 26, 2013, 10:56:21 PM »
Hi str4ng3r
Enter
Code: [Select]
which nanoto find out where it wound up.

Offline str4ng3r

  • Newbie
  • *
  • Posts: 48
Re: I just compiled it and then rebooted... where did it go?!
« Reply #8 on: January 26, 2013, 11:00:17 PM »
Hi str4ng3r
Enter
Code: [Select]
which nanoto 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....

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: I just compiled it and then rebooted... where did it go?!
« Reply #9 on: January 26, 2013, 11:11:34 PM »
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.

Offline str4ng3r

  • Newbie
  • *
  • Posts: 48
Re: I just compiled it and then rebooted... where did it go?!
« Reply #10 on: January 27, 2013, 05:05:06 PM »
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
« Last Edit: January 27, 2013, 05:59:08 PM by str4ng3r »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: I just compiled it and then rebooted... where did it go?!
« Reply #11 on: January 27, 2013, 11:09:36 PM »
Hi str4ng3r
Maybe this will work for you:
Code: [Select]
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:
Code: [Select]
ncurses-common.tcz
ncurses.tcz
Then:
Code: [Select]
cp my_nano.tcz.dep /mnt/mmcblk0p1/tce/optional

Offline str4ng3r

  • Newbie
  • *
  • Posts: 48
Re: I just compiled it and then rebooted... where did it go?!
« Reply #12 on: January 28, 2013, 02:32:52 PM »
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.  ;)