eliminate meaningless non-zero values of second_offset and ramdisk_offset

To eliminate meaningless non-zero values, this commit will:
  If second bootloader size is 0, set second_offset to 0.
  If ramdisk size is 0, set ramdisk_offset to 0.

Example/Test:

Previously if there is no second bootloader, the header may look like this:
00000000: 41 4e 44 52 4f 49 44 21 30 be 30 01 00 80 00 00  ANDROID!0.0.....
00000010: 28 ea 9a 00 00 00 00 01 00 00 00 00 00 00 f0 00  (...............
00000020: 00 01 00 00 00 10 00 00 02 00 00 00 36 01 00 14  ............6...
Values from 0x1c-0x1f are 0x0000f000

With this commit, the header becomes:
00000000: 41 4e 44 52 4f 49 44 21 30 be 30 01 00 80 00 00  ANDROID!0.0.....
00000010: 28 ea 9a 00 00 00 00 01 00 00 00 00 00 00 00 00  (...............
00000020: 00 01 00 00 00 10 00 00 02 00 00 00 36 01 00 14  ............6...
Values from 0x1c-0x1f are zero.

Change-Id: Id9aadd304c49554b9a6ca73f1afd3fc0278a06b2
1 file changed