Chinaunix首页 | 论坛 | 博客
  • 博客访问: 642837
  • 博文数量: 75
  • 博客积分: 7001
  • 博客等级: 少将
  • 技术积分: 1465
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-11 17:39
文章分类

全部博文(75)

文章存档

2010年(1)

2009年(25)

2008年(49)

我的朋友

分类: LINUX

2008-06-24 13:43:45

The data movement of uImage bootup by u-boot

Edwin @2008-06-16

 

./arch/arm/boot/Makefile:30:

targets := Image zImage xipImage bootpImage uImage

 

 

quiet_cmd_uimage = UIMAGE  $@

      cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \

                 -C none -a $(ZRELADDR) -e $(ZRELADDR) \

                 -n 'Linux-$(KERNELRELEASE)' -d $< $@

 

$(obj)/uImage:       $(obj)/zImage FORCE

       $(call if_changed,uimage)

       @echo '  Image $@ is ready'

 

For more informaton, pls refer to appendix 1

 

 

u-boot bootups linux kernel uImage

command:

tftpboot xxxx,xxxx  uImage              

bootm xxxx,xxxx

 

For our dev board evb3504:

tftpboot 6000,0000 uImage

bootm 6000,0000

 

command “tftpboot” downloads uImage to memory address xxxx,xxxx, then command “bootm” bootup the kernel by invoking do_bootm()(common/cmd_bootm.c), which calls do_bootm_linux()(lib_arm/armlinux.c).

 

 

int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])

