Still playing around with some bricked hikvision cams in order te get them working again.
Got a camera working again and wanted to copy the mtdblocks as a backup.
Got a problem with reading/copying mtdblock17.
Get the message 'read error: input/output error'
cat /proc/kmsg reveals some bad blocks in the flash memory, but all mtdblocks are created
<6>[ 0.534578] NAND device: Manufacturer ID: 0xc2, Chip ID: 0xf1 (MXIC NAND1 28MiB 3,3V 8-bit)
<4>[ 0.534624] ambarella_nand_config_flash: 0x02e00140, 0x02c00140
<7>[ 0.535052] Bad block table found at page 65472, version 0x01
<7>[ 0.535576] Bad block table found at page 65408, version 0x01
<7>[ 0.535897] nand_read_bbt: Bad block at 0x0000063c0000
<6>[ 0.541522] ambarella-nand ambarella-nand: ambarella_nand_probe: Partition infomation found!
<5>[ 0.541586] Creating 18 MTD partitions on "ambnand":
<5>[ 0.541624] 0x000000000000-0x000000020000 : "bst"
<5>[ 0.545835] 0x000000020000-0x000000120000 : "ptb"
<5>[ 0.549645] 0x000000120000-0x000000220000 : "bld"
<5>[ 0.553728] 0x000000220000-0x000000320000 : "hal"
<5>[ 0.557638] 0x000000320000-0x000000420000 : "ano_ptb"
<5>[ 0.561554] 0x000000420000-0x0000004a0000 : "env"
<5>[ 0.565851] 0x0000004a0000-0x000000520000 : "param"
<5>[ 0.569883] 0x000000520000-0x000000620000 : "dpt"
<5>[ 0.574226] 0x000000620000-0x000001020000 : "rcvy"
<5>[ 0.578442] 0x000001020000-0x000001820000 : "krn_pri"
<5>[ 0.582349] 0x000001820000-0x000002020000 : "krn_sec"
<5>[ 0.586591] 0x000002020000-0x000002420000 : "rmd_pri"
<5>[ 0.590585] 0x000002420000-0x000002820000 : "rmd_sec"
<5>[ 0.594914] 0x000002820000-0x000004020000 : "app_pri"
<5>[ 0.599054] 0x000004020000-0x000005820000 : "app_sec"
<5>[ 0.603519] 0x000005820000-0x000005c20000 : "cfg_pri"
<5>[ 0.607674] 0x000005c20000-0x000006020000 : "cfg_sec"
<5>[ 0.611987] 0x000006020000-0x000007020000 : "dbg"
But I can't copy the mtdblock17 from the camera to make a backup.
Gives a read error everytime.
Saving a working mtdblock17 from another cam doesn't give an error, but trying to read after writing still does.
Strangly camera seems to be working Ok.
Is there a way to 'repair' the flash memory and/or avoid it using the bad blocks ?
Something like diskrepair in windows maybe ?
Got a camera working again and wanted to copy the mtdblocks as a backup.
Got a problem with reading/copying mtdblock17.
Get the message 'read error: input/output error'
cat /proc/kmsg reveals some bad blocks in the flash memory, but all mtdblocks are created
<6>[ 0.534578] NAND device: Manufacturer ID: 0xc2, Chip ID: 0xf1 (MXIC NAND1 28MiB 3,3V 8-bit)
<4>[ 0.534624] ambarella_nand_config_flash: 0x02e00140, 0x02c00140
<7>[ 0.535052] Bad block table found at page 65472, version 0x01
<7>[ 0.535576] Bad block table found at page 65408, version 0x01
<7>[ 0.535897] nand_read_bbt: Bad block at 0x0000063c0000
<6>[ 0.541522] ambarella-nand ambarella-nand: ambarella_nand_probe: Partition infomation found!
<5>[ 0.541586] Creating 18 MTD partitions on "ambnand":
<5>[ 0.541624] 0x000000000000-0x000000020000 : "bst"
<5>[ 0.545835] 0x000000020000-0x000000120000 : "ptb"
<5>[ 0.549645] 0x000000120000-0x000000220000 : "bld"
<5>[ 0.553728] 0x000000220000-0x000000320000 : "hal"
<5>[ 0.557638] 0x000000320000-0x000000420000 : "ano_ptb"
<5>[ 0.561554] 0x000000420000-0x0000004a0000 : "env"
<5>[ 0.565851] 0x0000004a0000-0x000000520000 : "param"
<5>[ 0.569883] 0x000000520000-0x000000620000 : "dpt"
<5>[ 0.574226] 0x000000620000-0x000001020000 : "rcvy"
<5>[ 0.578442] 0x000001020000-0x000001820000 : "krn_pri"
<5>[ 0.582349] 0x000001820000-0x000002020000 : "krn_sec"
<5>[ 0.586591] 0x000002020000-0x000002420000 : "rmd_pri"
<5>[ 0.590585] 0x000002420000-0x000002820000 : "rmd_sec"
<5>[ 0.594914] 0x000002820000-0x000004020000 : "app_pri"
<5>[ 0.599054] 0x000004020000-0x000005820000 : "app_sec"
<5>[ 0.603519] 0x000005820000-0x000005c20000 : "cfg_pri"
<5>[ 0.607674] 0x000005c20000-0x000006020000 : "cfg_sec"
<5>[ 0.611987] 0x000006020000-0x000007020000 : "dbg"
But I can't copy the mtdblock17 from the camera to make a backup.
Gives a read error everytime.
Saving a working mtdblock17 from another cam doesn't give an error, but trying to read after writing still does.
Strangly camera seems to be working Ok.
Is there a way to 'repair' the flash memory and/or avoid it using the bad blocks ?
Something like diskrepair in windows maybe ?
Last edited by a moderator: