Li-Zhao's HomePage


I (LI Zhao) am from School of Computer Engineering, Nanyang Technological University, working in Sybase.
This is a memory book for me, so, miscellaneous topics can be found here.
Have fun!



Loading Blog Search...
Showing posts with label maemo. Show all posts
Showing posts with label maemo. Show all posts

Saturday, November 10, 2007

N810 application is accepted

I found the email when I got up this afternoon, :D, and so glad that I haven't read the news from maemo news Web site. Otherwise, I might think my application hasn't be accepted.

For sure, it's a great deal to buy such an amazing gadgets with 99Euro, and what also makes me happy is maemo thank contributors in this way.

Thanks, maemo.

Monday, September 17, 2007

make minimo maemo more stable

MicorB for ITOS2007HE may be on the way, but who knows when will it finally arrive. Based on the waiting experience, I decided to reinstall minimo, while waiting it.

When I tried minino 1 mth ago, it is not stable on 770, but I also heard if increase memory buffer size, it can perform much better. So, I try to set the buffer size to 4096 or 8192, according to mozilla site.

On 770, just run: vi /home/user/.mozilla/minimo/prefs.js and add one line:
user_pref("browser.cache.memory.capacity", 8192);
trying google calendar/reader/gmail for a while, yea, it is much more stable, but an annoying bug is still there.
I feel if there is unknown errors happened in rendering a page, the corresponding tab can not be closed, or refresh, and it will affect other tabs.
If anybody know how to solve this, plz tell me. :-)
try: user_pref("network.http.max-connections", 8); and user_pref("network.http.max-connections-per-server", 4);

Display Icon in Maemo Application Manager

After making a deb package for maemo platform, and depolying it to a repository recognized by Maemo application manager, it is valuable to let application manager display a interesting icon beside the package name.

There are several points need to note:

  1. encode a 26x26 png image into base64 format, this can be done by: uuencode -m xxx_26x26.png /dev/stdout . Then the encoded texts (between the 1st and the last line) will be used in package.
  2. embed the texts into debian/control, in a section named: XB-Maemo-Icon-26. There must be a space before each line in this section.
  3. run dpkg-scanpackages to generate Packages.gz, and make sure the XB-Maemo-Icon-26 section is also copied into Packages.gz
Actually, application manager display icon based on the base64 data found in Packages.gz.

However, I found dpkg-scanpackages of some versions dismiss the icon section. For these versions, here is the workaround:

change:

dpkg-scanpackages ....... > .../Packages.gz

to:

dpkg_scanpackages="/tmp/dpkg_scanpackages-$$"
cat $BIN_SCANPACKAGES | $BIN_SED -e "s/('Package',/('Package', 'Maemo-Icon-26',/" > $dpkg_scanpackages #this is for dpkg-scanpackage 1.3
cat $dpkg_scanpackages | $BIN_SED -e "s/Size MD5sum Section Priority Description))/Size MD5sum Section Priority Description Maemo-Icon-26))/" > $dpkg_scanpackages #this is for dpkg-scanpackage 1.4
chmod 755 $dpkg_scanpackages

$dpkg_scanpackages ....... > .../Packages.gz

Monday, August 20, 2007

SDCV for Nokia Internet Tablet

sdcv is a lightweight console version of StarDict dictionary.
Now, sdcv for maemo has a simple GUI, which can speak words, and this page is depreciated! plz visit http://sdcv.garage.maemo.org/

Releases


For all releases, please download at its maemo garage project site

Usage

After install, please execute sdcv from console (osso-xterm). type "sdcv --help" for details.
Please goto stardict dictonary page to download dictionaries, and install following its instruction.

Changes

Version 0.4.2-2
Minor bug fix based on the same version of ubuntu

Thursday, August 16, 2007

Dictionary for Nokia Internet Tablet N770/N800

We have two GUI dictionary tools for N770/N800 (or ITOS 2007, or maemo 3.1/3.2) --- stardict and sdictviewer.

sdictviewer is based on python, and runs slowly on the slow devices. It even takes several seconds to search a word. I also prefer dictionaries provided by stardict.

However, stardict.garage.maemo.org hasn't release anything so far. I tried a version compiled by a friend, and found it is slow too. What even worse is lots of bugs cause it always crash on 770 with 2007 HE.

So, the command line version of stardict may be a good alternative. The latest source deb from ubuntu can be compiled on maemo development environment (scratchbox), without any change.

The problem is the compiled binary can be executed on scratchbox smoothly, but crashs on 770 device. I spend hours to figure out the bugs, and now it works great on 770 device.

So, it should be good idea to share the patch. A new project at garage.maemo.org is opened, named sdcv (StarDictCommandVersion). Source and binary will be uploaded soon. Welcome to test it on both 770 and 800.

Tuesday, August 07, 2007

sdcv on 770/800 (ITOS 2007)

In previous article, we give stardict as an example to compile deb package on ITOS2007 platform. However, after trying stardict, I found it is slow and bug-full on my 770.

So, I decide to use the text mode version of stardict -- sdcv.

It is relative easier to build sdcv than stardict, as it does not need support of GUI libs, therefore, no need to change config files for automake tools.

The trouble I met is to install libglib2.0-dev on my scratchbox, as it need pkg-config package. Downloading libglib deb and forcing dpkg to install it can bypass this problem.

another problem is the config of libreadline, I do not bother to study into config file, and just replaced all @libreadline@ with -lreadline.

