Frases soltas sobre a Finlândia

November 29th, 2009 - 2 Responses

Estou em Tampere desde o dia 02/11. Após mais de 20 dias acho que já tenho algumas frases pra deixar aqui…

Clima

  • Oito horas de (sol) claridade por dia quando eu cheguei, agora já está das 9:10am até 3:20am.
  • Mais uma vez tive a felicidade de ver neve e de ver nevar. É muito massa botar a lingua pra fora pra pegar os flocos.
  • Todos os moradores aqui reclamam muito dessa época do ano pois não tem neve! Sim, como está muito escuro por boa parte do dia, a neve ajuda a deixar a cidade mais clara, já que ela reflete bastante a luz (nem que seja a dos refletores).

Eu: “Caramba… tá ZERO graus hoje!!”
R: “É… tá quente até, ainda bem né? Você não chegou no inverno forte.”
Eu: “Err… e frio é quanto?”
R: “Ah! Chega a -20″

Hobbies

  • Sauna é como futebol no Brasil. O primeiro apartamento que fiquei tinha 34m2 e acreditem, tinha uma sauna. Mas depois de um tempo percebi que, na verdade, ter sauna em casa não é algo que se encontre em casas mais simples.
  • Brincar de frio-quente. Eles adoram. Por exemplo algo bem comum aqui é ficar de 10 a 15 minutos numa sauna de 80 oC e depois pular num lago abaixo de 4 oC, daí eles nadam um pouco e voltam pra sauna. Quer tentar?

Comida

  • O primeiro choque: durante o almoço, percebi que 80% das pessoas tomam leite junto com o prato de comida. Sim, como se fosse suco. Explicação: eles precisam de cálcio dado que o sol não é um cara que costuma aparecer muito por aqui.
  • Suco natural: não achei.
  • Batata, batata, batata e mais batata. O cúmulo foi um prato que comi que tinha batata assada e batata frita de guarnição.
  • Carnes diferentes: já comi ovelha num restaurante estilo Viking e rena (sim, a do papai Noel) aqui do lado de casa.
  • Comi caviar :) Bléééééééé :(
  • A comida é um bocado gordurosa.

Língua

  • Kiitos‘ é obrigado, ‘hei‘ é oi, ‘hei hei‘ é tchau informal e ‘katu‘ é rua. Pronto, você sabe tanto finlandês quanto eu.
  • Todo nome de rua possui katu no fim. Eu já fiquei num apartamento na Mustalahdenkatu e agora estou num apartamento na Yliopistonkatu. Tenta falar aí…
  • As vogais tem o som muito parecido com o português. Isso ajuda na hora de falar nomes das lojas e ruas. Se bem que tem algumas vogais a mais aqui, e pra pronunciar… é difícil.
  • Em Tampere o inglês é mais comum entre os jovens. É razoavelmente fácil achar um idoso que não fala nada ou quase nada de inglês.

Misc

  • Eu nunca me considerei um cara alto. Mas aqui algumas vezes tenho a impressão de ser baxinho.. realmente estranho.
  • A carga horária diária na Finalândia, na média, é de 8h. Dentro desse tempo eles tem 30min de almoço.
  • O pessoal aqui curte beber. É muito comum achar pessoas cambaleando pelas ruas de madrugada. Além disso, as ruas principais da cidade ficam imundas durante o “período das baladas”. E acreditem, no dia seguinte as ruas estão completamente limpas. Algum milagre acontece no fim da madrugada…

Fotos em http://picasaweb.google.com/aloisiojr

Ensuring SSD alignment with parted tool

July 20th, 2009 - 5 Responses

I’ll show how to partition your SSD Vertex disk keeping the desired alignment to SSD erase block size. The following links were useful to point me that align partitions increase the SSD performance and how to complete the first part of the Journey to set up my Ubuntu+MacBook Pro+Vertex SSD.

http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/
http://www.ocztechnologyforum.com/forum/showthread.php?t=48309

You would ask me why don’t follow Ted’s post to make my partition table. Basically because I don’t want to use LVM. There is another important difference between our scenes: he has a Intel SSD with 128KB erase block size and I have a OCZ Vetex SSD with 512KB erase block size and of course it makes difference in the calculations.

Let’s start

$ sudo parted
(parted) unit b

The ‘unit’ command is very important because it makes the ‘print’ command show the start/end partition boundaries in bytes (and not in MB, GB or whatever).

This is my current partition table:


(parted) p
Model: ATA OCZ-VERTEX (scsi)
Disk /dev/sda: 128035676160B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number  Start         End            Size          File system  Name                  Flags
1      20480B        209735679B     209715200B    fat32        EFI System Partition  boot
2      209735680B    37656481791B   37446746112B  hfs+         Untitled
3      37656985600B  48393879551B   10736893952B  ext4         primary               boot
4      48393879552B  128035323903B  79641444352B  ext4         primary

Now, the very first question: How can I see that the partitions are aligned?

Good one. You just need to ensure that the boundaries can be divided by “erase block size” (EBS). In my case, the Vertex EBS is 512KB (= 512 * 1024B). Getting the 3rd partition as instance: 37656985600 / (512 * 1024) = 71825 (and no rest), so the begining of this partition is aligned.

How did I get this value?

  1. Get the end boundary of the second partition (37656481791)
  2. 37656481791 / (512 *1024) = 71824.04
  3. Get the non-decimal part +1 (71825)
  4. 71825 *512 * 1024 = 37656985600

So you have the aligned start address of your 3rd partition.

Note that to have a aligned end address, you need to choose a partition size that can be divided by 512KB as well, I’ve chosen 10736893952 (~10GB).

The end address in this case is  37656985600 + 10736893952 - 1 = 48393879551

Below you have the parted command to create the partition:

(parted) mkpart primary 37656985600 48393879551

In the same way I calculated the 4th partition boundaries (/home)

(parted) mkpart primary 48393879552 128035323903

Note that I lost some KB between the 2nd and 3rd partition and at the end of the disk. It’s normal as the second partition is not aligned (maybe MacOS is not prepared to SSD yet?).

I also marked the 3rd partition as bootable:

(parted) toogle 3 boot

And it’s done. The next post will show how to install Ubuntu Jaunty using a customised mkfs.ext4 command.

Macbook Pro 5,1 + OCZ Vetex 120GB + Ubuntu

July 20th, 2009 - 2 Responses

I’ve just finished.

After buy a SSD Vertex, I finally get my whole system working and now I can say: it’s not hard, it’s tricky. I’ll write some posts to let my efforts registered and maybe help someone to get the same success.

First of all, why did I buy a SSD?

I’m addicted to I/O performance. Actually this is the only reason. I could say that I want to improve the build time of Mamona, (and actually this is one nice reason), but in the truth, I just want to play with some of that toys ;)

