23028 Commits

Author SHA1 Message Date
Michael Marineau
a63b07ea76 Merge pull request #147 from marineam/disk_util
New approach to disk/partition handling, disk_util
2014-01-05 20:37:38 -08:00
Michael Marineau
0fba2d0a96 Merge pull request #294 from marineam/switch-usr
fix(make.conf): Don't share binary packages between boards.
2014-01-05 18:56:55 -08:00
Michael Marineau
8418179ff4 fix(build_library): Add amd64-usr board and disk layouts.
The basic infrastructure to support this is now in place. Add a new
board that uses the experimental coreos/amd64/usr profile /usr based
disk layouts. This is just enough to successfully build images, they
aren't bootable yet.
2014-01-05 18:39:47 -08:00
Michael Marineau
e84f922ba5 fix(build_library): remove references to chromeos-common.sh
Nothing from chromeos-common.sh is needed for image building now. Also
kill off build_common.sh which was just a weird way of sourcing
common.sh. The two piddly functions it provided fit better in
build_image_util.sh
2014-01-05 18:39:47 -08:00
Michael Marineau
96da63e87e fix(create_legacy_bootloader_templates.sh): Support -usr layouts
The boot kernel parameters change depending on whether the new /usr
scheme is in use. Pass the disk layout to the bootloader config script
and adjust generated configs accordingly.
2014-01-05 18:39:47 -08:00
Michael Marineau
19ecd4572f fix(disk_util): Sort mount order instead of special casing /
Now that /usr is a mount point we need to make sure it gets mounted
before /usr/share/oem. Simply sorting by path length works well enough.
2014-01-05 18:39:47 -08:00
Michael Marineau
bfe47817e4 fix(build_image): Add support for COREOS_DISK_LAYOUT_SUFFIX
Append COREOS_DISK_LAYOUT_SUFFIX from the portage profile to disk layout
names. Allows switching from "base" to "base-usr" and similar.
2014-01-05 18:39:47 -08:00
Michael Marineau
8ea698435d fix(make.conf): Don't share binary packages between boards.
Although it'd be nice to re-use packages for experimental boards that
may only have a few differences from amd64-generic there is a bug in
some ebuilds and portage that break sharing binary packages between
different values of $ROOT. This prevents that from happening by
accident.

https://bugs.gentoo.org/show_bug.cgi?id=490014
2014-01-05 16:43:45 -08:00
Michael Marineau
6d719f9d03 Merge pull request #293 from marineam/switch-usr
feat(profiles): Add coreos/amd64/usr profile.
2014-01-05 15:44:50 -08:00
Michael Marineau
c1e8a96cda feat(profiles): Add coreos/amd64/usr profile.
This profile enables the symlink-usr USE flag and target profiles have a
new variable COREOS_DISK_LAYOUT_SUFFIX that allows the profile to switch
to a different set of disk layouts. By default no suffix is used but the
usr profile uses layouts with the suffix "-usr" such as "base-usr".
2014-01-05 14:14:31 -08:00
Michael Marineau
ba532952b1 fix(disk_util): Fix layout inheritance in config verification. 2014-01-05 13:55:52 -08:00
Michael Marineau
3546256597 fix(vm_image_util): Unmount STATE before making squashfs 2014-01-04 21:39:31 -08:00
Michael Marineau
15eead682b cleanup(build_library): Remove old disk_layout_util.sh
All of this code can go away now.
2014-01-04 21:17:06 -08:00
Michael Marineau
bfcbb3f57f fix(image_to_vm): Move to disk_util, modify images in-place.
Avoid unpacking/repacking partitions by using disk_util's resize and
mount commands. Also simplify assorted bits along the way.
2014-01-04 21:00:45 -08:00
Michael Marineau
e066f91ca3 feat(disk_util): Add tune command, controlling fs read-only hack.
Now disk_util is aware of the weird ext2 read-only hack, both by
providing a command to manipulate it and support in the mount command to
automatically set the 'ro' mount option for filesystems with it.

