Commit Graph

67 Commits

Author SHA1 Message Date
Paul Taysom
5e39bb6cd1 Configure the serial port for debugging
Enable the serial port from the build_image command line.
Currenly, you have to edit build_kernel_image.sh to enable
the serial port for kernel debugging. Now:

./build_image --board=${BOARD} --enable_serial=ttyS0

Will enable sending printks to the specified serial port.

BUG=chromium-os:38026
TEST=built images with and without serial enabled

Change-Id: I9ef4f2a20f0d451e132371339c4eba1faf4c94de
Reviewed-on: https://gerrit.chromium.org/gerrit/41638
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Paul Taysom <taysom@chromium.org>
Tested-by: Paul Taysom <taysom@chromium.org>
2013-01-23 17:44:43 -08:00
Paul Taysom
00df6f6e5b Build script changes needed to enable bootcache
Changes to build_image to allow enabling of bootcache.

./build_image --board=$BOARD --enable_bootcache

A board can be configured to use the bootcache by
the following lines in private-overlays/overlay-<board>-private/scripts

if [[ ${FLAGS_bootcache_use_board_default} -eq ${FLAGS_TRUE} ]]; then
  FLAGS_enable_bootcache=${FLAGS_TRUE}
fi

Setting --noenable_bootcache or --enable_bootcache on the comand
line will override the default.

BUG=chromium-os:25441
TEST=built and installed snow, amd-64(latitude), stumpy

Change-Id: Ie081ef94f4799b0071b53e0587d89f1247b4a11f
Reviewed-on: https://gerrit.chromium.org/gerrit/38414
Tested-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Paul Taysom <taysom@chromium.org>
2012-11-28 16:19:40 -08:00
Mike Frysinger
8b82f358ed Revert "Added enable_bootcache option to scripts"
This reverts commit acff376525

This broke the signing process due to changed kernel params.
Please update ensure_secure_kernelparams.config under the
cros-signing/ tree before relanding this.

Change-Id: I3be62e16299eb69bbfef9f1530d92200a2e309d7
Reviewed-on: https://gerrit.chromium.org/gerrit/34320
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2012-09-28 19:16:40 -07:00
Paul Taysom
acff376525 Added enable_bootcache option to scripts
Added a new flag for enabling the boot cache.

BUG=chromium-os:25441
TEST=built and ran amd64 and arm

Change-Id: Ia151d40c4b02f4353981affd321763521d972ee6
Reviewed-on: https://gerrit.chromium.org/gerrit/33617
Tested-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Paul Taysom <taysom@chromium.org>
2012-09-28 11:31:13 -07:00
Liam McLoughlin
e81a23207f Updated verity error_behavior and max_ios defaults to match expected values
BUG=chromium-os:34696
TEST=Run ensure_secure_kernelparams.sh on an image built with this change

Change-Id: I16a6f5127bdfae958f9cd0d9ce1b0c55a0f68c67
Reviewed-on: https://gerrit.chromium.org/gerrit/33888
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
2012-09-24 10:56:52 -07:00
Paul Taysom
5b2c7e934c Moved knowledge of rootdev to one place
This CL centralizes the setting of which root device to use
in a single place. A boolean flag, --verity_is_enabled, indicates
if the the verity device should be used.

This is the first of about a half-dozen CLs to fix all the references
to dm-0.

BUG=chromium-os:25441
TEST=built images with and without verity enabled.
     cbuildbot --remote -g Id6c6e766 amd64-generic-paladin daisy-paladin

Change-Id: Id6c6e766bfde3651266323f7bc94c0e1f87cea38
Reviewed-on: https://gerrit.chromium.org/gerrit/32239
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Paul Taysom <taysom@chromium.org>
Tested-by: Paul Taysom <taysom@chromium.org>
2012-09-07 17:24:27 -07:00
Sameer Nanda
542cb53e9d build_kernel_image: modify console, loglevel and quiet kernel options
Three related changes to kernel command line:

1. quiet kernel command line option is redundant with loglevel option
since quiet sets the loglevel to 4 but it is immediately overriden by
the loglevel option. Remove quiet option.

2. with loglevel set to 0 in the kernel command line, pstore console
doesn't work most of the time. This is because all printk's with level
lower than that don't make it to the console drivers. Set loglevel
to 7.

