update_kernel: Make ab_update swap kernel slots

The new flag --ab_update installs the kernel to the other slot. However
the device will reboot to the current slot. Most developers are likely
using --bootonce, which does swap to the other slot. This patch makes
the swapping to the other slot explicit.

BUG=None
TEST=./update_kernel --ab_update # before, doesnt update, after, does
TEST=./update_kernel --ab_update --bootonce # still works

Change-Id: I47cd92c2ae16907a3ffc7369b715a42ef57e5ee3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/3434926
Tested-by: Evan Benn <evanbenn@chromium.org>
Auto-Submit: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Commit-Queue: Evan Benn <evanbenn@chromium.org>
1 file changed