Texas Instruments TMS320DM357 DVEVM v2.05 manual Building a New Linux Kernel

Page 43

Building a New Linux Kernel

4.5Building a New Linux Kernel

If you modify the target’s Linux kernel sources, you will need to rebuild it and then boot it up by either replacing the kernel that comes installed on the EVM board’s flash or by having the U-Boot utility use TFTP to boot the kernel over a network connection.

Make sure you have completed Section 4.4, Setting Up the Build/Development Environment and Section 4.4.1, Writing a Simple Program and Running it on the EVM before attempting to build a new kernel.

To rebuild the Linux Kernel, follow these steps:

1)Log in to your user account (not as root).

2)Set the PLATFORM variable in the Rules.make file as described in Section 4.6.

3)Use commands like the following to make a local working copy of the MontaVista Linux Support Package (LSP) in your home directory. This copy contains the embedded Linux 2.6.18 kernel plus the DaVinci drivers. If you installed in a location other than /opt/mv_pro_5.0, use your location in the cp command.

host $ cd /home/<useracct> host $ mkdir -p workdir/lsp host $ cd workdir/lsp

host $ cp -R /opt/mv_pro_5.0/montavista/pro/devkit/lsp/ti-davinci .

4)Use the following commands to configure the kernel using the DaVinci defaults. Note that CROSS_COMPILE specifies a prefix for the executables that is used during compilation:

host $ cd ti-davinci/linux-2.6.18_pro500

host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- davinci_dm357_defconfig

5)To modify the kernel options, you will need to use a configuration command such as "make menuconfig" or "make xconfig". To enable the MontaVista default kernel options, use the following command:

host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- checksetconfig

6) Compile the kernel using the following command:

host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage

DVEVM Software Setup

4-13

Image 43
Contents TMS320DM357 Dvevm Getting Started Guide Important Notice Evaluation BOARD/KIT Important Notice FCC Warning About This Guide PrefaceTrademarks Contents Contents Dvevm Overview What’s in this Kit? DM357 What’s on the Board?What’s Next? EVM Hardware Setup Setting Up the Hardware Audio In P3 Audio Out P5 Composite Video Out J8 Uart P6 Connecting to a Console Window Running the Demonstration Software Starting the Standalone Demos Default Boot ConfigurationStarting the Standalone Demos Starting the Standalone Demos Running the Standalone Demos Shutting Down the Demos About the Encode Demo About the Encode + Decode DemoIR Remote Buttons for Encode Demo IR Remote Buttons for Decode Demo About the Decode DemoRunning the Demos from the Command Line Running the Network Demo Page Dvevm Software Setup Software Overview Command Prompts in This Guide Software Components ApplicationPreparing to Install Installing the Target Linux Software Installing the SoftwareInstalling the Dvsdk Software Exporting a Shared File System for Target Access Installing the A/V Demo FilesSwitch user to root on the host Linux workstation EVM # setenv nfshost ip address of nfs host Testing the Shared File SystemInstalling the Software Writing a Simple Program and Running it on the EVM Setting Up the Build/Development EnvironmentBuilding a New Linux Kernel Compile the kernel using the following commandRebuilding the Dvevm Software for the Target Building with DSPLink EVM # setenv serverip tftp server ip address Booting the New Linux KernelUsing the Digital Video Test Bench Dvtb Page Additional Procedures Ntsc Changing the Video Input/Output MethodsPutting Demo Applications in the Third-Party Menu File filename.tar.gz You should see the following output Setting Up a Tftp ServerBooting from Flash Using Board’s Nand Flash File System Alternate Boot MethodsBooting from Flash Using NFS File System Booting via Tftp Using Board’s Nand Flash File SystemBooting via Tftp Using NFS File System Updating U-Boot Using U-Boot Updating/Restoring the BootloadersTo assign a dynamic address, use the following Updating/Restoring the Bootloaders Updating the Kernel Restoring the Nand FlashRestoring the Nand Flash Using NFS Restoring the Nand Flash Using RAM Disk and a 2 GB SD Card EVM # tar xf /mnt/mmc/dm357flashimage####.tar EVM # cd Page NFS IndexIndex--2 Index--3 Spectrum Digital, Inc 511458-0001B