From 8787d218bfc485acfad86343cda3c402a0c49114 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Wed, 6 Feb 2013 16:46:56 -0800 Subject: [PATCH] feat(coreos): add required packages for board setup --- .../chromeos-assets-split-0.0.1-r28.ebuild | 37 +++ .../chromeos-assets-split-9999.ebuild | 35 +++ .../chromeos-assets-0.0.1-r364.ebuild | 199 ++++++++++++ .../chromeos-assets-9999.ebuild | 197 ++++++++++++ .../chromeos-auth-config-0.0.1-r1.ebuild | 53 ++++ .../chromeos-auth-config/files/chromeos-auth | 16 + .../files/is_developer_end_user | 13 + .../chromeos-base/chromeos-base-0-r52.ebuild | 1 + .../chromeos-base/chromeos-base-0.ebuild | 284 ++++++++++++++++++ .../coreos-base/chromeos-base/files/cursor.sh | 7 + .../chromeos-base/files/include-chromeos-auth | 1 + .../chromeos-base/files/ssh_config | 2 + .../chromeos-base/files/sshd_config | 13 + .../chromeos-base/files/sysctl.conf | 96 ++++++ .../files/udev-rules/55-serial.rules | 9 + .../files/udev-rules/99-i2c.rules | 5 + .../files/udev-rules/99-usb-printer.rules | 8 + .../chromeos-base/files/xauthority.sh | 1 + .../chromeos-debugd-0.0.0-r123.ebuild | 63 ++++ .../chromeos-debugd-9999.ebuild | 61 ++++ .../chromeos-debugd/files/debugd.conf | 30 ++ .../files/org.chromium.debugd.conf | 19 ++ .../files/trace_marker-test.conf | 20 ++ .../chromeos-ec/chromeos-ec-0.0.1-r972.ebuild | 77 +++++ .../chromeos-ec/chromeos-ec-9999.ebuild | 75 +++++ .../chromeos-init-0.0.1-r623.ebuild | 73 +++++ .../chromeos-init/chromeos-init-9999.ebuild | 71 +++++ .../coreos/coreos-0.0.1-r187.ebuild | 1 + .../coreos-base/coreos/coreos-0.0.1.ebuild | 219 ++++++++++++++ .../coreos-base/coreos/metadata.xml | 20 ++ .../chromeos-bootimage-0.0.2-r57.ebuild | 1 + .../chromeos-bootimage-0.0.2.ebuild | 189 ++++++++++++ 32 files changed, 1896 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets-split/chromeos-assets-split-0.0.1-r28.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets-split/chromeos-assets-split-9999.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets/chromeos-assets-0.0.1-r364.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets/chromeos-assets-9999.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-auth-config/chromeos-auth-config-0.0.1-r1.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-auth-config/files/chromeos-auth create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-auth-config/files/is_developer_end_user create mode 120000 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/chromeos-base-0-r52.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/chromeos-base-0.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/cursor.sh create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/include-chromeos-auth create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/ssh_config create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/sshd_config create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/sysctl.conf create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/udev-rules/55-serial.rules create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/udev-rules/99-i2c.rules create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/udev-rules/99-usb-printer.rules create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/xauthority.sh create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/chromeos-debugd-0.0.0-r123.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/chromeos-debugd-9999.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/files/debugd.conf create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/files/org.chromium.debugd.conf create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/files/trace_marker-test.conf create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-ec/chromeos-ec-0.0.1-r972.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-ec/chromeos-ec-9999.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-init/chromeos-init-0.0.1-r623.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-init/chromeos-init-9999.ebuild create mode 120000 sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1-r187.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/metadata.xml create mode 120000 sdk_container/src/third_party/coreos-overlay/sys-boot/chromeos-bootimage/chromeos-bootimage-0.0.2-r57.ebuild create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-boot/chromeos-bootimage/chromeos-bootimage-0.0.2.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets-split/chromeos-assets-split-0.0.1-r28.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets-split/chromeos-assets-split-0.0.1-r28.ebuild new file mode 100644 index 0000000000..ba72970838 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets-split/chromeos-assets-split-0.0.1-r28.ebuild @@ -0,0 +1,37 @@ +# Copyright (c) 2010 The Chromium OS Authors. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +CROS_WORKON_COMMIT="f91b983c430f2e7ce125fda8704d094616d24a0c" +CROS_WORKON_TREE="e18118e277349f02968917bc3eddb4dc39722e05" +CROS_WORKON_PROJECT="chromiumos/platform/chromiumos-assets" + +inherit cros-workon toolchain-funcs + +DESCRIPTION="Chromium OS-specific assets" +HOMEPAGE="http://www.chromium.org/" +SRC_URI="" +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 arm x86" +IUSE="" + +PDEPEND=">chromeos-base/chromeos-assets-0.0.1-r47" +DEPEND="" +RDEPEND="" + +CROS_WORKON_LOCALNAME="chromiumos-assets" + +src_install() { + insinto /usr/share/chromeos-assets/images + doins -r "${S}"/images/* + + insinto /usr/share/chromeos-assets/images_100_percent + doins -r "${S}"/images_100_percent/* + + insinto /usr/share/chromeos-assets/images_200_percent + doins -r "${S}"/images_200_percent/* + + insinto /usr/share/chromeos-assets/screensavers + doins -r "${S}"/screensavers/* +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets-split/chromeos-assets-split-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets-split/chromeos-assets-split-9999.ebuild new file mode 100644 index 0000000000..c684a94be3 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets-split/chromeos-assets-split-9999.ebuild @@ -0,0 +1,35 @@ +# Copyright (c) 2010 The Chromium OS Authors. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +CROS_WORKON_PROJECT="chromiumos/platform/chromiumos-assets" + +inherit cros-workon toolchain-funcs + +DESCRIPTION="Chromium OS-specific assets" +HOMEPAGE="http://www.chromium.org/" +SRC_URI="" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="" + +PDEPEND=">chromeos-base/chromeos-assets-0.0.1-r47" +DEPEND="" +RDEPEND="" + +CROS_WORKON_LOCALNAME="chromiumos-assets" + +src_install() { + insinto /usr/share/chromeos-assets/images + doins -r "${S}"/images/* + + insinto /usr/share/chromeos-assets/images_100_percent + doins -r "${S}"/images_100_percent/* + + insinto /usr/share/chromeos-assets/images_200_percent + doins -r "${S}"/images_200_percent/* + + insinto /usr/share/chromeos-assets/screensavers + doins -r "${S}"/screensavers/* +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets/chromeos-assets-0.0.1-r364.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets/chromeos-assets-0.0.1-r364.ebuild new file mode 100644 index 0000000000..caf56436da --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets/chromeos-assets-0.0.1-r364.ebuild @@ -0,0 +1,199 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +CROS_WORKON_COMMIT="366c9e7ff1c99364be8eea8e1accc5bcb301773b" +CROS_WORKON_TREE="d003ce8d1ed1a8f362a169685fae11e7aedc0afe" +CROS_WORKON_PROJECT="chromiumos/platform/assets" + +inherit cros-workon toolchain-funcs + +DESCRIPTION="Chrome OS assets (images, sounds, etc.)" +HOMEPAGE="http://www.chromium.org/" +SRC_URI="" +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 arm x86" +IUSE="alex lumpy lumpy64 mario tegra2-ldk" + +DEPEND="media-fonts/croscorefonts + media-fonts/droidfonts-cros + x11-apps/xcursorgen" +RDEPEND="" + +REAL_CURSOR_NAMES=" + fleur + hand2 + left_ptr + sb_h_double_arrow + sb_v_double_arrow + top_left_corner + top_right_corner + xterm" + +# These are cursors for which there is no file, but we want to use +# one of the existing files. So we link them. The first one is an +# X holdover from some mozilla bug, and without it, we will use the +# default left_ptr_watch bitmap. +LINK_CURSORS=" + 08e8e1c95fe2fc01f976f1e063a24ccd:left_ptr_watch + X_cursor:left_ptr + arrow:left_ptr + based_arrow_down:sb_v_double_arrow + based_arrow_up:sb_v_double_arrow + boat:left_ptr + bogosity:left_ptr + bottom_left_corner:top_right_corner + bottom_right_corner:top_left_corner + bottom_side:sb_v_double_arrow + bottom_tee:sb_v_double_arrow + box_spiral:left_ptr + center_ptr:left_ptr + circle:left_ptr + clock:left_ptr + coffee_mug:left_ptr + diamond_cross:left_ptr + dot:left_ptr + dotbox:left_ptr + double_arrow:sb_v_double_arrow + draft_large:left_ptr + draft_small:left_ptr + draped_box:left_ptr + exchange:left_ptr + gobbler:left_ptr + gumby:left_ptr + hand1:hand2 + heart:left_ptr + icon:left_ptr + iron_cross:left_ptr + left_ptr_watch:left_ptr + left_side:sb_h_double_arrow + left_tee:sb_h_double_arrow + leftbutton:left_ptr + ll_angle:top_right_corner + lr_angle:top_left_corner + man:left_ptr + middlebutton:left_ptr + mouse:left_ptr + pencil:left_ptr + pirate:left_ptr + plus:left_ptr + right_ptr:left_ptr + right_side:sb_h_double_arrow + right_tee:sb_h_double_arrow + rightbutton:left_ptr + rtl_logo:left_ptr + sailboat:left_ptr + sb_down_arrow:sb_v_double_arrow + sb_left_arrow:sb_h_double_arrow + sb_right_arrow:sb_h_double_arrow + sb_up_arrow:sb_v_double_arrow + shuttle:left_ptr + sizing:top_left_corner + spider:left_ptr + spraycan:left_ptr + star:left_ptr + target:left_ptr + tcross:left_ptr + top_left_arrow:left_ptr + top_side:sb_v_double_arrow + top_tee:sb_v_double_arrow + trek:left_ptr + ul_angle:top_left_corner + umbrella:left_ptr + ur_angle:top_right_corner + watch:left_ptr" + +CROS_WORKON_LOCALNAME="assets" + +src_install() { + insinto /usr/share/chromeos-assets/images + doins -r "${S}"/images/* + + insinto /usr/share/chromeos-assets/images_100_percent + doins -r "${S}"/images_100_percent/* + + insinto /usr/share/chromeos-assets/images_200_percent + doins -r "${S}"/images_200_percent/* + + insinto /usr/share/chromeos-assets/text + doins -r "${S}"/text/boot_messages + dosbin "${S}"/text/display_boot_message + + insinto /usr/share/chromeos-assets/gaia_auth + doins -r "${S}"/gaia_auth/* + + insinto /usr/share/chromeos-assets/input_methods + doins "${S}"/input_methods/* + + unzip "${S}"/accessibility/extensions/access_chromevox.zip + insinto /usr/share/chromeos-assets/accessibility/extensions/access_chromevox + doins -r "${S}"/chromevox_deploy/* + + insinto /usr/share/chromeos-assets/crosh_builtin/ + unzip -d crosh_builtin_deploy/ "${S}"/chromeapps/crosh_builtin/crosh_builtin.zip + + doins -r "${S}"/crosh_builtin_deploy/* + + insinto /usr/share/fonts/chrome-droid + doins "${S}"/fonts/ChromeDroid*.ttf + + insinto /usr/share/color/bin + if use mario; then + newins "${S}"/color_profiles/mario.bin internal_display.bin + elif use alex; then + newins "${S}"/color_profiles/alex.bin internal_display.bin + elif use lumpy; then + newins "${S}"/color_profiles/lumpy.bin internal_display.bin + fi + + # Don't install cursors when building for Tegra, since the + # current ARGB cursor implementation is performing badly, + # and the fallback to 2-bit hardware cursor works better. + # TODO: Remove this when the display driver has been fixed to + # remove the performance bottlenecks. + if ! use tegra2-ldk; then + local CURSOR_DIR="${D}"/usr/share/cursors/xorg-x11/chromeos/cursors + + mkdir -p "${CURSOR_DIR}" + for i in ${REAL_CURSOR_NAMES}; do + xcursorgen -p "${S}"/cursors "${S}"/cursors/$i.cfg >"${CURSOR_DIR}/$i" + done + + for i in ${LINK_CURSORS}; do + ln -s ${i#*:} "${CURSOR_DIR}/${i%:*}" + done + fi + + mkdir -p "${D}"/usr/share/cursors/xorg-x11/default + echo Inherits=chromeos \ + >"${D}"/usr/share/cursors/xorg-x11/default/index.theme + + # + # Speech synthesis + # + + insinto /usr/share/chromeos-assets/speech_synthesis/patts + + # Speech synthesis component extension code + doins "${S}"/speech_synthesis/patts/manifest.json + doins "${S}"/speech_synthesis/patts/tts_main.js + doins "${S}"/speech_synthesis/patts/tts_service.nmf + + # Speech synthesis voice data + doins "${S}"/speech_synthesis/patts/voice_data_hmm_en-US.js + unzip "${S}"/speech_synthesis/patts/voice_data_hmm_en-US.zip + doins -r "${S}"/voice_data_hmm_en-US + + # Speech synthesis engine (platform-specific native client module) + if use arm ; then + unzip "${S}"/speech_synthesis/patts/tts_service_pexe_arm.nexe.zip + doins "${S}"/tts_service_pexe_arm.nexe + elif use x86 ; then + unzip "${S}"/speech_synthesis/patts/tts_service_x86-32.nexe.zip + doins "${S}"/tts_service_x86-32.nexe + elif use amd64 ; then + unzip "${S}"/speech_synthesis/patts/tts_service_x86-64.nexe.zip + doins "${S}"/tts_service_x86-64.nexe + fi +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets/chromeos-assets-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets/chromeos-assets-9999.ebuild new file mode 100644 index 0000000000..e9b84d76ff --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-assets/chromeos-assets-9999.ebuild @@ -0,0 +1,197 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +CROS_WORKON_PROJECT="chromiumos/platform/assets" + +inherit cros-workon toolchain-funcs + +DESCRIPTION="Chrome OS assets (images, sounds, etc.)" +HOMEPAGE="http://www.chromium.org/" +SRC_URI="" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="alex lumpy lumpy64 mario tegra2-ldk" + +DEPEND="media-fonts/croscorefonts + media-fonts/droidfonts-cros + x11-apps/xcursorgen" +RDEPEND="" + +REAL_CURSOR_NAMES=" + fleur + hand2 + left_ptr + sb_h_double_arrow + sb_v_double_arrow + top_left_corner + top_right_corner + xterm" + +# These are cursors for which there is no file, but we want to use +# one of the existing files. So we link them. The first one is an +# X holdover from some mozilla bug, and without it, we will use the +# default left_ptr_watch bitmap. +LINK_CURSORS=" + 08e8e1c95fe2fc01f976f1e063a24ccd:left_ptr_watch + X_cursor:left_ptr + arrow:left_ptr + based_arrow_down:sb_v_double_arrow + based_arrow_up:sb_v_double_arrow + boat:left_ptr + bogosity:left_ptr + bottom_left_corner:top_right_corner + bottom_right_corner:top_left_corner + bottom_side:sb_v_double_arrow + bottom_tee:sb_v_double_arrow + box_spiral:left_ptr + center_ptr:left_ptr + circle:left_ptr + clock:left_ptr + coffee_mug:left_ptr + diamond_cross:left_ptr + dot:left_ptr + dotbox:left_ptr + double_arrow:sb_v_double_arrow + draft_large:left_ptr + draft_small:left_ptr + draped_box:left_ptr + exchange:left_ptr + gobbler:left_ptr + gumby:left_ptr + hand1:hand2 + heart:left_ptr + icon:left_ptr + iron_cross:left_ptr + left_ptr_watch:left_ptr + left_side:sb_h_double_arrow + left_tee:sb_h_double_arrow + leftbutton:left_ptr + ll_angle:top_right_corner + lr_angle:top_left_corner + man:left_ptr + middlebutton:left_ptr + mouse:left_ptr + pencil:left_ptr + pirate:left_ptr + plus:left_ptr + right_ptr:left_ptr + right_side:sb_h_double_arrow + right_tee:sb_h_double_arrow + rightbutton:left_ptr + rtl_logo:left_ptr + sailboat:left_ptr + sb_down_arrow:sb_v_double_arrow + sb_left_arrow:sb_h_double_arrow + sb_right_arrow:sb_h_double_arrow + sb_up_arrow:sb_v_double_arrow + shuttle:left_ptr + sizing:top_left_corner + spider:left_ptr + spraycan:left_ptr + star:left_ptr + target:left_ptr + tcross:left_ptr + top_left_arrow:left_ptr + top_side:sb_v_double_arrow + top_tee:sb_v_double_arrow + trek:left_ptr + ul_angle:top_left_corner + umbrella:left_ptr + ur_angle:top_right_corner + watch:left_ptr" + +CROS_WORKON_LOCALNAME="assets" + +src_install() { + insinto /usr/share/chromeos-assets/images + doins -r "${S}"/images/* + + insinto /usr/share/chromeos-assets/images_100_percent + doins -r "${S}"/images_100_percent/* + + insinto /usr/share/chromeos-assets/images_200_percent + doins -r "${S}"/images_200_percent/* + + insinto /usr/share/chromeos-assets/text + doins -r "${S}"/text/boot_messages + dosbin "${S}"/text/display_boot_message + + insinto /usr/share/chromeos-assets/gaia_auth + doins -r "${S}"/gaia_auth/* + + insinto /usr/share/chromeos-assets/input_methods + doins "${S}"/input_methods/* + + unzip "${S}"/accessibility/extensions/access_chromevox.zip + insinto /usr/share/chromeos-assets/accessibility/extensions/access_chromevox + doins -r "${S}"/chromevox_deploy/* + + insinto /usr/share/chromeos-assets/crosh_builtin/ + unzip -d crosh_builtin_deploy/ "${S}"/chromeapps/crosh_builtin/crosh_builtin.zip + + doins -r "${S}"/crosh_builtin_deploy/* + + insinto /usr/share/fonts/chrome-droid + doins "${S}"/fonts/ChromeDroid*.ttf + + insinto /usr/share/color/bin + if use mario; then + newins "${S}"/color_profiles/mario.bin internal_display.bin + elif use alex; then + newins "${S}"/color_profiles/alex.bin internal_display.bin + elif use lumpy; then + newins "${S}"/color_profiles/lumpy.bin internal_display.bin + fi + + # Don't install cursors when building for Tegra, since the + # current ARGB cursor implementation is performing badly, + # and the fallback to 2-bit hardware cursor works better. + # TODO: Remove this when the display driver has been fixed to + # remove the performance bottlenecks. + if ! use tegra2-ldk; then + local CURSOR_DIR="${D}"/usr/share/cursors/xorg-x11/chromeos/cursors + + mkdir -p "${CURSOR_DIR}" + for i in ${REAL_CURSOR_NAMES}; do + xcursorgen -p "${S}"/cursors "${S}"/cursors/$i.cfg >"${CURSOR_DIR}/$i" + done + + for i in ${LINK_CURSORS}; do + ln -s ${i#*:} "${CURSOR_DIR}/${i%:*}" + done + fi + + mkdir -p "${D}"/usr/share/cursors/xorg-x11/default + echo Inherits=chromeos \ + >"${D}"/usr/share/cursors/xorg-x11/default/index.theme + + # + # Speech synthesis + # + + insinto /usr/share/chromeos-assets/speech_synthesis/patts + + # Speech synthesis component extension code + doins "${S}"/speech_synthesis/patts/manifest.json + doins "${S}"/speech_synthesis/patts/tts_main.js + doins "${S}"/speech_synthesis/patts/tts_service.nmf + + # Speech synthesis voice data + doins "${S}"/speech_synthesis/patts/voice_data_hmm_en-US.js + unzip "${S}"/speech_synthesis/patts/voice_data_hmm_en-US.zip + doins -r "${S}"/voice_data_hmm_en-US + + # Speech synthesis engine (platform-specific native client module) + if use arm ; then + unzip "${S}"/speech_synthesis/patts/tts_service_pexe_arm.nexe.zip + doins "${S}"/tts_service_pexe_arm.nexe + elif use x86 ; then + unzip "${S}"/speech_synthesis/patts/tts_service_x86-32.nexe.zip + doins "${S}"/tts_service_x86-32.nexe + elif use amd64 ; then + unzip "${S}"/speech_synthesis/patts/tts_service_x86-64.nexe.zip + doins "${S}"/tts_service_x86-64.nexe + fi +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-auth-config/chromeos-auth-config-0.0.1-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-auth-config/chromeos-auth-config-0.0.1-r1.ebuild new file mode 100644 index 0000000000..3f58788533 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-auth-config/chromeos-auth-config-0.0.1-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright (c) 2011 The Chromium OS Authors. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 + +DESCRIPTION="ChromiumOS-specific configuration files for pambase" +HOMEPAGE="http://www.chromium.org" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm x86" + +RDEPEND=" + >=sys-auth/pambase-20090620.1-r7 + chromeos-base/vboot_reference" +DEPEND="${RDEPEND}" + +src_install() { + # Chrome OS: sudo and vt2 are important for system debugging both in + # developer mode and during development. These two stanzas allow sudo and + # login auth as user chronos under the following conditions: + # + # 1. password-less access: + # - system in developer mode + # - there is no passwd.devmode file + # - there is no system-wide password set above. + # 2. System-wide (/etc/shadow) password access: + # - image has a baked in password above + # 3. Developer mode password access + # - user creates a passwd.devmode file with "chronos:CRYPTED_PASSWORD" + # 4. System-wide (/etc/shadow) password access set by modifying /etc/shadow: + # - Cases #1 and #2 will apply but failure will fall through to the + # inserted password. + insinto /etc/pam.d + doins "${FILESDIR}/chromeos-auth" || die + + dosbin "${FILESDIR}/is_developer_end_user" || die +} + +pkg_postinst() { + # If there's a shared user password or if the build target is the host, + # reset chromeos-auth to an empty file. We don't transition from empty to + # populated because binary packages lose FILESDIR. + local crypted_password='*' + if [ "${ROOT}" = "/" ]; then + crypted_password='host' + elif [ -r "${SHARED_USER_PASSWD_FILE}" ]; then + crypted_password=$(cat "${SHARED_USER_PASSWD_FILE}") + fi + if [ "${crypted_password}" != '*' ]; then + echo -n '' > "${ROOT}/etc/pam.d/chromeos-auth" || die + fi +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-auth-config/files/chromeos-auth b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-auth-config/files/chromeos-auth new file mode 100644 index 0000000000..b07fe86473 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-auth-config/files/chromeos-auth @@ -0,0 +1,16 @@ +# If we're not in dev-mode, skip to the system password stack. +auth [success=ignore default=3] pam_exec.so \ + quiet /usr/bin/crossystem cros_debug?1 + +# Check if a custom devmode password file exists and prefer it. +auth [success=ignore default=1] pam_exec.so \ + quiet /usr/bin/test -f /mnt/stateful_partition/etc/devmode.passwd + +# If we get to pwdfile, use it or bypass the password-less login. +auth [success=done default=1] pam_pwdfile.so \ + pwdfile /mnt/stateful_partition/etc/devmode.passwd + +# If we get here, allow password-less access +auth sufficient pam_exec.so quiet /usr/bin/crossystem cros_debug?1 + +# Fallback to a system password if one was stamped in after initial build. diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-auth-config/files/is_developer_end_user b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-auth-config/files/is_developer_end_user new file mode 100644 index 0000000000..358317cf6d --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-auth-config/files/is_developer_end_user @@ -0,0 +1,13 @@ +#!/bin/sh + +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Exit status is 0 if this is a "developer system", non-zero if not. +# We define "developer system" as any of +# - a release image on a system with the developer hardware switch set on, +# - a developer or test image running on hardware or a VM, or +# - a system with a shared user password set (meaning it's possible to log in +# on a VT console). +crossystem "cros_debug?1" || grep -q '^chronos:[^*]' /etc/shadow diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/chromeos-base-0-r52.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/chromeos-base-0-r52.ebuild new file mode 120000 index 0000000000..d123951679 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/chromeos-base-0-r52.ebuild @@ -0,0 +1 @@ +./chromeos-base-0.ebuild \ No newline at end of file diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/chromeos-base-0.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/chromeos-base-0.ebuild new file mode 100644 index 0000000000..8502d64554 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/chromeos-base-0.ebuild @@ -0,0 +1,284 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +inherit useradd pam + +DESCRIPTION="ChromeOS specific system setup" +HOMEPAGE="http://src.chromium.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm x86" +IUSE="cros_host pam" + +# We need to make sure timezone-data is merged before us. +# See pkg_setup below as well as http://crosbug.com/27413 +# and friends. +DEPEND=">=sys-apps/baselayout-2 + ! 95_cros_base + insopts -m 440 + doins 95_cros_base || die + fi +} + +pkg_postinst() { + local x + + # We explicitly add all of the users needed in the system here. The + # build of Chromium OS uses a single build chroot environment to build + # for various targets with distinct ${ROOT}. This causes two problems: + # 1. The target rootfs needs to have the same UIDs as the build + # chroot so that chmod operations work. + # 2. The portage tools to add a new user in an ebuild don't work when + # $ROOT != / + # We solve this by having baselayout install in both the build and + # target and pre-create all needed users. In order to support existing + # build roots we copy over the user entries if they already exist. + local system_user="chronos" + local system_id="1000" + local system_home="/home/${system_user}/user" + # Add a chronos-access group to provide non-chronos users, + # mostly system daemons running as a non-chronos user, group permissions + # to access files/directories owned by chronos. + local system_access_user="chronos-access" + local system_access_id="1001" + + local crypted_password='*' + [ -r "${SHARED_USER_PASSWD_FILE}" ] && + crypted_password=$(cat "${SHARED_USER_PASSWD_FILE}") + remove_user "${system_user}" + add_user "${system_user}" "x" "${system_id}" \ + "${system_id}" "system_user" "${system_home}" /bin/sh + remove_shadow "${system_user}" + add_shadow "${system_user}" "${crypted_password}" + + copy_or_add_group "${system_user}" "${system_id}" + copy_or_add_daemon_user "${system_access_user}" "${system_access_id}" + copy_or_add_daemon_user "messagebus" 201 # For dbus + copy_or_add_daemon_user "syslog" 202 # For rsyslog + copy_or_add_daemon_user "ntp" 203 + copy_or_add_daemon_user "sshd" 204 + copy_or_add_daemon_user "polkituser" 206 # For policykit + copy_or_add_daemon_user "tss" 207 # For trousers (TSS/TPM) + copy_or_add_daemon_user "pkcs11" 208 # For pkcs11 clients + copy_or_add_daemon_user "qdlservice" 209 # for QDLService + copy_or_add_daemon_user "cromo" 210 # For cromo (modem manager) +# copy_or_add_daemon_user "cashew" 211 # Deprecated, do not reuse + copy_or_add_daemon_user "ipsec" 212 # For strongswan/ipsec VPN + copy_or_add_daemon_user "cros-disks" 213 # For cros-disks + copy_or_add_daemon_user "tor" 214 # For tor (anonymity service) + copy_or_add_daemon_user "tcpdump" 215 # For tcpdump --with-user + copy_or_add_daemon_user "debugd" 216 # For debugd + copy_or_add_daemon_user "openvpn" 217 # For openvpn + copy_or_add_daemon_user "bluetooth" 218 # For bluez + copy_or_add_daemon_user "wpa" 219 # For wpa_supplicant + copy_or_add_daemon_user "cras" 220 # For cras (audio) +# copy_or_add_daemon_user "gavd" 221 # For gavd (audio) (deprecated) + copy_or_add_daemon_user "input" 222 # For /dev/input/event access + copy_or_add_daemon_user "chaps" 223 # For chaps (pkcs11) + copy_or_add_daemon_user "dhcp" 224 # For dhcpcd (DHCP client) + copy_or_add_daemon_user "tpmd" 225 # For tpmd + copy_or_add_daemon_user "mtp" 226 # For libmtp + copy_or_add_daemon_user "proxystate" 227 # For proxy monitoring + copy_or_add_daemon_user "power" 228 # For powerd + copy_or_add_daemon_user "watchdog" 229 # For daisydog + copy_or_add_daemon_user "devbroker" 230 # For permission_broker + copy_or_add_daemon_user "xorg" 231 # For Xorg + # Reserve some UIDs/GIDs between 300 and 349 for sandboxing FUSE-based + # filesystem daemons. + copy_or_add_daemon_user "ntfs-3g" 300 # For ntfs-3g prcoess + copy_or_add_daemon_user "avfs" 301 # For avfs process + copy_or_add_daemon_user "fuse-exfat" 302 # For exfat-fuse prcoess + + # Group that are allowed to create directories under /home//root + copy_or_add_group "daemon-store" 400 + + # All audio interfacing will go through the audio server. + add_users_to_group audio "cras" + add_users_to_group input "cras" # For /dev/input/event* access + + # The system user is part of the audio server group to play sounds. The + # power manager user needs to check whether audio is playing. + add_users_to_group cras "${system_user}" power + + # The system_user needs to be part of the audio and video groups. + add_users_to_group audio "${system_user}" + add_users_to_group video "${system_user}" + + # The Xorg user needs to be part of the input and video groups. + add_users_to_group input "xorg" + add_users_to_group video "xorg" + + # Users which require access to PKCS #11 cryptographic services must be + # in the pkcs11 group. + remove_all_users_from_group pkcs11 + add_users_to_group pkcs11 root ipsec "${system_user}" chaps wpa + + # All users accessing opencryptoki database files and all users for + # sandboxing FUSE-based filesystem daemons need to be in the + # ${system_access_user} group. + remove_all_users_from_group "${system_access_user}" + add_users_to_group "${system_access_user}" root ipsec "${system_user}" \ + ntfs-3g avfs fuse-exfat chaps + + # Dedicated group for owning access to serial devices. + copy_or_add_group "serial" 402 + add_users_to_group "serial" "${system_user}" + add_users_to_group "serial" "uucp" + + # The root user must be in the wpa group for wpa_cli. + add_users_to_group wpa root + + # Restrict tcsd access to root and chaps. + add_users_to_group tss root chaps + + # Add mtp user to usb group for USB device access. + add_users_to_group usb mtp + + # Create a group for device access via permission_broker + copy_or_add_group "devbroker-access" 403 + add_users_to_group devbroker-access "${system_user}" + + # Give the power manager access to I2C devices so it can adjust external + # displays' brightness via DDC. + copy_or_add_group i2c 404 + add_users_to_group i2c power + + # Give the power manager access to /dev/tty* so it can disable VT switching + # before suspending the system. + add_users_to_group tty power + + # The power manager needs to read from /dev/input/event* to observe power + # button and lid events. + add_users_to_group input power + + # Some default directories. These are created here rather than at + # install because some of them may already exist and have mounts. + for x in /dev /home /media \ + /mnt/stateful_partition /proc /root /sys /var/lock; do + [ -d "${ROOT}/$x" ] && continue + install -d --mode=0755 --owner=root --group=root "${ROOT}/$x" + done +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/cursor.sh b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/cursor.sh new file mode 100644 index 0000000000..357f9293ae --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/cursor.sh @@ -0,0 +1,7 @@ +# We disable vt cursors by default on the kernel command line +# (so that it doesn't flash when doing boot splash and such). +# +# Re-enable it when launching a login shell. This should only +# happen when logging in via vt or crosh or ssh and those are +# all fine. Login shells shouldn't get launched normally. +setterm -cursor on diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/include-chromeos-auth b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/include-chromeos-auth new file mode 100644 index 0000000000..cc7be37a5b --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/include-chromeos-auth @@ -0,0 +1 @@ +auth include chromeos-auth diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/ssh_config b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/ssh_config new file mode 100644 index 0000000000..17976aae52 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/ssh_config @@ -0,0 +1,2 @@ +Host * + UserKnownHostsFile /home/chronos/user/.ssh/known_hosts diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/sshd_config b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/sshd_config new file mode 100644 index 0000000000..f1fc02c098 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/sshd_config @@ -0,0 +1,13 @@ +# Force protocol v2 only +Protocol 2 + +# /etc is read-only. Fetch keys from stateful partition +# Not using v1, so no v1 key +HostKey /mnt/stateful_partition/etc/ssh/ssh_host_rsa_key +HostKey /mnt/stateful_partition/etc/ssh/ssh_host_dsa_key + +PasswordAuthentication no +UsePAM yes +PrintMotd no +PrintLastLog no +Subsystem sftp internal-sftp diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/sysctl.conf b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/sysctl.conf new file mode 100644 index 0000000000..af9bc7f29b --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/sysctl.conf @@ -0,0 +1,96 @@ +# /etc/sysctl.conf +# +# For more information on how this file works, please see +# the manpages sysctl(8) and sysctl.conf(5). +# +# In order for this file to work properly, you must first +# enable 'Sysctl support' in the kernel. +# +# Look in /proc/sys/ for all the things you can setup. +# + +# +# Original Gentoo settings: +# + +# Disables packet forwarding +net.ipv4.ip_forward = 0 +# Disables IP dynaddr +#net.ipv4.ip_dynaddr = 0 +# Disable ECN +#net.ipv4.tcp_ecn = 0 +# Enables source route verification +net.ipv4.conf.default.rp_filter = 1 +# Enable reverse path +net.ipv4.conf.all.rp_filter = 1 + +# Enable SYN cookies (yum!) +# http://cr.yp.to/syncookies.html +#net.ipv4.tcp_syncookies = 1 + +# Disable source route +#net.ipv4.conf.all.accept_source_route = 0 +#net.ipv4.conf.default.accept_source_route = 0 + +# Disable redirects +#net.ipv4.conf.all.accept_redirects = 0 +#net.ipv4.conf.default.accept_redirects = 0 + +# Disable secure redirects +#net.ipv4.conf.all.secure_redirects = 0 +#net.ipv4.conf.default.secure_redirects = 0 + +# Ignore ICMP broadcasts +#net.ipv4.icmp_echo_ignore_broadcasts = 1 + +# Perform PLPMTUD only after detecting a "blackhole" in old-style PMTUD +net.ipv4.tcp_mtu_probing = 1 + +# Disables the magic-sysrq key +#kernel.sysrq = 0 +# When the kernel panics, automatically reboot in 3 seconds +#kernel.panic = 3 +# Allow for more PIDs (cool factor!); may break some programs +#kernel.pid_max = 999999 + +# You should compile nfsd into the kernel or add it +# to modules.autoload for this to work properly +# TCP Port for lock manager +#fs.nfs.nlm_tcpport = 0 +# UDP Port for lock manager +#fs.nfs.nlm_udpport = 0 + +# +# ChromeOS specific settings: +# + +# Set watchdog_thresh +kernel.watchdog_thresh = 5 +# When the kernel panics, automatically reboot to preserve dump in ram +kernel.panic = -1 +# Reboot on oops as well +kernel.panic_on_oops = 1 + +# Disable shrinking the cwnd when connection is idle +net.ipv4.tcp_slow_start_after_idle = 0 + +# Protect working set in order to avoid thrashing. +# See http://crosbug.com/7561 for details. +vm.min_filelist_kbytes = 50000 + +# Allow full memory overcommit as we rather close or kill tabs than +# refuse memory to arbitrary core processes. +vm.overcommit_memory = 1 + +# Use laptop mode settings always +vm.dirty_background_ratio = 1 +vm.dirty_expire_centisecs = 60000 +vm.dirty_ratio = 60 +vm.dirty_writeback_centisecs = 60000 +vm.laptop_mode = 0 + +# Disable kernel address visibility to non-root users. +kernel.kptr_restrict = 1 + +# Increase shared memory segment limit for plugins rendering large areas +kernel.shmmax = 134217728 diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/udev-rules/55-serial.rules b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/udev-rules/55-serial.rules new file mode 100644 index 0000000000..ceb492c4b7 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/udev-rules/55-serial.rules @@ -0,0 +1,9 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +KERNEL=="tty[A-Z]*[0-9]", GROUP="serial" +# Don't allow access to serial interfaces on Gobi modems. +KERNEL=="tty[A-Z]*[0-9]", ID_USB_DRIVER=="qcserial", GROUP="root" +# Don't allow access to serial interfaces on Novatel modems. +KERNEL=="tty[A-Z]*[0-9]", ID_USB_DRIVER=="option", GROUP="root" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/udev-rules/99-i2c.rules b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/udev-rules/99-i2c.rules new file mode 100644 index 0000000000..d094e0fa71 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/udev-rules/99-i2c.rules @@ -0,0 +1,5 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +KERNEL=="i2c-[0-9]", GROUP="i2c" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/udev-rules/99-usb-printer.rules b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/udev-rules/99-usb-printer.rules new file mode 100644 index 0000000000..7895571938 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/udev-rules/99-usb-printer.rules @@ -0,0 +1,8 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="07", ATTRS{idProduct}=="*", \ + PROGRAM="/usr/bin/dbus-send --system --type=method_call --dest=org.chromium.LibCrosService \ + /org/chromium/LibCrosService org.chromium.LibCrosServiceInterface.PrinterAdded \ + string:$attr{idVendor} string:$attr{idProduct}" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/xauthority.sh b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/xauthority.sh new file mode 100644 index 0000000000..21774859d7 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-base/files/xauthority.sh @@ -0,0 +1 @@ +export XAUTHORITY="/home/chronos/.Xauthority" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/chromeos-debugd-0.0.0-r123.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/chromeos-debugd-0.0.0-r123.ebuild new file mode 100644 index 0000000000..8e34f30d27 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/chromeos-debugd-0.0.0-r123.ebuild @@ -0,0 +1,63 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 +CROS_WORKON_COMMIT="f6a78c3976f71190d7aa4d310f245410627e77d2" +CROS_WORKON_TREE="acf7bf198dadec0295a36c07a3f28615bd53af35" +CROS_WORKON_PROJECT="chromiumos/platform/debugd" +CROS_WORKON_LOCALNAME=$(basename ${CROS_WORKON_PROJECT}) + +inherit cros-debug cros-workon toolchain-funcs + +DESCRIPTION="Chrome OS debugging service" +HOMEPAGE="http://www.chromium.org/" +SRC_URI="" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 arm x86" +IUSE="" + +LIBCHROME_VERS="125070" + +RDEPEND="chromeos-base/chromeos-minijail + chromeos-base/libchrome:${LIBCHROME_VERS}[cros-debug=] + chromeos-base/libchromeos + dev-libs/dbus-c++ + dev-libs/glib:2 + dev-libs/libpcre" +DEPEND="${RDEPEND} + chromeos-base/shill + sys-apps/dbus + virtual/modemmanager" + +src_compile() { + tc-export CC CXX AR RANLIB LD NM PKG_CONFIG OBJCOPY + cros-debug-add-NDEBUG + emake BASE_VER=${LIBCHROME_VERS} +} + +src_test() { + emake tests BASE_VER=${LIBCHROME_VERS} +} + +src_install() { + cd build-opt + into / + dosbin debugd + dodir /debugd + exeinto /usr/libexec/debugd/helpers + doexe helpers/icmp + doexe helpers/netif + doexe helpers/modem_status + doexe "${S}"/src/helpers/minijail-setuid-hack.sh + doexe "${S}"/src/helpers/systrace.sh + doexe helpers/network_status + + insinto /etc/dbus-1/system.d + doins "${FILESDIR}/org.chromium.debugd.conf" + + insinto /etc/init + doins "${FILESDIR}/debugd.conf" + doins "${FILESDIR}/trace_marker-test.conf" +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/chromeos-debugd-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/chromeos-debugd-9999.ebuild new file mode 100644 index 0000000000..15b88e9680 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/chromeos-debugd-9999.ebuild @@ -0,0 +1,61 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 +CROS_WORKON_PROJECT="chromiumos/platform/debugd" +CROS_WORKON_LOCALNAME=$(basename ${CROS_WORKON_PROJECT}) + +inherit cros-debug cros-workon toolchain-funcs + +DESCRIPTION="Chrome OS debugging service" +HOMEPAGE="http://www.chromium.org/" +SRC_URI="" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="" + +LIBCHROME_VERS="125070" + +RDEPEND="chromeos-base/chromeos-minijail + chromeos-base/libchrome:${LIBCHROME_VERS}[cros-debug=] + chromeos-base/libchromeos + dev-libs/dbus-c++ + dev-libs/glib:2 + dev-libs/libpcre" +DEPEND="${RDEPEND} + chromeos-base/shill + sys-apps/dbus + virtual/modemmanager" + +src_compile() { + tc-export CC CXX AR RANLIB LD NM PKG_CONFIG OBJCOPY + cros-debug-add-NDEBUG + emake BASE_VER=${LIBCHROME_VERS} +} + +src_test() { + emake tests BASE_VER=${LIBCHROME_VERS} +} + +src_install() { + cd build-opt + into / + dosbin debugd + dodir /debugd + exeinto /usr/libexec/debugd/helpers + doexe helpers/icmp + doexe helpers/netif + doexe helpers/modem_status + doexe "${S}"/src/helpers/minijail-setuid-hack.sh + doexe "${S}"/src/helpers/systrace.sh + doexe helpers/network_status + + insinto /etc/dbus-1/system.d + doins "${FILESDIR}/org.chromium.debugd.conf" + + insinto /etc/init + doins "${FILESDIR}/debugd.conf" + doins "${FILESDIR}/trace_marker-test.conf" +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/files/debugd.conf b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/files/debugd.conf new file mode 100644 index 0000000000..d2fea70df3 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/files/debugd.conf @@ -0,0 +1,30 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +description "Chromium OS debug daemon" +author "chromium-os-dev@chromium.org" + +start on started ui +stop on stopping ui or starting halt or starting reboot +respawn + +pre-start script + TRACING=/sys/kernel/debug/tracing + # NB: check for tracing dir in case the kernel config changes + if [ -d "${TRACING}" ]; then + # enable debugd write access for systrace helper + for file in buffer_size_kb set_event trace trace_clock trace_marker \ + tracing_on; do + chgrp debugd ${TRACING}/${file} && chmod g+w ${TRACING}/${file} + done + fi + # NB: only on exynos5 + MALI_HWC_ENABLE=/sys/devices/platform/mali.0/hwc_enable + if [ -f "${MALI_HWC_ENABLE}" ]; then + chgrp debugd ${MALI_HWC_ENABLE} && chmod g+w ${MALI_HWC_ENABLE} + fi +end script + +exec /sbin/debugd + diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/files/org.chromium.debugd.conf b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/files/org.chromium.debugd.conf new file mode 100644 index 0000000000..f0c30d082b --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/files/org.chromium.debugd.conf @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + 512 + + diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/files/trace_marker-test.conf b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/files/trace_marker-test.conf new file mode 100644 index 0000000000..b4c6e1925b --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-debugd/files/trace_marker-test.conf @@ -0,0 +1,20 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +description "Chromium OS debug daemon trace_marker helper" +author "chromium-os-dev@chromium.org" + +# This lets us log trace events to the kernel trace buffer on test images +# where non-Chrome libraries can do logging to the trace_marker file. +# We need this to integrate third-party tracing into combined Chrome +# and system traces. + +#for_test start on starting debugd +stop on stopping ui or starting halt or starting reboot +respawn + +pre-start script + chmod a+w /sys/kernel/debug/tracing/trace_marker +end script + diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-ec/chromeos-ec-0.0.1-r972.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-ec/chromeos-ec-0.0.1-r972.ebuild new file mode 100644 index 0000000000..ab35812680 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-ec/chromeos-ec-0.0.1-r972.ebuild @@ -0,0 +1,77 @@ +# Copyright (C) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE.makefile file. + +EAPI="4" +CROS_WORKON_COMMIT="6e29f8091d9da763cd39b7ea61eefb5c35b94606" +CROS_WORKON_TREE="7312bc4c61477f0041b02dbca07a3029707e9d46" +CROS_WORKON_PROJECT="chromiumos/platform/ec" +CROS_WORKON_LOCALNAME="ec" + +inherit toolchain-funcs cros-board cros-workon + +DESCRIPTION="Embedded Controller firmware code" +HOMEPAGE="http://www.chromium.org/" +SRC_URI="" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="arm amd64 x86" +IUSE="test bds snow spring" + +# We don't want binchecks since we're cross-compiling firmware images using +# non-standard layout. +RESTRICT="binchecks" + +set_build_env() { + # The firmware is running on ARMv7-m (Cortex-M4) + export CROSS_COMPILE=arm-none-eabi- + tc-export CC BUILD_CC + export HOSTCC=${CC} + export BUILDCC=${BUILD_CC} + + # Allow building for boards that don't have an EC + # (so we can compile test on bots for testing). + export EC_BOARD=$(usev bds || get_current_board_with_variant) + if [[ ! -d board/${EC_BOARD} ]] ; then + ewarn "Sorry, ${EC_BOARD} not supported; doing build-test with BOARD=bds" + EC_BOARD=bds + fi + + # FIXME: hack to separate BOARD= used by EC Makefile and Portage, + # crosbug.com/p/10377 + if use snow; then + EC_BOARD=snow + fi + # If building for spring hack in spring, must happen after snow due + # to hirearchy of current overlays. + if use spring; then + ewarn "USE=spring detected; overriding EC_BOARD=spring" + EC_BOARD=spring + fi + +} + +src_compile() { + set_build_env + BOARD=${EC_BOARD} emake all + + EXTRA_ARGS="out=build/${EC_BOARD}_shifted " + EXTRA_ARGS+="EXTRA_CFLAGS=\"-DSHIFT_CODE_FOR_TEST\"" + BOARD=${EC_BOARD} emake all ${EXTRA_ARGS} +} + +src_install() { + set_build_env + # EC firmware binaries + insinto /firmware + doins build/${EC_BOARD}/ec.bin + doins build/${EC_BOARD}/ec.RW.bin + newins build/${EC_BOARD}/ec.RO.flat ec.RO.bin + newins build/${EC_BOARD}_shifted/ec.bin ec_autest_image.bin + # Intermediate files for debugging + doins build/${EC_BOARD}/ec.*.elf + # Utilities + exeinto /usr/bin + doexe build/${EC_BOARD}/util/ectool +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-ec/chromeos-ec-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-ec/chromeos-ec-9999.ebuild new file mode 100644 index 0000000000..3804484c6b --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-ec/chromeos-ec-9999.ebuild @@ -0,0 +1,75 @@ +# Copyright (C) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE.makefile file. + +EAPI="4" +CROS_WORKON_PROJECT="chromiumos/platform/ec" +CROS_WORKON_LOCALNAME="ec" + +inherit toolchain-funcs cros-board cros-workon + +DESCRIPTION="Embedded Controller firmware code" +HOMEPAGE="http://www.chromium.org/" +SRC_URI="" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~arm ~amd64 ~x86" +IUSE="test bds snow spring" + +# We don't want binchecks since we're cross-compiling firmware images using +# non-standard layout. +RESTRICT="binchecks" + +set_build_env() { + # The firmware is running on ARMv7-m (Cortex-M4) + export CROSS_COMPILE=arm-none-eabi- + tc-export CC BUILD_CC + export HOSTCC=${CC} + export BUILDCC=${BUILD_CC} + + # Allow building for boards that don't have an EC + # (so we can compile test on bots for testing). + export EC_BOARD=$(usev bds || get_current_board_with_variant) + if [[ ! -d board/${EC_BOARD} ]] ; then + ewarn "Sorry, ${EC_BOARD} not supported; doing build-test with BOARD=bds" + EC_BOARD=bds + fi + + # FIXME: hack to separate BOARD= used by EC Makefile and Portage, + # crosbug.com/p/10377 + if use snow; then + EC_BOARD=snow + fi + # If building for spring hack in spring, must happen after snow due + # to hirearchy of current overlays. + if use spring; then + ewarn "USE=spring detected; overriding EC_BOARD=spring" + EC_BOARD=spring + fi + +} + +src_compile() { + set_build_env + BOARD=${EC_BOARD} emake all + + EXTRA_ARGS="out=build/${EC_BOARD}_shifted " + EXTRA_ARGS+="EXTRA_CFLAGS=\"-DSHIFT_CODE_FOR_TEST\"" + BOARD=${EC_BOARD} emake all ${EXTRA_ARGS} +} + +src_install() { + set_build_env + # EC firmware binaries + insinto /firmware + doins build/${EC_BOARD}/ec.bin + doins build/${EC_BOARD}/ec.RW.bin + newins build/${EC_BOARD}/ec.RO.flat ec.RO.bin + newins build/${EC_BOARD}_shifted/ec.bin ec_autest_image.bin + # Intermediate files for debugging + doins build/${EC_BOARD}/ec.*.elf + # Utilities + exeinto /usr/bin + doexe build/${EC_BOARD}/util/ectool +} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-init/chromeos-init-0.0.1-r623.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-init/chromeos-init-0.0.1-r623.ebuild new file mode 100644 index 0000000000..a9a1c58d01 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/chromeos-init/chromeos-init-0.0.1-r623.ebuild @@ -0,0 +1,73 @@ +# Copyright (c) 2011 The Chromium OS Authors. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +EAPI="4" +CROS_WORKON_COMMIT="ea3cd573f8d47f15f7e4808a838f0066777bed16" +CROS_WORKON_TREE="849f1bf8c2dd07edda676636f278674b93c49414" +CROS_WORKON_PROJECT="chromiumos/platform/init" +CROS_WORKON_LOCALNAME="init" + +inherit cros-workon + +DESCRIPTION="Upstart init scripts for Chromium OS" +HOMEPAGE="http://www.chromium.org/" +SRC_URI="" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 arm x86" +IUSE="nfs" + +DEPEND="" +# vpd for vpd-log.conf of upstart +# vboot_reference for crossystem +RDEPEND="chromeos-base/chromeos-disableecho + ! + + +chromium + + chromium-os-dev@chromium.org + Maintained by The Chromium OS Authors. + +The Chromium OS base package pulls in dependencies to build a Chromium OS system. + + Enables dependencies on X. + Enables bluetooth dependencies. + Enables firmware bootimage dependencies. + Enables coreboot. + Enables CrOS Embedded Controller. + Enables WiMax dependencies. + Enables bootchart. + Enables OpenGL ES. + + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-boot/chromeos-bootimage/chromeos-bootimage-0.0.2-r57.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-boot/chromeos-bootimage/chromeos-bootimage-0.0.2-r57.ebuild new file mode 120000 index 0000000000..52e2f47ddc --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-boot/chromeos-bootimage/chromeos-bootimage-0.0.2-r57.ebuild @@ -0,0 +1 @@ +chromeos-bootimage-0.0.2.ebuild \ No newline at end of file diff --git a/sdk_container/src/third_party/coreos-overlay/sys-boot/chromeos-bootimage/chromeos-bootimage-0.0.2.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-boot/chromeos-bootimage/chromeos-bootimage-0.0.2.ebuild new file mode 100644 index 0000000000..b4c959f8a9 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-boot/chromeos-bootimage/chromeos-bootimage-0.0.2.ebuild @@ -0,0 +1,189 @@ +# Copyright (c) 2011 The Chromium OS Authors. All rights reserved. +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +inherit cros-debug + +DESCRIPTION="ChromeOS firmware image builder" +HOMEPAGE="http://www.chromium.org" +LICENSE="" +SLOT="0" +KEYWORDS="amd64 arm x86" +# TODO(sjg@chromium.org): Remove when x86 can build all boards +BOARDS="alex butterfly emeraldlake2 haswell link lumpy lumpy64 mario parrot stout stumpy" +IUSE="${BOARDS} exynos factory-mode memtest tegra cros_ec depthcharge spring" + +REQUIRED_USE="^^ ( ${BOARDS} arm )" + +X86_DEPEND=" + virtual/chromeos-coreboot + sys-apps/coreboot-utils + sys-boot/chromeos-seabios +" +DEPEND=" + exynos? ( sys-boot/exynos-pre-boot ) + tegra? ( virtual/tegra-bct ) + x86? ( ${X86_DEPEND} ) + amd64? ( ${X86_DEPEND} ) + virtual/u-boot + cros_ec? ( chromeos-base/chromeos-ec ) + chromeos-base/vboot_reference + sys-boot/chromeos-bmpblk + memtest? ( sys-boot/chromeos-memtest ) + depthcharge? ( sys-boot/depthcharge ) + " + +S=${WORKDIR} + +# Directory where the generated files are looked for and placed. +CROS_FIRMWARE_IMAGE_DIR="/firmware" +CROS_FIRMWARE_ROOT="${ROOT%/}${CROS_FIRMWARE_IMAGE_DIR}" + +netboot_required() { + ! use memtest && ( use factory-mode || use link || use spring) +} + +# Build vboot and non-vboot images for the given device tree file +# A vboot image performs a full verified boot, and this is the normal case. +# A non-vboot image doesn't do a check for updated firmware, and just boots +# the kernel without verity enabled. +# Args: +# $1: fdt_file - full name of device tree file +# $2: uboot_file - full name of U-Boot binary +# $3: ec_file - full name of the EC read/write binary +# $4: common_flags - flags to use for all images +# $5: verified_flags - extra flags to use for verified image +# $6: nv_flags - extra flags to pass for non-verified image + +build_image() { + local nv_uboot_file + local fdt_file="$1" + local uboot_file="$2" + local ec_file="$3" + local common_flags="$4" + local verified_flags="$5" + local nv_flags="$6" + + local board + local base + + local ec_file_flag + if use cros_ec; then + ec_file_flag="--ec ${ec_file}" + else + ec_file_flag="" + fi + einfo "Building images for ${fdt_file}" + + # Bash stuff to turn '/path/to/exynos-5250-snow.dts' into 'snow' + base=$(basename ${fdt_file}) + board=${base%%.dts} + board=${board##*-} + cmdline="${common_flags} \ + --dt ${fdt_file} \ + --uboot ${uboot_file} \ + ${ec_file_flag} \ + --bootcmd vboot_twostop \ + --bootsecure \ + ${verified_flags}" + + # Build an RO-normal image, and an RW (twostop) image. This assumes + # that the fdt has the flags set to 1 by default. + cros_bundle_firmware ${cmdline} \ + --outdir "out-${board}.ro" \ + --output "image-${board}.bin" || + die "failed to build image." + cros_bundle_firmware ${cmdline} --force-rw \ + --outdir "out-${board}.rw" \ + --output "image-${board}.rw.bin" || + die "failed to build image." + + # Make non-vboot image + nv_uboot_file="${uboot_file}" + if netboot_required; then + nv_uboot_file="${CROS_FIRMWARE_ROOT}/u-boot_netboot.bin" + fi + cros_bundle_firmware \ + ${common_flags} \ + --dt ${fdt_file} \ + --uboot ${nv_uboot_file} \ + ${ec_file_flag} \ + --add-config-int load_env 1 \ + --add-node-enable console 1 \ + ${nv_flags} \ + --outdir "nvout-${board}" \ + --output "nv_image-${board}.bin" || + die "failed to build legacy image." +} + +src_compile() { + + local verified_flags='' + local common_flags='' + local bct_file + local fdt_file + local uboot_file + local devkeys_file + local dd_params + + # Location of the board-specific bct file + bct_file="${ROOT%/}${CROS_FIRMWARE_IMAGE_DIR}/bct/board.bct" + + if use memtest; then + uboot_file="${CROS_FIRMWARE_ROOT}/x86-memtest" + elif use depthcharge; then + uboot_file="${CROS_FIRMWARE_ROOT}/depthcharge/depthcharge.bin" + U_BOOT_FDT_USE="${U_BOOT_FDT_USE}_dc" + else + # We only have a single U-Boot, and it is called u-boot.bin + uboot_file="${CROS_FIRMWARE_ROOT}/u-boot.bin" + fi + + # Location of the EC RW image + ec_file="${CROS_FIRMWARE_ROOT}/ec.RW.bin" + + # Location of the devkeys + devkeys_file="${ROOT%/}/usr/share/vboot/devkeys" + + if ! use x86 && ! use amd64 && ! use cros-debug; then + verified_flags+=' --add-config-int silent_console 1' + fi + if use x86 || use amd64; then + # Add a SeaBIOS payload + common_flags+=" --seabios ${CROS_FIRMWARE_ROOT}/seabios.cbfs" + common_flags+=" --coreboot \ + ${CROS_FIRMWARE_ROOT}/coreboot.rom" + if use depthcharge; then + common_flags+=" --coreboot-elf=${CROS_FIRMWARE_ROOT}" + common_flags+="/depthcharge/depthcharge.elf" + fi + fi + + common_flags+=" --board ${BOARD_USE} --bct ${bct_file}" + common_flags+=" --key ${devkeys_file}" + common_flags+=" --bmpblk ${CROS_FIRMWARE_ROOT}/bmpblk.bin" + + # TODO(sjg@chromium.org): For x86 we can't build all the images + # yet, since we need to use a different skeleton file for each. + if use x86 || use amd64; then + einfo "x86: Only building for board ${U_BOOT_FDT_USE}" + # Location of the U-Boot flat device tree source file + fdt_file="${CROS_FIRMWARE_ROOT}/dts/${U_BOOT_FDT_USE}.dts" + build_image "${fdt_file}" "${uboot_file}" "${ec_file}" \ + "${common_flags}" "${verified_flags}" "" + + else + einfo "Building all images" + for fdt_file in ${CROS_FIRMWARE_ROOT}/dts/*.dts; do + build_image "${fdt_file}" "${uboot_file}" \ + "${ec_file}" "${common_flags}" \ + "${verified_flags}" "" + done + fi +} + +src_install() { + insinto "${CROS_FIRMWARE_IMAGE_DIR}" + doins *image*.bin +}