Commit Graph

4592 Commits

Author SHA1 Message Date
Michael Marineau
77f164f1a0 Merge pull request #329 from marineam/grub
Switch to GRUB for both BIOS and UEFI booting
2014-09-07 10:00:46 -07:00
Michael Marineau
1a8b197659 qemu: adjust the meaning of the -s (simple) flag
My primary use case for this flag is to fix booting with UEFI firmware
which can have problems when mixed with KVM, adding kexec into the mix
doesn't help matters either. The current version of OVMF can boot from
virtio drives just fine so that is now enabled and KVM is disabled.

So the -s option can also mean sloooooooow but boots!
2014-09-07 09:58:51 -07:00
Michael Marineau
5bfa0c8d20 build: switch from SYSLINUX to GRUB2
The new grub install script must be called after the image is unmounted
and the old bootloaders script doesn't need to touch grub at all. For
now we will continue to use the existing syslinux configs but
interpreted by grub. Beyond the grub menu flashing by during boot
everything should still be functionally equivalent.
2014-09-07 09:58:51 -07:00
Michael Marineau
12a9900e02 grub_install: new install script for grub, add UEFI bootloader
This script replaces the standard grub-install tool to give us some more
control over what is going and ensure grub-install's auto-detection
magic doesn't make any incorrect choices. Also this script sets up a
loopback device and mounts the EFI partition in just the right way for
grub-bios-setup's auto-detection magic to work correctly.

I've chosen not to adapt disk_util to use partitioned loop devices to
make grub happy because ensuring loop devices get cleaned up properly
for the general case gets tricky and less robust.
2014-09-07 09:57:39 -07:00
retrack
ddccb5072b exoscale builder 2014-09-05 09:56:48 +02:00
Michael Marineau
f88778adee Merge pull request #327 from brianredbeard/check-etag-fix
fix: create empty file if it does not exist
2014-09-04 15:28:07 -07:00
Michael Marineau
aaf715e77b Merge pull request #328 from marineam/pkgs
build_image_util: fix generation of packages.txt
2014-09-04 15:13:44 -07:00
Michael Marineau
9580ea4086 build_image_util: fix generation of packages.txt
The passing ROOT= as an environment variable to board wrapper scripts
doesn't work, the script unconditionally overrides it. This means so far
our packages.txt files have listed the contents of /build/amd64-usr
instead of the image. Fix this by calling equery directly instead.
2014-09-04 15:12:20 -07:00
Brian 'Redbeard' Harrington
29140526c9 fix: create empty file if it does not exist
previously check_etag.sh would not create a blank file if it did
not exist.  The result was that the first time check_etag.sh was
run it would always exit non-zero.
2014-09-04 14:04:25 -07:00
Michael Marineau
3e4c29957c Merge pull request #326 from marineam/kernel
sdk: assert host system is running Linux 3.7 or later
2014-09-02 16:03:59 -07:00
Michael Marineau
6df3bbbe2e sdk: assert host system is running Linux 3.7 or later
Currently building images on older kernels will fail because mkfs.btrfs
enables an incompatible feature 'extref' by default. We never really
made this requirement explicit and the SDK in general has continued to
maintain compatibility with older kernels. Make the requirement explicit
so users will get errors quicker and there is a clear line for what
kernel features can be used in the SDK.
2014-09-02 15:55:52 -07:00
Alex Crawford
b2b70c8624 Merge pull request #325 from crawford/digitalocean
digitalocean: Add image format for digitalocean
2014-09-02 13:52:30 -07:00
Michael Marineau
3de1613a99 Merge pull request #324 from marineam/grub
Grub2 preview
2014-09-02 10:22:27 -07:00
Michael Marineau
680730cc1a configure_bootloaders: add grub install stub code
Not currently used, this configuration which sets up grub to re-use the
syslinux configuration only works with recent git versions, not any
releases. Compatibility is also limited because the serial configuration
in syslinux must be duplicated in the grub config.
2014-08-30 17:46:38 -07:00
Michael Marineau
0cc06c9c5c build_image_util: pass the disk image through to configure_bootloaders
Required so that configure_bootloaders can now handle installing the
bootloaders as well.
2014-08-30 16:39:05 -07:00
Michael Marineau
25b20b420c disk_util: support exposing a hybrid partition without syslinux
We don't need to do anything like manually install the MBR boot code
for grub but we do need to continue to expose the ESP partition as a
hybrid partition to support pvgrub.
2014-08-30 16:26:26 -07:00
Michael Marineau
fd8618336d disk_util: do not zero MBR and GPT when resizing disk
Calling cgpt create when resizing zeros the MBR boot code. This worked
with the syslinux setup because the boot code was re-written. When not
using syslinux it is easier to just preserve the existing MBR instead.
2014-08-30 16:00:07 -07:00
Michael Marineau
cb97931478 disk_layout: replace unused "BOOT-B" with Grub's BIOS Boot Partition
Unlike SYSLINUX, GRUB2 does not recommend embedding itself in a FAT
filesystem. Instead GRUB2 prefers embedding in the space between the MBR
and first partition or using a dedicated partition that is safe from
tampering by fs utilities. In our case the space after the MBR is where
the GPT lives so we need to use the extra partition scheme instead.

