cros_bundle_firmware: Allow sending a kernel over USB

When all you want to do is test a new kernel, it is convenient to be
able to send it over USB. This avoids the other slower options, like

1)
./build_packages --board daisy
./build_image --board daisy test
./image_to_usb ...
(put SD card in machine and boot)

2)
cros_workon_make --board daisy chromeos-kernel
./build_image --board daisy test
./image_to_usb ...
(put SD card in machine and boot)

3)
FEATURES=noclean cros_workon_make chromeos-kernel --install
(ssh to copy kernel to machine over network, or perhaps better
update_kernel.sh)

It is most similar to:

4)
cros_workon_make --board daisy chromeos-kernel
(reset board with network adaptor in USB, and have it pick up the
kernel using tftp or nfs)

but of course you can't easily fiddle with firmware with that path.

To use it on daisy, try:

cros_bundle_firmware -b daisy ---kernel /build/daisy/boot/vmlinux.uimg

or similar. It will reset the board, download U-Boot and the kernel,
then start U-Boot, setting the kernaddr environment variable so that the
scripts will substitute the downloaded kernel for the one that is loaded
through normal means.

BUG=chromium-os:32386
TEST=manual:
cros_bundle_firmware -b daisy ---kernel /build/daisy/boot/vmlinux.uimg
-d exynos5250-snow
on a snow and see that it boots U-Boot and then picks up the latest
kernel, ignoring the one on the machine.

Change-Id: I36f229aa1d55c8c6859fc7f62b4a9443e7d6c924
Reviewed-on: https://gerrit.chromium.org/gerrit/26792
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Commit-Ready: Che-Liang Chiou <clchiou@chromium.org>
3 files changed