Making mount aware of the hack makes it much easier to mount prod
images with a mix read-only and read-write filesystems.
2014-01-04 21:00:45 -08:00
Michael Marineau
89b61ac7b0 fix(disk_util): Rework how code handles existing images.
Read partition size and offset into the normal partition config with the
prefix 'image_' for each key.
2014-01-04 21:00:45 -08:00
Michael Marineau
1ee1840a89 fix(disk_util): Fix mount --read_only option. 2014-01-04 16:55:03 -08:00
Michael Marineau
c992d45dd3 feat(disk_util): Add resize command.
Based on the new gpt update code add the ability to resize filesystems
in existing images. Usually just the last (STATE) partition is resized.
2014-01-03 18:14:12 -08:00
Michael Marineau
ebc83599b3 fix(disk_util): Move loop device setup code to generic function 2014-01-03 17:59:15 -08:00
Michael Marineau
805cc65ffd fix(disk_util): Add option to safely rewrite partition table.
write_gpt --update <img> will read an existing image and make sure all
existing partitions will not get moved or truncated in the new layout.
This is mostly useful for resizing the final partition or just rewriting
metadata like partition types and labels.
2014-01-03 16:40:54 -08:00
Michael Marineau
5afd720956 fix(disk_util): Move existing image reading code to new function.
This will allow the code to be shared, making it possible to safely
resize existing images with disk_util.
2014-01-03 16:40:21 -08:00
Brandon Philips
d7b07174ba Merge pull request #292 from philips/docker-0.7.3
feat(app-emulation/docker): add docker-0.7.3
2014-01-03 16:35:59 -08:00
Brandon Philips
320b00ffa0 feat(app-emulation/docker): add docker-0.7.3 2014-01-03 16:30:27 -08:00
Michael Marineau
af94b1d6e0 Merge pull request #291 from marineam/firmware
Moar Firmware!
2014-01-03 13:35:08 -08:00
Michael Marineau
cf45f525df add(sys-kernel/coreos-firmware): Add firmware package.
This provides firmware from linux-firmware but excludes everything not
explicitly required by coreos-kernel. Note that firmware installed by
this will only be available on the root filesystem, the initrd still
uses the smaller set of firmware the linux repo provides.

The current 3.12 kernel wants a few files missing in the July snapshot:

 * Missing firmware: ct2fw-3.2.1.1.bin (bna.ko)
 * Missing firmware: ctfw-3.2.1.1.bin (bna.ko)
 * Missing firmware: cxgb4/t5fw.bin (cxgb4.ko)

These files have been added to the linux-firmware repo so a newer
snapshot will be required but for now I'm sticking with what is already
in Gentoo so I don't have to generate my own tarball or whatever.
2014-01-03 12:54:54 -08:00
Michael Marineau
6e4bc8d9c1 fix(sys-kernel/coreos-kernel): Don't install firmware to root filesystem
In preparation for moving to using firmware provided by the
linux-firmware repository instead of linux the kernel ebuild needs to
stop installing the files to avoid conflicts. Also to better ensure that
the firmware package gets rebuilt every time the kernel does bump to
EAPI=5 and set the subslot to the ebuild version/revision. The firmware
package can then depend on the kernel w/ a special slot operator to make
sure it gets rebuilt when the kernel version changes. The firmware
package can then scan the installed modules and only install the
firmware that is required.

