Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-21-2008, 04:14 AM   #1
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Integration of ScratchBox and iRex Official SDK

I want to integrate iRex Official SDK with ScratchBox, instead of crosstool. After some trial and error, I can setup a Target in ScratchBox with the Official SDK.

Reference: http://www.scratchbox.org/wiki/ForeignToolchains

I have succeeded in compiling a "Hello World" app with SDK in ScratchBox and its running in iLiad. So, the following steps are working.

*System Requirement: Debian 4. I don't know if the following steps work for system other than Debian 4.

*Required or packages:
darcs
fakeroot
debhelper

*In Synaptic Package Manager, add a line "deb http://scratchbox.org/debian/ apophis main" in Repositories setup. You can also add that line in /etc/apt/sources.list. Then you can install required ScratchBox with Synaptic Package Manager.

*Required ScratchBox Package (version number omitted):
scratchbox-core
scratchbox-devkit-cputransp
scratchbox-devkit-debian
scratchbox-devkit-doctools
scratchbox-devkit-perl
scratchbox-libs
scratchbox-toolchain-host-gcc

*Create a user in Linux. In my case, "iliaddev".
*Login as iliaddev.
IMPORTANT: Formally, the following steps should be done inside scratchbox, but I found it also works for outside scratchbox.

*Unpack official SDK in /
Code:
sudo tar jxf *.bz2
*
Code:
sudo mv /usr/local/arm/oe /scratchbox/compilers
*
Code:
cd /scratchbox
*
Code:
sudo darcs get --set-scripts-executable http://scratchbox.org/repos/1.0/sb-toolchain-extras
. Wait for download and install.
*
Code:
sudo chmod --recursive 777 /scratchbox/
*
Code:
cd /scratchbox/compilers/oe
*before going to next step, temporarily remove /scratchbox/compilers/oe/arm-linux/include/mozilla-minimo/system_wrappers/linux/version.h. After the next step finished, restore it.

*
Code:
/scratchbox/sb-toolchain-extras/confhelper/create_toolchain_conf.py > /scratchbox/sb-toolchain-extras/meta/alien-tc/arm-linux-iliad.conf
*Edit "/scratchbox/sb-toolchain-extras/meta/alien-tc/arm-linux-iliad.conf". Make it contain the following lines (exactly the same) and leave other lines unmodified:

Code:
COMPILER_PACKAGE = oesdk
VENDOR =
TOOLCHAIN_PREFIX_END =
TARGET_END =

*
Code:
cd /scratchbox/sb-toolchain-extras
*
Code:
make CONFIG=meta/alien-tc/arm-linux-iliad.conf -C meta/alien-tc all-sums
*
Code:
make CONFIG=meta/alien-tc/arm-linux-iliad.conf -C meta/alien-tc
. Ignore error messages.

*the next step might not be needed. I am not sure.
*
Code:
make CONFIG=meta/alien-tc/arm-linux-iliad.conf -C toolchain/post-install/ install
*
Code:
sudo /scratchbox/sbin/sbox_adduser iliaddev
*
Code:
/scratchbox/login
. You will be switched to ScratchBox environment.
If unable to login because of ERROR: '/scratchbox/sbin/chroot-uid' is not suid ROOT, execute "sudo chmod u+s /scratchbox/sbin/chroot-uid".

*
Code:
sb-menu
You will enter SB setup menu.

*Choose "Setup". Enter a name for your iLiad development environment. Choose "oe cross". In select devkits, choose "cputransp" and "qemu-arm-0.8.2-sb". Check everything to install. Select it as your Target.

*Done.

In ScratchBox:
*If pkg-config is needed when compiling, "export PKG_CONFIG_PATH=/scratchbox/compilers/oe/arm-linux/lib/pkgconfig". Or sbox$ echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" >> .bash_profile & sbox$ source .bash_profile to make it permanent.

