Getting Montavista Linux to OMAP Innovator

Getting Montavista Linux to OMAP Innovator

Ricardo Kekki, Tuomas Kulve, Valtteri Rahkonen, Markku Ursin [email protected] 8th March 2004 Copyright Movial Contents 1 Introduction 1 2 Test Environment 1 2.1 MontaVista Linux . 1 2.2 BDI2000 . 1 3 Setting Up 2 3.1 Setup TFTP and DHCP Servers . 2 3.2 Setup BDI2000 . 3 3.3 Setup the Innovator and the Workstation . 3 3.4 TesttheSetup ......................................... 3 4 Compiling the U-Boot and Flashing to the Innovator 3 4.1 Compiling............................................ 4 4.2 Flashing............................................. 4 5 Compiling a Linux Kernel for the Innovator 5 5.1 Compiling Linux kernel 2.4.21 . 5 5.2 Compiling Linux Kernel 2.6.3 . 6 5.3 Compiling the MontaVista Kernel . 7 5.4 Converting the Kernel to U-Boot’s Format . 7 6 Linux Installation 8 6.1 Setup MontaVista Linux in the NFS server . 8 6.2 Flash and Start the Kernel . 8 7 Conclusion 10 A OMAP BDI2000 Configuration File 12 B BDI2000 to JTAG Cable Pinout 14 C Flash Memory Map 14 1 Introduction This document describes how to get MontaVista r Linux r running on the Innovator Development board for the Texas Instruments OMAP platform. The purpose is to get a bootloader and a Linux kernel flashed to the Innovator board and get the kernel to use a root file system over NFS. In this document we describe the use of Universal Bootloader(U-Boot)[12]. We used Linux kernel versions 2.4.21 and 2.6.3 in addition to MontaVista Linux’s kernel 2.4.21. 2 Test Environment This document was done with the following hardware and software: • Innovator Development kit with a breakout board • Abatron BDI2000 with bdiGDB for ARM7/9TDMI targets • PC with Debian (unstable) OS as the workstation • PC with Red Hat OS as the TFTPD/NFS server • MontaVista Linux CEE3.0 • U-Boot bootloader • Minicom[10] serial line communication software • Trivial file transfer protocol daemon (tftpd) [11] With Debian you can get and install minicom and tftpd by typing apt-get install [package’s name ] With Red Hat you can install the packages after downloading them by typing rpm -i [package’s name ].rpm U-Boot can be downloaded from its project page[12] at sourceforge. MontaVista Linux requires Red Hat 7.2 or 7.3, otherwise it won’t install. We used Red Hat 91 with a little hack described in section 6.1. Excluding the MontaVista Linux there should be no specific Linux distribution requirements to get the Linux into the Innovator. 2.1 MontaVista Linux MontaVista Linux can be found in the MontaVista Zone[1], which requires an user account. MontaVista Linux can be downloaded in the ISO-images named arm_v4t_le-mvlcee300_innovator.img and host-mvlcee300_innovator.img. 2.2 BDI2000 We chose Abatron’s JTAG emulator BDI2000, because it works well in Linux environment. The BDI2000 has GDB support and ethernet connection to the local LAN. 1Maybe this works with a Debian with Red Hat’s RPM -package tools installed too? Copyright Movial 1 / 14 3 Setting Up The network topology used in our tests is shown in Figure 1. Figure 1: Test environment 3.1 Setup TFTP and DHCP Servers We had separate computers for the workstation and TFTP and DHCP daemons but there should be no reason why the workstation and these servers couldn’t be the same computer. TFTP In our test we used /tmp as the TFTP directory because it eases the use. Configuring TFTPD on a Red Hat computer is done by modifying /etc/xinetd.d/tftp file. It should look like this: service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -c -s /tmp disable = no per_source = 11 cps = 100 2 flags = IPv4 } For the changes to take effect the xinetd must be informed about the changed configuration file by typing /etc/init.d/xinetd reload Configuring TFTPD on a Debian computer is done by adding the line tftp dgram udp wait root /usr/sbin/in.tftpd tftpd /tmp to /etc/inetd.conf and reloading inetd configuration by typing /etc/init.d/inetd reload Copyright Movial 2 / 14 DHCP Make your DHCP server to give the Innovator an IP Address. 3.2 Setup BDI2000 You need to have the correct firmware and settings loaded to the BDI2000. The firmware should be bdiGDB for ARM. The settings should have at least the BDI2000’s IP, your TFTP server’s IP and the configuration file name. The configuration might look like this: BDI Type : BDI2000 Rev.C (SN: 95528830) Loader : V1.05 Firmware : V1.11 bdiGDB for ARM Logic : V1.05 ARM MAC : 00-0c-01-95-52-88 IP Addr : 172.16.6.53 Subnet : 255.255.255.255 Gateway : 255.255.255.255 Host IP : 172.16.6.63 Config : omap.conf See the BDI2000 manual for setting the configurations. The configuration file can be found in the Appendix A. Copy the configuration file named as omap.conf to the TFTP directory. Copy also the reg925t.def file, which came with the BDI2000. 3.3 Setup the Innovator and the Workstation Use a null-modem cable to connect the Innovator’s serial port labelled COM1 to the workstation’s serial port. Connect the BDI2000 to the Innovator breakout board with the MultiICE cable. Launch minicom on the workstation. Check that it is configured as follows: Serial Device : /dev/ttyS0 (ttyS0 is normally the port 1) Bps/Par/Bits : 115200 8N1 Hardware Flow Control : No Software Flow Control : No 3.4 Test the Setup Connect to BDI2000 with telnet to test the settings: telnet 172.16.6.53 If the configuration file gets loaded then the setup was successful. 4 Compiling the U-Boot and Flashing to the Innovator In this section we describe how to compile the U-Boot bootloader and how to flash it to the Innovator’s bootflash. Copyright Movial 3 / 14 4.1 Compiling Compilation of the U-Boot is very straightforward procedure. First extract the archive and type the following commands in the U-Boot’s source directory: make omap1510inn_config make all Now you should have u-boot, u-boot.bin, u-boot.srec and u-boot.map in the current directory and mkimage in the tools directory. 4.2 Flashing Here we explain how to load and flash the U-Boot using mainly itself to do the job. After the U-Boot is flashed it should start automatically after powering up the Innovator. Set the Innovator’s Memory Configuration Switch (SW2) (see development kit’s user’s guide[4] Figures 2-2 and 3-3 and Table 3-1) to boot flash: S1 on, S2-4 off and restart the Innovator. First copy the u.boot and u.boot.bin to your TFTP -directory. Then unlock and erase the bootloader area with BDI: Code#0>unlock 0 1 2 Core#0>erase 0 Erasing flash at 0x00000000 Erasing flash passed Then load both the ELF and BIN formatted U-Boot images to Innovator’s memory: Core#0>load u-boot elf Loading u-boot , please wait .... - File offset 0x00008000 to address 0x11000000 size 87548 Loading program file passed Core#0>load 0x10000000 u-boot.bin bin Loading u-boot.bin , please wait .... Loading program file passed You can check with the RD -command that the PC points to the area where the ELF U-Boot image was loaded. Start the U-Boot by typing GO. If the PC is invalid, you can give the correct memory pointer as a parameter for GO -command. Core#0>rd GPR00: fffb0000 00000020 1101172d 00000060 GPR04: 11011718 00000004 00000015 11017b60 GPR08: 11039020 ffffffff 00000001 11038f30 GPR12: 11038f34 11038f24 11003b00 11000000 PC : 11000000 CPSR: 400000d3 Core#0>go Now you should see the Innovator’s prompt at minicom. Using the U-Boot unlock again the bootloader flash area and copy the BIN formatted U-Boot image there with CP -command. Copyright Movial 4 / 14 OMAP1510 Innovator # protect off 1:0-1 Un-Protect Flash Sectors 0-1 in Bank # 1 OMAP1510 Innovator # cp 0x10000000 0 0x55aa Copy to Flash...-done The first and second parameters of the CP -command are source and destination addresses. The last parameter tells how many words (32bit) should be copied. 5 Compiling a Linux Kernel for the Innovator This section describes how to compile a kernel for the Innovator. We compiled both 2.4 and 2.6 series kernel. Compiling the kernel in a normal PC platform for Innovator requires cross compilation environ- ment where the kernel can be compiled directly for the target platform. We used both Scratchbox [6] and Embedded Linux Development Kit (ELDK) [5] as our compiling environment. The kernel can be compiled also in MontaVista SDK that comes with already patched version of kernel. 5.1 Compiling Linux kernel 2.4.21 First thing needed is to obtain sources for kernel 2.4.21. Sources can be found at The Linux Kernel Archives [7] or at one of its mirrors. Linux vanilla kernel needs to be patched with ARM and OMAP patches. The ARM patch can be found from The ARM Linux Project [8] and the OMAP patch can be obtained from MontaVista [9]. Extracting and Patching the Kernels Before the kernel can be compiled it must be extracted and patched with the ARM and OMAP patches. The kernel archive can be extracted with the command: tar jxf linux-2.4.21.tar.bz2 Following patch -commands are assumed to be executed in the kernel source tree’s root directory. gzip -cd patch-2.4.21-rmk1.gz | patch -p1 bzip2 -cd patch-2.4.21-rmk1-omap1.bz2 | patch -p1 Preparing the Kernel for Compiling Environment After the kernel is extracted and patches applied it must be prepared for cross compiling.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    16 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us