Text Export ODT Export
 
Table of Contents

Target Download

Build the image on the Host Development System. This involves typing make in the uClinux-dist directory. For more information, see compiling the kernel.

Now it needs to be copied to the target system. You will have a variety of files in the images directory. For more information on these, see the images page. Here you will want a kernel image with a root filesystem attached.

In order to do all of this, you'll need:

Process

  1. Copy the kernel into the tftpboot directory
    $ cp ./images/linux /tftpboot/linux
  2. Configure networking in U-Boot with IP addresses and TFTP server information.
    bfin> dhcp
    Using MAC Address 00:E0:22:FE:47:7B
    BOOTP broadcast 1
    DHCP client bound to address 192.168.1.99
    bfin> setenv serverip 192.168.1.1
    bfin> saveenv
    OR
    bfin> setenv serverip 192.168.1.1
    bfin> setenv ipaddr 192.168.1.99
    At this point issue a saveenv command to save these values after a reset.
  3. Now transfer the image from the host to the target and boot it.
    bfin> tftp 0x1000000 linux
    bfin> bootelf 0x1000000

Although both the uImage and linux image are designed to be run at a starting address of 0x1000, they should not be loaded there, as both formats are relocated. The run address is not the load address. Care must be taken with both formats that the expanded, relocated image does not overlap with the load address. For example, if you have an image with a 16Meg root filesystem, you can not load it at 0x1000000 (16Meg), because as the filesystem is being uncompressed, it will overwrite the header of the downloaded file.

  • You can add a uboot command to automate all this
    bfin> setenv tftpl “tftp 0x1000000 linux ; bootelf 0x1000000”
    bfin> saveenv
    
    It is only necessary to set up the command one time, as long as you save it into the flash. Then the following command can be used to perform the download.
    bfin> run tftpl
    
  • This can be automated by defining the auto boot command.
    bfin> setenv bootcmd run tftpl
    
    Then after a reset the system will attempt a tftp download and run the image.
 
downloading_to_the_target.txt · Last modified: 2009/02/12 16:33 (external edit)