Commit Graph

217 Commits

Author SHA1 Message Date
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