BUG=None
TEST=build regular, test, and recovery images
Change-Id: I2d7d073c27d14fb88be6a63953dcc77fc76a0807
Reviewed-on: http://gerrit.chromium.org/gerrit/5512
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
The recovery kernel is different from the regular kernel, and
should be kept sandboxed so that it does not mess with our
build directory.
We also need to give the recovery kernel a different PKGDIR so
that it does not overwrite our prebuilts for the ordinary
kernel.
BUG=chromium-os:18691
TEST=build_image --factory_install, mod_image_for_recovery.sh
Change-Id: I678a94305d5f30bc2c95bf4e53cfe81b2ae9d8ef
Reviewed-on: http://gerrit.chromium.org/gerrit/5305
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
This reverts commit 451f36e4a8.
Last time I removed the --crosbug12352_arm_kernel_signing flag, buildbot
failed. The reason seemed to be that buildbot still passing this flag to
build_image. However, I cannot find anywhere in the log that indicates
buildbot did pass this flag to build_image. So I think the last failure
should be transient and it is good to obsolete this flag.
BUG=chromium-os:12352
TEST=build_image
TEST=load_kernel_test -b 2 /path/to/image /path/to/recovery_key.vbpubk
Change-Id: Ic757eb2dc4304e7205b483063335f8816b536433
Reviewed-on: http://gerrit.chromium.org/gerrit/4794
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
This shortens the standard boilerplate for finding and sourcing
shell function libraries for build_image, mod_image_for_test.sh and
mod_image_for_recovery.sh.
As a side effect of the change, both mod_image_for_test.sh and
mod_image_for_recovery.sh will now restart inside the chroot if
invoked from outside; this is consistent with the pre-existing
behavior of build_image.
BUG=None
TEST=run the three scripts, from both inside and outside the chroot
Change-Id: Idd91cbee323346a871b49deea31a76875f5ee3c4
Reviewed-on: http://gerrit.chromium.org/gerrit/4675
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Vince Laviano <vlaviano@chromium.org>
The file was written as a script, but in fact was merely a shell
library of mostly unused functions. Remove the file, and move the
one function actually used to the one place it was used in
mod_image_for_recovery.sh.
BUG=None
TEST=run mod_image_for_recovery.sh
TEST=grep all relevant scripts for references to the deleted file
Change-Id: I424f6986089467d2b8cd95bb033851171c1d1e3a
Reviewed-on: http://gerrit.chromium.org/gerrit/4681
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Chris Sosa <sosa@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>
The following pattern creates a race condition:
LOOP_DEV=$(sudo losetup -f)
...
sudo losetup "${LOOP_DEV}" "${ROOT_FS_IMG}"
If two steps similar to the above run in parallel, and both steps pick up
the same free loop device, they may try to mount different images with the
same loop device and one of the two stages will get a "device is busy" error.
To fix this, we should switch to the following pattern:
LOOP_DEV=$(sudo losetup --show -f "${ROOT_FS_IMG}")
This CL implements the above.`
BUG=chromium-os:18046
TEST=Run buildbot run. Test case where we run out of loop devices and verify
logic still works.
Change-Id: Ie457701fda61e5fc3b9112c1bfef9fb9713ea265
Reviewed-on: http://gerrit.chromium.org/gerrit/4555
Tested-by: David James <davidjames@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Since now the arm firmware can parse %U as x86 bios, and kernel can
parse PARTNROFF=%d, we are able to generate kernel command line with
such construct.
BUG=chromium-os:14022,15683
TEST=manual
1. Build image with root filesystem verification turns off
2. Boot successfully
3. Run 'cat /proc/cmdline' and validate its output
4. Run 'rootdev' and validate its output
Change-Id: I11de0a30928efe9d9b0149feb3389a2f30063516
Reviewed-on: http://gerrit.chromium.org/gerrit/1104
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: <nsanders@google.com>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
This will prevent nasty surprises when it fails silently and one ends up with a
non-bootable recovery image.
BUG=chromium-os:16366
TEST=Adhoc
Hack /usr/lib/crosutils/build_kernel_image.sh to exit 1, run
mod_image_for_recovery
Change-Id: If23d181959aecf75044cb4581e25f8851d1b9840
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/3097
Reviewed-by: Will Drewry <wad@chromium.org>
This commit is a part of transition to enable ARM kernel signing. It is
at first an option that is enabled manually, and then (in this commit)
enabled by default. After more tests, the scripts that generate unsigned
ARM kernel partition will probably be removed.
BUG=chromium-os:12352
TEST=./build_image && load_kernel_test -b 2 /path/to/chromiumos_image.bin /usr/share/vboot/devkeys/recovery_key.vbpubk
Change-Id: I7d4ecc566f9c5cc0106a7af59255fc63fdfe017a
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Rong Chang <rongchang@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/1319
Tested-by: Nick Sanders <nsanders@chromium.org>
This commit is a part of transition to enable ARM kernel signing. It is
at first an option that is enabled manually, and then (in this commit)
enabled by default. After more tests, the scripts that generate unsigned
ARM kernel partition will probably be removed.
BUG=chromium-os:12352
TEST=./build_image && load_kernel_test -b 2 /path/to/chromiumos_image.bin /usr/share/vboot/devkeys/recovery_key.vbpubk
Change-Id: I6d48d1603cd7c96514892bcbbf8994b2d4cc2a08
Reviewed-on: http://gerrit.chromium.org/gerrit/512
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
This CL depends on http://codereview.chromium.org/6765018 which adds fbconsole
USE flag.
Change-Id: I159680e2cd53b6493545f6c0b1caaa8a7e833cb3
BUG=chromium-os:13607
TEST=run mod_image_for_recovery.sh and boot to recovery image to see messages
showed on framebuffer console.
Review URL: http://codereview.chromium.org/6814041
Enable the ARM kernel signing procedure in the recovery image. Will remove it
when the procedure is stable.
BUG=chromium-os:12352,chromium-os:1305
TEST=run "build_image" and "mod_image_for_recovery.sh
--crosbug12352_arm_kernel_signing" to create a recovery image.
Then use u-boot recovery mode to boot the recovery image. Successfully verify
and boot the kernel.
Change-Id: I1bf911176c6f3adaebf3aa9abc86488a48a60494
Review URL: http://codereview.chromium.org/6635010
Using %U+1 will ensure that we avoid device enumeration issues during recovery mode
boots.
TEST=build_image+dev recovery kernel and boot to it on new cros fw / fixed enumeration problem
used build with mp recovery kernel on cr-48 -> installed then booted fine
used dev recovery kernel on a legacy machine; installed fine, booted fine
tested with cr-48, mp recovery kernel, and noenable_rootfs_verification to ensure /dev/sd%D%P still worked as normal.
Change-Id: I5b1277a47536738a78c18988fd912cc05ebddd4b
BUG=chromium-os:5470
Review URL: http://codereview.chromium.org/6549034
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
This will prevent the firmware from updating the tries flag on a USB recovery image.
Change-Id: I47bf276eab5b40ae54b732d0e082e4c9f58bfed3
BUG=chromium-os:6550
TEST=build_package, build_image, cgpt show recovery_image.bin (successful flag should be set to 1)
Review URL: http://codereview.chromium.org/4979007
Developer images may have data on stateful they want to keep. In that case, just swap the kernels.
BUG=chromium-os:7451
TEST=tested with a --withdev build and stateful was intact and the recovery install worked.
Change-Id: I59d7f2e99892448d1eaf964e6292611accb2035c
Review URL: http://codereview.chromium.org/4418002
Change-Id: I636f3156e549508230515174edffaff650c9d46e
BUG=chromium-os:6759
TEST=(1)manually built a non-developer recovery image and verified recovery install
completes on an agz device and the device is able to boot from HD upon reboot
(2) repeat for a developer recovery image and verified dev image from dev_payload is installed onto target and the target is able to boot from HD
Review URL: http://codereview.chromium.org/3391018
Change-Id: Ibd1990747d20b3f11a8bf9d5b558405067589d0e
BUG=chromium-os:5871
TEST=manually ran the script with and without --output flag and verified output
image took default name and user-specified name, respectively
Review URL: http://codereview.chromium.org/3155042
Change-Id: I407d39ca461bbe609812e2b3bd2a51e67e331659
TEST=manually built a recovery image (non-dev mode, --withnodev) and verified
chromeos-install completed successfully when installing from USB to target HD
Review URL: http://codereview.chromium.org/3174005
Breaks make_image_bootable out of build_image into a separate
script. In addition, it make a helper .sh in the OUTPUT_DIR
to let make_image_bootable be re-run on an image with the same
arguments that were passed in via build_image.
This change also removes the use of the boot/ directory in
OUTPUT_DIR.
TEST=build_image verified; image_to_usb --test_image; booted l13
build_image; image_to_vm; qemu booted
build_image verified; image_to_usb; booted l13
BUG=chromium-os:5081
Review URL: http://codereview.chromium.org/3066037
Change-Id: I627d678089aa71c353347f387ad5b14063fd4e7b