3. console=tty2 doesn't do what we want since the early boot and
shutdown messages with appropriate message log level are still visible
on screen. Set console to empty.

BUG=chrome-os-partner:12780
TEST=1. boot system and ensure that no kernel log messages appear on
screen. Then do a warm reboot and check that /dev/pstore/console-ramoops
file contains kernel log messages from the previous boot.
2. run bootperf test and ensure there are no boot time regressions.

Change-Id: Id1348c30d6aa3d818bae3259e748bf7100bf9c51
Reviewed-on: https://gerrit.chromium.org/gerrit/31180
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Sameer Nanda <snanda@chromium.org>
Tested-by: Sameer Nanda <snanda@chromium.org>
2012-08-23 10:51:12 -07:00
Mike Frysinger
c17a493bcc setup DEFAULT_BOARD by default
Rather than forcing all consumers of DEFAULT_BOARD to remember to call
get_default_board, just do it for them automatically.

BUG=None
TEST=`cbuildbot {arm,amd64,x86}-generic-full` works
TEST=`./build_packages --help` shows correct default

Change-Id: I8d6ccb83babb2764a50692318eb9193c45fb3b39
Reviewed-on: https://gerrit.chromium.org/gerrit/17868
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-08-14 10:17:31 -07:00
Olof Johansson
d7a8aafa54 build_kernel_image: fix duplicate options
Don't append common options twice.

BUG=chromium-os:33220
TEST=build image, check bootargs

Change-Id: I632b6a9c7726ff3838e84c51ed8cea77142ba948
Reviewed-on: https://gerrit.chromium.org/gerrit/29134
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
Tested-by: Puneet Kumar <puneetster@chromium.org>
Commit-Ready: Puneet Kumar <puneetster@chromium.org>
2012-08-03 14:24:30 -07:00
Olof Johansson
1eafb5a351 build_kernel_image: turn off earlyprintk and make options common on ARM/x86
Also move the creation of config.txt to common code and add some of the
options that both platform should use to it.

BUG=chrome-os-partner:11403
TEST=build, boot

Change-Id: I9c6eed3bf05c9f0744063c1baf321bf6d24dc9cc
Reviewed-on: https://gerrit.chromium.org/gerrit/28914
Tested-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
2012-08-02 14:27:11 -07:00
Doug Anderson
cee2386caf build_kernel_image: arm: Remove vmalloc command line argument
We were putting 'vmalloc=234MB' in the command line of all ARM boards
even though that's really board-specific.  This shell script really
can't do board-specific stuff, just architecture-specific stuff (and
it would be really hard to change that).  ...so we're just going to
remove the vmalloc part and we'll have to add it back in in some other
way.

Note that the vmalloc was only there for tegra2 devices and there is
no active development going on there.  See http://crosbug.com/33133
for the task to fix the regression and re-add vmalloc somehow for
tegra boards.

BUG=chromium-os:24808
TEST=Built an image and didn't see vmalloc

Change-Id: I6d45143dec5e7ae1bdd207241d275be261085f90
Reviewed-on: https://gerrit.chromium.org/gerrit/28875
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>
2012-08-01 10:23:46 -07:00
David James
359d3e119d Simplify boilerplate common.sh code in src/scripts.
Currently, the scripts in src/scripts have multiple implementations
for handling when common.sh fails to load, some of which are buggy.
To simplify the boilerplate, these scripts now just exit if common.sh
fails to load. The shell itself will print the following message if
common.sh is not found:
  /usr/lib/crosutils/common.sh: No such file or directory

BUG=chromium-os:32442
TEST=Run these scripts with and without common.sh installed.

Change-Id: Ie54420b6c649774f9cb039c14c80f4cf6c6ebc07
Reviewed-on: https://gerrit.chromium.org/gerrit/27058
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
2012-07-12 10:55:37 -07:00
Sean Paul
078164ea85 Reduce kernel loglevel to 0
Change the kernel loglevel from 1 to 0 to avoid showing console
messages on the screen during shutdown.

An example is the "Power down." message that is shown when shutting
down. This appears on the screen because the kernel prints the
message with KERN_EMERG (level 0). As such, 0 < 1, and the message
appears on the screen.

BUG=chromium-os:28602
TEST=Tested on lumpy, saw no messages when shutting down.

