SWUPDATE NAND failed

28 views
Skip to first unread message

tridun...@gmail.com

unread,
Aug 7, 2019, 10:59:21 PM8/7/19
to swupdate
Hello everyone,

I met a problem with swupdate on NAND flash on B4860 freescale board

 ~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "NAND U-Boot Image"
mtd1: 000a0000 00020000 "NAND DTB Image"
mtd2: 00060000 00020000 "NAND UCODE"
mtd3: 00a00000 00020000 "NAND Linux Kernel Image"
mtd4: 0e200000 00020000 "NAND RFS Image"
mtd5: 11200000 00020000 "NAND Firmware Update"
mtd6: 00100000 00010000 "SPI Uboot Image"
mtd7: 00010000 00010000 "SPI environment"
mtd8: 00010000 00010000 "SPI Ucode Image"

I can manually NAND erase and nandwrite to /dev/mtd5 partition, but it's failed when using swupdate, pls see more below:

Log errors:

X_FILENAME: bbu-swu-image-b4860qds-20190808021307.swu length: 45229056
[NOTIFY] : SWUPDATE running :  [network_thread] : Incoming network request: processing...
[NOTIFY] : SWUPDATE started :  Software Update started !
[NOTIFY] : SWUPDATE running :  [extract_file_to_tmp] : Found file:
        filename sw-description
        size 286
Version 0.1.0
[NOTIFY] : SWUPDATE running :  [parse_images] : Found Image  : fsl-image-core-b4860qds.jffs2 in device : /dev/mtd5 for handler raw (installed from stream)

[NOTIFY] : SWUPDATE running :  [parse_uboot] : U-Boot var: jffs2nand = mtdblock5

[NOTIFY] : SWUPDATE running :  [extract_files] : Found file:
        filename fsl-image-core-b4860qds.jffs2
        size 45228328 required
[NOTIFY] : SWUPDATE running :  [extract_files] : Installing STREAM fsl-image-core-b4860qds.jffs2, 45228328 bytes

[NOTIFY] : SWUPDATE running :  [install_single_image] : Found installer for stream fsl-image-core-b4860qds.jffs2 raw
nand_do_write_ops: attempt to write non page aligned data
ERROR core/cpio_utils.c : copy_write : 104 : cannot write 8488 bytes
[NOTIFY] : SWUPDATE failed [0] ERROR core/cpio_utils.c : copy_write : 104 : cannot write 8488 bytes
[NOTIFY] : SWUPDATE running :  [install_single_image] : Installer for raw not successful !
ERROR corelib/stream_interface.c : extract_files : 250 : Error streaming fsl-image-core-b4860qds.jffs2
[NOTIFY] : SWUPDATE failed [0] ERROR corelib/stream_interface.c : extract_files : 250 : Error streaming fsl-image-core-b4860qds.jffs2
[NOTIFY] : SWUPDATE failed [1] Image invalid or corrupted. Not installing ...
[NOTIFY] : SWUPDATE running :  [network_initializer] : Main thread sleep again !
[NOTIFY] : No SWUPDATE running :  Waiting for requests...
Main loop Daemon

sw description:

software =
{
version = "0.1.0";

hardware-compatibility: [ "revC"];

images: (
{
filename = "fsl-image-core-b4860qds.jffs2";
device = "/dev/mtd5";
type = "raw"
installed-directly = true;
}
);
uboot: (
{
name = "jffs2nand";
value = "mtdblock5";
}
);
}

I get stuck in the problem, please help me if you have any idea, many thanks!


tridun...@gmail.com

unread,
Aug 8, 2019, 6:18:39 AM8/8/19
to swupdate
Hi all,

I used .ubi file format, then SWUPDATE successful, but the kernel is booting loop

software =
{
    version = "0.1.0";

    hardware-compatibility: [ "revC"];

    images: (
        {
            filename = "fsl-image-core-bbu-b4860qds.ubi";
            device = "/dev/mtd5";

            installed-directly = true;
        }
    );
   
    uboot: (
        {
            name = "jffs2nand";
            value = "mtdblock5";
        }
    );
}

=>SWupdate successfull

X_FILENAME: bbu-swu-image-b4860qds-20190808100445.swu length: 57721856
[NOTIFY] : SWUPDATE running :  [network_thread] : Incoming network request: processing...
[NOTIFY] : SWUPDATE started :  Software Update started !
[NOTIFY] : SWUPDATE running :  [extract_file_to_tmp] : Found file:
        filename sw-description
        size 352
Version 0.1.0
[NOTIFY] : SWUPDATE running :  [parse_images] : Found Image  : fsl-image-core-bbu-b4860qds.ubi in device : /dev/mtd5 for handler raw (installed from stream)


[NOTIFY] : SWUPDATE running :  [parse_uboot] : U-Boot var: jffs2nand = mtdblock5

[NOTIFY] : SWUPDATE running :  [extract_files] : Found file:
        filename fsl-image-core-bbu-b4860qds.ubi
        size 57720832 required
[NOTIFY] : SWUPDATE running :  [extract_files] : Installing STREAM fsl-image-core-bbu-b4860qds.ubi, 57720832 bytes

[NOTIFY] : SWUPDATE running :  [install_single_image] : Found installer for stream fsl-image-core-bbu-b4860qds.ubi raw
[NOTIFY] : SWUPDATE running :  [extract_files] : END INSTALLING STREAMING
[NOTIFY] : SWUPDATE running :  [network_initializer] : Valid image found: copying to FLASH
[NOTIFY] : SWUPDATE running :  Installation in progress
[NOTIFY] : SWUPDATE running :  [update_uboot_env] : Updating U-boot environment
[NOTIFY] : SWUPDATE successful ! SWUPDATE successful !

[NOTIFY] : SWUPDATE running :  [network_initializer] : Main thread sleep again !
[NOTIFY] : No SWUPDATE running :  Waiting for requests...
Main loop Daemon

=>Boot loop with error

fsl,ifc-nand fff800000.nand: NAND Flash ECC Uncorrectable Error
fsl,ifc-nand fff800000.nand: NAND Flash ECC Uncorrectable Error
fsl,ifc-nand fff800000.nand: NAND Flash ECC Uncorrectable Error
fsl,ifc-nand fff800000.nand: NAND Flash ECC Uncorrectable Error
fsl,ifc-nand fff800000.nand: NAND Flash ECC Uncorrectable Error
fsl,ifc-nand fff800000.nand: NAND Flash ECC Uncorrectable Error
fsl,ifc-nand fff800000.nand: NAND Flash ECC Uncorrectable Error
fsl,ifc-nand fff800000.nand: NAND Flash ECC Uncorrectable Error
jffs2: mtd->read(0x1ff08 bytes from 0xf8) returned ECC error
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000440c: 0x0100 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004410: 0x0020 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004804: 0x1000 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004c0c: 0x1100 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00008400: 0x2100 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00008404: 0x0160 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00008408: 0x2180 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00009400: 0x2520 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00009404: 0x2560 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00009408: 0x25a0 instead
Reply all
Reply to author
Forward
0 new messages