Commit Graph

3233 Commits

Author SHA1 Message Date
Michael Marineau
c5c5696c8b fix(make_chroot.sh): Remove duplicate chroot toolchain setup code.
Instead of handling toolchain packages in make_chroot and telling
update_chroot to skip the toolchains just depend on update_chroot to do
it properly. Reduces our code duplication by a tiny but worthwhile bit.
2013-11-25 16:38:32 -08:00
Michael Marineau
f25b84973e Merge pull request #135 from marineam/tarball
SDK tarball library
2013-11-23 23:41:36 -08:00
Michael Marineau
75972cd991 fix(catalyst): Always use the current SDK tarball as seed.
Right now there is some funky logic to either use a previous build as a
seed or the current SDK tarball if it happens to have been downloaded.
This is a bit confusing and doesn't work reliably since it is reasonable
for there to be neither a previous build or the current SDK available if
the SDK chroot was created some time ago. Fix this by using the new SDK
library and always use the latest SDK, downloading it if needed.
2013-11-23 20:32:55 -08:00
Michael Marineau
59ef0901d3 add(sdk_util.sh): Port basic SDK download logic to a shell library.
The current logic for downloading SDK tarballs is in cros_sdk and
written in python which isn't super convenient for re-using in the rest
of our shell scripts. This is a start of rewriting that logic into a
re-usable library but does not yet replace the functionality in cros_sdk.
2013-11-23 20:31:46 -08:00
Michael Marineau
763b27bb7f fix(common.sh): Move DIGESTS handling code to common functions.
This code would be useful to use when downloading SDK tarballs in
addition to uploading them. :)
2013-11-22 19:15:10 -08:00
Michael Marineau
8f44f49060 Merge pull request #134 from oremj/symlink_usr
Symlink /{bin,sbin,lib64} to /usr/.
2013-11-22 19:04:57 -08:00
Jeremiah Orem
0dd9778b6e Avoid overwriting /usr/{bin,sbin,lib64} symlinks. 2013-11-22 21:49:24 -05:00
Michael Marineau
c5c9ea0b9b fix(common.sh): New variables for .cache and .repo/manfests
A number of places refer to these paths and that number is going to
grow. Since the standard pattern is to use environment variables for
commonly used paths it is time to add ones for these:
REPO_CACHE_DIR
REPO_MANIFESTS_DIR
2013-11-22 16:13:49 -08:00
Michael Marineau
bd07dceb60 Merge pull request #133 from marineam/modules
Modules n' Bootloaders
2013-11-19 22:24:02 -08:00
Michael Marineau
1807fa2978 cleanup(update_bootloaders.sh): Remove dead code. 2013-11-19 21:42:28 -08:00
Michael Marineau
8af32ad6c8 fix(pvgrub): Stick root's copy of the configs in /boot/grub
Previously this was in /boot/grub/grub which was probably by mistake.
2013-11-19 21:40:40 -08:00
Michael Marineau
23b1b01f1a fix(syslinux): Apply sudo_clobber fix to syslinux configs.
Already cleaned up the contrived cat/dd combo for the pvgrub configs, do
the same for the syslinux configs.
2013-11-19 18:41:27 -08:00
Michael Marineau
59c90bfb38 fix(pvgrub): Disable support for gptprio root detection/fallback.
This scheme only works robustly with kexec. Until the happy day that
kexec is supported on Xen (or when Xen is dead, long live Xen!) we
shouldn't bother trying. This allows us to use kernel modules again.
2013-11-14 15:04:04 -08:00
Michael Marineau
39e377dff5 Merge pull request #131 from marineam/turtle-chain
Turtle chain: Building native compilers with cross compilers!
2013-11-13 17:19:50 -08:00
Michael Marineau
fa1ba72176 fix(set_lsb_release): Time for a new code name 2013-11-12 18:03:58 -08:00
Michael Marineau
1d8d99241a fix(build_toolchains): Upload packages to a new toolchain directory.
Currently we don't have a good way to upload packages from different
jobs to the same location. The 'Packages' index file is only generated
locally so the second upload would always win.
2013-11-07 16:20:13 -08:00
Michael Marineau
b5e608c551 fix(toolchain_util.sh): Switch from sudo_clobber to sudo tee
sudo_clobber is provided by common.sh which isn't included in the
catalyst environment so call sudo tee (what sudo_clobber does) directly
instead.
2013-11-07 16:07:17 -08:00
Michael Marineau
84fadc8236 fix(check_deps): Fix support for includes in ld.so.conf
The path passed to _ReadLdSoConf must start with a '/' which wasn't
happening since relpath returns a relative path.
2013-11-07 13:28:13 -08:00
Michael Marineau
078ec6cf0d fix(build_packages): Don't redirect emerge output.
The stats upload has been removed so there is no longer a need to
capture the emerge output to parse the logged output. Remove a bit of
dead chromeos logic too.
2013-11-07 13:28:13 -08:00
Michael Marineau
500fe74856 fix(setup_board): Move to new toolchain_util.sh and eselect
The new toolchain utils define chost, portage profiles, and portage arch
per board. Replace the tricker logic from the old platform/dev repo and
switch to setting the profile with the standard eselect tool.

