Meld SDK for TI Davinci DM6467T March 2012 ======================================================================= This software package from MontaVista Software, LLC contains a Software Development Kit (SDK) for the TI Davinci DM6467T architected around the MontaVista Integration Platform (MVIP). It provides MVIP 6.1, a MontaVista 4.4 toolchain (GCC 4.3), and a ready-to-build Integration Platform project for the Davinci DM6467T. For convenience, the prebuilt directory contains prebuilt images (U-Boot bootloader, kernel uImage, and root file system for the target device). This SDK comes with absolutely no warranty and no support at all. USE AT YOUR OWN RISK. What's included --------------- You'll find four top-level directories in this archive: mips-malta-mp/ Contains the Integration Platform project for the ti-davinci-dm6467 build. This is the actual SDK's content. mvip/ Contains the MontaVista Integration Platform kit. prebuilt/ Contains a prebuilt kernel, root file system, and U-Boot bootloader for the mips-malta-mp. toolchain/ Contains the MontaVista toolchain. This SDK is based on MontaVista Linux 6, which is an OpenEmbedded-inspired distribution, and is built using the MVIP, our Bitbake-based build environment. * MontaVista Linux 6: The MVL6 distribution was sourced from our latest release build on February 8, 2012. * Kernel: The kernel is a 2.6.32 tree initially obtained from kernel.org with additional MontaVista bug fixes and patches. Supported Target Reference Board Board version: Board version: TI-DaVinci- EVM Rev. A CPUs: DaVinci DM646x Firmware version: U-Boot 2009.08 for DaVinci DM646x Build instructions ------------------ Building a Default Image Now that you have set up a project and added content objects, you can use the MVIP to invoke BitBake, an automated build management system, to build a bootable image with the default configuration for your solution. Generally, your project includes support for these standard image recipes: Image Recipe Description default-image A maximal image that includes a feature-rich userland. initramfs-image A basic image designed to boot from a RAM disk. To see a list of all available image recipes, run the command: ls /tmp/collections/*/*/recipes/images/* Remember not to edit these or any files under tmp/ as they are rewritten during builds. To edit a recipe, copy it to /collections/custom and edit it there. Important: You cannot be logged in as root when you run the build with BitBake. To build a default image: 1. Make sure you are in your project directory. cd ~/ 2. Source the setup.sh script to set up your working directory and environment. source setup.sh This command sets up the required environment variables for building an image with the MVIP. The setup.sh script must be sourced each time before you build. 3. Build your project. bitbake default-image This builds a deployable image with the default configuration for your solution. The resulting build creates the directory ~//tmp/deploy/images with the following contents: • default-image--.rootfs.ext2.gz— The compressed root file system that can be mounted and exported for NFS. • .bin— The bootable kernel binary. For example, the ~/mytestproject/tmp/deploy/images directory for the x86 target contains the following files: bzImage-x86-generic.bin default-image-x86-generic-.rootfs.ext2.gz Note: To see more detailed information as the project builds, run the build with the -D (debug) option. Specify -D multiple times to increase the debug level by one each time. 4. Review the build results. Congratulations! You have successfully built your first bootable image! A message similar to the following displays: ... NOTE: package default-image-1.0-r0: task do build: started NOTE: package default-image-1.0-r0: task do build: completed NOTE: Tasks Summary: Attempted 644 tasks of which 8 didn’t need to be rerun and 0 failed. NOTE: build 2010060961034: completed You can now proceed to booting your target. For more information, see the Target Boot Quick Start Guide for your MSD. Boot instructions ----------------- Hardware and Firmware Requirements Before you start configuring the target, make sure you have the following hardware and firmware: Target System Hardware: Texas Instruments Da Vinci DM6467T EVM Target System Firmware: U-Boot 2009.08 for DaVinci DM646x Board tested: TI-DaVinci- EVM Rev. A Paths and Names Use the paths and names to configure and boot your default kernel. Use these values as a reference when you rebuild kernels or develop code using MontaVista Linux. : arm-montavista-linux-gnueabi (Note: The ARMv5T processor does not require a GCC compiler option.) : ti-davinci-dm6467t-evm-2.6.32 : ti-davinci-dm6467t-evm : /tmp/deploy/images/ : default-image-ti-davinci-dm6467t-evm-.rootfs.ext2.gz .bin: uImage-ti-davinci-dm6467t-evm.bin -initramfs-image.bin: uImage-ti-davinci-dm6467t-evm-initramfs-image.bin Note: Values for the default image binary names and compressed root file system are pointers to the latest build of the kernel images and root file system. To use an earlier default image build, replace the pointer name with the file name with the appropriate time stamp. Pointer File uImage-ti-davinci-dm6467t-evm.bin uImage-2.6.32--ti-davinci-dm6467t-evm.bin uImage-ti-davinci-dm6467t-evm-initramfs-image.bin uImage-2.6.32--ti-davinci-dm6467t-evm-initramfs-image.bin default-image-ti-davinci-dm6467t-evm.ext2.gz default-image-ti-davinci-dm6467t-evm-.rootfs.ext2.gz Steps to Configure and Boot the Target Configure and boot the target using an NFS or RAM disk file system: 1.Connect the Target Board to the Host 2.Set Up Minicom 3.Configure the Host 4.Configure the Target 5.Boot the Target Connect the Target Board to the Host Connect your target board to the host to set up the hardware communication interface between the two systems. Connect a null-modem serial cable from the host to port 0 on the Malta board. Port 0 is the DB-9 serial port on the top when looking directly at the connectors. Connect the target to a 100Base-T switch or hub. Connect the target's power supply. Set Up Minicom Minicom is a terminal emulation and modem interface program used by the host system to communicate with target boards. Set up Minicom for your host with the following settings for your target firmware: 115200 baud, 8 data bits, 1 stop bit, and no parity (8n1). Configure the Host DHCP, TFTP, and NFS servers must be configured on the host to provide the appropriate kernel and file system information to the target. To configure your host, complete the instructions for your host operating system: DHCP Warning! If the DHCP server is configured incorrectly, it may cause problems for other systems on your network. Server configuration may be specific to Linux hosts. Be sure to check your Linux host distribution manual for more information. If you have questions about how to install and configure the DHCP server on your machine, see your systems administrator for assistance. To configure DHCP: 1. Log in as the root user. 2. Turn off your operating system's DHCP server. Make sure that no other DHCP servers are running. Refer to your distribution manual for specific instructions on turning off your operating system's DHCP server. For example, to turn off DHCP in Red Hat: /etc/init.d/dhcpd stop 3. Ensure that the dhcpd.leases file exists. touch /etc/dhcpd.leases 4. Configure your dhcpd.conf file to mount the target kernel and root file system. For example, you can use the following configuration to edit or update your dhcpd.conf file: deny unknown-clients; ddns-update-style none; authoritative; allow bootp; #next-server q.r.s.t.; subnet a.b.c.d netmask e.f.g.h { default-lease-time 1209600; # two weeks max-lease-time 31557600; # one year option routers i.j.k.l; # gateway address group { host name.your.domain { # your target name (e.g. test1.mvista.com) hardware ethernet xx:xx:xx:xx:xx:xx; fixed-address m.n.o.p; # target IP address option root-path ""; # e.g. "/mnt/small-mvl6" filename ""; # relative to TFTP root } } } Notes: * When you replace name.your.domain with your target name (for example test1.mvista.com), the name you use must be consistent with the host name used for DNS or host file look-up. *Replace xx:xx:xx:xx:xx:xx with your target Ethernet (MAC) address. *Replace with the name of the boot image that will be used for your target processor. For IA-32/x86 targets that use PXE to boot, the is the pxeboot executable pxelinux.0. For all other targets using a network boot, the is listed in each target Quick Start Guide. *For IA-32/x86 targets that use PXE to boot, uncoment the option next-server q.r.s.t;. Replace q.r.s.t with the TFTP server address. Important: There is a size limit to the request. If you add options other than those listed above, your root file system may fail to mount. 5. Make sure that there are no other DHCP servers running, and restart dhcpd. /etc/init.d/dhcpd restart DHCP is now set up. TFTP Server configuration may be specific to Linux hosts. Be sure to check your Linux host distribution manual for more information. If you have questions about how to install and configure the TFTP server on your machine, see your systems administrator for assistance. To configure TFTP: 1. Log in as the root user. 2. Create (or edit) the file /etc/xinetd.d/tftp, as shown below. service tftp { socket_type = dgram wait = yes user = root log_on_success += USERID log_on_failure += USERID server = /usr/sbin/in.tftpd server_args = -v -r blksize -s /tftpboot disable = no protocol = udp } 3. Create the directory /tftpboot. mkdir /tftpboot 4. Copy the boot file into the directory /tftpboot. cp /.bin /tftpboot/ 5. Make xinetd reread its configuration file. /etc/init.d/xinetd restart Note: If there are any TFTP daemons that have not timed out, enter the following command to stop them manually. killall in.tftpd TFTP is now set up. NFS Server configuration may be specific to Linux hosts. Be sure to check your Linux host distribution manual for more information. If you have questions about how to install and configure the NFS server on your machine, see your systems administrator for assistance. To configure NFS: 1. Log in as the root user. 2. Create a directory for mounting the root file system. mkdir /mnt/ 3. Change to the directory you just created and copy the compressed root file system into it. cd /mnt/ cp / ./ 4. Unzip and mount the root file system. gunzip mount -o loop \ /mnt/ 5. Add the following line to /etc/exports. /mnt/ *(rw,sync,no_root_squash,no_all_squash) 6. Make sure portmap is running. /etc/rc.d/init.d/portmap start 7. Start the NFS daemon. /etc/rc.d/init.d/nfs start Note: If you want to start NFS automatically on every boot, run: /sbin/chkconfig portmap on /sbin/chkconfig nfs on 8. Sync the NFS daemon. /usr/sbin/exportfs -ra NFS is now set up. See the Paths and Names section above for the variables required during host configuration. Note: You must provide the target MAC address in order to configure the DHCP server. MAC Address The MAC address is programmed into the onboard EEPROM and should not be modified. Note: If you must use a different MAC address for the board, use the setenv ethaddr command to set the new value. The MAC address you use must be unique on the network segment. setenv ethaddr=xx.xx.xx.xx.xx.xx Configure the Target Configure the necessary firmware or controller required to boot your target. The Texas Instruments Da Vinci DM6467T EVM target board is shipped with the U-Boot firmware already installed. Turn on the target board. Display the environment variables. Configure the U-Boot environment. setenv bootargs mem=112M console=ttyS0,115200n8 vpif_display.ch2_numbuffers=0 vpif_display.ch3_numbuffers=0 setenv bootcmd 'dhcp;bootm' Save your environment variables. saveenv Boot the Target MontaVista supports the NFS and RAM disk file systems for development. You can boot the target for an NFS or RAM disk file system. For more information, see Selecting a Root File System for Development. Booting the Target Using NFS To boot your target using NFS: Make sure the target is connected to the NFS server and that it is properly configured. Copy the default kernel image to the tftpboot directory on the host. cp //tmp/deploy/images/uImage-ti-davinci-dm6467t-evm.bin \ /tftpboot/uImage-ti-davinci-dm6467t-evm Set the environment variables for the target. setenv bootargs $bootargs root=/dev/nfs Note: The rootpath points to the mounted uncompressed target root file system on the host as described in the host configuration instruction for NFS. Boot the target. boot After Linux boots, you are placed at a login prompt. Log in as root without a password. A bash shell prompt displays. Note: Change this password as soon as possible. To change your password, use the passwd command. Booting the Target Using RAM Disk You must create a kernel image with initramfs functionality to boot your target using RAM disk. Complete the instructions in the initramfs section. Then boot your target: Set up the environment variables. setenv bootargs $bootargs root=/dev/ram Note: The DHCP server provides the bootfile name. Make sure you configure the DHCP server (dhcpd.conf) to supply the name of the RAM image file. Boot the target. boot After Linux boots, you are placed at a login prompt. Log in as root without a password. A bash shell prompt displays. Note: Change this password as soon as possible. To change your password, use the passwd command. After you have installed and booted the target, configure the development environment to meet your needs and begin developing your embedded applications. Feedback and questions ---------------------- Don't hesitate to give your feedback or ask your questions on the Meld forums at http://meld.org !