Skip to main content
deleted 47 characters in body
Source Link
Lexx Luxx
  • 149
  • 2
  • 7

Device with Linux embedded system on NAND flash memory. I did memory dump of some MTD devices partitions use serial console, from U-boot bootloader use available commands. First I read MTD partition to address in the memory, then dumped memory from that address to the terminal window. For example, MTD partition 0x01d60000-0x01e60000 : "FPAR" MTD partition size is 0x00100000 = 1048576 bytes

nand read 0x20000000 0x01d60000 0x00100000 NAND read: device 0 offset 0x1d60000, size 0x100000 1048576 bytes read: OK md.b 0x20000000 0x00100000 

Then saved log file with dump as text file, cut out extra stuff before and after the dump and coverted it to binary use

xxd -r -p dump.txt dump.bin 

Resulting bin file size 1,310,860 bytes is mismatching MTD partion size (1,048,576 bytes), its much larger. Is the problem related to hex data conversion or the dump process have errors? I understand that MTD partion size of 1048576 bytes is size assigned to the whole MTD partition, the actual data on partition takes much smaller space, the large space filled with hex 'ff' values. Additionally, can anyone advice good utility for hex to bin data conversion?

Edit: I tried the same steps with 64 bytes data size, edited dump with gedit:and used Raw log session mode, after trimming extra stuff, the resulting ascii file size =is 318 bytes. So gedit corruptsAfter dump conversion, the filebin size is 87 bytes. When I open saved log with Gedit, it show alert:

'There20000000: wasa0 a7c problem4f openingfa the62 file61 “/home/../Documents/64bytes-test75 64 72 61 74 65 3d 31 31 35 .log|O. baudrate=115 The20000010: file32 you30 opened30 has00 some65 invalid74 characters.68  If61 you64 continue64 editing72 this3d file46 you46 could3a corrupt46 this document.  200.ethaddr=FF:F You20000020: can46 also3a choose46 another46 character3a encoding46 and46 try3a again.46  Character46 encoding3a 46 46 00 6e 65 F:FF:FF:FF:FF.ne 20000030: Current74 locale6d (UTF-8)'61 73 6b 3d 32 35 35 2e 32 35 35 2e 32 35 tmask=255.255.25 

So probably I have to redirect raw serial data to disk.

Device with Linux embedded system on NAND flash memory. I did memory dump of some MTD devices partitions use serial console, from U-boot bootloader use available commands. First I read MTD partition to address in the memory, then dumped memory from that address to the terminal window. For example, MTD partition 0x01d60000-0x01e60000 : "FPAR" MTD partition size is 0x00100000 = 1048576 bytes

nand read 0x20000000 0x01d60000 0x00100000 NAND read: device 0 offset 0x1d60000, size 0x100000 1048576 bytes read: OK md.b 0x20000000 0x00100000 

Then saved log file with dump as text file, cut out extra stuff before and after the dump and coverted it to binary use

xxd -r -p dump.txt dump.bin 

Resulting bin file size 1,310,860 bytes is mismatching MTD partion size (1,048,576 bytes), its much larger. Is the problem related to hex data conversion or the dump process have errors? I understand that MTD partion size of 1048576 bytes is size assigned to the whole MTD partition, the actual data on partition takes much smaller space, the large space filled with hex 'ff' values. Additionally, can anyone advice good utility for hex to bin data conversion?

Edit: I tried the same steps with 64 bytes data size, edited dump with gedit: resulting ascii file size = 318 bytes. So gedit corrupts the file. When I open saved log with Gedit, it show alert:

'There was a problem opening the file “/home/../Documents/64bytes-test.log.  The file you opened has some invalid characters.  If you continue editing this file you could corrupt this document. You can also choose another character encoding and try again.  Character encoding: Current locale (UTF-8)' 

So probably I have to redirect raw serial data to disk.