A few cleanups here and there, replacing echo with info and renames.
2013-11-07 13:28:13 -08:00
Michael Marineau
41099eef6f fix(board_options.sh): Move CHOST->ARCH mapping code.
Use the complete chost to portage arch mapping list from crossdev and
move the logic to toolchain_util.sh where it can be used by other
scripts.
2013-11-07 13:28:13 -08:00
Michael Marineau
b5816f7a8d fix(disk_layout_util.sh): Fix changing build_image's disk layout.
Previously the code in base_image_util.sh properly handled the disk
layout command line flag but the spaghetti code later on calls a
function from disk_layout_util.sh which only returned 'base' resulting
in a bit of a mess if something other than 'base' is used. Sync up the
two code paths to avoid that...
2013-11-07 13:28:13 -08:00
Michael Marineau
d5a19a0700 fix(toolchain_util.sh): Move cross-toolchain install code to common lib.
This will eventually be used by setup_board instead of the even more
complicated toolchain code provided by chromite.
2013-11-07 13:28:13 -08:00
Michael Marineau
e145b916f2 fix(catalyst.sh): Update catalyst build more aggressively.
Use 2*CPUs for the target load average but add load average throttling
to emerge in addition to make. Also work around how catalyst sets
FEATURES so we can disable extra locking for hopefully faster builds.
2013-11-07 13:28:13 -08:00
Michael Marineau
55a4517d65 fix(common.sh): Use $SCRIPT_NAME as the default log prefix.
Seems useful with all the scripts-calling-scripts-turtles but very few
scripts explicitly set a prefix.
2013-11-07 13:28:13 -08:00
Michael Marineau
986548722d fix(toolchain_util.sh): Move native->cross pkg translation to function
Will be useful in other places and seems better to hide the bash magic.
2013-11-07 13:28:13 -08:00
Michael Marineau
0ba3d9ea04 fix(get_board_chost): Accept a list of boards to get_board_* funcs 2013-11-07 13:28:13 -08:00
Michael Marineau
6778eeda83 fix(bootstrap_sdk): Remove toolchain build step, replaced by build_toolchains 2013-11-07 13:28:13 -08:00
Michael Marineau
9fbf30f670 Merge pull request #130 from marineam/fix-tag
fix(tag_release): Fix default SDK version
2013-11-07 13:02:12 -08:00
Michael Marineau
e290235b18 fix(tag_release): Fix default SDK version 2013-11-07 12:56:38 -08:00
Michael Marineau
95bf5bb29d Merge pull request #129 from marineam/python-exec
add(129.0.0_python_exec_transition.sh): gracefully upgrade python-exec
2013-11-07 12:48:54 -08:00
Michael Marineau
65b9977b80 add(129.0.0_python_exec_transition.sh): gracefully upgrade python-exec
We've had trouble with eclean and equery vanishing in our SDKs from time
to time. Although I don't know the root cause it seemed to be some
confusion in the ebuild environment, perhaps a mis-match between the
eclasses, profiles, and ebuilds. Updating all of those seemed to resolve
the issue and to make sure other environments are ok force a re-install
of portage and gentoolkit to clean things up.
2013-11-06 20:14:20 -08:00
Michael Marineau
571ebef01f Merge pull request #127 from marineam/fix-tag
fix(tag_release): Fix cleanup of old branch manifests.
2013-10-24 18:26:33 -07:00
Michael Marineau
ec62584f8a fix(tag_release): Fix cleanup of old branch manifests. 2013-10-24 11:33:19 -07:00
Michael Marineau
acfb1a961c Merge pull request #126 from marineam/turtle-chain
Turtle chain
2013-10-23 13:41:08 -07:00
Michael Marineau
9187adb7ca fix(catalyst_toolchains.sh): Fix error in doc comment 2013-10-23 12:07:39 -07:00
Michael Marineau
169cc17394 fix(build_toolchains): Fix simple logging typo 2013-10-23 12:02:25 -07:00
Michael Marineau
31d5ced3df fix(build_toolchains): Remove hard-coded portage profile 2013-10-23 11:58:19 -07:00
Michael Marineau
8ee5f00137 fix(common.sh): Stop collecting stats and uploading them to Google.
Just... no.. in so many ways. Kinda dumb it took me this long to delete
this little chunk of rather annoying code.
2013-10-23 11:39:08 -07:00
Michael Marineau
c503b0248b add(build_toolchains): New command to build cross and native target toolchains.
This replaces the cross-toolchain compile step in bootstrap_sdk and adds the
ability to build native toolchains using the cross toolchain. This is just
the first step towards actually providing the native toolchain in a container.
2013-10-23 11:07:01 -07:00
Michael Marineau
5d8237b2c6 Merge pull request #125 from marineam/snapshot
fix(copy_ami.sh): Share copied snapshots with Amazon marketplace
2013-10-20 14:14:19 -07:00
Michael Marineau
5b9c5ce3ec fix(copy_ami.sh): Share copied snapshots with Amazon marketplace
Now all the permissions should be correct everywhere!
2013-10-18 18:28:58 -07:00
Michael Marineau
4a06ea4904 Merge pull request #124 from marineam/release-reorg
Release reorg
2013-10-18 17:21:13 -07:00
Michael Marineau
955ad2990b fix(tag_release): Default to bumping the SDK version
This keeps the SDK version by default only one version behind the
current build version.
2013-10-18 16:56:31 -07:00
Michael Marineau
243ab47a87 add(tag_release): Switch to tagging releases off of master. 2013-10-18 16:55:24 -07:00
Michael Marineau
975894ee1a Merge pull request #123 from marineam/align
Align partitions
2013-10-17 20:13:43 -07:00
Michael Marineau
f6341fc31d fix(legacy_disk_layout.json): Omit unused partitions.
We don't need to reserve space on disk just to reserve partition
numbers. And now that partitions are aligned these blanks spots grew
from 512 bytes to 1MB which is not much but still silly.
2013-10-16 19:44:49 -07:00
Michael Marineau
03754b2d62 fix(cgpt.py): Add support for aligning partitions
When using anything other than classic spinning disks with 512 sectors
it is generally best to maintain some alignment with the underlying
physical sector or erase block size. The default alignment most
partitioning tools use these days is 1MB (2048 sectors). Also sometimes
qemu-img requires disk sizes to be aligned to 64KB.
2013-10-16 19:32:04 -07:00
Michael Marineau
ecca978053 fix(cgpt.py): Fix GPT reserved space calculations.
The existing code arbitrarily multiplies START_SECTOR by 512 converting
from blocks/sectors to bytes, but blocks was the correct unit to begin
with. Also the secondary GPT area is not considered but that was OK
because the bogus unit conversion oversized our disks by almost 16MB.

Instead of relying on bugs properly reserve 34 sectors at each end of
the disk. (Well, we could get away with only 33 at the end since it
doesn't have a MBR but meh.)
2013-10-16 18:30:46 -07:00
Michael Marineau
1e17818736 Merge pull request #122 from unclejack/build_library-vmx_utc_tz
fix(build_library): set tz to UTC in vmx template
2013-10-15 14:43:45 -07:00