August 2007


INdT and Mamona28 Aug 2007 06:15 pm

Thinking to leave the main flash memory free for Mamona tests I looked for a way to have dual boot in the N800. Then I found a good documentation explaining how to easily boot from MMC card.

The only step that I skipped was the “How to install a dual boot menu?”.

To use the system in memory card I’ve edited the initfs manually  to access directly the partition created in the memory card. The only thing that I did was to add the code below in the begin of boot() function in linuxrc of initfs (My last post  explains how to edit and flash the initfs in your pc).

load_mmc_modules
root_dev=mmcblk0p2
root_dev_name=”MMC”
root_dev_set=1
root_fstype=”"
root_fsoptions=”"

As you can easily notice it is hard coded. Actually I’m not using a real dual boot because when testing mamona I need to flash the kernel too, so I prefer to flash a different initfs for mamona every time instead of have to press a button during the boot.

However it is possible to have a dual boot changing the begin of boot() function of linuxrc in initfs to be like that:

boot()
{
load_wlan_module
if ! grep -q new_root /proc/mounts; then
text2screen -t “Press any key for MMC boot” -H left -y 80 -s 2 -B 0xffff
key_pressed 1
if [ $? -ne 0 ]; then
load_mmc_modules
root_dev=mmcblk0p2
root_dev_name=”MMC”
root_dev_set=1
root_fstype=”"
root_fsoptions=”"
fi
mount_device “$root_dev”
fi
if [ $? -ne 0 ]; then
return 1
fi

Or following that step that I haven’t tried.

It is important to clarify that when you flash only the initfs and/or the kernel you don’t loose any data in your main flash memory or in your MMC card.

Another important thing to say is about performance. I’ve been using it for more than a week from  internal MMC slot and couldn’t notice any lost of performance when compared to a system booting from main flash memory.

Are you curious about Mamona booting on N800? This is a topic for another post…

INdT20 Aug 2007 03:27 pm

initfs hack picture

Hi, I’ve hacked initfs of my n800 to show my name and email as you can see in this picture. I know that it is not a big deal, but it can be useful to avoid undesired changes/mistakes when you work in a team that has more than 1 n800.This post is not only to show, but to describe how to do this hack.

  • Download the image and flasher. (You can use the 0xffff if you prefer)
  • Unpack the image:

flasher -F <image name> -u

  • Mount the initfs.jffs2:

sudo modprobe mtdblock

sudo modprobe mtdram total_size=65536 erase_size=256

sudo modprobe jffs2

sudo modprobe loop

sudo dd if=/pathtoimage/initfs.jffs2 of=/dev/mtdblock0

mkdir /mnt/jffs2

sudo mount -t jffs2 /dev/mtdblock0 /mnt/jffs2

  • The /mnt/jfss2 directory is read only, so you need to create another dir and copy everything preserving the files:

mkdir $HOME/myinitfs

sudo tar pcf – -C /mnt/jffs2 . | tar xvf – -C $HOME/myinitfs

  • edit the $HOME/myinitfs/linuxrc using your preffered text editor. Look for “want_menu=0″ and add something like the text below just before it.

text2screen -t “Your Name” -H left -y 12 -s 3 -B 0xffff

text2screen -t “your_email@server” -H left -y 50 -s 2 -B 0xffff

  • Create your new initfs image:

sudo mkfs.jffs2 -r $HOME/myinitfs/ -o $HOME/myinitfs.jffs2 -e 128KiB -l -n

  • Flash it:

sudo flasher -n $HOME/myinitfs.jffs2 -f

That’s all. Enjoy it.

Another thing that I want to talk about is that I’m using the OS 2007 entire in a memory card (MMC) leaving free the main flash memory where I’m going to put Mamona. But this is a topic for another post…

Impressions16 Aug 2007 06:57 pm

$ cd `pwd`

Birunko saw I typing this command and asked me: “Are you crazy?”

I believe that the best answer for that question is: “not yet”, because in a single day I used:

  • gcc to compile gcc
  • wget to donwload the wget (source package)
  • find to find the findutils package
  • tar to unzip the tar package

(hmm it remembered me that another day I used apt-get to reinstall apt package that was corrupted)

So, what is the problem about to use the ‘cd’ command to “change” my current directory to my current directory?

ok, let me try to explain that. I was using 2 terminals. In the first one I had OpenEmbedded building Mamona packages and in the second one I was seeing the files generated on work directory. During the build my directory was deleted and recreated by OpenEmbedded, but my second terminal couldn’t know about that. The ‘pwd’ command still returns the full link correctly, but ‘ls’ and other commands tries to access something in memory that doesn’t exist anymore, so ‘cd `pwd`’ command takes me to the right current directory in memory.

But, if you thought that my strange day had a happy end you were wrong, I finished my day finding a bug on a bug tracker.

So the current question that is driving me crazy is: “how can I report a bug tracker bug in a bug tracker that has a blocker bug?

I couldn’t have a better end, could you?

INdT and Mamona06 Aug 2007 12:43 pm

mamona logo
This is a short post just to announce that now Mamona has a beautiful logo made by INdT designers, and that we finally added questions and answers to Mamona’s FAQ. But if your doubts weren’t answered by this FAQ, please contribute sending me your questions.