Device with Linux embedded system on NAND flash memory. I did memory dump of some MTD devices partitions use serial console, from U-boot bootloader use available commands. First I read MTD partition to address in the memory, then dumped memory from that address to the terminal window. For example, MTD partition 0x01d60000-0x01e60000 : "FPAR" MTD partition size is 0x00100000 = 1048576 bytes

nand read 0x20000000 0x01d60000 0x00100000 NAND read: device 0 offset 0x1d60000, size 0x100000 1048576 bytes read: OK md.b 0x20000000 0x00100000 

Then saved log file with dump as text file, cut out extra stuff before and after the dump and coverted it to binary use

xxd -r -p dump.txt dump.bin 

Resulting bin file size 1,310,860 bytes is mismatching MTD partion size (1,048,576 bytes), its much larger. Is the problem related to hex data conversion or the dump process have errors? I understand that MTD partion size of 1048576 bytes is size assigned to the whole MTD partition, the actual data on partition takes much smaller space, the large space filled with hex 'ff' values. Additionally, can anyone advice good utility for hex to bin data conversion?

Edit: I tried the same steps with 64 bytes data size, and used Raw log session mode, after trimming extra stuff, the resulting ascii file is 318 bytes. After dump conversion, the bin size is 87 bytes.

20000000: a0 7c 4f fa 62 61 75 64 72 61 74 65 3d 31 31 35 .|O.baudrate=115 20000010: 32 30 30 00 65 74 68 61 64 64 72 3d 46 46 3a 46   200.ethaddr=FF:F 20000020: 46 3a 46 46 3a 46 46 3a 46 46 3a 46 46 00 6e 65 F:FF:FF:FF:FF.ne 20000030: 74 6d 61 73 6b 3d 32 35 35 2e 32 35 35 2e 32 35 tmask=255.255.25 
deleted 112 characters in body
Source Link
Lexx Luxx
  • 149
  • 2
  • 7

Device with Linux embedded system on NAND flash memory. I did memory dump of some MTD devices partitions use serial console, from U-boot bootloader use available commands. First I read MTD partition to address in the memory, then dumped memory from that address to the terminal window. For example, MTD partition 0x01d60000-0x01e60000 : "FPAR" MTD partition size is 0x00100000 = 1048576 bytes

nand read 0x20000000 0x01d60000 0x00100000 NAND read: device 0 offset 0x1d60000, size 0x100000 1048576 bytes read: OK md.b 0x20000000 0x00100000 

Then saved log file with dump as text file, cut out extra stuff before and after the dump and coverted it to binary use

xxd -r -p dump.txt dump.bin 

Resulting bin file size 1,310,860 bytes is mismatching MTD partion size (1,048,576 bytes), its much larger. Is the problem related to hex data conversion or the dump process have errors? I understand that MTD partion size of 1048576 bytes is size assigned to the whole MTD partition, the actual data on partition takes much smaller space, the large space filled with hex 'ff' values. Additionally, can anyone advice good utility for hex to bin data conversion?

Edit: I tried the same steps with 64 bytes data size, edited dump with gedit: resulting ascii file size = 318 bytes. So gedit corrupts the file. When I open saved log with Gedit, it show alert:

'There was a problem opening the file “/home/../Documents/64bytes-test.log. The file you opened has some invalid characters. If you continue editing this file you could corrupt this document. You can also choose another character encoding and try again. Character encoding: Current locale (UTF-8)' 

So probably I just clicked 'Edit anyway' proceededhave to edit it, then saved file. The resulting file size 318 bytes(Line Ending:Windows) and 313 bytes with Line Ending:Unix/Linuxredirect raw serial data to disk.

Device with Linux embedded system on NAND flash memory. I did memory dump of some MTD devices partitions use serial console, from U-boot bootloader use available commands. First I read MTD partition to address in the memory, then dumped memory from that address to the terminal window. For example, MTD partition 0x01d60000-0x01e60000 : "FPAR" MTD partition size is 0x00100000 = 1048576 bytes