Now, you can download the deb package.

Wednesday, July 25, 2007

Nokia N770: ITOS2007 HE MK2

I decided to get a Nokia internet tablet, when I found the basic Chinese support works. Last week, I got 2 Nokia n770 instead of n800 for my wife and me, as I can not reject the price ($250 for 2). IMHO, I also prefer its design to N800. Actually my wife love it as soon as she got it, although she does not want a tablet at all before that. It can save her much effort to bring slides, books or laptop, while the screen size is acceptable. From maemo.org/news, we know N800 will get support for next two version of maemo, while N770 has no support for even ITOS2007. It's OK. As the hacker edition (HE) of ITOS2007 works great. maemo news also announces a new hacker edition will come soon. But I decide that I had better to install ITOS2007 HE MK2 on 770, other than just waiting the new version. This article lists what I did on the 770, for future reference. It is only for ITOS2007 HE MK2. For a new comer, it is good to start from

  1. http://maemo.org/community/wiki/howto/ (general problem)
  2. http://www.internettablettalk.com/forums/ (ask question)
  3. http://maemo.org/downloads (install software)
  4. http://guoyong.org (CJK support)

Flash ITOS2007 to 770

In office, I use Windows, so, need to download the exe from http://www.nokia.com/A4144790, install it and then follow its simple wizard. In home, on Ubuntu, just follow Flash the latest Nokia image to your Nokia 770/800 device with Linux from maemo wiki.

Install becomeroot, xterm

This step is prerequirement for other operations, as it allow me to become root user. Please follow maemo wiki.

Partition of MMC

I bought 2G MMC Mobile card for the gadget. ITOS2007 requires the 1st partition of the MMC is vfat format. If we want to install OS into the MMC, I guess we need a ext2 partition it. So, it is time to do partition. The vfat partition can be recognized by Windows when connect with USB cable. So, it is convenient to share files using this partition. I think 950M is enough for it (virtual memory file is also on it). Please follow maemo wiki to do the partition, and the following texts are parameters I use:
/dev/mmcblk0p1:1,30000,6
/dev/mmcblk0p2:30001,,
PS: The largest swap file ITOS2007 can manage is 64M, sb. says we can use swap partition larger than 60M, however, I failed.

Install dual boot menu for 770

With the ext2 partition on MMC, we can install OS on it. The basic idea is copy the OS in flash into MMC and then generate a dual boot menu when tablet starts. Thank fanoush, it is easy. Please follow maemo wiki. If want to set default OS to the one in MMC, we need to modify bootmenu.conf before install the dual boot menu. Please do:
# cp bootmenu.conf.n800.example bootmenu.conf
# vi bootmenu.conf
change the parameters in bootmenu.conf, and then install.

Duplicate OS from flash to MMC

After reboot, it is time to copy OS. Please follow rear part of maemo wiki to do it.

Patch kernel for fast MMC access

By default, ITOS2007 kernel only support low speed of MMC card. Sb. say the reason may be high speed can cause shorter life of the card. Who care when we have lifetime warranty for the card? It is dangerous to do the patch before following maemo wiki to copy OS into MMC, as I failed to copy OS with the patch. Please follow weezedog's step by step guide to do the patch.

Install Chinese support

Please goto maemocjk Web site to install it.

Install Minimo

Opera come with 770 is not compatible with lots of Web sites, and mozilla based minimo should be a better choice. Now, minimo is one-click installable from maemo.org/downloads

Conclusion

This is my 2nd time to do the procedure (as I have two). and cost about 1 hour to finish all steps. So, it is not difficult and very time consuming to improve performance of the gadget. I just suggest do not install other software before duplicating OS successfully, as sb. reported failure after that.

Saturday, June 30, 2007

How to cross-platform compile stardict for Nokia N770

I am still staying in S'pore, where Nokia just begin n800 trial session, and the unknown date to sell. Last week, I booked a N800 from Amazon and my wife will goto US to pick up it for me. Interesting, the second day woot promoted Nokia N770 at $130. Wow, what price! So, canceled the 800 and I booked two 770 for my wife and me. What even more interesting is I found online shop all around the world begin to promote the N770, and expansys even deliver to S'pore with lower price. It's OK. The reason I love Nokia internet tablets is they are using Linux as OS, so that I can compile software I am interested in. Although I can only get the 770 next mth, I can not resist to do sth. for it. Due to my native language (Chinese), I think a good dictionary is a good startpoint. Guoyong has write a brief description of how to compile it. It's a great article, however, for a beginner, more details may be better. So, I add several points here.

  1. install cross-platform environment (scratchbox): please follow the instruction to install scratchbox (here)
  2. adjust auto build tools in scratchbox: please refer to this article to add a exectuable script autogen.sh into scratchbox.
  3. download a proper stardict source deb package: the reason to download a PROPER version of stardict is that the latest version need more dependences unsupported on the tablet. It's OK to use older version, as the new eye candy is not very important for me. We can get 2.4.5 from http://packages.ubuntu.com/.
  4. unpackage the source deb and apply patch: after download [dsc] [stardict_2.4.5.orig.tar.gz] [stardict_2.4.5-1.1.diff.gz], untar orig.tar.gz and zcat ../stardict_2.4.5-1.1.diff.gz | patch -p1
  5. modify configure.in in the source to disable some dependences unsupported on scratchbox
  6. modify debian/rules and debian/control in source to help debian package build system work
  7. dpkg-buildpackage