{

       ulong      iflag;

       ulong      addr;

       ulong      data, len, checksum;

       ulong  *len_ptr;

       uint  unc_len = CFG_BOOTM_LEN;

       int    i, verify;

       char *name, *s;

       int    (*appl)(int, char *[]);

       image_header_t *hdr = &header;

#ifdef EDWIN

       char *tmp_kernel_addr;

       int j;

#endif

       s = getenv ("verify");

       verify = (s && (*s == 'n')) ? 0 : 1;

 

       if (argc < 2) {

addr = load_addr;   ---- > assume uImage is download to default address, while

                                          execute “bootm” command without parameters,

       } else {

              addr = simple_strtoul(argv[1], NULL, 16);  

--- > addr equals xxxx, xxxx specified in

                                                        command “bootm xxxx,xxxx”

              for evb3504:  addr = 0x6000,0000

#ifdef EDWIN

              printf("edwin: addr = %8lx\n", addr);

#endif

             

       }

 

       SHOW_BOOT_PROGRESS (1);

       printf ("## Booting image at %08lx ...\n", addr);

 

#ifdef EDWIN

       printf("edwin: ----------------->\n");

 

#endif

 

 

      

 

       /* Copy header so we can blank CRC field for re-calculation */

#ifdef CONFIG_HAS_DATAFLASH

       if (addr_dataflash(addr)){

              read_dataflash(addr, sizeof(image_header_t), (char *)&header);

       } else

#endif

       memmove (&header, (char *)addr, sizeof(image_header_t));

                                   --- >the first “sizeof(image_header_t)” eg 0x40 byte of uImage is the header, which contains information built by “MKIMAGE”, such entry address ,load address, compressed format etc.

                                                              

 

#ifdef EDWIN

       printf("edwin : memmove (&header, (char *)addr, sizeof(image_header_t))\n");

       printf("edwin : download address addr = %8lx\n", addr);

       printf("edwin : the content of uImage header[0x] :\n");

       for(j=0; j

              if(j%16 == 0)

                     printf("\n");

              printf("%5x", *((char*)addr+j));

       }

                                   --- > print content of header

#endif

 

 

       if (ntohl(hdr->ih_magic) != IH_MAGIC) {

#ifdef __I386__     /* correct image format not implemented yet - fake it */

              if (fake_header(hdr, (void*)addr, -1) != NULL) {

                     /* to compensate for the addition below */

                     addr -= sizeof(image_header_t);

                     /* turnof verify,

                      * fake_header() does not fake the data crc

                      */

                     verify = 0;

              } else

#endif     /* __I386__ */

           {

              puts ("Bad Magic Number\n");

              SHOW_BOOT_PROGRESS (-1);

              return 1;

           }

       }

       SHOW_BOOT_PROGRESS (2);

 

       data = (ulong)&header;

       len  = sizeof(image_header_t);

 

       checksum = ntohl(hdr->ih_hcrc);

       hdr->ih_hcrc = 0;

 

       if (crc32 (0, (uchar *)data, len) != checksum) {

              puts ("Bad Header Checksum\n");

              SHOW_BOOT_PROGRESS (-2);

              return 1;

       }

       SHOW_BOOT_PROGRESS (3);

 

#ifdef CONFIG_HAS_DATAFLASH

       if (addr_dataflash(addr)){

              len  = ntohl(hdr->ih_size) + sizeof(image_header_t);

              read_dataflash(addr, len, (char *)CFG_LOAD_ADDR);

              addr = CFG_LOAD_ADDR;

       }

#endif

 

 

#ifdef EDWIN

       printf("\nedwin: --------->print_image_hdr()\n");

#endif

 

      

 

       /* for multi-file images we need the data part, too */

       print_image_hdr ((image_header_t *)addr);

 

#ifdef EDWIN

       printf("\nedwin: --------->print_image_hdr()\n");

#endif

 

      

 

       data = addr + sizeof(image_header_t);

       len  = ntohl(hdr->ih_size);

                            --- > after the header is real linux kernel image.

 

       if (verify) {

              puts ("   Verifying Checksum ... ");

              if (crc32 (0, (uchar *)data, len) != ntohl(hdr->ih_dcrc)) {

                     printf ("Bad Data CRC\n");

                     SHOW_BOOT_PROGRESS (-3);

                     return 1;

              }

              puts ("OK\n");

       }

       SHOW_BOOT_PROGRESS (4);

 

       len_ptr = (ulong *)data;

 

#if defined(__PPC__)

       if (hdr->ih_arch != IH_CPU_PPC)

#elif defined(__ARM__)

       if (hdr->ih_arch != IH_CPU_ARM)

#elif defined(__I386__)

       if (hdr->ih_arch != IH_CPU_I386)

#elif defined(__mips__)

       if (hdr->ih_arch != IH_CPU_MIPS)

#elif defined(__nios__)

       if (hdr->ih_arch != IH_CPU_NIOS)

#elif defined(__M68K__)

       if (hdr->ih_arch != IH_CPU_M68K)

#elif defined(__microblaze__)

       if (hdr->ih_arch != IH_CPU_MICROBLAZE)

#elif defined(__nios2__)

       if (hdr->ih_arch != IH_CPU_NIOS2)

#elif defined(__blackfin__)

       if (hdr->ih_arch != IH_CPU_BLACKFIN)

#elif defined(__avr32__)

       if (hdr->ih_arch != IH_CPU_AVR32)

#else

# error Unknown CPU type

#endif

       {

              printf ("Unsupported Architecture 0x%x\n", hdr->ih_arch);

              SHOW_BOOT_PROGRESS (-4);

              return 1;

       }

       SHOW_BOOT_PROGRESS (5);

 

       switch (hdr->ih_type) {

       case IH_TYPE_STANDALONE:

              name = "Standalone Application";

              /* A second argument overwrites the load address */

              if (argc > 2) {

                     hdr->ih_load = htonl(simple_strtoul(argv[2], NULL, 16));

              }

              break;

       case IH_TYPE_KERNEL:

              name = "Kernel Image";

              break;

       case IH_TYPE_MULTI:

              name = "Multi-File Image";

              len  = ntohl(len_ptr[0]);

              /* OS kernel is always the first image */

              data += 8; /* kernel_len + terminator */

              for (i=1; len_ptr[i]; ++i)

                     data += 4;

              break;

       default: printf ("Wrong Image Type for %s command\n", cmdtp->name);

              SHOW_BOOT_PROGRESS (-5);

              return 1;

       }

       SHOW_BOOT_PROGRESS (6);

 

       /*

        * We have reached the point of no return: we are going to

        * overwrite all exception vector code, so we cannot easily

        * recover from any failures any more...

        */

 

       iflag = disable_interrupts();

 

#ifdef CONFIG_AMIGAONEG3SE

       /*

        * We've possible left the caches enabled during

        * bios emulation, so turn them off again

        */

       icache_disable();

       invalidate_l1_instruction_cache();

       flush_data_cache();

       dcache_disable();

#endif

 

       switch (hdr->ih_comp) {

       case IH_COMP_NONE:   --- > note: uImage is made with  “mkimage –C none parameter”

              if(ntohl(hdr->ih_load) == addr) {

                     printf ("   XIP %s ... ", name);

              } else {

#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)

                     size_t l = len;

                     void *to = (void *)ntohl(hdr->ih_load);

                     void *from = (void *)data;

 

                     printf ("   Loading %s ... ", name);

 

                     while (l > 0) {

                            size_t tail = (l > CHUNKSZ) ? CHUNKSZ : l;

                            WATCHDOG_RESET();

                            memmove (to, from, tail);

                            to += tail;

                            from += tail;

                            l -= tail;

                     }

#else       /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */

 

#ifdef EDWIN

                     printf("\nedwin: --------->memmove ((void *) ntohl(hdr->ih_load), (uchar *)data, len)\n");

#endif

 

                    

                     memmove ((void *) ntohl(hdr->ih_load), (uchar *)data, len);

                                   --- > copy the real kernel image to specified address,

                                          For evb3504, the address is 0x6000,8000

 

#ifdef EDWIN

                     printf("the kernel image[0x] after move to default address \

                                          [(ulong) ntohl(hdr->ih_load)]: %x\n",(ulong) ntohl(hdr->ih_load));

 

                     tmp_kernel_addr = (char *) ntohl(hdr->ih_load);

                     for(j=0; j<1024*512; j++){

                            if(j%16 == 0)

                                   printf("\n");

                            printf("%5x", *(tmp_kernel_addr+j));

                     }

                                   --- > print the first 512k bytes of the kernel image

 

                     printf("\nedwin: --------->memmove ((void *) ntohl(hdr->ih_load), (uchar *)data, len)\n");

                    

#endif

 

 

                    

#endif     /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */

              }

              break;

       case IH_COMP_GZIP:

              printf ("   Uncompressing %s ... ", name);

              if (gunzip ((void *)ntohl(hdr->ih_load), unc_len,

                         (uchar *)data, &len) != 0) {

                     puts ("GUNZIP ERROR - must RESET board to recover\n");

                     SHOW_BOOT_PROGRESS (-6);

                     do_reset (cmdtp, flag, argc, argv);

              }

              break;

#ifdef CONFIG_BZIP2

       case IH_COMP_BZIP2:

              printf ("   Uncompressing %s ... ", name);

              /*

               * If we've got less than 4 MB of malloc() space,

               * use slower decompression algorithm which requires

               * at most 2300 KB of memory.

               */

              i = BZ2_bzBuffToBuffDecompress ((char*)ntohl(hdr->ih_load),

                                          &unc_len, (char *)data, len,

                                          CFG_MALLOC_LEN < (4096 * 1024), 0);

              if (i != BZ_OK) {

                     printf ("BUNZIP2 ERROR %d - must RESET board to recover\n", i);

                     SHOW_BOOT_PROGRESS (-6);

                     udelay(100000);

                     do_reset (cmdtp, flag, argc, argv);

              }

              break;

#endif /* CONFIG_BZIP2 */

       default:

              if (iflag)

                     enable_interrupts();

              printf ("Unimplemented compression type %d\n", hdr->ih_comp);

              SHOW_BOOT_PROGRESS (-7);

              return 1;

       }

       puts ("OK\n");

       SHOW_BOOT_PROGRESS (7);

 

       switch (hdr->ih_type) {

       case IH_TYPE_STANDALONE:

              if (iflag)

                     enable_interrupts();

 

              /* load (and uncompress), but don't start if "autostart"

               * is set to "no"

               */

              if (((s = getenv("autostart")) != NULL) && (strcmp(s,"no") == 0)) {

                     char buf[32];

                     sprintf(buf, "%lX", len);

                     setenv("filesize", buf);

                     return 0;

              }

              appl = (int (*)(int, char *[]))ntohl(hdr->ih_ep);

              (*appl)(argc-1, &argv[1]);

              return 0;

       case IH_TYPE_KERNEL:

       case IH_TYPE_MULTI:

              /* handled below */

              break;

       default:

              if (iflag)

                     enable_interrupts();

              printf ("Can't boot image type %d\n", hdr->ih_type);

              SHOW_BOOT_PROGRESS (-8);

              return 1;

       }

       SHOW_BOOT_PROGRESS (8);

 

       switch (hdr->ih_os) {

       default:                  /* handled by (original) Linux case */

       case IH_OS_LINUX:  --- > note: uImage is made with “mkimage –O linux parameter”

 

#ifdef CONFIG_SILENT_CONSOLE

           fixup_silent_linux();

#endif

           do_bootm_linux  (cmdtp, flag, argc, argv,

                          addr, len_ptr, verify);

           break;

       case IH_OS_NETBSD:

           do_bootm_netbsd (cmdtp, flag, argc, argv,

                          addr, len_ptr, verify);

           break;

 

#ifdef CONFIG_LYNXKDI

       case IH_OS_LYNXOS:

           do_bootm_lynxkdi (cmdtp, flag, argc, argv,

                          addr, len_ptr, verify);

           break;

#endif

 

       case IH_OS_RTEMS:

           do_bootm_rtems (cmdtp, flag, argc, argv,

                          addr, len_ptr, verify);

           break;

 

#if (CONFIG_COMMANDS & CFG_CMD_ELF)

       case IH_OS_VXWORKS:

           do_bootm_vxworks (cmdtp, flag, argc, argv,

                           addr, len_ptr, verify);

           break;

       case IH_OS_QNX:

           do_bootm_qnxelf (cmdtp, flag, argc, argv,

                           addr, len_ptr, verify);

           break;

#endif /* CFG_CMD_ELF */

#ifdef CONFIG_ARTOS

       case IH_OS_ARTOS:

           do_bootm_artos  (cmdtp, flag, argc, argv,

                          addr, len_ptr, verify);

           break;

#endif

       }

 

       SHOW_BOOT_PROGRESS (-9);

#ifdef DEBUG

       puts ("\n## Control returned to monitor - resetting...\n");

       do_reset (cmdtp, flag, argc, argv);

#endif

       return 1;

}

 

 

 


The print messge is as follows:

 

U-Boot 1.1.6 (Jun 16 2008 - 15:11:23)

 

DRAM:  64 MB

Flash:  8 MB

In:    serial

Out:   serial

Err:   serial

Hit any key to stop autoboot:  0

 

Warning: MAC addresses don't match:

        HW MAC address:  00:00:00:00:00:00

        "ethaddr" value: 00:01:00:01:00:05

Using MAC Address 00:01:00:01:00:05

TFTP from server 192.168.167.131; our IP address is 192.168.167.133

Filename 'uImage'.

Load address: 0x60000000

Loading: T T #################################################################

         #################################################################

         #################################################################

         #################################################################

         ############

done

Bytes transferred = 1388316 (152f1c hex)

edwin: addr = 60000000

## Booting image at 60000000 ...

edwin: ----------------->

edwin : memmove (&header, (char *)addr, sizeof(image_header_t))

edwin : download address addr = 60000000

edwin : the content of uImage header[0x] :

 

27    5   19   56    2   a4   7f    0   48   56   16   47    0   15   2e   c4

60    0   80    0   60    0   80    0   f9   9d   5d   36    5    2    2    0

4c   69   6e   75   78   2d   32   2e   36   2e   31   38   5f   70   72   6f

35   30   30   2d   6f   6d   61   70   35   39   31   32   5f   6f   73   6b

edwin: --------->print_image_hdr()

   Image Name:   Linux-2.6.18_pro500-omap5912_osk

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    1388252 Bytes =  1.3 MB

   Load Address: 60008000

   Entry Point:  60008000

 

edwin: --------->print_image_hdr()

   Verifying Checksum ... OK

 

edwin: --------->memmove ((void *) ntohl(hdr->ih_load), (uchar *)data, len)

the kernel image[0x] after move to default address                                              [(ulong) ntohl(hdr->ih_load)]: 60008000

 

 

0    0   a0   e1    0    0   a0   e1    0    0   a0   e1    0    0   a0   e1

0    0   a0   e1    0    0   a0   e1    0    0   a0   e1    0    0   a0   e1

2    0    0   ea   18   28   6f    1    0    0    0    0   c4   2e   15    0

1   70   a0   e1    2   80   a0   e1    0   20    f   e1    3    0   12   e3

1    0    0   1a   17    0   a0   e3   56   34   12   ef    0   20    f   e1

c0   20   82   e3    2   f0   21   e1    0    0    0    0    0    0    0    0

cc    0   8f   e2   7e   30   90   e8    1    0   50   e0    a    0    0    a

0   50   85   e0    0   60   86   e0    0   c0   8c   e0    0   20   82   e0

0   30   83   e0    0   d0   8d   e0    0   10   96   e5    0   10   81   e0

4   10   86   e4    c    0   56   e1   fa   ff   ff   3a    0    0   a0   e3

4    0   82   e4    4    0   82   e4    4    0   82   e4    4    0   82   e4

3    0   52   e1   f9   ff   ff   3a   28    0    0   eb    d   10   a0   e1

1   28   8d   e2    2    0   54   e1   15    0    0   2a    5   30   4d   e0

3    1   84   e0    5    0   50   e1   11    0    0   9a    2   50   a0   e1

5    0   a0   e1    7   30   a0   e1   29    b    0   eb   7f    0   80   e2

7f    0   c0   e3    0   10   85   e0    2   2c   8f   e2   50   30   9f   e5

3   30   82   e0    0   7e   b2   e8    0   7e   a1   e8    0   7e   b2   e8

0   7e   a1   e8    3    0   52   e1   f9   ff   ff   3a   ff    0    0   eb

0   f0   85   e0    4    0   a0   e1    7   30   a0   e1   18    b    0   eb

7e    0    0   ea   34    1    0    0   c4   2e   15    0   fc   b2   15    0

 

……………………

……………………

……………………

 


 

The header of uImage: (with shadow)

 

The real data of kernel image: ( with shadow)

 

 

Conclusion:

The data on 0x6000,8000 is the same with uImage data behind 0x40 bytes (which are the header of the uImage added by mkimage tool), namely, data of zImage.

 

No matter where we download the uImage, the real data of the kernel image will be copy to the address designated in “mkimage –e xxxxxxxx” in do_bootm() function.
Appendix 1:

 

mkimage制作linux内核映像

bootm命令是用来引导经过u-boot的工具mkimage打包后的kernel image的,什么叫做经过u-boot的工具mkimage打包后的kernel image,这个就要看mkimage的代码,看看它做了些什么,虽然我很希望大家不要偷懒,认真地去看看,但是我知道还是有很多人懒得去做这件,那么我就j将分析mkimage代码后得到的总结告诉大家,mkimage做了些什么,怎么用这个工具。

mkimage
的用法
uboot
源代码的tools/目录下有mkimage工具,这个工具可以用来制作不压缩或者压缩的多种可启动映象文件。

mkimage
在制作映象文件的时候,是在原来的可执行映象文件的前面加上一个0x40字节的头,记录参数所指定的信息,这样uboot才能识别这个映象是针对哪个CPU体系结构的,哪个OS的,哪种类型,加载内存中的哪个位置, 入口点在内存的那个位置以及映象名是什么

root@Glym:/tftpboot# ./mkimage
Usage: ./mkimage -l image
-l ==> list image header information
./mkimage -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
-A ==> set architecture to 'arch'
-O ==> set operating system to 'os'
-T ==> set image type to 'type'
-C ==> set compression type 'comp'
-a ==> set load address to 'addr' (hex)
-e ==> set entry point to 'ep' (hex)
-n ==> set image name to 'name'
-d ==> use image data from 'datafile'
-x ==> set XIP (execute in place)
参数说明:

-A
指定CPU的体系结构:

取值 表示的体系结构
alpha Alpha
arm A RM
x86 Intel x86
ia64 IA64
mips MIPS
mips64 MIPS 64 Bit
ppc PowerPC
s390 IBM S390
sh SuperH
sparc SPARC
sparc64 SPARC 64 Bit
m68k MC68000

-O
指定操作系统类型,可以取以下值:
openbsd
netbsdfreebsd4_4bsdlinuxsvr4esixsolarisirixscodellncrlynxosvxworkspsosqnxu-bootrtemsartos

-T
指定映象类型,可以取以下值:

standalone
kernelramdiskmultifirmwarescriptfilesystem

-C
指定映象压缩方式,可以取以下值:

none
不压缩
gzip
gzip的压缩方式
bzip2
bzip2的压缩方式

-a
指定映象在内存中的加载地址,映象下载到内存中时,要按照用mkimage制作映象时,这个参数所指定的地址值来下载

-e
指定映象运行的入口点地址,这个地址就是-a参数指定的值加上0x40(因为前面有个mkimage添加的0x40个字节的头)

-n
指定映象名

-d
指定制作映象的源文件

mkimage

   解压内核源码包,编辑Makefile
  
设置 cross_compile:=[编译器的绝对路径]     ;这个绝对路径既上面2.95.3放到的路径

  
进入内核文件夹,执行下面命令
   [root@hostname]# make clean
   [root@hostname]# make dep
   [root@hostname]# make
   [root@hostname]# [
编译器的绝对路径]/bin/arm-linux-objcopy -O binary -S vmlinux linux.bin    ;编译器的绝对路径也是上面说到的路径
    [root@hostname]# gzip linux.bin