Change-Id: Id3842c2203f6cc4bf3bc9165d8537f440fffba61
Reviewed-on: https://gerrit.chromium.org/gerrit/22104
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Sean Paul <seanpaul@chromium.org>
Commit-Ready: Sean Paul <seanpaul@chromium.org>
2012-05-11 12:04:02 -07:00
Brian Harring
7f175a59e1 common.sh: output a backtrace and debug information on failure.
Currently, if set -e spots a nonzero exit we basically have
no real debug information- it just stops immediately without stating
where or why.  This forces our scripts to be stupidly verbose so
we can track roughly where they were, thus when they fail we can
use that information to localize the rough exit point.

Instead we should be traping that set -e induced exit and
outputing necessary debug information to run it down.  This includes
outputing the relevant stack trace, or at least what we can get of
it.

The 'die' function is now enhanced to automatically dump the trace
that lead to it.  For most consumers this is desired- however for
commandline parsing induced dies ("--board is missing" for example),
the trace is noise.  For those cases, a 'die_notrace' function was
added that retains the original non-backtrace behaviour.

Example output via instrumenting cros_generate_breakpad_symbols
w/ the failing command '/bin/false' (nonzero exit code).

Before:
./cros_generate_breakpad_symbols  monkeys --board=x86-alex
<no output at all, just exit code 1>

With this CL:
./cros_generate_breakpad_symbols  monkeys --board=x86-alex
ERROR   : script called: ./cros_generate_breakpad_symbols 'monkeys' '--board=x86-alex'
ERROR   : Backtrace:  (most recent call is last)
ERROR   :   file cros_generate_breakpad_symbols, line 207, called: main 'monkeys' '--board=x86-alex'
ERROR   :   file cros_generate_breakpad_symbols, line 163, called: die_err_trap '/bin/false' '1'
ERROR   :
ERROR   : Command failed:
ERROR   :   Command '/bin/false' exited with nonzero code: 1

BUG=chromium-os:30598
TEST=inject a failing command into a script, verify the output.
TEST=inject a 'command not found', verify the output
TEST=cbuildbot x86-generic-full --remote
TEST=cbuildbot arm-tegra2-full --remote
TEST=cbuildbot chromiumos-sdk --remote

Change-Id: I517ffde4d1bb7e2310a74f5a6455b53ba2dea86c
Reviewed-on: https://gerrit.chromium.org/gerrit/17225
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
2012-05-07 17:19:41 -07:00
Vadim Bendebury
b90bf4aabf Revert "Use keyboard controller for hard reset instead of CF9"
This reverts commit bc856858be86b1ae7c4dc33b256f43baac51636d

The thing is that ${FLAGS_board} is not set when build_kernel_image.sh runs, so the check never kicks in.

Change-Id: I501cb979c7aef8d2f7061da2b6cf2daedfe65004
Reviewed-on: https://gerrit.chromium.org/gerrit/20977
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
2012-04-24 18:52:18 -07:00
Vadim Bendebury
d90bf392cf Use keyboard controller for hard reset instead of CF9
For some still unknown reason writes to location 0xcf9 do not cause
the Link to reboot, they cause it to shut down instead. While this
will have to be investigated and fixed, this change modifies the code
to have the kernel use the keyboard controller (implemented by the EC
on Link) to restart the system.

Once the 0xcf9 problem is resolved, this change could be reverted.

BUG=chrome-os-partner:8397
TEST=manual
      . typing 'reboot' at the shell causes the system to restart. It
        was shutting down before this change.

Change-Id: I515c87c8ffb57c444bfc3e7074d584e7cbefa87f
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/18333
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-03-16 01:51:26 -07:00
Brian Harring
aa13ea4658 Shift crosutils scripts to use the common.sh they were written against.
Rather than trying to use an old/stale common.sh, use the common.sh
from the invocation point- if invoked via /usr/lib/crosutils, use that
common.sh.  If invoked via src/scripts/, use that, etc.

Trying to intermix it just introduces potential for bugs and invalidly
freezes common.sh api, thus the efforts to revert this and ultimately
revert the existing of a crosutils ebuild.

BUG=chromium-os:27201
TEST=cbuildbot x86-generic-full

