SySS-Research / nand-dump-tools

Simple software tools for encoding and decoding dumps of NAND memory chips using implemented error correcting codes (ECC)
MIT License
76 stars 17 forks source link

Unable to initilize bch, invalid parameters? #5

Open JavierBaratech opened 1 year ago

JavierBaratech commented 1 year ago

I have the following ouput when I executed the nand-decoder script:

./nand_dump_decoder.sh -i /chipoff/ -o test.bin -m ATMEL --atmel-config

[] Found one binary input file (138412032 bytes) [] Using ECC mode ATMEL [*] Used configuration Block size: 131072 bytes (64 pages) Page size: 2048 bytes Sector size: 512 bytes Spare size: 64 bytes ECC offset: 36 bytes ECC errors: 4 errors per sector (max.) ECC bytes: 7 bytes per sector Use ECC: True File offset: 0x0 (skip 0 blocks) Traceback (most recent call last): File "nand-dump-tools/nand_dump_decoder.py", line 1425, in ecc_method(input_files, args.outfile, config) File /nand-dump-tools/nand_dump_decoder.py", line 158, in atmel_error_correction bch = bchlib.BCH(config['ecc_polynom'], config['ecc_errors'], False) RuntimeError: unable to inititalize bch, invalid parameters?

Do you have any suggestion? Thanks in advance.

sirastynax commented 11 months ago

Been slamming my head into this for the better part of a day. It appears that when bchlib moved to version 1.0.0, it changed everything about the lib.

Run 'pip uninstall bchlib' and then 'pip install bchlib==0.7'

This change worked for me.