下面的比较重要了,主要是u-boot的安装,这个在H9200的手册上说的很不清楚
    [root@hostname]# tar xzvf u-boot-1.0.0.tar.gz      ;
解压u-boot
    [root@hostname]# cd u-boot-1.0.0
    [root@hostname]# make distclean
    [root@hostname]# make at91rm9200dk_config
    [root@hostname]# make all
   
然后在/usr/local下建立uboot文件夹将u-boot-1.0.0下的所有文件都复制到uboot

    [root@hostname]# [uboot
的绝对路径]/tools/mkimage -A arm -O linux -C gzip -a 0x20008000 -e 0x20008000 -d linux.bin.gz uImage           ;这里的绝对路径是/usr/local/uboot

vmlinux linux.bin linux.bin.gz uImage(uboot制作的image)

mkimage -a -e

-a参数后是内核的运行地址,-e参数后是入口地址。

1
)如果我们没用mkimage对内核进行处理的话,那直接把内核下载到0x30008000再运行就行,内核会自解压运行(不过内核运行需要一个tag来传递参数,而这个tag建议是由bootloader提供的,在u-boot下默认是由bootm命令建立的)。

2
)如果使用mkimage生成内核镜像文件的话,会在内核的前头加上了64byte的信息,供建立tag之用。bootm命令会首先判断bootm xxxx 这个指定的地址xxxx是否与-a指定的加载地址相同。
(1)
如果不同的话会从这个地址开始提取出这个64byte的头部,对其进行分析,然后把去掉头部的内核复制到-a指定的load地址中去运行之
(2)
如果相同的话那就让其原封不同的放在那,但-e指定的入口地址会推后64byte,以跳过这64byte的头部。


