DENX . U-Boot . TaskRefactorBootmImage

Refactor bootm and Image Commands

Problems:

Sequence

  1. fdt boardsetup
  2. fdt chosen
  3. interrupts off
  4. usb stop
  5. dcache off ; icache off
  6. bootm start <os> <initrd> <fdtaddr>
  7. bootm ramdisk
  8. bootm fdt
  9. bootm bdt
  10. bootm cmdline
  11. bootm prepos
  12. bootm loados
  13. bootm go

Original Sequence

  1. Initialize / fill out the images structure
  2. lmb
  3. os_hdr = boot_get_kernel (cmdtp, flag, argc, argv, &images, &os_data, &os_len);
  4. /* get image parameters */ (different methods of filling out these variables based on IMAGE_FORMAT_LEGACY or IMAGE_FORMAT_FIT)
  5. Disable interrupts
  6. USB stop (if CONFIG_CMD_USB)
  7. Disable caches (if CONFIG_AMIGAONEG3SE)
  8. Decompress the image (based on compression type)
  9. Some sanity checking (load vs. image start and end, header validity)
  10. Add image load region to lmb
  11. OS-specific start function - should not return

=> bootm $loadaddr $ramdiskaddr $fdtaddr
## Booting kernel from Legacy Image at 00408000 ...
   Image Name:   Linux-2.6.26-06077-gc010b2f
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1391935 Bytes =  1.3 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01000000 ...
   Image Name:   Simple Embedded Linux Framework
   Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
   Data Size:    1731902 Bytes =  1.7 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 00400000
   Booting using the fdt blob at 0x400000
   Uncompressing Kernel Image ... OK
   Loading Ramdisk to 0fdf7000, end 0ff9dd3e ... OK

Refactoring cmd_bootm.c

Refactoring image.c

New Commands Thoughts...

This section is some thoughts about if we made an imload command with subcommands rather than shoehorning the image manipulation into the bootm command.

  1. Copy fdt into destination address
  2. Copy initrd into destination address
  3. Decompress/copy OFP into destination address (requires interrupts disabled)

----- Revision r1.1 - 17 Oct 2008 - 01:43 - JerryVanBaren
Copyright © 2002-2017 by DENX Software Engineering