Merge pull request #974 from marineam/grub

Lots of bits for future GRUB and my own Xen testing
This commit is contained in:
Michael Marineau 2014-12-01 17:36:21 -08:00
commit 35e18d4d42
17 changed files with 132 additions and 17 deletions

View File

@ -9,7 +9,7 @@ HOMEPAGE="http://coreos.com"
LICENSE="GPL-2" LICENSE="GPL-2"
SLOT="0" SLOT="0"
KEYWORDS="amd64 arm x86" KEYWORDS="amd64 arm x86"
IUSE="" IUSE="vm-testing"
# The dependencies here are meant to capture "all the packages # The dependencies here are meant to capture "all the packages
# developers want to use for development, test, or debug". This # developers want to use for development, test, or debug". This
@ -52,12 +52,10 @@ RDEPEND="
sys-process/ktop sys-process/ktop
sys-process/procps sys-process/procps
sys-process/psmisc sys-process/psmisc
vm-testing? (
app-emulation/xen
app-emulation/xen-pvgrub
app-emulation/xen-tools
app-emulation/qemu
)
" "
# TODO: sys-apps/iotools
X86_DEPEND="
app-benchmarks/i7z
"
RDEPEND="${RDEPEND} x86? ( ${X86_DEPEND} )"
RDEPEND="${RDEPEND} amd64? ( ${X86_DEPEND} )"

View File

@ -0,0 +1,7 @@
# CoreOS GRUB settings
# Azure only has a serial console.
set linux_console="console=ttyS0,115200n8"
serial com0 --speed=115200 --word=8 --parity=no
terminal_input serial_com0
terminal_output serial_com0

View File

@ -25,4 +25,5 @@ src_prepare() {
src_install() { src_install() {
insinto "/usr/share/oem" insinto "/usr/share/oem"
doins ${T}/cloud-config.yml doins ${T}/cloud-config.yml
doins ${FILESDIR}/grub.cfg
} }

View File

@ -0,0 +1,7 @@
# CoreOS GRUB settings
# GCE only has a serial console.
set linux_console="console=ttyS0,115200n8"
serial com0 --speed=115200 --word=8 --parity=no
terminal_input serial_com0
terminal_output serial_com0

View File

@ -34,4 +34,5 @@ src_install() {
insinto "/usr/share/oem" insinto "/usr/share/oem"
doins ${T}/cloud-config.yml doins ${T}/cloud-config.yml
doins ${FILESDIR}/grub.cfg
} }

View File

@ -0,0 +1,11 @@
# CoreOS GRUB settings
# Rackspace wanted a longer timeout, I forget why. (15 seconds)
set timeout=15
# Switch default console to ttyS4, only applies to Linux since
# GRUB needs exact IO ports for non-standard serial devices.
set linux_console="console=ttyS4,115200n8 8250.nr_uarts=5"
# Blacklist MEI, the firmware is just plain broken.
set linux_append="modprobe.blacklist=mei_me"

View File

@ -26,4 +26,5 @@ src_install() {
insinto "/usr/share/oem" insinto "/usr/share/oem"
doins ${T}/cloud-config.yml doins ${T}/cloud-config.yml
doins ${FILESDIR}/grub.cfg
} }

View File

@ -0,0 +1,32 @@
#cloud-config
coreos:
units:
- name: xenstored.service
command: start
runtime: yes
content: |
[Unit]
RequiresMountsFor=/proc/xen
[Service]
ExecStartPre=/usr/sbin/modprobe xen-evtchn
ExecStart=/usr/sbin/xenstored --no-fork
ExecStartPost=/usr/bin/xenstore write /local/domain/0/name Domain-0
ExecStartPost=/usr/bin/xenstore write /local/domain/0/domid 0
- name: xenconsoled.service
command: start
runtime: yes
content: |
[Unit]
Requires=xenstored.service
After=xenstored.service
[Service]
ExecStart=/usr/sbin/xenconsoled
oem:
id: xendom0
name: Xen Domain0 for Testing
version-id: @@OEM_VERSION_ID@@
home-url: https://coreos.com
bug-report-url: https://github.com/coreos/bugs/issues

View File

@ -0,0 +1,15 @@
# Boot CoreOS as Xen Domain0
set default=coreos-xen
set xen_console="console=vga,com1 com1=115200,8n1"
set linux_console="console=hvc0 console=tty0"
serial com0 --speed=115200 --word=8 --parity=no
terminal_input console serial_com0
terminal_output console serial_com0
menuentry "CoreOS on Xen" --id=coreos-xen {
multiboot /xen-@@XEN_VERSION@@.gz $xen_console noreboot
gptprio.next -d root -u usr_uuid
module /boot/vmlinuz $linux_console $linux_root usr=PARTUUID=$usr_uuid
}

View File

@ -0,0 +1,29 @@
# Copyright (c) 2013 CoreOS, Inc.. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=5
DESCRIPTION="OEM suite for Xen testing"
HOMEPAGE=""
SRC_URI=""
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64"
IUSE=""
# no source directory
S="${WORKDIR}"
src_prepare() {
sed -e "s%@@OEM_VERSION_ID@@%${PVR}%g" \
${FILESDIR}/cloud-config.yml > ${T}/cloud-config.yml || die
sed -e "s%@@XEN_VERSION@@%${PV}%g" \
${FILESDIR}/grub.cfg > ${T}/grub.cfg || die
}
src_install() {
insinto "/usr/share/oem"
doins ${T}/cloud-config.yml
doins ${T}/grub.cfg
}