Change-Id: I4c6c5fbade3d28c71752bd4c44dccad49af52ec0
Reviewed-on: https://gerrit.chromium.org/gerrit/18303
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
2012-03-15 23:35:06 -07:00
Doug Anderson
2dd2e8ea91 Moved setting of kern_guid kernel arg from platform-specific to common.
There was no reason for it to be platform-specific.  Original CL
that added it to ARM (it was already there for x86) is:
<http://gerrit.chromium.org/gerrit/1467>

This change is in preparation for moving platform-specific bits
into ebuilds.

BUG=chromium-os:24808
TEST=Validated that kern_guid gets set properly.

Change-Id: I5544ad3730e05128c0a9b0a4a3a8aee80ef31df5
Reviewed-on: https://gerrit.chromium.org/gerrit/13821
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>
2012-01-09 11:59:21 -08:00
Pawel Osciak
a2c2375c18 build_kernel_image: disable text cursor on ttys by default
This disables text cursor on ttys by default to get rid of a black
rectangle showing up during but on splash screen.

BUG=chromium-os:22879
TEST=manual boot on Alex

Change-Id: I06c50034c03488e49f88e01152cdceeee4f49a24
Signed-off-by: Pawel Osciak <posciak@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/11730
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
2011-11-15 18:02:52 -08:00
Sonny Rao
3163cf0605 Change script style for ARCH comparisons to double-bracket bash style
BUG=none
TEST=test setup_board, build_packages, build_image, image_to_vm,
on x86-generic and amd64-generic

Change-Id: I43d9d8e6e0e48cbce4d0086b78721ed86b120d4a
Reviewed-on: http://gerrit.chromium.org/gerrit/10209
Reviewed-by: Vince Laviano <vlaviano@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
2011-10-17 17:53:48 -07:00
Sonny Rao
0679b368c9 Add amd64 recognition to build_kernel_image.sh
This causes the script to treat amd64 the same as x86.

BUG=chromium-os:21284
TEST=./build_image for amd64-generic shouldn't generate an invalid
architecture error

Change-Id: I8f40a827684dde1258158d470a38623a8c936bca
Reviewed-on: http://gerrit.chromium.org/gerrit/9963
Reviewed-by: Vince Laviano <vlaviano@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
2011-10-12 15:14:00 -07:00
Katie Roberts-Hoffman
8429b4eb07 Append vmalloc arg for ARM in build_kernel_image
Tegra2 systems require a minimum vmalloc bootarg to successfully
reserve the graphics carveout memory. If the vmalloc is insufficient
a crash can result prior to any serial output reported. The minimum
vmalloc is >= carveout size + framebuffer - 32MB, thus for a 256MB
graphics carveout (with 10MB framebuffer), vmalloc>=234MB. This
arg is not added in the u-boot configs to avoid tightly coupling
the u-boot and kernel and is discussed in greater depth at
http://gerrit.chromium.org/gerrit/#change,8293.

BUG=chrome-os-partner:5197,chrome-os-partner:5902
TEST=Manually observe /proc/cmdline reflects change

Change-Id: I66b35b266c7542771f2d4fc497dd4429587529f8
Reviewed-on: http://gerrit.chromium.org/gerrit/8373
Commit-Ready: Katie Roberts-Hoffman <katierh@chromium.org>
Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
Tested-by: Katie Roberts-Hoffman <katierh@chromium.org>
2011-10-10 17:12:18 -07:00
Elly Jones
9ca3e4c0fe mod_image_for_recovery: reuse salt.
This will prevent the recovery kernel from having a different salt from the
rootfs it corresponds to.

BUG=chromium-os:20766
TESTED_ON=kaen
TEST=Adhoc
Build a recovery image and do recovery from it.

Change-Id: I96f735e527d807247e09e17aac1ed5b51367f0ef
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/8288
2011-09-28 10:50:10 -07:00
Elly Jones
f4e4833a9e build_kernel_image: use a salt for verity.
BUG=chromium-os:12138
TEST=Adhoc
TESTED_ON=Kaen
Build an image. Look for "Generating root fs hash tree (salt <foo>)." in the
output. Boot the image, grep for 'salt=' in dmesg. All should be well.

Change-Id: Ia7d8504033ff1e62ba451129be5796702809cc7c
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/7335
2011-09-13 12:14:54 -07:00
Darin Petkov
4b964ca646 Revert "build_kernel_image: use a salt for verity."
Seems to break internal PFQ.

