[U-Boot] [BUG] am335x: SPL: fails to load u-boot.img from vfat partition on eMMC

Hello Stefan,
the am335x based shc board fails loading u-boot.img in SPL from vfat partition on eMMC card with current HEAD of mainline U-Boot:
U-Boot SPL 2017.01-00294-g0c9e85f (Jan 23 2017 - 11:23:05) SHC MPU reference clock runs at 6 MHz Setting MPU clock to 594 MHz Enabling Spread Spectrum of 18 permille for MPU Trying to boot from MMC2 reading u-boot.img reading u-boot.img
Detected with my weekly tbot tests of U-Boot. An automated git bisect cycle with tbot shows your patch:
$ git bisect visualize commit 8d48c92b45aea91e2a2be90f2ed93677e85526f1 Author: Stefan Brüns stefan.bruens@rwth-aachen.de Date: Sat Dec 17 03:55:10 2016 +0100
fs/fat: simplify get_fatent for FAT12
Instead of shuffling bits from two adjacent 16 bit words, use one 16 bit word with the appropriate byte offset in the buffer.
Signed-off-by: Stefan Brüns stefan.bruens@rwth-aachen.de
$ git bisect log git bisect start # bad: [0c9e85f67cd86d2d7a3424ea3ebff0e6db7a3915] Merge branch 'master' of git://git.denx.de/u-boot-uniphier git bisect bad 0c9e85f67cd86d2d7a3424ea3ebff0e6db7a3915 # good: [0c1d74fda7c0063eeca4d8d9fa8674e6ec2ef685] image: Add crypto_algo struct for RSA info git bisect good 0c1d74fda7c0063eeca4d8d9fa8674e6ec2ef685 # good: [fe9822556e051e6c24a3832532166ade00a81a8c] Merge branch 'master' of git://git.denx.de/u-boot-uniphier git bisect good fe9822556e051e6c24a3832532166ade00a81a8c # bad: [7876dcb5d46057403a715771a75c483add6a64c1] ARM64: zynqmp: Add missing earlycon for ep108 git bisect bad 7876dcb5d46057403a715771a75c483add6a64c1 # good: [36737f22b78a475c6bbc8a0467b51e4d95b52a7d] Merge git://git.denx.de/u-boot-dm git bisect good 36737f22b78a475c6bbc8a0467b51e4d95b52a7d # bad: [8098b8cb3f15c8b203de133106e4bce4b8fe956d] configs: engicam: Enable CONFIG_IMAGE_FORMAT_LEGACY git bisect bad 8098b8cb3f15c8b203de133106e4bce4b8fe956d # good: [6c1a808052ba6a875df7aa450b6df4b199f3a281] fs/fat: Avoid corruption of sectors following the FAT git bisect good 6c1a808052ba6a875df7aa450b6df4b199f3a281 # bad: [3d3a74cc8c774345be7d1661b215555ad41f4515] mmc: move MMC_SDHCI_IO_ACCESSORS to Kconfig git bisect bad 3d3a74cc8c774345be7d1661b215555ad41f4515 # bad: [3cc5bbb8e68dc67b7c3d2fdebef69408e5271469] fs/ext4: Initialize group descriptor size for revision level 0 filesystems git bisect bad 3cc5bbb8e68dc67b7c3d2fdebef69408e5271469 # bad: [085be482f6c62614ddbe51000a09db9dec360e90] ARM: revive CONFIG_USE_ARCH_MEMCPY/MEMSET for UniPhier and Tegra git bisect bad 085be482f6c62614ddbe51000a09db9dec360e90 # bad: [8d48c92b45aea91e2a2be90f2ed93677e85526f1] fs/fat: simplify get_fatent for FAT12 git bisect bad 8d48c92b45aea91e2a2be90f2ed93677e85526f1 # good: [b8948d2aef80717d3d2c4f37ec086ce3ea5ad24f] fs/fat: merge readwrite get_fatent_value() with readonly get_fatent() git bisect good b8948d2aef80717d3d2c4f37ec086ce3ea5ad24f # first bad commit: [8d48c92b45aea91e2a2be90f2ed93677e85526f1] fs/fat: simplify get_fatent for FAT12
Reverting this patch, and it works as expected: U-Boot SPL 2017.01-00294-g0c9e85f-dirty (Jan 23 2017 - 12:53:29) SHC MPU reference clock runs at 6 MHz Setting MPU clock to 594 MHz Enabling Spread Spectrum of 18 permille for MPU Trying to boot from MMC2 reading u-boot.img reading u-boot.img
U-Boot 2017.01-00294-g0c9e85f-dirty (Jan 23 2017 - 12:53:29 +0100)
CPU : AM335X-GP rev 2.1 I2C: ready DRAM: 512 MiB MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 Net: cpsw Enter 'shc' to enter prompt (times out) 0 Enter 'noautoboot' to enter prompt without timeout U-Boot#
Any ideas what could be wrong here?
Thanks!
bye, Heiko

On Mon, Jan 23, 2017 at 01:00:54PM +0100, Heiko Schocher wrote:
Hello Stefan,
the am335x based shc board fails loading u-boot.img in SPL from vfat partition on eMMC card with current HEAD of mainline U-Boot:
U-Boot SPL 2017.01-00294-g0c9e85f (Jan 23 2017 - 11:23:05) SHC MPU reference clock runs at 6 MHz Setting MPU clock to 594 MHz Enabling Spread Spectrum of 18 permille for MPU Trying to boot from MMC2 reading u-boot.img reading u-boot.img
Are you able to save off the vFAT image somewhere and pass around privately? The general case of am335x and VFAT booting is part of my regular testing, so there's something interesting about the partition you have :)
participants (2)
-
Heiko Schocher
-
Tom Rini