View File

@ -0,0 +1,5 @@
# Creating symlinks on FAT doesn't work, so don't do that
INSTALL_MASK="${INSTALL_MASK}
/boot/xen-?.?.gz
/boot/xen-?.gz
/boot/xen.gz"

View File

@ -0,0 +1,6 @@
# We provide xenstore as a standalone package
INSTALL_MASK="${INSTALL_MASK}
/usr/bin/xenstore
/usr/lib/debug/usr/bin/xenstore.debug
/usr/lib/debug/usr/lib*/libxenstore.so*
/usr/lib*/libxenstore.so*"

View File

@ -97,10 +97,10 @@ dev-util/checkbashisms
=sys-fs/lvm2-2.02.107 =sys-fs/lvm2-2.02.107
=sys-block/thin-provisioning-tools-0.3.2 =sys-block/thin-provisioning-tools-0.3.2
# this version includes the xen target # current stable (4.3.x) xen-tools doesn't build without multilib
=sys-boot/grub-2.02_beta2 ~app-emulation/xen-4.4.1
# current stable xen-tools doesn't build without multilib ~app-emulation/xen-tools-4.4.1
=app-emulation/xen-tools-4.4.0-r9 ~app-emulation/xen-pvgrub-4.4.1
# Security update, Gentoo hasn't finished marking it stable yet. # Security update, Gentoo hasn't finished marking it stable yet.
# https://www.openssl.org/news/secadv_20141015.txt # https://www.openssl.org/news/secadv_20141015.txt

View File

@ -1313,6 +1313,7 @@ CONFIG_BLK_DEV_NVME=m
# CONFIG_CDROM_PKTCDVD is not set # CONFIG_CDROM_PKTCDVD is not set
# CONFIG_ATA_OVER_ETH is not set # CONFIG_ATA_OVER_ETH is not set
CONFIG_XEN_BLKDEV_FRONTEND=m CONFIG_XEN_BLKDEV_FRONTEND=m
CONFIG_XEN_BLKDEV_BACKEND=m
CONFIG_VIRTIO_BLK=m CONFIG_VIRTIO_BLK=m
# CONFIG_BLK_DEV_HD is not set # CONFIG_BLK_DEV_HD is not set
CONFIG_BLK_DEV_RBD=m CONFIG_BLK_DEV_RBD=m
@ -1864,6 +1865,7 @@ CONFIG_USB_NET_DRIVERS=m
# #
# CONFIG_WAN is not set # CONFIG_WAN is not set
CONFIG_XEN_NETDEV_FRONTEND=m CONFIG_XEN_NETDEV_FRONTEND=m
CONFIG_XEN_NETDEV_BACKEND=m
CONFIG_VMXNET3=m CONFIG_VMXNET3=m
CONFIG_HYPERV_NET=m CONFIG_HYPERV_NET=m
# CONFIG_ISDN is not set # CONFIG_ISDN is not set
@ -2348,7 +2350,7 @@ CONFIG_ITCO_VENDOR_SUPPORT=y
# CONFIG_W83977F_WDT is not set # CONFIG_W83977F_WDT is not set
# CONFIG_MACHZ_WDT is not set # CONFIG_MACHZ_WDT is not set
# CONFIG_SBC_EPX_C3_WATCHDOG is not set # CONFIG_SBC_EPX_C3_WATCHDOG is not set
# CONFIG_XEN_WDT is not set CONFIG_XEN_WDT=m
# #
# PCI-based Watchdog Cards # PCI-based Watchdog Cards
@ -3005,15 +3007,16 @@ CONFIG_XEN_SELFBALLOONING=y
CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
CONFIG_XEN_SCRUB_PAGES=y CONFIG_XEN_SCRUB_PAGES=y
CONFIG_XEN_DEV_EVTCHN=m CONFIG_XEN_DEV_EVTCHN=m
# CONFIG_XEN_BACKEND is not set CONFIG_XEN_BACKEND=y
CONFIG_XENFS=m CONFIG_XENFS=m
CONFIG_XEN_COMPAT_XENFS=y CONFIG_XEN_COMPAT_XENFS=y
CONFIG_XEN_SYS_HYPERVISOR=y CONFIG_XEN_SYS_HYPERVISOR=y
CONFIG_XEN_XENBUS_FRONTEND=y CONFIG_XEN_XENBUS_FRONTEND=y
# CONFIG_XEN_GNTDEV is not set CONFIG_XEN_GNTDEV=m
CONFIG_XEN_GRANT_DEV_ALLOC=m CONFIG_XEN_GRANT_DEV_ALLOC=m
CONFIG_SWIOTLB_XEN=y CONFIG_SWIOTLB_XEN=y
CONFIG_XEN_TMEM=m CONFIG_XEN_TMEM=m
CONFIG_XEN_PCIDEV_BACKEND=m
CONFIG_XEN_PRIVCMD=m CONFIG_XEN_PRIVCMD=m
CONFIG_XEN_ACPI_PROCESSOR=m CONFIG_XEN_ACPI_PROCESSOR=m
CONFIG_XEN_MCE_LOG=y CONFIG_XEN_MCE_LOG=y