This reverts commit e13e4d94753a585234189f0f34c1723cdbdb36a4

Change-Id: Ia232dc7a50feb87b2af8e945c6940eaa71390525
Reviewed-on: http://gerrit.chromium.org/gerrit/7195
Tested-by: Elly Jones <ellyjones@chromium.org>
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
2011-09-02 13:39:34 -07:00
Elly Jones
6f568e6a94 build_kernel_image: use a salt for verity.
BUG=chromium-os:12138
TEST=Adhoc
TESTED_ON=Kaen
Build an image. Look for "Generating root fs hash tree (salt <foo>)." in the
output. Boot the image, grep for 'salt=' in dmesg. All should be well.

Change-Id: If9dbefbd8a875d06ff45cd54704f166c2511c3b7
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/7174
2011-09-02 12:06:27 -07:00
Da Zheng
87465ea735 Create squashfs as the rootfs.
This give users the choice to have rootfs formatted with squashfs.
When --squash_image is specified, the rootfs will be formatted to squashfs.

Users can also use --squash_sort_file to specify the file priority when
squashfs is created.

BUG=None
TEST=Manually tested "--squash_image", and the image can be installed
from USB stick. Also tried "--squash_sort_file=sort-prio.list", and files
in squashfs are sorted.

Change-Id: I5fd818ac9d1203598926efa82e94fa105cd86ebc
Reviewed-on: http://gerrit.chromium.org/gerrit/5664
Tested-by: Da Zheng <zhengda@chromium.org>
Reviewed-by: Da Zheng <zhengda@chromium.org>
2011-08-26 13:04:29 -07:00
Che-Liang Chiou
e51bdf284c Obsolete --crosbug12352_arm_kernel_signing flag
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>
2011-07-26 21:40:13 -07:00
Brian Harring
d5d5dbffa1 Fix/standardize exiting if common.sh can't be found
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>
2011-07-22 12:06:59 -07:00
Che-Liang Chiou
451f36e4a8 Revert "obsolete --crosbug12352_arm_kernel_signing flag"
This reverts commit 2d2e825247.

Change-Id: I62d68c063aeab6beca4393ed51a4e754c8d9cc6a
Reviewed-on: http://gerrit.chromium.org/gerrit/4487
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
2011-07-21 04:54:47 -07:00
Che-Liang Chiou
2d2e825247 obsolete --crosbug12352_arm_kernel_signing flag
BUG=chromium-os:12352
TEST=manual

./build_image --board {tegra2_seaboard,x86-mario}
load_kernel_test -b 2 /path/to/chromiumos_image.bin \
  /usr/share/vboot/devkeys/recovery_key.vbpubk

Change-Id: Ide2b641842ce08ec5540c5195356821afaf7d048
Reviewed-on: http://gerrit.chromium.org/gerrit/2864
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
2011-07-21 03:02:30 -07:00
Che-Liang Chiou
93b6effb0b arm: kernel cmdline use root=PARTUUID=UUID/PARTNROFF=%d
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>
2011-07-01 01:33:10 -07:00
Nick Sanders
ffd0ca6f36 Use %U on dm-verity boots on arm
BUG=chrome-os-partner:4662,chrome-os-partner:3198
TEST=run recovery

Change-Id: I54372737dc75ed19d4361e8d58a50511c34336b1
Reviewed-on: http://gerrit.chromium.org/gerrit/3226
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Will Drewry <wad@chromium.org>
2011-06-27 00:47:59 -07:00
Elly Jones
5e7a430a55 build_kernel_image: use key-value args for verity.
BUG=chromium-os:15772
TEST=Adhoc
Ran build_image.

Change-Id: I1a745076dfb0242e76f65c5e24d72a1119f29008
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/1740
2011-06-21 07:10:46 -07:00
Che-Liang Chiou
69faa267cd Remove obsolete u-boot script in kernel partition
BUG=chromium-os:14572
TEST=./build_kernel_image.sh \
    --arch=arm
    --vmlinuz=/build/tegra2_seaboard/boot/vmlinuz
    --keys_dir=/usr/share/vboot/devkeys --use_dev_keys

