Commit Graph

329 Commits

Author SHA1 Message Date
Chris Sosa
b9f2d2ecbd Flag day flip of statefuldev
Review URL: http://codereview.chromium.org/1989001
2010-05-05 16:42:44 -07:00
Don Garrett
640a0585f5 Added restart_in_chroot_if_needed to common.sh.
Add restart_in_chroot_if_needed to common.sh, and modify the build scripts which referred to assert_inside_chroot to use it instead. The effect is that you don't ever have to explicitly enter_chroot.sh to build (still can, it work's fine).

Update mod_image_for_test.sh to use restart_in_chroot_if_needed

Review URL: http://codereview.chromium.org/1736025
2010-05-04 16:54:28 -07:00
Chris Sosa
5c37ce2e03 Modifies dev server to produce stateful gzip and modify image_to_live to use it.
TEST=Tested with image_to_live, memento_updater without image_to_live

This mimics the update process of the real image for the stateful partition.
By moving this the update into a separate script, I can add it to the gmerge
package such that developers will not have to use image_to_live.  This change
also removes the dependency on tar.

Review URL: http://codereview.chromium.org/1774021
2010-05-03 20:18:02 -07:00
robotboy
b75eee3d67 Add --bootargs option to build_image.
This allows appending extra kernel command line parameters to
the ARM kernel command line on the Voguev210 boards.

BUG=None
TEST=Built image

Review URL: http://codereview.chromium.org/1694021
2010-04-30 09:51:23 -07:00
Chris Sosa
bde8c1bccc Harden build_image to not lose loopback devices.
Review URL: http://codereview.chromium.org/1794007
2010-04-29 14:02:35 -07:00
Bill Richardson
041bd71932 Add more choices to grub2 menu.
This adds some '/dev/sdb' options to the grub2 menu, so that we can keep the
default boot partition /dev/sda3 while still using the USB key as a recovery
image. This is work in progress for EFI BIOS development.

Review URL: http://codereview.chromium.org/1706014
2010-04-27 09:36:14 -07:00
Daniel Erat
dd9818aaad build: Get rid of scary /dev/sdb defaults in scripts.
Choosing a default device is no good; the user should
tell us where the image should be written.

BUG=none
TEST=wrote an image

Review URL: http://codereview.chromium.org/1730012
2010-04-26 09:16:44 -07:00
Ken Mixter
d5c4b17da5 Revert "Retry on build_image failures and make sbt more aggressive by default"
This reverts commit 7c3272657eb2e3a106090c5ab57f16ba5ba21ffe.

Review URL: http://codereview.chromium.org/1594035
2010-04-16 10:11:02 -07:00
Ken Mixter
c223ba1e0c Retry on build_image failures and make sbt more aggressive by default
As with build_packages, only retries by default if you passed --jobs
even though build_image will indeed spuriously fail with only one job.
sync_build_test now uses jobs=#cores by default for both package and
image building.  Eventually will also use this for gclient sync'ing
once that is better vetted.

Review URL: http://codereview.chromium.org/1564035
2010-04-16 09:08:26 -07:00
Chris Sosa
3d9a10b393 Fix install mask and move dev_mode to true when dev packages are installed
Review URL: http://codereview.chromium.org/1553028
2010-04-13 15:00:46 -07:00
Bill Richardson
ba9682ac08 Change default grub.cfg to support fast-boot from EFI BIOS
Review URL: http://codereview.chromium.org/1518025
2010-04-13 13:02:32 -07:00
Jie Sun
96e2b09b24 current mkimage are build in u-boot package and copied to sys-root ( a x86 binary).
move mkimage to hard-host-depends and remove dependency from u-boot to kernel.
this will make use of mkimage on target possible in the future.

Review URL: http://codereview.chromium.org/1613008
2010-04-09 11:05:49 -07:00
Bill Richardson
a81df76a06 Replace "mount -o loop" with explict losetup use in build_image.
This fixes the loop device leak. The problem is that inside the chroot, we
have /etc/mtab as a symlink to /proc/mounts. That works most of the time,
but if you mount something using "-o loop", it isn't cleaned up correctly
when you umount it. To avoid that, we either have to replace the /etc/mtab
symlink with an empty file when we create the chroot, or we have to make
sure that we never execute a "mount -o loop" command from within the chroot.
If we use an empty /etc/mtab file, the builds work fine, but then we can't
see any mounted partitions that the host creates outside the chroot (such as
USB keys), which causes other problems. Bleah.

Review URL: http://codereview.chromium.org/1594020
2010-04-09 08:12:05 -07:00
Chris Sosa
1e5fe62f92 Fix build image
Review URL: http://codereview.chromium.org/1622015
2010-04-08 20:51:53 -07:00
Andrew de los Reyes
e7a04adc83 Factory Installer.
Change build_image to support building a factory install image. Also,
a shell script and startup script to run the factory installer.

