Commit Graph

9 Commits

Author SHA1 Message Date
Brandon Philips
4057d5590d feat(disk_layout): follow new CoreOS partition layout
As outlined here we need a new partition layout, this patch makes the
necessary changes:
https://groups.google.com/forum/#!topic/coreos-dev/bA7gwGGoTng

The first big change is making all of the scripts obey partition numbers
based on labels in the disk_layout.json. This makes it much easier to
change later on.

The second big change is in the layout itself. The json file was updated
to reflect the document above.

And finally the grub boot configuration needed for pv-grub and pygrub
were added to the create_legacy_bootloader_templates.sh library utlity.

Everything seems to work and boot now.
2013-05-12 12:31:03 -07:00
Liam McLoughlin
12a9a84de9 Add adjust_part flag
BUG=chromium-os:35003
TEST=Build an image specifying above flag, verify image is correct size

Change-Id: I36df212bf1dac41717044da011552d459645d523
Reviewed-on: https://gerrit.chromium.org/gerrit/35105
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
2012-10-30 04:44:53 -07:00
Don Garrett
de262e86c7 Increase the rootfs to 1G in size.
We are coming close to filling the rootfs size, so just make it bigger.

TEST=build_image, image_to_live, recovery, USB install, trybot
BUG=chromium-os:35086
CQ-DEPEND=CL:*27626
CQ-DEPEND=CL:*27627
CQ-DEPEND=CL:*27628
CQ-DEPEND=CL:*27632

Change-Id: Ida27761dbcf59e5553b10789a068e9cd6c1887ee
Reviewed-on: https://gerrit.chromium.org/gerrit/35477
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Commit-Ready: Don Garrett <dgarrett@chromium.org>
2012-10-17 23:30:38 -07:00
Mike Frysinger
1ef08a9fcf cgpt: validate layout files when loading
Add more sanity checks to the input .json file to catch when people
make typos or other random mistakes.

BUG=None
TEST=loaded all .json files we have

Change-Id: Ibc2439684628225da43639c2fac25958b5fa794e
Reviewed-on: https://gerrit.chromium.org/gerrit/34708
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-10-08 13:13:39 -07:00
Mike Frysinger
c17cf6aff0 cgpt: fix up "with open" handling
There is no need to call .close() ourself in a with block.

We can also use a with block in the WritePartitionScript func.

BUG=None
TEST=build_image still works

Change-Id: I53b31ba96c94e885b1d4415889b5d2a9691ccda1
Reviewed-on: https://gerrit.chromium.org/gerrit/34707
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-10-08 13:13:39 -07:00
Mike Frysinger
624071a08b cgpt: touch up style
No functional changes here.

BUG=None
TEST=build_image worked

Change-Id: I4dc7968c7417cefcb6576e9452dcf71847101c56
Reviewed-on: https://gerrit.chromium.org/gerrit/34706
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-10-08 13:13:38 -07:00
Liam McLoughlin
e61da0dff1 Fixes the ability to AU after running chromeos-install
Make it possible to run chromeos-install without root

BUG=none
TEST=Build image, chromeos-install, verify ROOT-B is full size

Change-Id: Id506f1e5a6f8b8ee03ea1bdd621aaab1239bca2c
Reviewed-on: https://gerrit.chromium.org/gerrit/34081
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
2012-09-26 03:01:41 -07:00
Liam McLoughlin
53fbca3fdb Correct partition layout calculation code
The CURR counter wasn't being correctly incremented for the stateful
partition resulting in an invalid layout

BUG=chromium-os:34715
TEST=Build image and verify it can be installed

Change-Id: Ie2f90d2e51e34e2056414363d7b2b42413018322
Reviewed-on: https://gerrit.chromium.org/gerrit/33928
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Olof Johansson <olofj@chromium.org>
2012-09-24 16:25:08 -07:00
Liam McLoughlin
5b37c5443a Simplify and add flexibility to image creation process
This change adds support for building the disk layout from a
configuration file. It also cleans up much of the image creation
code.

install_gpt no longer exists, and has been replaced by cgpt.py's
write action. This spits out a file that has two functions that can
be called to write a partition layout to a disk/file. This gets rid
of the gigantic nest of calculations that built the layout previously.

All instances of partition/filesystem sizes in build scripts should now
be gone in favour of calls to the cgpt.py tool.

create_boot_desc has moved inside the base image creation, in an effort
to simplify build_image.

load_kernel_test is gone since it's apparently not supposed to be called
here anyway (asked wfrichar/rspangler about this one).

Base image creation now uses files rather than loop devices when
building an image. This means we can simply umount them once we're
done and not worry about cleaning up the loop device, since it's
been done for us.

Hash pad calculation has been removed. This is now set manually inside
the partition config file.

Hybrid MBR creation is gone, since it's now possible to do that in a board
specific hook (see overlay-beaglebone/scripts/board_specific_setup.sh).

OEM partition now has a filesystem, which is mounted at /usr/share/oem
during emerge so that packages can stash files here.

root_fs_dir and friends are still globals, but the long-term idea
is to make this not the case.

BUG=chromium-os:33817
TEST=All types of images and their respective flows
  (VM, recovery, test, factory etc)

Change-Id: I8a596728a4d1845c930e837bea627f5b6a11c098
Reviewed-on: https://gerrit.chromium.org/gerrit/29931
Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
2012-09-23 10:05:12 -07:00