Category Archives: Tutorial

Getting Started with Symbian Development

The world has gone app-crazy and I want to become a part of it. I’ve decided to see if I can horne my C++ skills by creating a Symbian application.

Getting prepared for Symbian development isn’t a straightforward process. Here’s how I set up my development environment:

Download and install ActivePerl (current version is 5.10.1).

I’m developing for the Symbian S60v3 FP1 platform so I needed to apply the context sensitive patch.

Download and install the JDK (current version 6u20).

Download and install the Carbine.c++ development environment (current version 2.3).

For Windows XP SP3 (and probably SP2) users, add the epoc.exe binary to the allowed DEP. You can do this by going to Start -> right click on My Computer -> click on Properties -> click on the Advanced tab -> click on Settings in the Performance category -> click on the Data Execution Prevention tab -> select the “Turn on DEP for all programs and services except those I select:” radio button -> click Add -> Navigate to C:\Symbian\9.2\S60_3rd_FP1\Epoc32\release\winscw\udeb and select epoc.exe (location is dependent on installation path).

Finally, install the S60 Platform SDK. I selected 3rd Edition, FP 1.

Further instructions are available at the Forum Nokia Library.

Managing gpg keys across multiple computers

Manging a secret gpg key-pair across two computers is relatively simple.

Export the secret keys

gpg --export-secret-key -a your_email@address.com > myprivate.key

Export your public keys

gpg --export -a your_email@address.com > mypublic.key

Import the keys

gpg --import mypublic.key
gpg --import --allow-secret-key-import myprivate.key

That’s all there is to it.

Install a GNU/Linux distribution upon a USB Stick

This is a quick reference-post that shows how to install GNU/Linux to a USB stick from within a GNU/Linux distribution.

Download the ISO or CD image.

[antony@ARCH arch-core]$ wget http://mirror.neotuli.net/arch/iso/2007.08/i686/Archlinux-i686-2007.08-2.core.iso -O ~/archlinux.iso

Plug in the USB stick.

[root@ARCH antony]# dmesg | tail

Oct 26 15:08:23 ARCH sd 2:0:0:0: [sdb] Mode Sense: 23 00 00 00
Oct 26 15:08:23 ARCH sd 2:0:0:0: [sdb] Assuming drive cache: write through
Oct 26 15:08:23 ARCH sd 2:0:0:0: [sdb] 3903488 512-byte hardware sectors (1999 MB)
Oct 26 15:08:23 ARCH sd 2:0:0:0: [sdb] Write Protect is off
Oct 26 15:08:23 ARCH sd 2:0:0:0: [sdb] Mode Sense: 23 00 00 00
Oct 26 15:08:23 ARCH sd 2:0:0:0: [sdb] Assuming drive cache: write through
Oct 26 15:08:23 ARCH sdb: sdb1
Oct 26 15:08:23 ARCH sd 2:0:0:0: [sdb] Attached SCSI removable disk
Oct 26 15:08:23 ARCH sd 2:0:0:0: Attached scsi generic sg1 type 0

Note the location of the drive (sdb).

Partition the USB stick.

[root@ARCH antony]# fdisk /dev/sdb

Then type the commands:

p – print partition table (count number of partitions, let’s call that n)

d – delete partition (type that n times)

n – add a new partition

p – create a primary partition

1 – make the primary partition the first partition

enter – default (first cylinder)

+512M – 512 megabytes from the first cylinder

n – new partition (create a second one for your files)

p – primary partition

2 – make this partition the second one

enter – default setting

enter – until the last cylinder on the USB stick

t – change partition type

1 – select partition 1

6 – partition code 6 (FAT16)

t – change partition type

2 – select partition 2

c – partition code c (FAT32 which is compatible with most file systems)

a – toggle bootable flag

1 – select partition 1

w – write table to disk and exit

Create the filesystem.

[root@ARCH antony]# mkfs.vfat -F 16 -n linux /dev/sdb1

[root@ARCH antony]# mkfs.vfat -F 16 -n vfat /dev/sdb2

Mount the ISO to a temporary directory.

[root@ARCH antony]# mkdir /mnt/iso

[root@ARCH antony]# mount -o loop /home/antony/archlinux.iso /mnt/iso

Copy the ISO’s contents to the USB stick.

[root@ARCH antony]# mkdir /mnt/usb

[root@ARCH antony]# mount /dev/sdb1 /mnt/usb

[root@ARCH antony]# cp -ra /mnt/iso/* /mnt/usb

Copy isolinux kernel to the root directory of the USB stick.

[root@ARCH antony]# cd /mnt/usb/isolinux

[root@ARCH antony]# cp vmlinuz ../

[root@ARCH antony]# cp initrd.img ../

[root@ARCH antony]# cp boot.* ../

[root@ARCH antony]# cp isolinux.cfg ../syslinux.cfg

Install the bootloader

[root@ARCH antony]# install-mbr /dev/sdb OR lilo -M /dev/sdb

[root@ARCH antony]# syslinux -s /dev/sdb1

[root@ARCH antony]# umount /mnt/usb