The 64MB "BOOT-B" partition has never been used so we can replace it
with a 2MB partition which is more than enough for GRUB.
2014-08-29 14:05:22 -07:00
Michael Marineau
4228c591a8 disk_layout: mount ESP to /boot instead of /boot/efi
We have long since stopped installing anything to the /boot directory of
the root filesystem. Mount the ESP partition to /boot for consistancy
with the discoverable partition spec.
2014-08-29 13:57:42 -07:00
Michael Marineau
30372ccf9a Merge pull request #323 from marineam/gcc
Make ldconfig not matter so much
2014-08-27 23:01:51 -07:00
Michael Marineau
70051bf6ef prod_image_util: install GCC libraries to /usr/lib
Normally GCC is installed in a way that allows installing multiple
versions and switching between them. Our production images do not need
this and additionally the only things from the GCC package that are
needed are the shared libraries. To ensure these libraries are *always*
locatable regardless of the presence of /etc/ld.so.conf and
/etc/ld.so.cache we can install those libraries to plain old /usr/lib.
The GCC packages don't have a built in way to do this but we can get
away with extracting the libraries directly from the binary package.

This is actually similar to what ChromeOS did with a few exceptions:
 - We use a native GCC build instead of the cross toolchain
 - The archive is properly extracted from the package instead of feeding
   the package directly to tar and ignoring the resulting warnings.

