Hi Colin, On 19/05/2023 02:19, Colin Foster wrote: > Hi Roger, > > I really appreciate the help! > > On Thu, May 18, 2023 at 01:55:38PM +0300, Roger Quadros wrote: >> Hi Colin, >> >> On 17/05/2023 22:39, Colin Foster wrote: >>> >>> I swapped in just U-Boot (not the SPL) with your patch, and everything >>> seems to work! >>> >>> The issue of Uncorrectable ECC errors spam came from the SPL. Here's a >>> snippet of the boot log with the "ecc" print as well as your patch: >>> >> >> Thanks for the tests. Glad to hear issue is narrowed down to SPL. > > I can "fix" the issue by just commenting out the "ECC uncorrectable > errors" print :-)
lol > >> >>> U-Boot SPL 2023.04-00029-g26a9ce5314-dirty (May 17 2023 - 12:06:49 -0700) >>> OMAP4460-GP ES1.1 >>> Trying to boot from NAND >>> ecc: 2420106 >>> ecc: ebd922f6 >>> ecc: 333f844f >>> ecc: ab812f72 >> >> This is clearly the issue. They should all have been 0. > > Interesting. With the "ecc" prints in U-Boot I also get some non-zero > values: > > ecc: 0 > ecc: 6bff997b > ecc: 6bff997b > ecc: 6bff997b > > > Once I'm booted, I can use nanddump. It seems like everything is correct > from the Linux side of things: > > # nanddump -f mlo_dump /dev/mtd0 > ECC failed: 0 > ECC corrected: 0 > Number of bad blocks: 0 > Number of bbt blocks: 0 > Block size 131072, page size 2048, OOB size 64 > Dumping data starting at 0x00000000 and ending at 0x00020000... > > # nanddump -f uboot1_dump /dev/mtd1 > ECC failed: 0 > ECC corrected: 0 > Number of bad blocks: 0 > Number of bbt blocks: 0 > Block size 131072, page size 2048, OOB size 64 > Dumping data starting at 0x00000000 and ending at 0x00180000... > > # nanddump -f uboot2_dump /dev/mtd2 > ECC failed: 0 > ECC corrected: 0 > Number of bad blocks: 0 > Number of bbt blocks: 0 > Block size 131072, page size 2048, OOB size 64 > Dumping data starting at 0x00000000 and ending at 0x00180000... > > # nanddump -f /dev/null /dev/mtd3 > ECC failed: 0 > ECC corrected: 6 > Number of bad blocks: 0 > Number of bbt blocks: 0 > Block size 131072, page size 2048, OOB size 64 > Dumping data starting at 0x00000000 and ending at 0x1fce0000... > ECC: 1 corrected bitflip(s) at offset 0x0ab30800 > ECC: 1 corrected bitflip(s) at offset 0x0b008800 > ECC: 1 corrected bitflip(s) at offset 0x0deaa000 > ECC: 1 corrected bitflip(s) at offset 0x0ea5b000 > ECC: 1 corrected bitflip(s) at offset 0x0ecbc000 > ECC: 1 corrected bitflip(s) at offset 0x0ed61800 > > >> Can you please share your spl/u-boot.cfg? > > Attached Couple of questions there 1) CONFIG_MTDPARTS_DEFAULT "mtdparts=nandflash:0x20000(xload_raw),0x180000(u-boot),0x180000(u-boot-2),0x1fce0000(main)" Is this correct and matches with what kernel sees? I couldn't see the NAND partition table in the Kernel Device tree patch. 2) #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x20000 #define CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND 0x1a0000 These don't seem to match what you have defined in MTDPARTS_DEFAULT. Which one is correct? How do you flash the MLO and u-boot image to NAND? I tried on AM335x-EVM and it works fine both before and after commit 04fcd25873. Once change I had to do was to increase the u-boot partition size as u-boot image does not fit in original partition size. -----boot log follows----- U-Boot SPL 2023.01-rc4-00381-g04fcd25873-dirty (May 19 2023 - 15:10:15 +0300) Trying to boot from NAND U-Boot 2023.01-rc4-00381-g04fcd25873-dirty (May 19 2023 - 15:10:15 +0300) CPU : AM335X-GP rev 1.0 Model: TI AM335x EVM DRAM: 512 MiB Core: 156 devices, 17 uclasses, devicetree: separate WDT: Started wdt@44e35000 with servicing every 1000ms (60s timeout) NAND: 256 MiB MMC: OMAP SD/MMC: 0 Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1... <ethaddr> not set. Validating first E-fuse MAC Net: eth2: ethernet@4a100000, eth3: usb_ether Hit any key to stop autoboot: 0 => => mtd device nand0 <nand.0>, # parts = 10 #: name size offset mask_flags 0: NAND.SPL 0x00020000 0x00000000 0 1: NAND.SPL.backup1 0x00020000 0x00020000 0 2: NAND.SPL.backup2 0x00020000 0x00040000 0 3: NAND.SPL.backup3 0x00020000 0x00060000 0 4: NAND.u-boot-spl-os 0x00040000 0x00080000 0 5: NAND.u-boot 0x00200000 0x000c0000 0 6: NAND.u-boot-env 0x00020000 0x002c0000 0 7: NAND.u-boot-env.backup10x00020000 0x002e0000 0 8: NAND.kernel 0x00700000 0x00300000 0 9: NAND.file-system 0x0f600000 0x00a00000 0 -- cheers, -roger