Firmware upgrade and MacOS install

I’ve read some posts before get the SSD and I knew that a firmware upgrade was needed. The following link was enough to point me the instructions.

http://www.ocztechnology.com/products/flash_drives/ocz_vertex_series_sata_ii_2_5-ssd

NOTE: The boring part was to find a desktop computer… I didn’t try the iso from OCZ in a Mac machine (and I can bet that it wouldn’t work).

The MacOS installation went flawlessly, no problems at all. I need to highlight the migration system. I just plugged my “old” disk in the USB port and bingo: users, configuration and files migrated to the new disk. Apple++.

Before the Linux installation, the finding…

… Ubuntu was not prepared to SSD disks. Well, it works without hacks. But if you want to get all the performance your disk has (remember my reason to buy it?) you need to make some adjustments to your Ubuntu Jaunty.

I won’t post everything together in the same post. The following posts (in HOWTO format) will show how I made these adjustments in my Ubuntu.

I can divide the whole process in four parts:

  1. Ensuring the partition alignment;
  2. Installing Ubuntu with a customized mkfs.ext4 command;
  3. Solving random freezes;
  4. Make Broadcom 4322 wireless work in the 2.6.30 kernel.

After these posts, I want to prepare one about the SSD performance compared to the original MacBook Pro 7200 rpm disk.

Avoiding conflict with Scratchbox

September 12th, 2008 - No Responses

We noticed that many people are giving up to try Mamona due to 2 reasons:

  1. We were requesting the user to install a qemu compatible version.  Of course this can bother people that use Scratchbox or another emulated system. Even Scratchbox has its own qemu you need to register the right interpreter on kernel through binfmt_misc and this registration is system-wide.
  2. There were many scritps to set/fetch/setup Mamona stuff and the help was distributed in many pages. All of this scripts were located (hidden) in tool.git repository and the documentation was a set of small pages with pointers between them asking for a “segmentation fault” :D

So we decided to make the things easier to the user creating mamona-installer.  It includes all Mamona scripts, our own qemu-arm static binary and do the dependency track. You just need to get the deb, rpm or tarball package and install Mamona.

The installer includes mamona-cputransp script to easily switch between qemu-arm interpreters in your system. Now you can have Mamona and Scratcbox in your machine and use them  one at a time.

The mamona-installer is included in our just released Mamona 0.2!!! Wooow!! See our Release Notes and enjoy our completely rewritten documentation :)

Suggestions and bugs, please report to us!

Mamona SDK pre-release!!!!

August 11th, 2008 - 5 Responses

We’ve published the repositories of Mamona SDK 0.2Pre-release!!!!

Follow the instructions to install and use the SDK. If you have any doubts or bug reports:

  • mail list (mamona-devel <at> garage <dot> maemo <dot> org )
  • http://dev.openbossa.org/trac/mamona/report
  • #mamona at freenode

The following machines are supported: Nokia770, Nokia800, Nokia810 and Omap3430sdp.