Change-Id: I85e8b96ef0b79bf17976e718bcfb59040a557c1f
Reviewed-on: http://gerrit.chromium.org/gerrit/1876
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
2011-06-01 03:45:15 -07:00
Nick Sanders
f9fa9f532a Add kern_guid to cmdline
BUG=chromium-os:14022,15683
TEST=not yet

Change-Id: I50437a10218f0dcf15cdc8ce86e63f4b44e11189
Reviewed-on: http://gerrit.chromium.org/gerrit/1467
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
2011-05-25 03:00:45 -07:00
Nick Sanders
b795deba76 Cherry-pick: ARM: enable kernel signing by default
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>
2011-05-25 02:56:21 -07:00
Tom Wai-Hong Tam
a4395b5b1c Revert "ARM: enable kernel signing by default"
This reverts commit 9c5d88573f.

Change-Id: Ica876e1be20dc9ab60666af476294e093fd59498
Reviewed-on: http://gerrit.chromium.org/gerrit/762
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
2011-05-12 12:39:53 -07:00
Che-Liang Chiou
9c5d88573f ARM: enable kernel signing by default
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>
2011-05-09 03:13:56 -07:00
Mandeep Singh Baines
118692ab3f src/scripts: remove all references to verity_depth
This option is now deprecated. Remove from all scripts

To understand the impact of this change ran the following searches:

http://codesearch.google.com/codesearch?as_q=package%3Achromiumos+verity_depth
http://codesearch.google.com/codesearch?hl=en&lr=&q=package%3Achromiumos+verity_tree_depth

BUG=chromium-os:14357
TEST=Ran build_image, mod_image_for_test.sh, chromeos-install, and mod_image_for_recovery.sh.

Change-Id: I79e0e5fe1c917fbb54cc7c7f152d3c97d5f5c9b5

R=wad@chromium.org,scottz@chromium.org,gauravsh@chromium.org

Review URL: http://codereview.chromium.org/6901005
2011-04-28 13:50:33 -07:00
Mandeep Singh Baines
e388e18b67 build_kernel_image.sh: set default verity_depth to 0
verity_depth must be 0. No other values are supported. So changing the
default to 0.

Needs to go in before:

http://codereview.chromium.org/6901005

BUG=chromium-os:14357
TEST=Ran build_image, mod_image_for_test.sh, mod_image_for_recovery.sh
     chromeos-install, and image_to_live.sh.
Change-Id: I6208327d9ce68c9ba56d78e99bc145e34bee9d1d

R=wad@chromium.org,scottz@chromium.org,gauravsh@chromium.org

Review URL: http://codereview.chromium.org/6902061
2011-04-27 13:53:39 -07:00
Olof Johansson
24e10cb3db remove quiet and loglevel=1 from arm cmdline for now
It makes debugging system boot issues harder, so let's re-enable console
output for a while. It will be quieted down again later.

Change-Id: I7c543c09818c0152470c9f5e54d36c614d05bf3a

BUG=chrome-os-partner:3199
TEST=Boot a system, check for console output before login screen

Review URL: http://codereview.chromium.org/6801045
2011-04-07 15:08:08 -07:00
Duncan Laurie
1649ba8c1b Revert "Disable the 8042 MUX on our x86 devices."
This reverts commit 4deda9c24f.

BUG=chrome-os-partner:2811, chromium-os:13101
TEST=boot and verify /proc/cmdline
TBR=puneetster

Change-Id: I52990abc01fe5fc2d160d8efbb0a14bff1943ae4
2011-03-18 19:23:01 -07:00
Duncan Laurie
4deda9c24f Disable the 8042 MUX on our x86 devices.
The use of the mux can cause issues with some EC 8042 controllers and
result in loss of keyboard/trackpad between suspend/resume/reboot cycles.
We will never have more than keyboard+trackpad attached through the 8042
on our devices so using the mux is unnecessary.

BUG=chrome-os-partner:2700
TEST=manual verification that mux is not probed at boot:

Original:
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX0 port at 0x60,0x64 irq 12
serio: i8042 AUX1 port at 0x60,0x64 irq 12
serio: i8042 AUX2 port at 0x60,0x64 irq 12
serio: i8042 AUX3 port at 0x60,0x64 irq 12

New:
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12

Change-Id: I942ab86eb71941ab072ad6a17d15b067ca94439d

