Sunday, August 2, 2009

Initialising the SD-card on the Emulator

You might have noticed that you do not see the 'Documents' folder that you see on your own DR. The Documents-folder is the root of the SD-card, so we need an SD-card for our emulator. Ofcource we will not use a real SD-card. See section 3.5.6 of the iOn development document. From the terminal window that is connected to the emulator create the root of the SD-card: 'mkdir -p /media/mmcblk0p1'.

To copy files to the 'SD-card' of the emulator we can use the scp-command (secure copy).
Here an example from the iOn Development document to copy the hello-world program to the emulator (open another terminal window, not the one that is 'connected' to the emulator):
scp ./src/hello-world root@qemu:/usr/bin

Or to copy the desktop-file to the root of the SD-card
scp ./data/hello-world.desktop root@qemu:/media/mmcblk0p1

The emulator might not immediately show the new file that you copied. If you were already looking at the Documents-folder, go one folder up and back to Documents again, the icon should now show up.

Click on the icon and .... you will get some strange error message...

If you look into the hello-world.desktop file that you just copied, you will notice that there is a problem in the name of the hello-world application. It is called hello_world i.s.o. hello-world. Fix this and copy the file to the emu. (Or fix on the emu, which has vi :-)

When you click now, hello-world should be started again. You will notice also that the Task Manager row in the menu now contains an icon for the hello-world application, which is not there when you started the application 'manually' from the terminal window.

The iOn Development document section 3.5.7 explains some method that would probably also show the icon in the task-manager when started from the terminal window, but for me this did not work as expected.

You can now download the content of an 'empty' SD-card from the iRex site and copy it to the SD-card of the emulator. To copy complete directories use the -r option:
scp -r anyFolder root@qemu:/media/mmcblk0p1/anyFolder

No comments:

Post a Comment