update_kernel: Remove multiple cros_secure from remote_bootargs.

update_kernel.sh get remote_bootargs from /proc/cmdline, which includes
the 'cros_secure' prepended by depthcharge. This cause the cmdline to
contain multiple instances of 'cros_secure' after multiple run of
`update_kernel.sh --remote_bootargs`, and eventually cause kernel to
refuse to boot because of too long cmdline.

Fix this by removing continuous repeating cros_secure flag from
remote_bootargs in update_kernel.sh.

BUG=chromium:907772
TEST=manually, run `update_kernel.sh --remote_bootargs` multiple times,
     and see that `cat /proc/cmdline` on DUT still have only two
     cros_secure.

Change-Id: I308043648547cbb5ed6006cc436f56068848ab6a
Reviewed-on: https://chromium-review.googlesource.com/1351176
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed