Commit Graph

647 Commits

Author SHA1 Message Date
Nick Owens
a03cef558e build_library: copy grub.efi in pxe/cpio generation 2016-04-27 15:54:59 -07:00
Nick Owens
e0524264b9 build_library: generate pflash files for qemu_uefi from edk2-armvirt 2016-04-21 10:45:15 -07:00
Nick Owens
4ec33c5495 Merge pull request #519 from mischief/lib-path
build_library: use lib for tmpfiles rather than lib64
2016-04-14 15:47:44 -07:00
Nick Owens
12a9d94922 build_library: enable extra modules for arm64-efi 2016-04-14 14:46:01 -07:00
Nick Owens
704a480379 build_library: use lib for tmpfiles rather than lib64
in arm64-usr, lib is not yet a symlink to arm64, so trying to access
tmpfiles.d in lib64 will not work.
2016-04-14 13:26:02 -07:00
Matthew Garrett
0bd89d3381 Move PAM configuration to /usr at build time
A bunch of packages install PAM configuration fragments in /etc. Rather than
modify them all to install into /usr/lib, just move the entire directory at
image build time.
2016-04-11 11:34:57 -07:00
Matthew Garrett
56aa7e5a17 Add support for generating PCR configuration at image build time
We need to ship some PCR measurements alongside images in order to make it
easier for admins to provide an appropriate policy. Add some tooling to
generate the appropriate hashes during build, pack those into a zip file
and upload it.
2016-04-04 14:47:06 -07:00
Alex Crawford
c75583f2b8 Merge pull request #512 from crawford/name
set_lsb_release: a new name
2016-03-26 20:45:51 -07:00
Alex Crawford
d4103b08a6 set_lsb_release: a new name 2016-03-25 19:39:05 -07:00
Michael Marineau
9c529bb6fc check_root: add test for missing interpreters 2016-03-16 11:43:20 -07:00
Yann Hodique
2828c365da ovf: define variables accepted by coreos-cloudinit
OVF environment variables for VMware deployments, including cloud config
and network configuration
2016-03-05 15:15:45 -08:00
Michael Marineau
10fa4b5a0c prod_image_util: move profile.env to /usr
profile is already set up to source /usr/share/baselayout/profile.env
but it never has because I forgot to add this line during the migration
to amd64-usr images. Sure took us a while to notice that one... :(
2016-02-29 18:54:12 -08:00
Michael Marineau
66ea5974ce image_to_vm: add --getbinpkg option
Now image_to_vm can be used without first running build_packages.
2016-02-23 13:06:49 -08:00
Michael Marineau
744faa2df4 vm_image_util: oems are always from ebuild, others always from binary
This resolves two issues:
 - Large dependencies are *never* built during image_to_vm,
   build_packages must now handle that.
 - Since build_packages can't resonably do the oem-* packages (they all
   conflict with eachother) we do want to build them from the ebuild.
   This is now enforced so a old binpkg is never used. This resolves
   confusing issues people have always had while when editing oem
   ebuilds but getting a stale build instead.
2016-02-23 12:50:52 -08:00
Michael Marineau
65864a3a2d build_library: add a little script for checking oem packages 2016-02-23 12:23:40 -08:00
Michael Marineau
743d4bce37 build_image: Add support for --getbinpkg
Allows build_image to be used without first running build_packages.

Note: setup_board --force is required before build_packages will work
properly after doing this since baselayout won't be installed otherwise.
2016-02-20 14:26:50 -08:00
Michael Marineau
bc5de30442 board_options: new portageq wrappers
- May be sourced early, so explicitly die if source fails.
 - Add a function for getting the latest version of a package.
 - Read PROVIDES metadata using portageq, enabling data to be read from
   binary packages in addition to installed packages. The performance
   issue is not an issue here and needed to support empty build roots.