As an added benefit switching from a blacklist to a whitelist ensures
that extra cruft does not slip through the cracks, saving 5-10MB.
2014-08-27 20:23:39 -07:00
Michael Marineau
8a3a5e1c51 build_image_util: do not symlink etc/portage/profile
Create profile as a real directory instead of a symlink to the board
root's configuration. Normally the board root does not modify this but
it is useful for build_image to use it to modify package.provided.
2014-08-27 19:55:27 -07:00
Michael Marineau
a1d3a95381 Merge pull request #322 from marineam/gcc
GCC update fixes
2014-08-26 18:45:02 -07:00
Michael Marineau
5377e7870d prod_image_util: update /etc/ld.so.conf on every boot
Early images created this as a file instead of a symlink, these systems
will not be able to find the new GCC libraries using the older config.
2014-08-26 18:28:07 -07:00
Alex Crawford
f835e1e0fd digitalocean: Add image format for digitalocean 2014-08-26 17:30:00 -07:00
Michael Marineau
1de8eb3b11 toolchain: always switch to latest GCC version
Normally Gentoo expects moving between major GCC releases to be a manual
step. In our case we want this to always be automatic, otherwise the GCC
version won't be switched at all.
2014-08-26 16:31:46 -07:00
Michael Marineau
d97f6e7332 Merge pull request #318 from marineam/gce
vm_image_util: use only ttyS0 for the console on GCE instances
2014-08-24 16:55:58 -07:00
Michael Marineau
af910f94c6 Merge pull request #321 from marineam/updatectl
rename references to updatectl, it is now updateservicectl
2014-08-20 16:46:02 -07:00
Michael Marineau
f6bc2908d4 rename references to updatectl, it is now updateservicectl 2014-08-20 16:27:44 -07:00
Michael Marineau
ab6f42f494 Merge pull request #320 from marineam/packages
image_set_group: copy contents and packages text files
2014-08-20 14:51:16 -07:00
Michael Marineau
ae06bafacb image_set_group: copy contents and packages text files 2014-08-20 14:39:44 -07:00
Michael Marineau
f7e4c2a109 Merge pull request #319 from marineam/git
chroot: remove git from $PS1
2014-08-18 16:45:05 -07:00
Michael Marineau
2991ad8cd8 chroot: remove git from $PS1
This feature is disabled for now. See c8a62a12 for details.
2014-08-18 16:40:34 -07:00
Michael Marineau
5c590f2a6d vm_image_util: use only ttyS0 for the console on GCE instances 2014-08-18 16:09:24 -07:00
Michael Marineau
8be325f406 Merge pull request #317 from marineam/sudo
toolchain_util: fix bash syntax when running as root
2014-08-18 14:48:58 -07:00
Michael Marineau
b3ecb2c550 toolchain_util: fix bash syntax when running as root
Apparently expanding an empty string before a variable assignment forces
that assignment to be interpreted as a command instead. Instead of an
empty string use env as our sudo alternative when running as root.
2014-08-18 14:41:53 -07:00
Michael Marineau
9f79898507 Merge pull request #315 from marineam/gdb
Setup GDB in the SDK
2014-08-18 13:00:39 -07:00
Michael Marineau
38e9489e1e Merge pull request #316 from marineam/git
make_chroot: don't enable git-prompt via bashcomp
2014-08-18 12:00:36 -07:00
Michael Marineau
c8a62a12ee make_chroot: don't enable git-prompt via bashcomp
Newer git ebuilds have decided that the "git-prompt" script isn't really
bash completion so stopped installing it via that mechanism. Instead it
installed it started installing it in /usr/share/docs which gets
compressed by default and the path is based on ebuild version. The path
changed again in 1.9.3 to /usr/share/git and didn't compress it so that
makes it actually possibly usable but 1.9.3 or later isn't stable yet.

We can re-enable it the next time git gets updated but not worth fussing
over the current brokenness right now.
2014-08-16 13:36:57 -07:00
Michael Marineau
03e8d451bf setup_board: setup gdb wrapper and debug symbol path 2014-08-15 16:36:35 -07:00
Michael Marineau
319879609e toolchain_util: build stable cross gdb, misc cleanups 2014-08-15 16:17:04 -07:00
Alex Crawford
47982596b5 Merge pull request #314 from crawford/timeout
onmetal: Up the TOTALTIMEOUT setting
2014-08-06 19:26:49 -07:00
Alex Crawford
5d13999fbb onmetal: Up the TOTALTIMEOUT setting
Bump TOTALTIMEOUT to 5 minutes
2014-08-06 19:22:15 -07:00
Alex Crawford
891c47819b Merge pull request #313 from crawford/timeout
onmetal: Up the TIMEOUT and TOTALTIMEOUT settings
2014-08-06 18:56:27 -07:00
Alex Crawford
3740cc0504 onmetal: Up the TIMEOUT and TOTALTIMEOUT settings
Bump TIMEOUT to 15 seconds and TOTALTIMEOUT to 2 minutes
2014-08-06 18:45:05 -07:00
Michael Marineau
a3a94689f3 Merge pull request #312 from marineam/fix
amis: update publish script for new block device mapping
2014-08-01 15:38:52 -07:00
Michael Marineau
d5969d1a23 amis: update publish script for new block device mapping 2014-07-31 16:06:08 -07:00
Michael Marineau
569ad7ff31 Merge pull request #311 from marineam/ami
amis: switch back to sda for root PV volume, add publish wrapper
2014-07-31 13:45:47 -07:00
Michael Marineau
f72d744a7a amis: switch back to sda for root PV volume, add publish wrapper
If additional EBS volumes are mapped to a PV instance using a "sd*" name
they will always be ordered by the hypervisor before "xvd*" devices,
again ignoring the root device definition. This applies to all PV
instance types so we cannot get away with just poo-pooing m1.small.

We will need to call attention to this since it requires users who set
the volume size via APIs to use the name "/dev/sda" again.
2014-07-30 14:06:44 -07:00
Michael Marineau
7c594a1706 Merge pull request #310 from marineam/ami
AMI build updates
2014-07-28 13:27:00 -07:00