QUESTIONS

1. I have built a vmlinux image but I can boot it.

2: The mkimage tool, ARMboot's tftp command, and the bootm command require
   certain load and entry addresses. I'm confused which ones to chose.


ANSWERS

1. I have built a vmlinux image but I can boot it.
--------------------------------------------------

ARMboot is designed to boot Images as created by the mkimage tool, that
comes with ARMboot and is automatically built, too. You cannot directly load
the vmlinux image, as it expects a number of prerequisits such as special
register contents etc.

2. The mkimage tool, ARMboot's tftp command, and the bootm command require
   certain load and entry addresses. I'm confused which ones to chose.
--------------------------------------------------------------------------

Well, there are 3 different addresses:

1. Kernel Load Address. This is the address, where the kernel was linked
   to when you built the vmlinux and can be found in arch/arm/Makefile.
   The default for it is:
  
   ifeq ($(CONFIG_CPU_32),y)
   PROCESSOR    = armv
   TEXTADDR     = 0xC0008000
   LDSCRIPT     = arch/arm/vmlinux-armv.lds.in
   endif
  
   Provide this as "-a" parameter to mkimage.

2. Kernel Entry Point. This is the address, where ARMboot jumps to to
   enter the Kernel. It usually is the same as the kernel load address.

   Provide this as "-e" parameter to mkimage.

3. The Network Download Address. This is where you download the mkimage
   File. This address MUST BE different to the Kernel Load Address, and
   should be sufficiently far away to allow ARMboot to relocate the
   image to the final Kernel Load Address. Loading to the 5th MB
   within the RAM is usually a good idea, eg. if the RAM begins at
   0xc0000000, you can do this:
  
   LART # tftp c0400000 linux.img
   ARP broadcast 1
   eth addr: 00:02:03:04:05:06
   TFTP from server 192.168.1.1; our IP address is 192.168.1.2
   Filename 'image.img'.
   Load address: 0xc0400000
   Loading:
   ##################################################################done
   Bytes transferred = 567252 (8a7d4 hex)
   LART # bootm c0400000
      Image Name:   Linux 2.4.18
      Created:      Mon Jun 24 12:00:01 2002
      Image Type:   ARM Linux Kernel Image (gzip compressed)
      Data Size:    567188 Bytes = 553 kB = 0 MB
      Load Address: 0xc0008000
      Entry Point: 0xc0008000
      Verifying Checksum ... OK
      Loading Kernel Image ... OK

   Starting kernel ...

 

文件: The data movement of uImage bootup by u-boot.rar
大小: 51KB
下载: 下载

 

阅读(3269) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~