Commit Graph

5075 Commits

Author SHA1 Message Date
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
Michael Marineau
a53ff2a03b amis: run build script as normal user
This reduces the awkwardness of passing credentials to the build job.

Replace run.sh with assorted example scripts for prod, master, etc.
2014-07-28 13:14:36 -07:00
Michael Marineau
f6801e6b21 amis: split build/copy and publishing publicly into different steps
For a long time these scripts have always set images as public
regardless of whether the image was a working production image or not.
This may lead users to boot random development images if they happen to
pop up to the top of Amazon's terrible AMI search page.
2014-07-28 13:14:36 -07:00
Michael Marineau
ee1840fe04 Merge pull request #309 from marineam/cloudstack
feat(vm_image_util): CloudStack support
2014-07-24 17:50:09 -07:00
Petr Hosek
95e5912b14 feat(vm_image_util): CloudStack support
Provide initial support for CloudStack.
2014-07-24 17:47:57 -07:00
Michael Marineau
9b18163577 Merge pull request #308 from marineam/hack
onmetal: Replace boot_kernel's args
2014-07-24 12:01:35 -07:00
Michael Marineau
3ee48fac14 onmetal: Replace boot_kernel's args
The console should be on ttyS4 and just in case blacklist mei.
2014-07-24 11:57:57 -07:00
Michael Marineau
4c88c69412 Merge pull request #307 from marineam/fix-loop
build_package: fix loop between two loop breaking steps
2014-07-23 15:46:15 -07:00
Michael Marineau
a518dc8df1 build_package: fix loop between two loop breaking steps
If util-linux has a binary package it will be used, but if that binary
package has +udev it will pull in systemd. systemd has a loop that needs
to be broken too so if the util-linux loop breaker doesn't also handle
the systemd one it all falls apart.

In short the comment above the loop breaker code noting that we can try
this until it gets wonky. Well, it is wonky and we need to re-do how
build_packages works as a result. This is just a temporary workaround
until we figure out a larger restructuring.
2014-07-22 14:49:52 -07:00
Michael Marineau
aac815e449 Merge pull request #306 from marineam/fail
setup_board: fix fetching binary toolchain packages
2014-07-22 14:20:54 -07:00
Michael Marineau
e19de29cda setup_board: fix fetching binary toolchain packages
Fix 98684560 which in turn tried to fix 0d29e735. This time the option
to download binary packages was lost so building from scratch worked but
not the normal usage of using binary packages. *sigh*
2014-07-22 14:11:18 -07:00
Michael Marineau
4ca4b65dba Merge pull request #303 from marineam/fixes
Toolchain build fixes
2014-07-22 12:44:41 -07:00
Alex Crawford
abf24663a2 Merge pull request #305 from crawford/fillings
Pull teeth. Replace with onmetal.
2014-07-21 20:44:36 -05:00
Alex Crawford
712c1a3d9b Pull teeth. Replace with onmetal. 2014-07-21 18:40:36 -07:00
Michael Marineau
4b359375d7 Merge pull request #304 from marineam/hostname
qemu: set DHCP hostname based on image name and version
2014-07-21 18:32:08 -07:00
Michael Marineau
2a004f0081 qemu: set DHCP hostname based on image name and version
Provides an easy way to test this setting hostname from DHCP, most other
systems rely on it.
2014-07-21 16:43:48 -07:00
Michael Marineau
986845608a setup_board: fix compiling toolchains from scratch
Commit 0d29e735 broke this by not properly initializing the toolchain
ebuild flags when binary packages were disabled.
2014-07-20 21:32:53 -07:00
Michael Marineau
859cea0306 build_library: fix compatibility with latest crossdev version 2014-07-20 21:32:53 -07:00