2016-02-20 14:17:45 -08:00
Michael Marineau
707c6c6f12 vm_image_util: add a small openstack image for wedging into tiny places
Most vm images have an expanded root partiton to make them practical to
use as-is. Some deployments may not want such a large root, putting most
storage on other volumes.
2016-02-16 11:22:59 -08:00
Michael Marineau
06d5ac79b1 set_lsb_release: a little cleanup, a new name
❤️
2016-02-15 14:17:37 -08:00
Michael Marineau
5ba4c7181d *: drop usage of COREOS_VERSION_STRING
This variable was semi-deprecated ages ago so `version.txt` could follow
a similar variable naming pattern to `os-release`. Finally drop usage of
it here in favor of `$COREOS_VERSION`.
2016-02-15 13:55:55 -08:00
Michael Marineau
9332cb697e release_util: use BOTO_PATH instead of searching for .boto
This simplifies the code a little and allows BOTO_PATH or BOTO_CONFIG to
be set in the environment. Now configs may be in arbitrary locations.
2016-01-28 13:10:01 -08:00
Matthew Garrett
5fa4196501 Verify netboot config fragments if there's an available gpg key
If there's a gpg public key available in a system firmware variable, trust
it and use it to verify netboot configuration fragments.
2016-01-11 11:54:04 -08:00
Matthew Garrett
b6792a5609 Fix platform testing for suffix configuration
Grub doesn't seem happy with && tests in if statements, so replace it with
a two stage check.
2016-01-08 14:45:50 -08:00
Matthew Garrett
1f7c749b2d Add UEFI netboot support
If grub's been netbooted, pull the uuid and serial number out of smbios and
hit the API server to get the appropriate configuration.
2016-01-08 14:45:45 -08:00
Vito Caputo
0b9c8e5855 grub: disable console blanking
The console often contains very useful information in the event of a
hard crash, in such situations there's no ability to unblank the console
via keypress because the kernel won't handle the interrupt.

Since CoreOS is a server/cluster operating system, there won't generally
be monitors connected benefitting from a blanked console.  Disabling the
blanking altogether allows the frame buffer contents to always be
visible, even when the kernel can't handle keypresses.
2015-11-11 15:22:12 -08:00
Michael Marineau
b0c14f99b1 kernel_menuconfig: new script to simplify kernel config changes 2015-11-10 18:06:49 -08:00
Vito Caputo
f67fa9ce6c grub: supply disk guid to randomize in coreos.randomize_disk_guid 2015-11-06 14:58:00 -08:00
Vito Caputo
68f1b407c6 grub: add and set coreos.randomize_disk_guid kernel param
coreos.first_boot=1 will no longer trigger disk-guid randomization, so
manual ignition triggers in diskless/pxe scenarios may succeed.  Instead
we explicitly request the randomization when first_boot=1 was added by
grub finding the 00000000-0000-0000-0000-000000000001 disk-guid.
2015-11-05 21:04:31 -08:00
Alex Crawford
f7bcd4f547 grub: add oem_id variable to kernel parameters 2015-10-21 16:47:58 -07:00
Michael Marineau
01ae17dcc9 grub: move standard kernel options to grub
In order to boot properly we need `rootflags=rw mount.usrflags=ro` on
the command line. These have been build into the kernel directly but for
arm64 builds the built in options seem to be ignored.
2015-09-21 15:31:41 -07:00
Andrej Rosano
8ba400eca7 Add arm64 qemu image support
Allows image_to_vm.sh to build also arm64 qemu images.

Signed-off-by: Andrej Rosano <andrej@inversepath.com>
2015-09-17 14:16:18 +02:00
Andrej Rosano
16feac5ef6 Add arm64 grub installation support
Add the necessary variables in grub.cfg and populate the EFI
partition with arm64 efi executable and modules.