nand read 0x20000000 0x01d60000 0x00100000 NAND read: device 0 offset 0x1d60000, size 0x100000 1048576 bytes read: OK md.b 0x20000000 0x00100000 

Then saved log file with dump as text file, cut out extra stuff before and after the dump and coverted it to binary use

xxd -r -p dump.txt dump.bin 

Resulting bin file size 1,310,860 bytes is mismatching MTD partion size (1,048,576 bytes), its much larger. Is the problem related to hex data conversion or the dump process have errors? I understand that MTD partion size of 1048576 bytes is size assigned to the whole MTD partition, the actual data on partition takes much smaller space, the large space filled with hex 'ff' values. Additionally, can anyone advice good utility for hex to bin data conversion?

Edit: I tried the same steps with 64 bytes data size, edited dump with gedit: resulting ascii file size = 318 bytes. So gedit corrupts the file. When I open saved log with Gedit, it show alert:

'There was a problem opening the file “/home/../Documents/64bytes-test.log. The file you opened has some invalid characters. If you continue editing this file you could corrupt this document. You can also choose another character encoding and try again. Character encoding: Current locale (UTF-8)' 

I just clicked 'Edit anyway' proceeded to edit it, then saved file. The resulting file size 318 bytes(Line Ending:Windows) and 313 bytes with Line Ending:Unix/Linux.

Device with Linux embedded system on NAND flash memory. I did memory dump of some MTD devices partitions use serial console, from U-boot bootloader use available commands. First I read MTD partition to address in the memory, then dumped memory from that address to the terminal window. For example, MTD partition 0x01d60000-0x01e60000 : "FPAR" MTD partition size is 0x00100000 = 1048576 bytes

nand read 0x20000000 0x01d60000 0x00100000 NAND read: device 0 offset 0x1d60000, size 0x100000 1048576 bytes read: OK md.b 0x20000000 0x00100000 

Then saved log file with dump as text file, cut out extra stuff before and after the dump and coverted it to binary use

xxd -r -p dump.txt dump.bin 

Resulting bin file size 1,310,860 bytes is mismatching MTD partion size (1,048,576 bytes), its much larger. Is the problem related to hex data conversion or the dump process have errors? I understand that MTD partion size of 1048576 bytes is size assigned to the whole MTD partition, the actual data on partition takes much smaller space, the large space filled with hex 'ff' values. Additionally, can anyone advice good utility for hex to bin data conversion?

Edit: I tried the same steps with 64 bytes data size, edited dump with gedit: resulting ascii file size = 318 bytes. So gedit corrupts the file. When I open saved log with Gedit, it show alert:

'There was a problem opening the file “/home/../Documents/64bytes-test.log. The file you opened has some invalid characters. If you continue editing this file you could corrupt this document. You can also choose another character encoding and try again. Character encoding: Current locale (UTF-8)' 

So probably I have to redirect raw serial data to disk.

added 701 characters in body
Source Link
Lexx Luxx
  • 149
  • 2
  • 7

Device with Linux embedded system on NAND flash memory. I did memory dump of some MTD devices partitions use serial console, from U-boot bootloader use available commands. First I read MTD partition to address in the memory, then dumped memory from that address to the terminal window. For example, MTD partition 0x01d60000-0x01e60000 : "FPAR" MTD partition size is 0x00100000 = 1048576 bytes

nand read 0x20000000 0x01d60000 0x00100000 NAND read: device 0 offset 0x1d60000, size 0x100000 1048576 bytes read: OK md.b 0x20000000 0x00100000 

Then saved log file with dump as text file, cut out extra stuff before and after the dump and coverted it to binary use

xxd -r -p dump.txt dump.bin 

Resulting bin file size 1,310,860 bytes is mismatching MTD partion size (1,048,576 bytes), its much larger. Is the problem related to hex data conversion or the dump process have errors? I understand that MTD partion size of 1048576 bytes is size assigned to the whole MTD partition, the actual data on partition takes much smaller space, the large space filled with hex 'ff' values. Additionally, can anyone advice good utility for hex to bin data conversion?

