x86: preserve partition table on sysupgrade
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 9 Feb 2016 12:33:17 +0000 (12:33 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 9 Feb 2016 12:33:17 +0000 (12:33 +0000)
commit682ced1792f83ef940e31a6e98b8890ee804a17c
tree086ba162d0005151dbf3c4ce56d5ac1fa546035f
parentb6ffc0d181149c85018bb493c75a479cd2087722
x86: preserve partition table on sysupgrade

With this patch sysupgrade will write directly to the partitions
instead of to the main disk.  The UUID is copied from the image
to the MBR as well.  This prevents the mbr from being completely
overwritten and losing the partition table.  The -p option has
been added to maintain the original behavior and overwite the
entire disk with the new image.  Tests have been added to ensure
that the image partitions match up with the active partitions.

Signed-off-by: Rob Mosher <nyt-openwrt@countercultured.net>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48682 3c298f89-4303-0410-b956-a3cf2f4a3e73
package/base-files/files/lib/upgrade/common.sh
package/base-files/files/sbin/sysupgrade
target/linux/x86/Makefile
target/linux/x86/base-files/lib/upgrade/platform.sh