View Single Post
Old 04-13-2009, 09:40 PM   #10
UtterInanity
Member
UtterInanity is on a distinguished road
 
Posts: 24
Karma: 58
Join Date: Aug 2008
Device: Sony PRS-505, iRex DR1000S
Quote:
Originally Posted by Mackx View Post
Since I am a newby to porting software it would be helpfull if someone wrote a simple description on how to port extra libraries to emu and DR environment. To be more specific, I wanted to add an icon in the DR taskbar for the xournal-app, but I found that I needed at least two extra libraries in my environent. So a short description with the following steps would help me:
1) where to get them
2) how to get them and where to store them (in the VMWare environment of Adam)
3) how to build (i.e. which arguments to add to ./configure ? etc.)
4) how to install (should I give some extra arguments to ./install.sh ?)
5) how to use (do I need to add some extra include and library directories somewhere or are they copied in generic libs-directories)
6) where to copy the libraries on the DR (with example script :-) (will the libraries survive a new firmware upgrade?)

This would help me to get more productive and I assume also other people, lets share the knowledge available in the group.
I've been meaning to write something like this, but I haven't had the time. I do, however, have the time to answer a few questions. Unfortunately, I'm answering them from memory, since I managed to screw up the VMWare environment so bad that it won't even boot.

1) The source code generally isn't hard to find for most packages. Just download the code, unzip it to a folder, and compile. Most of the time, it won't work, and that's where the fun starts. Sometimes it'll be missing additional dependencies, sometimes something'll be wrong in the makefile, sometimes you just have to cut things out entirely. At least that's been my experience.

2) Doesn't matter where you put them. I just unzipped them to the Desktop, but it got a little messy after a few bouts with dependency hell.

3) Compile as you would any other DR1000 program. Most of the libraries you can open in Anjuta. For those that don't, you'll have to do it manually. That can get messy. Hopefully you don't run into that.

4) Once it's compiling, it takes some work to get it going. I found the best way was to package it into a .ipk file. You an do this with a script I found. Look for ipkg-build.sh on Google, you'll find it. It requires certain files and the correct folder structure. The best way I found to do this is as follows:
a) Go to "Deploy" under the tools menu. Let it do its thing until you get a little popup that asks for a password. Do not enter a password.
b) Instead, open up the folder that contains the source files. Make sure you can see hidden files (under the view menu, I think). Look for the folder .deploy.
c) Copy it to another name (I called it ipkg).
d) Cancel the Deploy. It removes the .deploy folder (Hence why we copied it) Alternatively, let it finish if you want. Doesn't matter, just copy the folder first.
e) Create a file in the ipkg folder you just copied. Call it CONTROL. Inside this file goes some basic information about the package. I don't know what it is. The same place you found the ipkg-build.sh will probably tell you. (Ah, here you go: http://qtextended.org/modules/develo...ers/IPKG_Howto ) That explains it better than I can.
f) Follow those instructions to build the package. You should get a file called packageName.ipk.
f) To install it to the dev environment (so you can satisfy dependencies): open a terminal. Type "opkg-target install packageName.ipk" without the quotes, where packageName.ipk is the package file you got in the last step.
g) To install it to the simulator: start the simulator. Copy the file to it. (terminal command: "scp root@192.168.7.2 packageName.ipk /"). Ssh into the machine. (terminal: "ssh root@192.168.7.2"). Navigate to the root directory. (cd /) Install package. (opkg install packageName.ipk).
Alternative: Deploy might work as well, but only if you shut the simulator down properly. Not sure, this is the way I remember doing it.
h) To install it on an actual device, make a shell script with "opkg install packageName.ipk" in it, and copy the file and the script to a directory on the device, then run the script. Should work.

5) Nothing special. Should work as normal.

6) They should be in the right spot if you follow the install instructions. Unfortunately, they will not survive a firmware upgrade. I don't know how to get past that, unfortunately.

If you have any more questions, I check here every so often. I'll do my best to help out. Hope this wasn't too lengthy or confusing. (Or wrong... I shouldn't be going by memory alone.)
UtterInanity is offline   Reply With Quote