[U-Boot-Users] fatload'ing kernel image from CF

Wolfgang Denk wd at denx.de
Wed Apr 13 21:58:05 CEST 2005


Dear Jeff,

in message <1113402442.11108.14.camel at nighteyes.localdomain> you wrote:
> 
> Are there any partitioning requirements associated with loading files
> using the fatload command?  I have found that if I try to load a file
> from the 2nd partition and the 1st partition exceeds a certain size, the
> fatload command fails.

Must be a problem on your platform, then.

> For instance, with part1=8MB and part2=4MB, I see the following error
> when loading an image from the 2nd partition:
> 
> => fatload ace 0:2 140000 uimage
> reading uimage
> Invalid FAT entry
> 
> 26624 bytes read
> 
> However, with part1=4MB and part2=4MB, the same file loads fine from the
> 2nd partition.  If I put the file in the first partition it always loads
> fine.
> 
> Both partitions were formatted using mkfs.msdos.

Did the same here, and it works without problems:

in Linux:

	...
	Command (m for help): p

	Disk /dev/hda: 256 MB, 256376832 bytes
	16 heads, 32 sectors/track, 978 cylinders
	Units = cylinders of 512 * 512 = 262144 bytes

	   Device Boot    Start       End    Blocks   Id  System
	/dev/hda1             1        32      8176    6  FAT16
	/dev/hda2            33        48      4096    6  FAT16
	/dev/hda3            49       978    238080    6  FAT16
	...
	bash-2.05b# mkfs.msdos /dev/hda1
	mkfs.msdos 2.8 (28 Feb 2001)
	bash-2.05b# mkfs.msdos /dev/hda2
	mkfs.msdos 2.8 (28 Feb 2001)
	bash-2.05b# mkfs.msdos /dev/hda3
	mkfs.msdos 2.8 (28 Feb 2001)
	bash-2.05b# mount /dev/hda1 /mnt && cp -v /tmp/linux.img /mnt && umount /dev/hda1
	`/tmp/linux.img' -> `/mnt/linux.img'
	bash-2.05b# mount /dev/hda2 /mnt && cp -v /tmp/linux.img /mnt && umount /dev/hda2
	`/tmp/linux.img' -> `/mnt/linux.img'
	bash-2.05b# mount /dev/hda3 /mnt && cp -v /tmp/linux.img /mnt && umount /dev/hda3
	`/tmp/linux.img' -> `/mnt/linux.img'

in U-Boot:

=> ide part  

Partition Map for IDE device 0  --   Partition Type: DOS

Partition     Start Sector     Num Sectors     Type
    1                   32           16352       6
    2                16384            8192       6
    3                24576          476160       6
=> fatls ide 0:1 /
   990407   linux.img 

1 file(s), 0 dir(s)

=> fatload ide 0:1 200000 linux.img ; imi 200000
reading linux.img

990407 bytes read

## Checking Image at 00200000 ...
   Image Name:   Linux + initrd fuer UC-100
   Created:      2005-04-13  15:27:32 UTC
   Image Type:   PowerPC Linux Multi-File Image (gzip compressed)
   Data Size:    990343 Bytes = 967.1 kB
   Load Address: 00000000
   Entry Point:  00000000
   Contents:
   Image 0:   751915 Bytes = 734.3 kB
   Image 1:   238415 Bytes = 232.8 kB
   Verifying Checksum ... OK
=> fatls ide 0:2 /
   990407   linux.img 

1 file(s), 0 dir(s)

=> fatload ide 0:2 200000 linux.img ; imi 200000
reading linux.img

990407 bytes read

## Checking Image at 00200000 ...
   Image Name:   Linux + initrd fuer UC-100
   Created:      2005-04-13  15:27:32 UTC
   Image Type:   PowerPC Linux Multi-File Image (gzip compressed)
   Data Size:    990343 Bytes = 967.1 kB
   Load Address: 00000000
   Entry Point:  00000000
   Contents:
   Image 0:   751915 Bytes = 734.3 kB
   Image 1:   238415 Bytes = 232.8 kB
   Verifying Checksum ... OK
=> fatls ide 0:3 /
   990407   linux.img 

1 file(s), 0 dir(s)

=> fatload ide 0:3 200000 linux.img ; imi 200000
reading linux.img

990407 bytes read

## Checking Image at 00200000 ...
   Image Name:   Linux + initrd fuer UC-100
   Created:      2005-04-13  15:27:32 UTC
   Image Type:   PowerPC Linux Multi-File Image (gzip compressed)
   Data Size:    990343 Bytes = 967.1 kB
   Load Address: 00000000
   Entry Point:  00000000
   Contents:
   Image 0:   751915 Bytes = 734.3 kB
   Image 1:   238415 Bytes = 232.8 kB
   Verifying Checksum ... OK



On which board / processor is this?


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If I have seen further it is by standing on the shoulders of  giants.
              - Isaac Newton, Letter to Robert Hooke, 5 February 1676




More information about the U-Boot mailing list