Re: Firmware upgrade using Linux tool, requires no hardware
Posted: 23 Oct 2014, 16:39
update:
ubuntu@ubuntu-Aspire-6935:~/flashrom$ sudo modprobe i2c-dev
ubuntu@ubuntu-Aspire-6935:~/flashrom$ sudo i2cdetect -l
i2c-0 i2c nouveau-0000:01:00.0-0 I2C adapter
i2c-1 i2c nouveau-0000:01:00.0-1 I2C adapter
i2c-2 i2c nouveau-0000:01:00.0-2 I2C adapter
i2c-3 i2c nouveau-0000:01:00.0-3 I2C adapter
i2c-4 i2c nouveau-0000:01:00.0-4 I2C adapter
i2c-5 i2c nouveau-0000:01:00.0-5 I2C adapter
i2c-6 i2c nouveau-0000:01:00.0-8 I2C adapter
i2c-7 i2c nouveau-0000:01:00.0-9 I2C adapter
i2c-8 i2c nouveau-0000:01:00.0-10 I2C adapter
i2c-9 i2c nouveau-0000:01:00.0-11 I2C adapter
ubuntu@ubuntu-Aspire-6935:~/flashrom$ sudo i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- 49 -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- 59 -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
ubuntu@ubuntu-Aspire-6935:~/flashrom$ sudo i2cdump -r 0-127 0 0x50
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x50, mode byte
Probe range limited to 0x00-0x7f.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 ff ff ff ff ff ff 00 09 d1 30 7f 45 54 00 00 ........??0?ET..
10: 0b 18 01 03 0e 35 1e 78 2e 9d e1 a6 54 54 9f 26 ?????5?x.???TT?&
20: 0d 50 54 a5 6b 80 d1 c0 45 7c 61 7c 81 80 81 bc ?PT?k???E|a|????
30: 95 3c 31 7c 01 01 02 3a 80 18 71 38 2d 40 58 2c ?<1|???:??q8-@X,
40: 45 00 13 2a 21 00 00 1e 00 00 00 ff 00 33 33 45 E.?*!..?.....33E
50: 30 30 39 37 34 53 4c 30 0a 20 00 00 00 fd 00 18 00974SL0? ...?.?
60: 78 0f 87 15 00 0a 20 20 20 20 20 20 00 00 00 fc x???.? ...?
70: 00 42 65 6e 51 20 58 4c 32 34 31 31 5a 0a 00 cd .BenQ XL2411Z?.?
ubuntu@ubuntu-Aspire-6935:~/flashrom$ sudo ./flashrom -p mstarddc_spi:dev=/dev/i2c-0:49 -f
flashrom v0.9.7-r1852 on Linux 3.13.0-24-generic (i686)
flashrom is free software, get the source code at http://www.flashrom.org
Calibrating delay loop... OK.
Info: Will try to use device /dev/i2c-0 and address 0x49.
Info: WILL reset the device at the end.
Found Macronix flash chip "MX25L1605" (2048 kB, SPI) on mstarddc_spi.
Found Macronix flash chip "MX25L1605A/MX25L1606E" (2048 kB, SPI) on mstarddc_spi.
Found Macronix flash chip "MX25L1605D/MX25L1608D/MX25L1673E" (2048 kB, SPI) on mstarddc_spi.
Multiple flash chip definitions match the detected chip(s): "MX25L1605", "MX25L1605A/MX25L1606E", "MX25L1605D/MX25L1608D/MX25L1673E"
Please specify which chip definition to use with the -c <chipname> option.
ubuntu@ubuntu-Aspire-6935:~/flashrom$ sudo ./flashrom -p mstarddc_spi:dev=/dev/i2c-0:49 -c "MX25L1605A/MX25L1606E" -r backup.bin -f
flashrom v0.9.7-r1852 on Linux 3.13.0-24-generic (i686)
flashrom is free software, get the source code at http://www.flashrom.org
Calibrating delay loop... OK.
Info: Will try to use device /dev/i2c-0 and address 0x49.
Info: WILL reset the device at the end.
Found Macronix flash chip "MX25L1605A/MX25L1606E" (2048 kB, SPI) on mstarddc_spi.
Reading flash... done.
ubuntu@ubuntu-Aspire-6935:~/flashrom$ tr '\000' '\377' < /dev/zero | dd of=firmware.bin bs=1k count=2k
2048+0 Datensätze ein
2048+0 Datensätze aus
2097152 Bytes (2,1 MB) kopiert, 0,0177809 s, 118 MB/s
ubuntu@ubuntu-Aspire-6935:~/flashrom$ dd if=XL2411Z_V2_20131209_8B72.BIN of=firmware.bin conv=notrunc
1664+0 Datensätze ein
1664+0 Datensätze aus
851968 Bytes (852 kB) kopiert, 0,00520596 s, 164 MB/s
ubuntu@ubuntu-Aspire-6935:~/flashrom$ sudo ./flashrom -p mstarddc_spi:dev=/dev/i2c-0:49 -c "MX25L1605A/MX25L1606E" -w firmware.bin -f
[sudo] password for ubuntu:
flashrom v0.9.7-r1852 on Linux 3.13.0-24-generic (i686)
flashrom is free software, get the source code at http://www.flashrom.org
Calibrating delay loop... OK.
Info: Will try to use device /dev/i2c-0 and address 0x49.
Info: WILL reset the device at the end.
Found Macronix flash chip "MX25L1605A/MX25L1606E" (2048 kB, SPI) on mstarddc_spi.
Reading old flash chip contents... done.
Erasing and writing flash chip... Error sending write command: errno 5.
spi_nbyte_program failed during command execution at address 0x1f300
Reading current flash chip contents... done. Looking for another erase function.
Error sending write command: errno 5.
spi_nbyte_program failed during command execution at address 0x27900
Reading current flash chip contents... Error sending write command: errno 5.
Can't read anymore! Aborting.
FAILED!
Uh oh. Erase/write failed.Checking if anything has changed.
Reading current flash chip contents... done.
Apparently at least some data has changed.
Your flash chip is in an unknown state.
Please report this on IRC at chat.freenode.net (channel #flashrom) or
mail [email protected], thanks!
Info: Reset command was not sent. Either the noreset=1 option was used, or an error occured.
ubuntu@ubuntu-Aspire-6935:~/flashrom$ sudo modprobe i2c-dev
ubuntu@ubuntu-Aspire-6935:~/flashrom$ sudo i2cdetect -l
i2c-0 i2c nouveau-0000:01:00.0-0 I2C adapter
i2c-1 i2c nouveau-0000:01:00.0-1 I2C adapter
i2c-2 i2c nouveau-0000:01:00.0-2 I2C adapter
i2c-3 i2c nouveau-0000:01:00.0-3 I2C adapter
i2c-4 i2c nouveau-0000:01:00.0-4 I2C adapter
i2c-5 i2c nouveau-0000:01:00.0-5 I2C adapter
i2c-6 i2c nouveau-0000:01:00.0-8 I2C adapter
i2c-7 i2c nouveau-0000:01:00.0-9 I2C adapter
i2c-8 i2c nouveau-0000:01:00.0-10 I2C adapter
i2c-9 i2c nouveau-0000:01:00.0-11 I2C adapter
ubuntu@ubuntu-Aspire-6935:~/flashrom$ sudo i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- 49 -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- 59 -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
ubuntu@ubuntu-Aspire-6935:~/flashrom$ sudo i2cdump -r 0-127 0 0x50
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x50, mode byte
Probe range limited to 0x00-0x7f.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 ff ff ff ff ff ff 00 09 d1 30 7f 45 54 00 00 ........??0?ET..
10: 0b 18 01 03 0e 35 1e 78 2e 9d e1 a6 54 54 9f 26 ?????5?x.???TT?&
20: 0d 50 54 a5 6b 80 d1 c0 45 7c 61 7c 81 80 81 bc ?PT?k???E|a|????
30: 95 3c 31 7c 01 01 02 3a 80 18 71 38 2d 40 58 2c ?<1|???:??q8-@X,
40: 45 00 13 2a 21 00 00 1e 00 00 00 ff 00 33 33 45 E.?*!..?.....33E
50: 30 30 39 37 34 53 4c 30 0a 20 00 00 00 fd 00 18 00974SL0? ...?.?
60: 78 0f 87 15 00 0a 20 20 20 20 20 20 00 00 00 fc x???.? ...?
70: 00 42 65 6e 51 20 58 4c 32 34 31 31 5a 0a 00 cd .BenQ XL2411Z?.?
ubuntu@ubuntu-Aspire-6935:~/flashrom$ sudo ./flashrom -p mstarddc_spi:dev=/dev/i2c-0:49 -f
flashrom v0.9.7-r1852 on Linux 3.13.0-24-generic (i686)
flashrom is free software, get the source code at http://www.flashrom.org
Calibrating delay loop... OK.
Info: Will try to use device /dev/i2c-0 and address 0x49.
Info: WILL reset the device at the end.
Found Macronix flash chip "MX25L1605" (2048 kB, SPI) on mstarddc_spi.
Found Macronix flash chip "MX25L1605A/MX25L1606E" (2048 kB, SPI) on mstarddc_spi.
Found Macronix flash chip "MX25L1605D/MX25L1608D/MX25L1673E" (2048 kB, SPI) on mstarddc_spi.
Multiple flash chip definitions match the detected chip(s): "MX25L1605", "MX25L1605A/MX25L1606E", "MX25L1605D/MX25L1608D/MX25L1673E"
Please specify which chip definition to use with the -c <chipname> option.
ubuntu@ubuntu-Aspire-6935:~/flashrom$ sudo ./flashrom -p mstarddc_spi:dev=/dev/i2c-0:49 -c "MX25L1605A/MX25L1606E" -r backup.bin -f
flashrom v0.9.7-r1852 on Linux 3.13.0-24-generic (i686)
flashrom is free software, get the source code at http://www.flashrom.org
Calibrating delay loop... OK.
Info: Will try to use device /dev/i2c-0 and address 0x49.
Info: WILL reset the device at the end.
Found Macronix flash chip "MX25L1605A/MX25L1606E" (2048 kB, SPI) on mstarddc_spi.
Reading flash... done.
ubuntu@ubuntu-Aspire-6935:~/flashrom$ tr '\000' '\377' < /dev/zero | dd of=firmware.bin bs=1k count=2k
2048+0 Datensätze ein
2048+0 Datensätze aus
2097152 Bytes (2,1 MB) kopiert, 0,0177809 s, 118 MB/s
ubuntu@ubuntu-Aspire-6935:~/flashrom$ dd if=XL2411Z_V2_20131209_8B72.BIN of=firmware.bin conv=notrunc
1664+0 Datensätze ein
1664+0 Datensätze aus
851968 Bytes (852 kB) kopiert, 0,00520596 s, 164 MB/s
ubuntu@ubuntu-Aspire-6935:~/flashrom$ sudo ./flashrom -p mstarddc_spi:dev=/dev/i2c-0:49 -c "MX25L1605A/MX25L1606E" -w firmware.bin -f
[sudo] password for ubuntu:
flashrom v0.9.7-r1852 on Linux 3.13.0-24-generic (i686)
flashrom is free software, get the source code at http://www.flashrom.org
Calibrating delay loop... OK.
Info: Will try to use device /dev/i2c-0 and address 0x49.
Info: WILL reset the device at the end.
Found Macronix flash chip "MX25L1605A/MX25L1606E" (2048 kB, SPI) on mstarddc_spi.
Reading old flash chip contents... done.
Erasing and writing flash chip... Error sending write command: errno 5.
spi_nbyte_program failed during command execution at address 0x1f300
Reading current flash chip contents... done. Looking for another erase function.
Error sending write command: errno 5.
spi_nbyte_program failed during command execution at address 0x27900
Reading current flash chip contents... Error sending write command: errno 5.
Can't read anymore! Aborting.
FAILED!
Uh oh. Erase/write failed.Checking if anything has changed.
Reading current flash chip contents... done.
Apparently at least some data has changed.
Your flash chip is in an unknown state.
Please report this on IRC at chat.freenode.net (channel #flashrom) or
mail [email protected], thanks!
Info: Reset command was not sent. Either the noreset=1 option was used, or an error occured.