"new_kern.bin" was being generated in the current directory and not
being cleaned up. Additionally, without this change, it is not safe to
run update_kernel.sh concurrently to separate devices.
BUG=None
TEST=Updated a kernel on a running VM, verified /tmp/update_kernel.* was
created and used for generated outputs.
Change-Id: I27cd236ee9d38263dcca361ce063078a13b11864
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/10240
Reviewed-by: Olof Johansson <olofj@chromium.org>
The KVM examples boot from the syslinux partiton, so update the kernel
that lives there too.
BUG=None
TEST=correctly updated a kernel in a VM
Change-Id: I1526064f85d6c9233696590e9e746bc91bcd6d2a
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/10239
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
The problem here is that most were doing their exiting w/in a subshell;
exit within a subshell kills the subshell, not the parent. Not all scripts
were using set -e (which would pick up the failing subshell); as such
just rewriting them to remove the potential via eliminateing the subshelling.
Beyond that, removed a couple of custom (working, although non-standard)
approaches, and removed a duplicate common.sh sourc'ing w/in mk_memento_images.sh
TEST=force 'find_common_sh' to fail, note the scripts fails to exit
BUG=none
Change-Id: Ia1108a091a6399ad6aedd3cade4a107f4411686c
Reviewed-on: http://gerrit.chromium.org/gerrit/3905
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
This 'update_kernel.sh' script gratuitiously broke on ARM targets
because the bootloader file has been changed to 'bootloader.bin' from
its previous name.
TEST=Used the script with a small kernel change to my Arthur board.
BUG=none
Change-Id: I146f08256543ffe2c4c52995625b26a1b3f28318
Reviewed-on: http://gerrit.chromium.org/gerrit/1989
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Taylor Hutt <thutt@chromium.org>
Tested-by: Taylor Hutt <thutt@chromium.org>
The script used to assume that you were running it from src/scripts.
That assumption has now been removed.
BUG=none
TEST=After this change I can run update_kernel.sh from anywhere.
Change-Id: I2676e1c16f5682d06be48e99c915660e4cb35be8
Reviewed-on: http://gerrit.chromium.org/gerrit/1933
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Mandeep Singh Baines <msb@chromium.org>
This CL is separated from http://gerrit.chromium.org/gerrit/#change,1104 which
is depends on the UUID replacement. In order to make update_kernel not break on
officail ChromeOS firmware, this CL just signs the kernel and use the original
cmdline approach, i.e. /dev/${devname}${rootpart}.
TEST=./update_kernel --remote IP
BUG=none
Change-Id: I6a194da0ebb0b3f5a442b62ffb76186909eb4321
Reviewed-on: http://gerrit.chromium.org/gerrit/1538
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
Auto-detect use of verity, and if verity is not used, copy over modules and firmware.
Also, while I was at it, I added a --noreboot argument.
And also copy over vmlinux.uimg on ARM if on non-verity.
Change-Id: Ida9d3fbf4f342db65ebd0002a8b1a528440ea7fe
BUG=chromium-os:13321
TEST=Build kernel, try updating on x86 and ARM, both with and without verity
Review URL: http://codereview.chromium.org/6881029
This script recently stopped working when we changed the kernel cmdline.
Fix to be more robust by using rootdev instead.
BUG=12780
TEST=Updated my kernel.
Change-Id: I033f670c5db821863441ea1546c382fce3436c01
Review URL: http://codereview.chromium.org/6628027
from within the chroot.
It also fixes a number of style issues.
It changes the meaning of cros_workon "list-all" to list all available
packages, and adds "list-live" to list all live packages.
It changes things that load chromeos-common.sh from the installer to
load it from /usr/lib/installer.
BUG=chromium-os:4230
TEST=synced, rebuilt chroot, made packages, made images, built chrome
from source, and wrote an image to a USB stick.
Review URL: http://codereview.chromium.org/6240018
Change-Id: I90c34420af1a64020402bafef8e9e77f56837c02
Change-Id: I5dc22223559d3cdad357530af66c14115da63c89
BUG=n0ne
TEST=update_kernel to seaboard (and mario for regression test)
Review URL: http://codereview.chromium.org/6031005
Change-Id: I7b38b5f9656bd21f6c88c5385c1aa0c526f48294
Signed-off-by: Olof Johansson <olofj@chromium.org>
BUG=n0ne
TEST=build kernel and firmware, update a mario
Review URL: http://codereview.chromium.org/5974003
This change is in preparation for the new sudo, which corrects how
parameters are passed to subcommands.
Change-Id: I34d09d2716fbef137d02748a2934459a8a10d693
BUG=chromium-os:7072
TEST=Ran modified "update_kernel.sh" w/ old sudo and new sudo.
Review URL: http://codereview.chromium.org/5859002
This command can be used to update the kernel of a ChromiumOS target.
Much thanks to snanda for the inspiration and instructions.
BUG=9864
TEST=Verified that it works.
Change-Id: I66f7d940e0dc59b0e1a50409a7155fe0ba7157fe
Review URL: http://codereview.chromium.org/5550001