Skipping bad block fails in BSP 3

Hi team,

A customer in production using BSP 2 and 3 is having issues trying to save their environment. Uboot recognizes a bad block but doesn’t workaround it. BSP 5 doesn’t seem to have this issue.

BSP 2 (but BSP 3 is similar):

U-Boot 2016.11-HBA-2110.04+ (Oct 21 2021 - 16:08:28 +0900)

DRAM:  256 MiB
NAND:  512 MiB
MMC:   FSL_SDHC: 0
*** Warning - readenv() failed, using default environment

Video: 640x480x18
In:    serial
Out:   serial
Err:   serial
Model: Toradex Colibri iMX6ULL 256MB V1.1A, Serial# 07012292
Net:   FEC0
Hit any key to stop autoboot:  0
iMX6ULL #
iMX6ULL # setenv vidargs 'video=mxsfb:800x600M-16@60'&& setenv videomode 'video=ctfb:x:800,y:600,depth:18,pclk:26143,le:112,ri:32,up:17,lo:3,hs:80,vs:4,sync:0,vmode:0'
iMX6ULL # saveenv
Saving Environment to NAND...
Erasing NAND...
Skipping bad block at  0x00380000

Writing to NAND... FAILED!
iMX6ULL # Skipping bad block

BSP 5:

U-Boot 2020.07-5.7.0+git.1cbeecee44a8 (Jun 27 2022 - 13:27:02 +0000)

CPU:   Freescale i.MX6ULL rev1.1 528 MHz (running at 396 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 50C
Reset cause: POR
DRAM:  256 MiB
NAND:  512 MiB
MMC:   FSL_SDHC: 0
Loading Environment from NAND... OK
In:    serial
Out:   serial
Err:   serial
Model: Toradex Colibri iMX6ULL 256MB V1.1A, Serial# 07012292
Net:   eth0: ethernet@20b4000
Hit any key to stop autoboot:  0
Colibri iMX6ULL #
Colibri iMX6ULL # setenv vidargs 'video=mxsfb:800x600M-16@60'&& setenv videomode 'video=ctfb:x:800,y:600,depth:18,pclk:26143,le:112,ri:32,up:17,lo:3,hs:80,vs:4,sync:0,vmode:0'
Colibri iMX6ULL # saveenv
Saving Environment to NAND... Erasing NAND...
Skipping bad block at  0x00380000
Skipping bad block at  0x003c0000
Erasing at 0x3e0000 -- 100% complete.
Writing to NAND... OK
OK
Colibri iMX6ULL #

Any chance we can issue a patch? Kind regards,
Alvaro.

Since the LTS support of BSP 3 is over, and since this issue is solved for BSP 5, no fix is planned for BSP 3. Customers should move to BSP 5.