Change software_update startup script to detect if it's a factory
install and abort if so.

BUG=2378,2379,2380
TEST=Tested factory install worked on device.
Wrapper script to perform factory install at boot.

AU: New arg to install on non-boot device partition. This is used to
install in the factory. Also, switch to shflags for argument parsing.

Review URL: http://codereview.chromium.org/1556022
2010-04-08 15:58:17 -07:00
Chris Sosa
503efe1f65 Add /usr/local/lib to readlibs for test_image and move ldconfig higher for sful
Review URL: http://codereview.chromium.org/1618007
2010-04-08 10:05:46 -07:00
Chris Sosa
4bffb8be6a Fix symlinks for gmergefs on stateful and keep other stateful items installed from build_image
Review URL: http://codereview.chromium.org/1561014
2010-04-07 17:23:54 -07:00
Bill Richardson
8b3bd10b91 Create EFI System Partition on USB image during build.
The EFI System Partition is a special disk partition where EFI BIOS expects
to find the platform-specific bootloader. We need this in order to work on
the BIOS/kernel handoff. It's not needed for the final ChromeOS image and it
isn't useful for legacy BIOS systems, so right now it only makes any difference on x86
devices with development BIOSes.

This change creates the partition for ARM builds as well; it has no effect
there, either.

Review URL: http://codereview.chromium.org/1513019
2010-04-06 15:00:10 -07:00
Chris Masone
35a83f99e4 Apparently, we have to have a rootfs big enough to hold all dev and test tools too.
I need a couple extra tools for testing purposes (about 10MB).  I'd love to not add space to the rootfs for these.  But...talking to sosa, it doesn't seem there's any other way.

Review URL: http://codereview.chromium.org/1576018
2010-04-05 16:51:53 -07:00
Chris Sosa
aa1a7fd63d Adds gmergefs. A method of remoting to a target and pushing new
packages using emerge from the host

Review URL: http://codereview.chromium.org/1515011
2010-04-02 14:06:29 -07:00
Antoine Labour
e9e585f330 Add a --to option to build_image
That way we can directly build an image onto a usb stick/sd card without a separate step.
Also, add mounting of /sys into the chroot that is needed by build_gpt on a block device.

Review URL: http://codereview.chromium.org/1521012
2010-04-01 15:57:57 -07:00
Bill Richardson
6dcea16492 Clean up temporary files and directories, add utilities.
Remove the temporary rootfs.image file and others that are left by build_image and related scripts. Also added tool to emit scripts that can pack and unpack the combined disk image.

Review URL: http://codereview.chromium.org/1567013
2010-03-31 19:20:24 -07:00
Bill Richardson
4364a2e679 Switch to GPT-format disk images.
This changes the disk image for both USB keys and hard-drive installs to use
the EFI GUID Partition Tables. This is a prequisite for booting with an EFI
BIOS. This change does not use the EFI Boot protocol; it still boots using
Legacy BIOS. The PMBR contains syslinux' gptmbr.bin, which searches the GPT
for a specified partition's GUID to boot.

I've tested it on my EeePC. The USB image works, chromeos-install works, and
the reimaged hard drive works. I have not yet tested the memento_updater.sh
script, but I wanted to start the review without waiting until it's all perfect.
I will also be refactoring build_gpt.sh and chromeos-install to share common
logic.

It's almost certain that all existing dogfood machines will need to be
reimaged from a USB key. We could probably figure out a way to upgrade
automatically, but not quickly or without risk.

In addition to the GPT formatting, the build_image script has changed to
emit a single usb.bin file. This can be copied directly onto a USB key and
booted. Installation of dev tools needs to happen with build_image, not
image_to_usb. I have not yet looked at the other image_to_* scripts.

Review URL: http://codereview.chromium.org/1100001
2010-03-30 14:17:34 -07:00
Antoine Labour
643fffab67 arm: don't truncate the mbr when installing the boot script. bad things happen otherwise
Review URL: http://codereview.chromium.org/1117005
2010-03-19 18:17:11 -07:00
Chris Sosa
cbac648820 Fix xterm
Review URL: http://codereview.chromium.org/1026002
2010-03-15 17:52:47 -07:00
Chris Sosa
77a2963e7d TBR: Change default to false 2010-03-15 14:12:15 -07:00
Chris Sosa
4bccd3c54d Build image part of http://codereview.chromium.org/913004/show
Review URL: http://codereview.chromium.org/998002
2010-03-15 13:23:14 -07:00
Bill Richardson
c09b94fda3 Replace symlink to build_image with real file.
Review URL: http://codereview.chromium.org/921001
2010-03-15 11:40:30 -07:00
tedbo
6a2c4c3365 Add symlinks to new build scripts. This obviates the need to run setup_source_tree.sh.
Review URL: http://codereview.chromium.org/650056
2010-02-19 14:54:50 -08:00