                        Open Source Package Tarballs
                                 README
                            
1. Overview
The document describes how to build the open source packages. The building
process has been verified under the Ubuntu Linux 11.10 32-bit desktop
environment, and it's recommended to install this distribution. For
information on how to install a Linux system, please refer to related
documents. The following instructions are executed assuming the
environment is correctly installed. 

2. Environment setup
After installing Linux system, open a terminal, and in the command prompt,
type the following commands to install extra packages:

   $ sudo apt-get update
   $ sudo apt-get install libncurses5-dev bison g++ flex gettext texinfo \
     patch vim screen ctags git subversion curl fakeroot autoconf python-lxml \
     mtd-utils u-boot-tools gawk tcl

And make sure the symbolic link /bin/sh points to /bin/bash, not /bin/dash.

   $ cd /bin
   $ sudo rm sh
   $ sudo ln -s bash sh

The following sections will describe steps for building tarballs.
You can also run the script 'build.sh' to automate the process.

3. Building autofs
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf autofs-3.1.7.tar
   $ cd autofs-3.1.7
   $ make

4. Building boa
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf boa-0.94.13.tar
   $ cd boa-0.94.13
   $ make

5. Building busybox
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf busybox-1.12.4.tar
   $ cd busybox-1.12.4
   $ make

6. Building dosfstools
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf dosfstools-2.11.tar
   $ cd dosfstools-2.11
   $ make

7. Building ethtool
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf ethtool-3.tar
   $ cd ethtool-3
   $ make

8. Building ftpmput
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf ftpmput_dm365-1.0.0.0.tar
   $ cd ftpmput_dm365-1.0.0.0
   $ make

9. Building iptables
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf iptables-1.3.8.tar
   $ cd iptables-1.3.8
   $ make

10. Building jpeg2avi
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf jpeg2avi-1.5.tar
   $ cd jpeg2avi-1.5
   $ make

11. Building net-tools
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf net-tools-1.60.tar
   $ cd net-tools-1.60
   $ make

12. Building smtpclient
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf smtpclient-1.0.0.tar
   $ cd smtpclient-1.0.0
   $ make

13. Building stunnel
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf stunnel-4.20.tar
   $ cd stunnel-4.20
   $ make

14. Building sysklogd
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf sysklogd-1.5.tar
   $ cd sysklogd-1.5
   $ make

15. Building wide-dhcpv6
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf wide-dhcpv6_dm365-20070507.tar
   $ cd wide-dhcpv6_dm365-20070507
   $ make

16. Building WPA_Supplicant
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf WPA_Supplicant-0.5.8.tar
   $ cd WPA_Supplicant-0.5.8
   $ make

17. Building ppp
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf ppp-2.4.4.tar
   $ cd ppp-2.4.4
   $ make

18. Building mtd-utils
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf mtd-utils-2.6.9_1.1.tar
   $ cd mtd-utils-2.6.9_1.1
   $ make

19. Building sqlite
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf sqlite.dm365-3.7.6.2.tar
   $ cd sqlite.dm365-3.7.6.2
   $ make

20. Building openssl
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf openssl-0.9.8j.tar
   $ cd openssl-0.9.8j
   $ make

21. Building zlib
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf zlib-1.2.3.tar
   $ cd zlib-1.2.3
   $ make

22. Building ftpd
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf ftpd-0.17.tar
   $ cd ftpd-0.17
   $ make

23. Building ntpclient
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf ntpclient-0.1.tar
   $ cd ntpclient-0.1
   $ make

24. Building radvd
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf radvd-1.0.tar
   $ cd radvd-1.0
   $ make

25. Building ucd-snmp
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf ucd-snmp-4.1.2.tar
   $ cd ucd-snmp-4.1.2
   $ make

26. Building expat
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf expat-2.0.1.tar
   $ cd expat-2.0.1
   $ make

27. Building message
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf message-1.0.1.19.tar
   $ cd message-1.0.1.19
   $ make

28. Building account
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf account-1.0.0.3.tar
   $ cd account-1.0.0.3
   $ make

29. Building xmlsparser
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf xmlsparser-1.1.0.0.tar
   $ cd xmlsparser-1.1.0.0
   $ make

30. Building encrypt_md5
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf encrypt_md5-0.0.0.0.tar
   $ cd encrypt_md5-0.0.0.0
   $ make

31. Building linkdetect
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf linkdetect-1.3.0.3.tar
   $ cd linkdetect-1.3.0.3
   $ make

32. Building autoip
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf autoip-1.0.0.1.tar
   $ cd autoip-1.0.0.1
   $ make

33. Building alsa library
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf alsa-lib-1.0.11rc3.tar
   $ cd alsa-lib-1.0.11rc3
   $ make

34. Building fdipc library
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf fdipc-0.0.0.1.tar
   $ cd fdipc-0.0.0.1
   $ make

35. Building mount_cifs
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf mount_cifs-1.10.tar
   $ cd mount_cifs-1.10
   $ make

36. Building rp-pppoe
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf rp-pppoe-3.8.tar
   $ cd rp-pppoe-3.8
   $ make

37. Building cross toolchain
The ARM cross toolchain need to be built before building remaining packages.
In the working directory, unpack the toolchain package and change to the
source folder:

   $ tar jxf toolchain_src.tar.bz2
   $ cd toolchain_src

And type following command to start building:

   $ sudo ./build.sh

After building, the toolchain will be located under the
folder '/var/tmp/cross-gcc-arm_v5t_le-root'.

Update your environment variables to prepare for building remaining
packages:

   $ export PATH=$PATH:/var/tmp/cross-gcc-arm_v5t_le-root/opt/montavista/pro/devkit/arm/v5t_le/bin
   $ export ARCH=arm
   $ export CROSS_COMPILE=arm_v5t_le-

38. Building kernel
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf linux-2.6.18.tar
   $ cd linux-2.6.18
   $ make

Add a new environment variable KERNELSRC to indicate the path of kernel
source, which is required for building drivers:

   $ export KERNELSRC=<YOURDIR>/linux-2.6.28.9/mozart_kernel-1.12_lz

39. Building cmemk driver
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf cmemk-2.24.03.tar
   $ cd cmemk-2.24.03
   $ make

40. Building dm365mm driver
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf dm365mm-1.0.0.0.tar
   $ cd dm365mm-1.0.0.0
   $ make

41. Building edmak driver
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf edmak-2.24.03.tar
   $ cd edmak-2.24.03
   $ make

42. Building irqk driver
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf irqk-2.24.03.tar
   $ cd irqk-2.24.03
   $ make

43. Building focusmotor driver
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf focusmotor-1.0.0.0.tar
   $ cd focusmotor-1.0.0.0
   $ make

44. Building zoommotor driver
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf zoommotor-1.0.0.0.tar
   $ cd zoommotor-1.0.0.0
   $ make

45. Building u-boot
Place the source tarball in a suitable folder in your system, and type
following commands:

   $ tar xf u-boot-1.3.4.tar
   $ cd u-boot-1.3.4
   $ make

