The nand-part.c code tries to re-read the partition tables
by issuing an ioctl(fd, BLKRRPART, NULL). This isn't available
on non-Linux platforms, e.g. Mac OS X.
Add preprocessor conditionals to prevent this from breaking
the build.
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Build one nand-part program to handle both A10 and A20 mbr header formats.
Changed -f option to take an "a10" or "a20" argument to specify which mbr
format to force.
Signed-off-by: Patrick Wood <patrickhwood@gmail.com>
A20 boot1 checks the MBR magic string but not the version, but let's
check it anyway (can always force now with the -f option if the version
isn't 0x200 on the system)
allow setting of partition 1 size/offset
if -f option is used, force writing of MBR header, even if CRC or
header magic/version are incorrect (for recovery only)
ignore user_type in android nand MBR; these can be other than 0 or 2
contrary to Allwinner's expectations
allow the user to set the user_type from the command line
(optional -- backwards compatible with existing usage