This document describes howto create your own custom OpenMCT firmage image.
To compile an OpenMCT image you have to install at least gcc, make, automake and svn on your build host system. You also need several other tools, like SquashFS or JFFS2 to create filesystems for the image.
First of all you have to download the OpenMCT source tree via svn. This can be done with the following command:
$ cd ~
$ svn co http://svn.openmct.org/svn/trunk/openmct/ ~/openmct
.....
Checked out revision 284.
$
Now you have the complete source tree in the openmct directory.
Before you build the Image you have to know which product code will be used for your image. Look at the following list, to get the correct product code:
Now you have to choose which packages should be included in your OpenMCT image. At the moment you can choose from the following list:
Then you create your own config file by running make with parameter config and variable MCT. Afterwards you can change the default settings by editing .config.
$ make config MCT=sa
CONFIGURE OpenMCT
$ vi .config
...
$
The config file contains some variables, that can be changed. Have a look at the following list:
NOTE: IMAGEFLASHKERNELSIZE + IMAGEFLASHROOTSIZE + IMAGEFLASHETCSIZE = 3904
To change the kernel config you have to edit packages/system/linux/configs/config. For example if you don't want GRSecurity Support or PPPOE you can disable this. You can also enable another features, that are not enabled
in the default configuration.
You also have to set the variable IMAGEPACKAGES. Here you have to specify which packages should be included in your Image.
IMAGEPACKAGES= packages/base/busybox \
packages/base/coreutils \
packages/net/dnrd \
packages/net/dropbear \
packages/net/iptables \
packages/net/nfsutils \
packages/net/ntp \
packages/net/ppp \
packages/net/pptp \
packages/net/pppoe \
packages/net/rsync \
packages/net/tcpwrapper \
packages/net/portmap \
packages/net/pptpd \
packages/net/vsftpd \
packages/system/debootstrap \
packages/system/fcp \
packages/system/proccgi \
packages/system/smartd \
packages/system/vserver \
packages/system/vserverdebiantools \
packages/system/webadmin
OpenMCT uses /usr as mountpoint for the harddisk. You can change this in the base fstab file in
packages/build/buildroot/configs/fstab. You can also change the directory for your files in /etc.
$ cat configs/root/etc/fstab
proc /proc proc defaults 0 0
tmpfs /tmp ramfs defaults 0 0
/dev/mtdblock/3 /etc jffs2 defaults 0 0
/dev/discs/disc0/part1 /usr ext3 defaults 0 0
$
So, you simply have to type make to build your OpenMCT image.
$ make
WGET linux-2.4.32
...
[*] writing header to file 'OpenMCT_0x100_0x00_0x04.bin'...
[*] writing kernel to file 'OpenMCT_0x100_0x00_0x04.bin'...
[*] writing ramdisk to file 'OpenMCT_0x100_0x00_0x04.bin'...
Now you have a complete OpenMCT in your current directory.
Have fun