(Portage automatic rebuild behavior often makes this sort of rebuild
happen anyway but using subslots makes it a strict requirement.)
2014-01-03 12:40:42 -08:00
Michael Marineau
d3bfcc7823 fix(cros-workon.eclass): Fix support for EAPI=5 subslots
The subslot should not be used as part of package name directories.
This fixes the kernel builds now that cros-kernel2 uses subslots.
2014-01-03 12:40:42 -08:00
Michael Marineau
340ce65bc8 fix(sys-kernel/coreos-kernel): Drop old no-modules kernel. 2014-01-03 12:36:01 -08:00
Michael Marineau
0774cd0837 Merge pull request #289 from marineam/fix-ssh
bump(coreos-base/coreos-init): Fix bogus ssh_config
2014-01-03 11:53:52 -08:00
Brandon Philips
a418dcd569 Merge pull request #290 from gregkh/kernel_update
bump(sys-kernel/coreos-kernel): bump to 3.12.6
2014-01-03 10:46:31 -08:00
Greg Kroah-Hartman
b7bd408b7e bump(sys-kernel/coreos-kernel): bump to 3.12.6 2014-01-02 21:23:53 -08:00
Michael Marineau
06dbb9476d bump(coreos-base/coreos-init): Set EDITOR=/usr/bin/vim 2014-01-02 17:17:24 -08:00
Michael Marineau
b1aa0c9e52 bump(coreos-base/coreos-init): Fix bogus ssh_config
Bump to include https://github.com/coreos/init/pull/32
Fixes https://github.com/coreos/coreos-vagrant/issues/33
2014-01-02 16:44:25 -08:00
Michael Marineau
fb6393d667 Merge pull request #287 from marineam/symlink-usr
A few /usr related fixes
2014-01-02 16:42:04 -08:00
Brandon Philips
e8ec4c9fb0 Merge pull request #288 from gregkh/kernel_update
bump(sys-kernel/coreos-kernel): add some SATA driver support.
2014-01-02 12:26:20 -08:00
Greg Kroah-Hartman
79b603dfc6 bump(sys-kernel/coreos-kernel): add some SATA driver support.
Should resolve #279
2013-12-30 21:09:55 -08:00
Michael Marineau
d85b14db00 add(sys-libs/nss-usrfiles): nss module for files under /usr/share/nss 2013-12-30 16:43:34 -08:00
Michael Marineau
8e0d630699 fix(image_to_vm): Remove support for alternate state fs image.
We haven't really needed this, remove the option to simplify things.
2013-12-30 16:32:37 -08:00
Michael Marineau
213472652c add(prod_image_util): Rename what remains of cros_make_image_bootable
cros_make_image_bootable now only is relevant for prod images, so move
the remaining code to prod_image_util in a similar scheme that base and
dev images use.
2013-12-30 16:12:44 -08:00
Michael Marineau
306a2f6cbc fix(cros_make_image_bootable): Switch to disk_util mount/umount 2013-12-30 16:12:44 -08:00
Michael Marineau
e2c2271579 fix(create_legacy_bootloader_templates): Setup ESP partition.
Replace "update_bootloaders" script.
2013-12-30 16:12:43 -08:00
Michael Marineau
359505490d fix(disk_util): Install syslinux as part of filesystem formatting.
This means scripts later don't need to deal with the ESP block device
directly, they can just copy the config files into place.
2013-12-30 16:12:43 -08:00
Michael Marineau
d1fee3653e fix(cros_make_image_bootable): Remove dead command line flags.
Lots of things are either unused or meaningless. A particularly creative
one is the fact that there are command line flags for mount point
locations that are then overwritten.
2013-12-30 16:12:43 -08:00
Michael Marineau
52e1dba3ec fix(build_image): Migrate to new disk_util commands 2013-12-30 16:12:43 -08:00
Michael Marineau
9bc36ee344 fix(base_image_util): Remove dead code, leave rootfs writable.
The verification flag was being passed through to the bootloader
template script but no longer had any effect.
Force the base image to always remain writable, its only purpose is to
be modified in a later build step anyway.
2013-12-30 16:12:41 -08:00
Michael Marineau
8ca62121d9 feat(disk_util): Add mount and unmount commands.
This will replace the assorted mix of mount/umount scripts.
2013-12-30 16:12:04 -08:00
Michael Marineau
ba45152b4b feat(disk_util): Add 'format' command to create filesystems in an image.
This will replace the less flexible code in base_image_util.sh
2013-12-30 16:12:04 -08:00
Michael Marineau
ab23353448 fix(disk_util): Rework config parsing.
Merge GetPartitionTable and partition alignment from WritePartitionTable
into LoadPartitionConfig so that all this config manipulation code is in
one place and inheritance from the 'base' layout is more predictable.
2013-12-30 16:12:04 -08:00
Michael Marineau
0f4b52134a fix(disk_util): Convert partition list to an object.
Hey, 'num' is a primary key! Lets use it and avoid pointless looping.
2013-12-30 16:12:04 -08:00
Michael Marineau
576c8996f4 fix(disk_util): Remove support for --adjust_part
This isn't a feature we've been using as far as I know and if someone
needs a custom partition layout it's probably better to just add it to
the json file. Removing this avoids some complexity.
2013-12-30 16:12:02 -08:00