Steps to build the Software

Assuming that all the individual repositories have been downloaded cloned in the my-linux-c6x directory, the following steps need to be followed.

1.     Change directory to linux-c6x-project by giving

cd linux-c6x-project

2.    Then issue the following commands

./setup

3.     Then edit the "setenv". Appropriately change the various environment variables. TI_CG6X_DIR should point to the location where the TI CGTOOLS are located # Stuff that will often change from machine to machine export LINUX_C6X_TOP_DIR=/sim/scratch_a0866907/my-linux-c6x export TI_CG6X_DIR=/sim/scratch_a0866907/cgt GNU_TOOLS_DIR points to the GCC tool chain folder. if gcc-install.sh is used this doesn't have to be changed. export GNU_TOOLS_DIR=$LINUX_C6X_TOP_DIR/c6x-4.5

# BUILD_KERNEL_WITH_GCC and BUILD_USERSPACE_WITH_GCC are used for selecting the tool chain for build. Comment these variables for building with CGT and uncomment it      when building with GCC. export BUILD_KERNEL_WITH_GCC=yes export BUILD_USERSPACE_WITH_GCC=yes

KERNELS_TO_BUILD represents the various kernels that will be built In the example shown below we build kernels for all 3 devices supported in this release. # Choose kernels to build # This is a space-separated list of kernels to build. The names used are # used to include a kbuilds/ .mk makefile fragment from the top-level # Makefile. #      export KERNELS_TO_BUILD="evmc6472 dsk6455 evmc6474 evmc6457 evmc6474-lite evmc6678"

If we want to build the kernel with an initramfs filesystem then we have to enable the EXTRA_KERNELS_TO_BUILD variable. # This is a space-separated list of kernels to build after everything else has built # This is for variants of the main kernels. Variants which have minor differences in      # config or commandline compared to a kernel in KENRELS_TO_BUILD. This is used for # initramfs variants, for example. #      export EXTRA_KERNELS_TO_BUILD="dsk6455-initramsfs evmc6472-initramfs "

ROOTFS variable is used to select between a min-root fs vs full-root fs. If we want to build extra packages such as snmp, nbench etc and populate it in      in the fs, then set this to full-root. Otherwise set it to min-root for a small filesystem. NOTE: When choosing full-root option, make sure all of the dependent components are downloaded and copied to projects/package-downloads folder before starting the build. See []. full-root is min-root + srio-utils + additional packages. #export ROOTFS=full-root export ROOTFS=min-root PKG_LIST lists the additional packages that you want to build and install in the full-root fs. List the packages separated by space characters #list the packages for full-root export PKG_LIST="zlib net-snmp polarssl ttcp dhrystone nbench-byte tcpdump"

This release supports both big endian and little endian kernels. Change the ENDIAN variable appropriately. # 'little' or 'big' for single endianess. Leave blank or undefined to build # both endians export ENDIAN=little

# If you are building sdk0 you must use a 3.x gcc version # Otherwise 3.x and 4.x should work #export HOSTCC=gcc-3.4 export HOSTCC=gcc

If the user is using an old machine like a RHEL4 machine, the version of depmod in /sbin/depmod is not sufficient for a big endian build to succeed. Please refer to the section on how to setup a linux host with an updated depmod # If you need to override DEPMOD use something like below # This is needed for older versions of depmod like on RHEL4 and big endian c6x #export DEPMOD=/my/special/stuff/depmod

4.    Issue the commands ./setup source setenv

5.    Finally issue the command

make product