title: Use 'dd' to split the binary apart and extract the parts
body: <p>I have firmware file in .bin format, but need to obtain the romimage.img and Kernel uImage files required to reflash a bricked device. 
  I used Binwalk to identify different parts of a firmware binary, <code>$ binwalk firmware.bin</code></p>
  
  <pre><code>DECIMAL       HEXADECIMAL     DESCRIPTION
  --------------------------------------------------------------------------------
  392           0x188           uImage header, header size: 64 bytes, header CRC: 0xEF73A583, created: 1969-12-31 23:59:59, image size: 1572736 bytes, Data Address: 0x20008000, Entry Point: 0x20008000, data CRC: 0x3661C6EC, OS: Linux, CPU: ARM, image type: OS Kernel Image, compression type: none, image name: "SP2Xcybertan_rom_bin"
  13596         0x351C          gzip compressed data, maximum compression, from Unix, last modified: 2019-04-03 05:25:36
  1573192       0x180148        uImage header, header size: 64 bytes, header CRC: 0x9053B22D, created: 1969-12-31 23:59:59, image size: 8474624 bytes, Data Address: 0x0, Entry Point: 0x0, data CRC: 0xFC8655E0, OS: Linux, CPU: ARM, image type: Filesystem Image, compression type: none, image name: "SP2Xcybertan_rom_bin"
  1573256       0x180188        Squashfs filesystem, little endian, non-standard signature, version 3.1, size: 8473072 bytes, 1028 inodes, blocksize: 131072 bytes, created: 2019-04-03 05:36:06
  </code></pre>
  
  <p>from boot log:</p>
  
  <pre><code>Loading from NAND 32MiB 3,3V 8-bit, offset 0x80000
     Image Name:   SP2Xcybertan_rom_bin
     Created:      1970-01-01   0:00:-1 UTC
     Image Type:   ARM Linux Kernel Image (uncompressed)
     Data Size:    1572736 Bytes =  1.5 MB
     Load Address: 20008000
     Entry Point:  20008000
      ... ... ... ...
  
  Creating 11 MTD partitions on "gen_nand":
  0x00000000-0x00060000 : "u-boot"
  0x00060000-0x00080000 : "u-bootenv"
  0x00080000-0x01460000 : "ROMIMAGE"
  0x01460000-0x01b60000 : "HALFIMAGE"
  0x00200000-0x01460000 : "LINUX_ROOTFS"
     ... ... ... ...
  </code></pre>
  
  <p>Now I need to split the firmware image apart and extract the Rom Image romimage.img and kernel uImage from firmware.bin: how to make this properly use linux <code>dd</code> command?</p>