[build] unify x86-64 builds under magenta-pc-x86-64

Fold the magenta-pc-uefi and magenta-qemu-x86-64 builds into a
unified magenta-pc-x86-64 build.  The pc-x86-64 build enabled an
intel-hda driver, while the pc-uefi driver had some workarounds
for Pixel2 (gated on recognition of the Pixel2 via ACPI).

Update the default project and the run-magenta script.

Change-Id: Iff2c3f347b342d056296eb0625c635a82a67d978
Esse commit está contido em:
Brian Swetland
2016-07-17 21:47:29 -07:00
commit 9bb94777f8
15 arquivos alterados com 21 adições e 106 exclusões
@@ -279,7 +279,7 @@ static const pcie_driver_fn_table_t BCC_FN_TABLE = {
.pcie_release_fn = bcc_pci_release,
};
STATIC_PCIE_DRIVER(intel_hda, "Broadwell Chipset Config", BCC_FN_TABLE)
STATIC_PCIE_DRIVER(broadwell_chipset, "Broadwell Chipset Config", BCC_FN_TABLE)
/****************************************************************************************
*
-16
Ver Arquivo
@@ -1,16 +0,0 @@
# Copyright 2016 The Fuchsia Authors
# Copyright (c) 2008-2015 Travis Geiselbrecht
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT
SUBARCH := x86-64
MODULES +=
# we're going to need to put the user cpio archive in the kernel binary directly
EMBED_USER_BOOTFS:=true
include project/virtual/test.mk
include project/virtual/user.mk
include project/target/pc-uefi.mk
-10
Ver Arquivo
@@ -1,10 +0,0 @@
# Copyright 2016 The Fuchsia Authors
# Copyright (c) 2008-2015 Travis Geiselbrecht
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT
ARCH := x86
SUBARCH ?= x86-64
TARGET := pc-uefi
-13
Ver Arquivo
@@ -1,13 +0,0 @@
// Copyright 2016 The Fuchsia Authors
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#include "target_p.h"
void target_init(void)
{
pc_uefi_debug_init();
}
-25
Ver Arquivo
@@ -1,25 +0,0 @@
# Copyright 2016 The Fuchsia Authors
# Copyright (c) 2008-2015 Travis Geiselbrecht
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT
LOCAL_DIR := $(GET_LOCAL_DIR)
MODULE := $(LOCAL_DIR)
PLATFORM := pc
MODULE_SRCS += \
$(LOCAL_DIR)/config.c \
$(LOCAL_DIR)/debug.c \
$(LOCAL_DIR)/pixel2_quirks.c
MODULE_DEPS += \
dev/broadwell_chipset_config \
dev/i915 \
dev/thermal/intel_pch_thermal
include make/module.mk
+2 -33
Ver Arquivo
@@ -1,44 +1,13 @@
// Copyright 2016 The Fuchsia Authors
// Copyright (c) 2012 Corey Tabaka
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#include <dev/driver.h>
#include <dev/class/block.h>
#include <dev/class/netif.h>
#include <platform/uart.h>
#include <platform/ide.h>
#include <platform/pcnet.h>
#include <platform.h>
#include <malloc.h>
#include <string.h>
#include <debug.h>
#if 0
static const struct platform_uart_config uart0_config = {
.io_port = 0x3f8,
.irq = ISA_IRQ_SERIAL1,
.baud_rate = 115200,
.rx_buf_len = 1024,
.tx_buf_len = 1024,
};
DEVICE_INSTANCE(uart, uart0, &uart0_config);
#endif
#ifndef ARCH_X86_64
static const struct platform_ide_config ide0_config = {
};
DEVICE_INSTANCE(ide, ide0, &ide0_config);
#endif
#include "target_p.h"
void target_init(void)
{
//device_init_all();
pc_debug_init();
}
@@ -47,7 +47,7 @@ bool has_cros_embedded_controller(void)
return has_cros_ec;
}
void pc_uefi_debug_init(void)
void pc_debug_init(void)
{
/* The Pixel2 does not have the serial RX IRQ wired up for the debug UART.
* Try to detect if we're a Pixel2 by checking for a CrOS embedded
+8 -2
Ver Arquivo
@@ -5,7 +5,6 @@
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT
# mostly null target configuration for pc-x86
LOCAL_DIR := $(GET_LOCAL_DIR)
MODULE := $(LOCAL_DIR)
@@ -13,7 +12,14 @@ MODULE := $(LOCAL_DIR)
PLATFORM := pc
MODULE_SRCS += \
$(LOCAL_DIR)/config.c
$(LOCAL_DIR)/config.c \
$(LOCAL_DIR)/debug.c \
$(LOCAL_DIR)/pixel2_quirks.c
MODULE_DEPS += \
dev/broadwell_chipset_config \
dev/i915 \
dev/thermal/intel_pch_thermal
include make/module.mk
@@ -6,4 +6,4 @@
#pragma once
void pc_uefi_debug_init(void);
void pc_debug_init(void);
+1 -1
Ver Arquivo
@@ -9,7 +9,7 @@ LKMAKEROOT := .
LKROOT := kernel
LKINC := system third_party
BUILDROOT ?= .
DEFAULT_PROJECT ?= magenta-qemu-x86-64
DEFAULT_PROJECT ?= magenta-pc-x86-64
TOOLCHAIN_PREFIX ?=
ENABLE_BUILD_SYSROOT ?= false
+1 -1
Ver Arquivo
@@ -6,7 +6,7 @@
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT
export PROJECT=magenta-qemu-x86-64
export PROJECT=magenta-pc-x86-64
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+1 -1
Ver Arquivo
@@ -10,7 +10,7 @@ set -e -u
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECT="magenta-pc-uefi"
PROJECT="magenta-pc-x86-64"
PROJECT_DIR="$DIR/../build-$PROJECT"
(cd "$DIR/.."; $DIR/make-parallel $PROJECT) || exit
+5 -1
Ver Arquivo
@@ -73,7 +73,11 @@ if [ "$ARCH" == "" ]; then
HELP
fi
PROJECT=magenta-qemu-$ARCH
if [ "$ARCH" = "x86-64" ]; then
PROJECT=magenta-pc-x86-64
else
PROJECT=magenta-qemu-$ARCH
fi
# build the project if asked for
if [ "$BUILD" -eq 1 ]; then