Edit: I tried the same steps with 64 bytes data size, edited dump with gedit: resulting ascii file size = 318 bytes. So gedit corrupts the file. When I open saved log with Gedit, it show alert:

'There was a problem opening the file “/home/../Documents/64bytes-test.log. The file you opened has some invalid characters. If you continue editing this file you could corrupt this document. You can also choose another character encoding and try again. Character encoding: Current locale (UTF-8)' 

I just clicked 'Edit anyway' proceeded to edit it, then saved file. The resulting file size 318 bytes(Line Ending:Windows) and 313 bytes with Line Ending:Unix/Linux.

Device with Linux embedded system on NAND flash memory. I did memory dump of some MTD devices partitions use serial console, from U-boot bootloader use available commands. First I read MTD partition to address in the memory, then dumped memory from that address to the terminal window. For example, MTD partition 0x01d60000-0x01e60000 : "FPAR" MTD partition size is 0x00100000 = 1048576 bytes

nand read 0x20000000 0x01d60000 0x00100000 NAND read: device 0 offset 0x1d60000, size 0x100000 1048576 bytes read: OK md.b 0x20000000 0x00100000 

Then saved log file with dump as text file, cut out extra stuff before and after the dump and coverted it to binary use

xxd -r -p dump.txt dump.bin 

Resulting bin file size 1,310,860 bytes is mismatching MTD partion size (1,048,576 bytes), its much larger. Is the problem related to hex data conversion or the dump process have errors? I understand that MTD partion size of 1048576 bytes is size assigned to the whole MTD partition, the actual data on partition takes much smaller space, the large space filled with hex 'ff' values. Additionally, can anyone advice good utility for hex to bin data conversion?

Device with Linux embedded system on NAND flash memory. I did memory dump of some MTD devices partitions use serial console, from U-boot bootloader use available commands. First I read MTD partition to address in the memory, then dumped memory from that address to the terminal window. For example, MTD partition 0x01d60000-0x01e60000 : "FPAR" MTD partition size is 0x00100000 = 1048576 bytes

nand read 0x20000000 0x01d60000 0x00100000 NAND read: device 0 offset 0x1d60000, size 0x100000 1048576 bytes read: OK md.b 0x20000000 0x00100000 

Then saved log file with dump as text file, cut out extra stuff before and after the dump and coverted it to binary use

xxd -r -p dump.txt dump.bin 

Resulting bin file size 1,310,860 bytes is mismatching MTD partion size (1,048,576 bytes), its much larger. Is the problem related to hex data conversion or the dump process have errors? I understand that MTD partion size of 1048576 bytes is size assigned to the whole MTD partition, the actual data on partition takes much smaller space, the large space filled with hex 'ff' values. Additionally, can anyone advice good utility for hex to bin data conversion?

Edit: I tried the same steps with 64 bytes data size, edited dump with gedit: resulting ascii file size = 318 bytes. So gedit corrupts the file. When I open saved log with Gedit, it show alert:

'There was a problem opening the file “/home/../Documents/64bytes-test.log. The file you opened has some invalid characters. If you continue editing this file you could corrupt this document. You can also choose another character encoding and try again. Character encoding: Current locale (UTF-8)' 

I just clicked 'Edit anyway' proceeded to edit it, then saved file. The resulting file size 318 bytes(Line Ending:Windows) and 313 bytes with Line Ending:Unix/Linux.

deleted 4 characters in body
Source Link
Lexx Luxx
  • 149
  • 2
  • 7
Loading
added 191 characters in body
Source Link
Lexx Luxx
  • 149
  • 2
  • 7
Loading
added 8 characters in body
Source Link
Lexx Luxx
  • 149
  • 2
  • 7
Loading
Source Link
Lexx Luxx
  • 149
  • 2
  • 7
Loading