[U-Boot] FAT - problem with new mkcksum implementation

Michal Simek monstr at monstr.eu
Mon Jan 28 11:11:29 CET 2013


Hi Marek,

your patch "fs: fat: Fix mkcksum() function parameters"
(sha1: ff04f6d1224d8952b566b8671222151495883073)
is causing the problem on xilinx zynq platform.

Here is what I get as output when patch is in the tree. You see that
all files are there twice and more.
    zynq-uboot> fatls mmc 0
      4045655   download.bit
      4045655   download.bit
      2729968   zimage
      2729968   zimage
         5256   zynq-zc702-adv7511.dtb
         5256   zynq-z~1.dtb
                ubuntu/
                ubuntu/
      4380524   boot.bin-14.1
      4380524   bootbi~1.1
      4359340   boot.bin-14.3
      4359340   bootbi~1.3
      4359340   boot.bin-latest
      4359340   boot~1.bin
        68044   output.bin
        68044   output.bin
       329044   boot.bin
       329044   boot.bin
                zc702/
                zc702/

    16 file(s), 4 dir(s)

When I revert your patch I get the correct output
    zynq-uboot> fatls mmc 0
      4045655   download.bit
      2729968   zimage
         5256   zynq-zc702-adv7511.dtb
                ubuntu/
      4380524   boot.bin-14.1
      4359340   boot.bin-14.3
      4359340   boot.bin-latest
        68044   output.bin
       329044   boot.bin
                zc702/

    8 file(s), 2 dir(s)


It is tested on mmc driver and here is information about SD card I use.
VFAT support is also enabled.

[~]$ sudo fdisk /dev/mmcblk0
[sudo] password for monstr:

Command (m for help): p

Disk /dev/mmcblk0: 3904 MB, 3904897024 bytes
4 heads, 16 sectors/track, 119168 cylinders, total 7626752 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1              16       70399       35192    b  W95 FAT32
/dev/mmcblk0p2           70400     7626751     3778176   83  Linux

I didn't look at background just bisect which patch introduced this problem.
Any input from you will be useful.

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


More information about the U-Boot mailing list