We divided the work in three parts:

  1. SDK itself: Our SDK was a little abandoned… The first thing we did was re-test it, fix the bugs and improve the script to install and enter into the chroot environment.
  2. SDK noemu: The no emulated packages are statically i386 binaries that improve the SDK performance, mainly the build time. After some tests bash, gcc and binutils were chosen to figure the noemu metapackage. We made a wiki page with instructions and some comparison tests.
  3. Xephyr: Finally we decided to add this functionality to Mamona. Now we can test GUI programs without flash the device.

Try it!

Midori, Firefox 3, Beagleboard and Mamona

July 29th, 2008 - One Response

Lets welcome and  Eduardo Valentin! The new comers are working from INdT Manaus site and they already achieved GREAT results! Thanks guys!

The news:

Enjoy the links!

What’s next?? SDK and Network daemon. Mamona 0.2 is coming…

Virtual Keyboard in Mamona

July 21st, 2008 - No Responses

- I got Mamona 0.1 and it boots up!!! But… How can access the terminal?
- You can’t, there is no terminal..
- Bad.. but why?
- There is no virtual keyboard.
- And how can I play with Mamona?
- USB serial, USB net, …

Yeah, as you can see, we actually were providing a way to use Mamona on N(77|80|81)0 devices.But of course we weren’t happy with this… Mamona 0.2 couldn’t be released without this feature. And now it’s done.

A research work was made by Lauro and Salveti by testing some vkbds under Enlightenment and without WM (just X). The guys decided to create the mamona_im (git web) implemented by Salveti that “notice” that a text field has the cursor and request the vkbd to appear. The ecore and gtk plugins were created to this library to support text fields from these toolkits.

The virtual keyboard chosen is matchbox-keyboard (mkbd) because it’s simple and toolkit independent. We planned to place the keyboard at screen bottom (1/3 of screen height), horizontally maximized, without decorations  (border and title bar), and owning the desktop area that it is placed ( I mean other windows doesn’t use this area when maximized). Beyond this we needed to fix some bugs of mkbd (crazy resize, ’shift’ bug - keys weren’t working with shift and placement just after launch).

I experienced some troubles with Enlightenment too. They have some different concepts of how a desktop should be and so they don’t follow some freedesktop standards. For instance the _NET_WORKAREA X hint (inform the current desktop area) is not set by e-wm because (1) it limits the workarea in a square shape and (2) e-wm manage vdesktops of different sizes. Thanks to E guys that helped me to understand this. :) In the end I added a patch to get the screen size from Xlib, it was enought.

Finally it’s  done!  It was tested on N770 tablet and we’re testing it on N800 and N810, actually it should work in all tablets. Take a look in the results in the demo recorded by Salveti (take a look in his feed about mamona vkbd too).

Sometimes the compiler cannot save you…

July 9th, 2008 - No Responses

When I was trying to understand why the matchbox-keyboard always presents window decoration under E (it doesn’t do it under Gnome and KDE), I found this code and noticed a strange thing…

if (!cfdata->border->remember)
    cfdata->border->remember = e_remember_new();
{
    if (cfdata->border->remember)
        e_remember_use(cfdata->border->remember);
}

(e17/apps/e/src/modules/conf_borders/e_int_config_borders.c function _basic_apply_border)

The second and third lines are switched, "cfdata->border->remember = e_remember_new();" should be inside the next context created ( {} ).

This small mistake couldn’t be noticed by the compiler as the syntax is actually right (you can create new contexts anytime). Functionally speaking, it sounds the the e_remember_use function should be called just when the new “remember” is created instead of every time.

This bug won’t be noticed because the code is already patched ;)

Mamona/OE merge

April 10th, 2008 - One Response

We invited mickey (Michael Lauer) from OpenMoko to present about OpenEmbedded project at OpenBossa conference. Thanks for the nice presentation!

After the conference, mickey came to INdT to take a look in Mamona patches to OE (mainly EFL and Pyhton-EFL). We worked two days together to merge all stuff. All differences were merged and Vivi and I received commit permission to OE upstream. Nice! Now we are working to send all Mamona pacthes to OE.

Mamona migrated from MTN to GIT

April 10th, 2008 - 3 Responses

Yeah… After some months using monotone repository, Mamona team decided to migrate to git. Reasons?

  • Performance: Some things that you can do while mtn works..
    • ‘mtn status’: you can check irc messages
    • ‘mtn update’: take some coffee
    • ‘mtn pull’: make the coffee
  • Monotone ‘propagate’ issues: If your branch starts to become very different from the main branch, get prepared, you will probably experience problems with propagation. It seems that monotone doesn’t deal very well with directory removals. It wouldn’t so bad if the errors were made to help the monotone user to fix the problem, but actually errors that show node numbers are just useful to monotone developers…

As OpenEmbedded has a git repository (maintained by mtn2git script of Holger Freyther), we created the Mamona git repository and stopped to use the old monotone one.

After one month of use we just experienced problems with git-push-http that was breaking during the push, but after a git upgrade the problem was solved. Until now, no problems to create many branches and work with them. Thanks to Canola guys for help me to set up the git repository and to show me the basic and some advanced commands :)