*make a link in /usr/local/arm/oe/arm-linux for /scratchbox/compilers/oe/arm-linux/lib and /scratchbox/compilers/oe/arm-linux/include
*If c++ header files is needed, they are in /scratchbox/compilers/oe/include/c++/3.4.4. use ./configure CPPFLAGS=-I to make gcc search for c++ headers there.

Last edited by ericshliao; 11-25-2008 at 03:52 PM.
ericshliao is offline   Reply With Quote
Old 09-23-2008, 05:54 AM   #2
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Here is a package of Midnight Commander 4.6.1 runnable on iLiad. I compiled the package in ScratchBox with SDK. It's not a serious release. I just want to test and prove my setup of ScratchBox and SDK are working. I am amazed that touch pen is functional in MC, although not really useful.

In my current environment, I have to do some dirty trick:
"export PKG_CONFIG_PATH=/scratchbox/compilers/oe/arm-linux/lib/pkgconfig", "ln -s /scratchbox/compilers/oe /usr/local/arm/oe", and "./configure --host=arm-linux".

Unpack the package to any where, and execute "bin/mc" in terminal.

Sorry. I uploaded a wrong file. The previous package is the source code of MC. It's corrected now.
Attached Files
File Type: gz mc4.6.1.tar.gz (2.21 MB, 199 views)

Last edited by ericshliao; 09-23-2008 at 07:56 AM.
ericshliao is offline   Reply With Quote
Old 09-23-2008, 11:18 AM   #3
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
This is Stardict command line Version runnable on iLiad. A dictionary is included in the package. The dictionary contains some Chinese glyphs, currently not dispalyable on iLiad. This package is executable in ScratchBox iLiad development environment. Chinese glyphs are correctly shown in ScratchBox.

How to execute it :
*Unpack the package to anywhere you like.
*In command prompt, execute "bin/sdcv --data-dir ~~~~/sdcv/dic --utf8-output". (~~~~ is the absolute path to sdcv).

Now, I have to build a terminal compatible with Unicode so that I can see Chinese glyphs on iLiad terminal screen. If possible, Chinese IME on iLiad will be beautiful.
Attached Files
File Type: zip sdcv.iliad.bin.zip (8.75 MB, 179 views)
ericshliao is offline   Reply With Quote
Old 10-09-2008, 04:51 PM   #4
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Antartica reminded me that I should also setup a iLiad test environment within ScratchBox.

Followed some instructions by Adam (http://www.mobileread.com/forums/sho...8&postcount=35), I made it.
Here is my steps:

1. Setup a new Target in ScratchBox, name it "iliad_run" with the same options with iliad development env.
2. Within iliad_run, execute "apt-get update", "apt-get install matchbox". Varied errors may occur, solve it.
3. Outside ScratchBox, with root id, execute "vncserver :2 -ac -geometry 768x1024 -depth 8". I used ":2" because ":1" is used by default desktop. Execute "ifconfig" to get your current ip_address. Execute any vncviewer to connect to ip_address:2.
4. Switch to iliad_run env, execute "export DISPLAY=ip_address:2", "/usr/bin/matchbox-window-manager -use_titlebar no -use_cursor no -dispaly ip_address:2 &"
5. Execute you iliad app, and vncviewer will show the display if everything goes fine.


*Attached is the snapshot of vncviewer.
Attached Thumbnails
Click image for larger version

Name:	leafpad.jpg
Views:	292
Size:	129.5 KB
ID:	16917  
ericshliao is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about Irex DR-800 official cover ahhahh iRex 8 03-12-2010 11:16 AM
iRex Releases DR1000 SDK and source code Adam B. iRex 26 09-29-2009 11:58 AM
iLiad colinux + scratchbox ? ericshliao iRex Developer's Corner 2 01-28-2009 10:18 AM
iLiad Howto create a crosscompiler for iliad27 using softfloat, with scratchbox integration Antartica iRex Developer's Corner 7 10-26-2006 10:16 AM


All times are GMT -4. The time now is 10:48 PM.


MobileRead.com is a privately owned, operated and funded community.