Review URL: http://codereview.chromium.org/6679031
2011-03-12 15:45:19 -08:00
Vadim Bendebury
8e623f6ea5 Modify x86 kernel command line to enable nmi watchog.
For the kernel nmi to be activated and function properly it
must be enabled in the kernel command line. This CL adds
`nmi_watchdog=panic,lapic' (which is equivalent of
nmi_watchdog=2) to the command line. The reason '2' was used
and not '1' is that nmi_watchdog=1 is known to break audio
functionality on chromeos devices.

Note that only x86 platforms are affected by this change,
ARM platforms will be added later.

This CL is required by the autotest CL

http://codereview.chromium.org/6596002

Change-Id: Ie8a9ba3f0de6d236cbe098e402b0240aa64ddcd0

BUG=chromium-os:12463, chromium-os:12464
TEST=see below

. build new image for test and install it on the target
. restart the target
. observe the contents of /proc/sys/kernel/nmi_watchdog (it
  should read '1' after reboot)
. run autotest as follows
 (chroot) ~/trunk/src/scripts $ ./run_remote_tests.sh \
   --board=x86-mario --remote=172.22.75.163 \
   platform_KernelErrorPaths kernel_BootMessagesServer \
platform_HighResTimers
. observe the results:

INFO   : Test results:
---------------------------------------------------------
kernel_BootMessagesServer                           PASS
kernel_BootMessagesServer/kernel_BootMessagesServer PASS
  coldboot_active_mb                                50
  coldboot_anonpages_mb                             36
  coldboot_buffers_mb                               3
  coldboot_cached_mb                                166
  coldboot_inactive_mb                              156
  coldboot_memfree_mb                               1649
platform_HighResTimers                              PASS
platform_HighResTimers/platform_HighResTimers       PASS
platform_KernelErrorPaths                           PASS
platform_KernelErrorPaths/platform_KernelErrorPaths PASS
---------------------------------------------------------
Total PASS: 6/6 (100%)

No crashes detected during testing.
Elapsed time: 4m28s

Review URL: http://codereview.chromium.org/6597001
2011-02-28 10:28:31 -08:00
Che-Liang Chiou
75ac2beb67 Add transitional flag for enabling arm kernel signing
For now arm kernel partitions are not signed. This CL is a transitionsl.
That is, the added flag should be removed after arm verified boot is stable.

To properly create an arm kernel partition, we also need another CL for
vbutil_kernel utility that turns off x86-only modifications on kernel
image. See CL:6538015.

BUG=chromium-os:3790,chromium-os:12352
TEST=see below

Build images for x86 and arm successfully, and notice that load_kernel_test
passes for x86 and signed arm image.

$ build_image --board=tegra2_seaboard --crosbug12352_arm_kernel_signing
$ build_image --board=tegra2_seaboard --nocrosbug12352_arm_kernel_signing
$ build_image --board=x86-generic

Review URL: http://codereview.chromium.org/6538014

Change-Id: I1be381bae2fc367a0603ac2ec67ee70fc9a257e4
2011-02-24 12:00:16 +08:00
Will Drewry
b910de849c kernel build: use %U+1 for dm-verity booting
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
2011-02-23 13:26:50 -06:00
Greg Spencer
798d75f3be This starts to fix the scripts so that they load from /usr/lib/crosutils
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
2011-02-01 22:04:49 -08:00
Olof Johansson
e0b7551f7b add quiet to arm bootargs
Not printing on the uart makes a huge difference in boot time performance. Since it's easy to re-enable again for those debugging boot time issues, let's disable it by default. It's how x86 does it as well.

Change-Id: Idb4af8d98434e70ee1389b3579c220da34be9c3b

BUG=chromium-os:11351
TEST=Build image and boot system

Review URL: http://codereview.chromium.org/6290011
2011-01-26 14:31:26 -08:00
Todd Broch
93300cd754 Revert "build_kernel_image: enable nmi watchdog"
This reverts commit ea621903e9.

TEST=grep dmesg for clock & nmi to make sure things look ok.
Run example program to make sure result of clock_getres call tv_nsec = 1 again
BUG=chromium-os:10720

Change-Id: Ife23fc7d08420788d4c165957d739ec2ce974969

Review URL: http://codereview.chromium.org/6274006
2011-01-18 10:05:21 -08:00