Re: [PATCH] tools: mxsboot: pre-fill buffer with 0xff, not 0

2023-12-13 Thread Fabio Estevam
On Sun, Dec 3, 2023 at 9:24 PM Alessandro Rubini wrote: > > The tool works for me, with imx28 and NAND memory, but the resulting > blocks are reported as bad, both by u-boot and the kernel. > > This makes it impossible to erase from Linux (for an upgrade without > console access, for example --

Re: [PATCH] tools: mxsboot: pre-fill buffer with 0xff, not 0

2023-12-04 Thread Alessandro Rubini
> But what about the bad block markers , do they get erased when you write > this U-Boot image into the NAND ? The image includes OOB data, because the rom-mandated map is different from normal standards. If OOB is zeroed, blocks appear as bad (correctly!). By memsetting to 0xff, before filling

Re: [PATCH] tools: mxsboot: pre-fill buffer with 0xff, not 0

2023-12-04 Thread Alessandro Rubini
Hello. >>> pre-filling with 0xff creates a proper boot loader image, but no >>> bad-block marker is there when written to flash. > Isn't there some kobs-ng or whatever tool it was to properly initialize > the NAND on MXS ? I didn't know. I used what u-boot offers, which works for me without

Re: [PATCH] tools: mxsboot: pre-fill buffer with 0xff, not 0

2023-12-04 Thread Marek Vasut
On 12/4/23 09:42, Alessandro Rubini wrote: But what about the bad block markers , do they get erased when you write this U-Boot image into the NAND ? The image includes OOB data, because the rom-mandated map is different from normal standards. If OOB is zeroed, blocks appear as bad

Re: [PATCH] tools: mxsboot: pre-fill buffer with 0xff, not 0

2023-12-04 Thread Marek Vasut
On 12/4/23 09:09, Alessandro Rubini wrote: Hello. pre-filling with 0xff creates a proper boot loader image, but no bad-block marker is there when written to flash. Isn't there some kobs-ng or whatever tool it was to properly initialize the NAND on MXS ? I didn't know. I used what u-boot

Re: [PATCH] tools: mxsboot: pre-fill buffer with 0xff, not 0

2023-12-03 Thread Marek Vasut
On 12/4/23 02:35, Fabio Estevam wrote: Hi Alessandro, [Adding Marek and Rogan] On Sun, Dec 3, 2023 at 9:24 PM Alessandro Rubini wrote: The tool works for me, with imx28 and NAND memory, but the resulting blocks are reported as bad, both by u-boot and the kernel. This makes it impossible to

Re: [PATCH] tools: mxsboot: pre-fill buffer with 0xff, not 0

2023-12-03 Thread Fabio Estevam
Hi Alessandro, [Adding Marek and Rogan] On Sun, Dec 3, 2023 at 9:24 PM Alessandro Rubini wrote: > > The tool works for me, with imx28 and NAND memory, but the resulting > blocks are reported as bad, both by u-boot and the kernel. > > This makes it impossible to erase from Linux (for an upgrade

[PATCH] tools: mxsboot: pre-fill buffer with 0xff, not 0

2023-12-03 Thread Alessandro Rubini
The tool works for me, with imx28 and NAND memory, but the resulting blocks are reported as bad, both by u-boot and the kernel. This makes it impossible to erase from Linux (for an upgrade without console access, for example -- u-boot can "nand scrub" but linux can't). pre-filling with 0xff