Signed-off-by: Andrej Rosano <andrej@inversepath.com>
2015-09-16 15:13:08 +02:00
Alex Crawford
32277dd006 build_library: fix comment 2015-09-08 16:15:50 -07:00
Michael Marineau
0ef030051c catalyst: re-enable ccache
Now that ccache is turned on by default in the profile portage complains
a lot if ccache isn't actually installed, sleeping 5 seconds for each
error message. Since pkgcache is in use ccache isn't going to make that
much of a difference but getting rid of those 5 second sleeps will. :)
2015-09-06 21:26:15 +00:00
Dong Xie
c04e2cb227 init commit of interoute oem build 2015-09-05 00:32:50 +01:00
Alex Crawford
9fb9442576 grub: add coreos.first_boot kernel param 2015-09-01 14:35:43 -07:00
Alex Crawford
b475cb2ea3 grub: run Ignition on first boot 2015-08-31 23:02:25 -07:00
Matthew Garrett
673f166013 Ensure that selinux policy is installed in correct location
Failing to explicitly set the selinux policy store to operate on may
result in semodule installing the policy in an incorrect location. Pass
it on the command line in order to avoid this.
2015-08-24 16:27:18 -07:00
Geoff Levand
3f3b2f2e8c build_image: Run ldconfig in qemu
ldconfig does not work for non-native arches.  Create a new
build_image routine run_ldconfig that uses qemu user emulation
to run the board ldconfig on the board rootfs when the board and
SDK arches are different.

See: http://code.google.com/p/chromium/issues/detail?id=378377

Prior to calling run_ldconfig the board rootfs must have ldconfig
installed.  To arrange this move the call of run_ldconfig to after
the base package install.

Fixes build_image errors like these when building for arm64:

  /sbin/ldconfig: /lib64/libXXX is for unknown machine 183.

Signed-off-by: Geoff Levand <geoff@infradead.org>
2015-08-05 14:47:58 -07:00
Michael Marineau
cf26510ea7 check_root: update ignore list for arm64, make error non-fatal 2015-07-29 19:22:55 -07:00
Michael Marineau
0fbb1891e0 Merge pull request #435 from marineam/check
Improved/faster package checks
2015-07-22 20:46:50 -07:00
Michael Marineau
806d9ca313 grub_install: stash an exact copy of the MBR boot code.
Useful for repairing the MBR without needing GRUB's tools.
2015-07-16 18:06:35 -07:00
Michael Marineau
d27bc5aeb3 Revert "build_library: set osType to otherlinux-64"
This reverts commit 39bb800f16.

This change disabled a number of features so it isn't suitable for the
generic VMware templates. We need to re-trace our steps to list exactly
what tools/systems weren't accepting the linux26 type.
2015-07-16 12:34:33 -07:00
Alex Crawford
0b0aa88be3 Merge pull request #427 from crawford/disk_util
disk_util: use the dummy disk UUID
2015-07-15 00:03:12 -07:00
Michael Marineau
5985b1e3d6 build_library: replace package checking script
The new python script check_root uses data that portage already
maintains on what shared libraries packages need or provide instead of
re-scanning whatever ELF files that can be found. This is much more
comprehensive but there is a bit of a transition issue for folks with
long-lived SDKs: packages built with portage older than 2.2.18 do not
include this data. As such for now the check is non-fatal and provides a
command you can use to refresh locally installed packages.

The code checking for conflicts between top level directories and /usr
has also been rewritten. Both tests now are considerably faster.
2015-07-12 15:50:58 -07:00
Alex Crawford
93e5faebd1 Merge pull request #423 from stresler/patch-1
Adding packet to the list of img and oem types.
2015-07-10 08:39:45 -07:00
Michael Marineau
fcd55e0171 generate_au_zip: improve error reporting of missing files 2015-07-02 13:51:39 -07:00
Michael Marineau
9db6ac5ef7 build_image: make building selinux policy optional 2015-07-01 23:11:09 -07:00
George Tankersley
283452e883 verity: add verity plumbing and hash injection to build scripts 2015-07-01 17:34:11 -07:00
George Tankersley
aa879ddcce grub_install: add support for verity and non-verity grub.cfg 2015-07-01 17:32:37 -07:00