libpayload: Remove some old files, and move some files to depthcharge-y.
Change-Id: Ieb3649f322287787d72e1fbb2662cd4f532f5e73
diff --git a/src/arch/arm/v7/Makefile.inc b/src/arch/arm/v7/Makefile.inc
index a5bc8cc..dfe014e 100644
--- a/src/arch/arm/v7/Makefile.inc
+++ b/src/arch/arm/v7/Makefile.inc
@@ -15,6 +15,8 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
##
+classes-y += libc
+
subdirs-y += handoff
depthcharge-y += boot.c
diff --git a/src/arch/arm/v8/Makefile.inc b/src/arch/arm/v8/Makefile.inc
index 942b0cb..3d82177 100644
--- a/src/arch/arm/v8/Makefile.inc
+++ b/src/arch/arm/v8/Makefile.inc
@@ -15,6 +15,8 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
##
+classes-y += libc
+
subdirs-y += handoff lib
depthcharge-y += boot_asm.S
diff --git a/src/arch/x86/ia32/Makefile.inc b/src/arch/x86/ia32/Makefile.inc
index 209f6d8..ece56f4 100644
--- a/src/arch/x86/ia32/Makefile.inc
+++ b/src/arch/x86/ia32/Makefile.inc
@@ -15,6 +15,8 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
##
+classes-y += libc
+
subdirs-y += handoff preram temp_stack
depthcharge-y += enter_trampoline.c
diff --git a/src/base/libc/Makefile.inc b/src/base/libc/Makefile.inc
index fbe6f4e..c8550d0 100644
--- a/src/base/libc/Makefile.inc
+++ b/src/base/libc/Makefile.inc
@@ -25,6 +25,8 @@
## SUCH DAMAGE.
##
+classes-y += libc
+
libc-y += ctype.c
libc-y += elf.c
libc-y += lib.c
diff --git a/src/drivers/blockdev/Makefile.inc b/src/drivers/blockdev/Makefile.inc
index b1c32fe..404c4d3 100644
--- a/src/drivers/blockdev/Makefile.inc
+++ b/src/drivers/blockdev/Makefile.inc
@@ -28,4 +28,4 @@
depthcharge-$(CONFIG_DRIVER_BLOCKDEV_UEFI) += uefi.c
depthcharge-$(CONFIG_DRIVER_BLOCKDEV_USB) += usb.c
-libc-$(CONFIG_USB_MSC) += usbmsc.c
+depthcharge-$(CONFIG_USB_MSC) += usbmsc.c
diff --git a/src/libpayload/LICENSES b/src/libpayload/LICENSES
deleted file mode 100644
index afdd67a..0000000
--- a/src/libpayload/LICENSES
+++ /dev/null
@@ -1,131 +0,0 @@
--------------------------------------------------------------------------------
-Copyright and Licenses
--------------------------------------------------------------------------------
-
-The copyright on libpayload is owned by various individual developers
-and/or companies. Please check the individual source files for details.
-
-The libpayload code is mostly licensed under the terms of the three-clause
-BSD license:
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.
-
-For some parts, which were taken from external projects, other (compatible)
-licenses may apply. Please check the individual source files for details,
-or see the section at the bottom of this file for an overview of third-party
-code in libpayload.
-
-(Please note that the coreboot project makes a best effort to keep licensing
-information up to date and accurate, but provides no legal guarantees to that
-regard. If you redistribute libpayload code in source or binary form, it is
-your liability to ensure that you conform to all legal requirements that this
-might entail.)
-
-Third-party Code and License Overview
--------------------------------------
-
-This is an overview of (modified or unmodified) third-party code in
-libpayload, and where it was originally taken from.
-
-Please check the individual source code files for the list of copyright
-holders, and the exact license terms that apply.
-
-* util/kconfig/*: GPLv2
- Source: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
- Current version we use: 587c90616a5b44e6ccfac38e64d4fecee51d588c (03/2008)
-
-* include/curses.priv.h: BSD-like license
- Source: ncurses, http://www.gnu.org/software/ncurses/
- Original files: ncurses/curses.priv.h
- Current version we use: 5.6
-
-* include/curses.h: BSD-like license
- Source: ncurses, http://www.gnu.org/software/ncurses/
- Original files: include/curses.h.in
- Current version we use: 5.6
-
-* include/lar.h: GPLv2 or revised BSD license
- Source: coreboot v3, svn://coreboot.org/repository/coreboot-v3
- Original file: util/lar/lar.h
- Current version we use: r647
-
-* libc/ipchecksum.c: 2-clause BSD license
- Source: FreeBSD's base system libraries, http://www.freebsd.org
- http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libalias/Attic/alias_util.c?rev=1.15;content-type=text%2Fplain
- Original files: lib/libalias/alias_util.c, function LibAliasInternetChecksum()
- Current version we use: CVS revision 1.15 2004/07/06 12:13:28
-
-* libc/rand.c: 3-clause BSD license
- Source: OpenBSD
- http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdlib/rand.c
- Original files: src/lib/libc/stdlib/rand.c
- Current version we use: CVS revision 1.9 2005/8/8 08:05:37
-
-* libc/memory.c: 3-clause BSD license
- Source: HelenOS, http://www.helenos.eu
- svn checkout svn://svn.helenos.eu/HelenOS/trunk HelenOS
- http://svn.helenos.eu/chora/browse.php?f=%2Ftrunk%2F
- Original files: uspace/libc/generic/string.c
- Current version we use: r2754
-
-* libc/printf.c: 3-clause BSD license
- Source: HelenOS, http://www.helenos.eu
- svn checkout svn://svn.helenos.eu/HelenOS/trunk HelenOS
- http://svn.helenos.eu/chora/browse.php?f=%2Ftrunk%2F
- Original files: kernel/generic/src/printf/printf_core.c
- kernel/generic/src/printf/snprintf.c
- kernel/generic/src/printf/sprintf.c
- kernel/generic/src/printf/vsnprintf.c
- kernel/generic/src/printf/vsprintf.c
- kernel/generic/src/printf/printf.c
- kernel/generic/src/printf/vprintf.c
- Current version we use: r2745
-
-* drivers/video/font8x16.c: 3-clause BSD license
- Source: HelenOS, http://www.helenos.eu
- svn checkout svn://svn.helenos.eu/HelenOS/trunk HelenOS
- http://svn.helenos.eu/chora/browse.php?f=%2Ftrunk%2F
- Original file: kernel/genarch/src/fb/font-8x16.c
- Current version we use: r3293
-
-* crypto/sha1.c: Public domain
- Source: OpenBSD
- http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/hash/sha1.c
- Original files: src/lib/libc/hash/sha1.c
- Current version we use: CVS revision 1.20 2005/08/08
-
-* arch/arm/mem*.S: GPLv2
- Source: Linux, http://www.kernel.org
- Original files: arch/arm/lib/mem*.S
- Current version we use: 3.9 (418df63adac56841ef6b0f1fcf435bc64d4ed177)
-
-* arch/x86/string.c: LGPLv2.1, modified to GPLv2 under the terms of section 3
- Source: GNU C Library (glibc), http://www.gnu.org/software/libc/libc.html
- Original files: sysdeps/i386/memset.c
- Current version we use: 2.14
-
-* liblz4/lz4.c: 2-clause BSD
- Source: LZ4 library, https://github.com/Cyan4973/lz4
- Current version we use: r130 (baf78e7e4dcbdf824a76f990ffeb573d113bbbdb)
diff --git a/src/libpayload/Makefile.inc b/src/libpayload/Makefile.inc
index c905560..aaa9879 100644
--- a/src/libpayload/Makefile.inc
+++ b/src/libpayload/Makefile.inc
@@ -27,8 +27,6 @@
## SUCH DAMAGE.
##
-classes-y += libc
-
-subdirs-y += drivers libc
+subdirs-y += drivers
src-includes-y += include
diff --git a/src/libpayload/README b/src/libpayload/README
deleted file mode 100644
index 0f905cb..0000000
--- a/src/libpayload/README
+++ /dev/null
@@ -1,65 +0,0 @@
--------------------------------------------------------------------------------
-libpayload README
--------------------------------------------------------------------------------
-
-libpayload is a minimal library to support standalone payloads
-that can be booted with firmware like coreboot. It handles the setup
-code, and provides common C library symbols such as malloc() and printf().
-
-Note: This is _not_ a standard library for use with an operating system,
-rather it's only useful for coreboot payload development!
-See http://coreboot.org for details on coreboot.
-
-
-Installation
-------------
-
- $ git clone http://review.coreboot.org/p/coreboot.git
-
- $ cd coreboot/payloads/libpayload
-
- $ make menuconfig
-
- $ make
-
- $ sudo make install (optional, will install into /opt per default)
-
-As libpayload is for 32bit x86 systems only, you might have to install the
-32bit libgcc version, otherwise your payloads will fail to compile.
-On Debian systems you'd do 'apt-get install gcc-multilib' for example.
-
-
-Usage
------
-
-Here's an example of a very simple payload (hello.c) and how to build it:
-
- #include <libpayload.h>
-
- int main(void)
- {
- printf("Hello, world!\n");
- return 0;
- }
-
-Building the payload using the 'lpgcc' compiler wrapper:
-
- $ lpgcc -o hello.elf hello.c
-
-Please see the sample/ directory for details.
-
-
-Website and Mailing List
-------------------------
-
-The main website is http://www.coreboot.org/Libpayload.
-
-For additional information, patches, and discussions, please join the
-coreboot mailing list at http://coreboot.org/Mailinglist, where most
-libpayload developers are subscribed.
-
-
-Copyright and License
----------------------
-
-See LICENSES.
diff --git a/src/libpayload/drivers/Makefile.inc b/src/libpayload/drivers/Makefile.inc
index 30d9fe7..b700339 100644
--- a/src/libpayload/drivers/Makefile.inc
+++ b/src/libpayload/drivers/Makefile.inc
@@ -27,32 +27,32 @@
## SUCH DAMAGE.
##
-libc-$(CONFIG_PCI) += pci.c
+depthcharge-$(CONFIG_PCI) += pci.c
-libc-$(CONFIG_NVRAM) += nvram.c
+depthcharge-$(CONFIG_NVRAM) += nvram.c
# USB stack
-libc-$(CONFIG_USB) += usb/usbinit.c
-libc-$(CONFIG_USB) += usb/usb.c
-libc-$(CONFIG_USB) += usb/usb_dev.c
-libc-$(CONFIG_USB) += usb/quirks.c
-libc-$(CONFIG_USB_GEN_HUB) += usb/generic_hub.c
-libc-$(CONFIG_USB_HUB) += usb/usbhub.c
-libc-$(CONFIG_USB_UHCI) += usb/uhci.c
-libc-$(CONFIG_USB_UHCI) += usb/uhci_rh.c
-libc-$(CONFIG_USB_OHCI) += usb/ohci.c
-libc-$(CONFIG_USB_OHCI) += usb/ohci_rh.c
-libc-$(CONFIG_USB_EHCI) += usb/ehci.c
-libc-$(CONFIG_USB_EHCI) += usb/ehci_rh.c
-libc-$(CONFIG_USB_XHCI) += usb/xhci.c
-libc-$(CONFIG_USB_XHCI) += usb/xhci_debug.c
-libc-$(CONFIG_USB_XHCI) += usb/xhci_devconf.c
-libc-$(CONFIG_USB_XHCI) += usb/xhci_events.c
-libc-$(CONFIG_USB_XHCI) += usb/xhci_commands.c
-libc-$(CONFIG_USB_XHCI) += usb/xhci_rh.c
-libc-$(CONFIG_USB_DWC2) += usb/dwc2.c
-libc-$(CONFIG_USB_DWC2) += usb/dwc2_rh.c
+depthcharge-$(CONFIG_USB) += usb/usbinit.c
+depthcharge-$(CONFIG_USB) += usb/usb.c
+depthcharge-$(CONFIG_USB) += usb/usb_dev.c
+depthcharge-$(CONFIG_USB) += usb/quirks.c
+depthcharge-$(CONFIG_USB_GEN_HUB) += usb/generic_hub.c
+depthcharge-$(CONFIG_USB_HUB) += usb/usbhub.c
+depthcharge-$(CONFIG_USB_UHCI) += usb/uhci.c
+depthcharge-$(CONFIG_USB_UHCI) += usb/uhci_rh.c
+depthcharge-$(CONFIG_USB_OHCI) += usb/ohci.c
+depthcharge-$(CONFIG_USB_OHCI) += usb/ohci_rh.c
+depthcharge-$(CONFIG_USB_EHCI) += usb/ehci.c
+depthcharge-$(CONFIG_USB_EHCI) += usb/ehci_rh.c
+depthcharge-$(CONFIG_USB_XHCI) += usb/xhci.c
+depthcharge-$(CONFIG_USB_XHCI) += usb/xhci_debug.c
+depthcharge-$(CONFIG_USB_XHCI) += usb/xhci_devconf.c
+depthcharge-$(CONFIG_USB_XHCI) += usb/xhci_events.c
+depthcharge-$(CONFIG_USB_XHCI) += usb/xhci_commands.c
+depthcharge-$(CONFIG_USB_XHCI) += usb/xhci_rh.c
+depthcharge-$(CONFIG_USB_DWC2) += usb/dwc2.c
+depthcharge-$(CONFIG_USB_DWC2) += usb/dwc2_rh.c
# USB device stack
-libc-$(CONFIG_UDC) += udc/udc.c
-libc-$(CONFIG_UDC_CI) += udc/chipidea.c
+depthcharge-$(CONFIG_UDC) += udc/udc.c
+depthcharge-$(CONFIG_UDC_CI) += udc/chipidea.c
diff --git a/src/libpayload/drivers/video/graphics.c b/src/libpayload/drivers/video/graphics.c
index 9c045dc..4836a8c 100644
--- a/src/libpayload/drivers/video/graphics.c
+++ b/src/libpayload/drivers/video/graphics.c
@@ -1,5 +1,28 @@
/*
- * Copyright (C) 2015 Google, Inc.
+ * Copyright 2015 Google, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
*/
#include <cbgfx.h>