summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--payloads/libpayload/Makefile24
-rw-r--r--payloads/libpayload/Makefile.inc22
-rw-r--r--payloads/libpayload/arch/armv7/Makefile.inc2
-rw-r--r--payloads/libpayload/arch/armv7/coreboot.c19
-rw-r--r--payloads/libpayload/arch/armv7/main.c2
-rw-r--r--payloads/libpayload/arch/x86/Makefile.inc4
-rw-r--r--payloads/libpayload/arch/x86/coreboot.c14
-rw-r--r--payloads/libpayload/arch/x86/main.c2
-rw-r--r--payloads/libpayload/arch/x86/multiboot.c4
-rw-r--r--payloads/libpayload/arch/x86/rom_media.c10
-rw-r--r--payloads/libpayload/arch/x86/sysinfo.c6
-rwxr-xr-xpayloads/libpayload/bin/lpgcc8
-rw-r--r--payloads/libpayload/configs/config.panther92
-rw-r--r--payloads/libpayload/configs/defconfig106
-rw-r--r--payloads/libpayload/crypto/sha1.c2
-rw-r--r--payloads/libpayload/curses/Makefile.inc254
-rw-r--r--payloads/libpayload/curses/keyboard.c14
-rw-r--r--payloads/libpayload/curses/local.h4
-rw-r--r--payloads/libpayload/curses/pdcurses-backend/pdcdisp.c16
-rw-r--r--payloads/libpayload/curses/pdcurses-backend/pdckbd.c14
-rw-r--r--payloads/libpayload/curses/pdcurses-backend/pdcscrn.c2
-rw-r--r--payloads/libpayload/curses/pdcurses-backend/pdcsetsc.c4
-rw-r--r--payloads/libpayload/curses/pdcurses-backend/pdcutil.c2
-rw-r--r--payloads/libpayload/curses/tinycurses.c30
-rw-r--r--payloads/libpayload/drivers/Makefile.inc80
-rw-r--r--payloads/libpayload/drivers/keyboard.c4
-rw-r--r--payloads/libpayload/drivers/nvram.c2
-rw-r--r--payloads/libpayload/drivers/serial.c12
-rw-r--r--payloads/libpayload/drivers/storage/ahci.c8
-rw-r--r--payloads/libpayload/drivers/storage/ata.c2
-rw-r--r--payloads/libpayload/drivers/storage/storage.c4
-rw-r--r--payloads/libpayload/drivers/usb/ehci.c2
-rw-r--r--payloads/libpayload/drivers/usb/ohci.c2
-rw-r--r--payloads/libpayload/drivers/usb/usb.c6
-rw-r--r--payloads/libpayload/drivers/usb/usbhid.c2
-rw-r--r--payloads/libpayload/drivers/usb/usbinit.c28
-rw-r--r--payloads/libpayload/drivers/usb/xhci.c6
-rw-r--r--payloads/libpayload/drivers/usb/xhci_private.h2
-rw-r--r--payloads/libpayload/drivers/video/video.c12
-rw-r--r--payloads/libpayload/include/cbfs_core.h2
-rw-r--r--payloads/libpayload/include/endian.h4
-rw-r--r--payloads/libpayload/include/kconfig.h4
-rw-r--r--payloads/libpayload/include/libpayload.h4
-rw-r--r--payloads/libpayload/include/stdlib.h2
-rw-r--r--payloads/libpayload/include/storage/storage.h2
-rw-r--r--payloads/libpayload/include/sysinfo.h8
-rw-r--r--payloads/libpayload/libc/Makefile.inc18
-rw-r--r--payloads/libpayload/libc/console.c12
-rw-r--r--payloads/libpayload/libc/exec.c4
-rw-r--r--payloads/libpayload/libc/malloc.c14
-rw-r--r--payloads/libpayload/libc/time.c4
-rw-r--r--payloads/libpayload/libcbfs/Makefile.inc4
-rw-r--r--payloads/libpayload/libcbfs/cbfs.c8
-rw-r--r--payloads/libpayload/libcbfs/cbfs_core.c4
-rw-r--r--payloads/libpayload/liblzma/Makefile.inc2
-rw-r--r--payloads/libpayload/tests/libpayload-config.h48
-rw-r--r--payloads/libpayload/util/kconfig/confdata.c52
-rw-r--r--payloads/libpayload/util/kconfig/mconf.c20
58 files changed, 523 insertions, 522 deletions
diff --git a/payloads/libpayload/Makefile b/payloads/libpayload/Makefile
index a1e8dc7510..64165197b8 100644
--- a/payloads/libpayload/Makefile
+++ b/payloads/libpayload/Makefile
@@ -57,7 +57,7 @@ export KCONFIG_AUTOCONFIG := $(obj)/auto.conf
# directory containing the toplevel Makefile.inc
TOPLEVEL := .
-CONFIG_SHELL := sh
+CONFIG_LP_SHELL := sh
KBUILD_DEFCONFIG := configs/defconfig
UNAME_RELEASE := $(shell uname -r)
DOTCONFIG ?= .config
@@ -91,15 +91,15 @@ include util/kconfig/Makefile
include $(HAVE_DOTCONFIG)
-ARCHDIR-$(CONFIG_ARCH_ARMV7) := armv7
-ARCHDIR-$(CONFIG_ARCH_X86) := x86
+ARCHDIR-$(CONFIG_LP_ARCH_ARMV7) := armv7
+ARCHDIR-$(CONFIG_LP_ARCH_X86) := x86
ARCH-y := $(ARCHDIR-y)
# If architecture folder name is different from GCC binutils architecture name,
# override here.
-ARCH-$(CONFIG_ARCH_ARMV7) := armv7
-ARCH-$(CONFIG_ARCH_X86) := i386
+ARCH-$(CONFIG_LP_ARCH_ARMV7) := armv7
+ARCH-$(CONFIG_LP_ARCH_X86) := i386
CC := $(CC_$(ARCH-y))
AS := $(AS_$(ARCH-y))
@@ -137,13 +137,13 @@ real-all: config
else
ifneq ($(INNER_SCANBUILD),y)
-ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
+ifeq ($(CONFIG_LP_COMPILER_LLVM_CLANG),y)
CC:=clang -m32
HOSTCC:=clang
endif
endif
-ifeq ($(CONFIG_CCACHE),y)
+ifeq ($(CONFIG_LP_CCACHE),y)
CCACHE:=$(word 1,$(wildcard $(addsuffix /ccache,$(subst :, ,$(PATH)))))
ifeq ($(CCACHE),)
$(error ccache selected, but not found in PATH)
@@ -161,12 +161,12 @@ strip_quotes = $(subst ",,$(subst \",,$(1)))
# other files
ifeq ($(INNER_SCANBUILD),y)
-CONFIG_SCANBUILD_ENABLE:=
+CONFIG_LP_SCANBUILD_ENABLE:=
endif
-ifeq ($(CONFIG_SCANBUILD_ENABLE),y)
-ifneq ($(CONFIG_SCANBUILD_REPORT_LOCATION),)
-CONFIG_SCANBUILD_REPORT_LOCATION:=-o $(CONFIG_SCANBUILD_REPORT_LOCATION)
+ifeq ($(CONFIG_LP_SCANBUILD_ENABLE),y)
+ifneq ($(CONFIG_LP_SCANBUILD_REPORT_LOCATION),)
+CONFIG_LP_SCANBUILD_REPORT_LOCATION:=-o $(CONFIG_LP_SCANBUILD_REPORT_LOCATION)
endif
real-all:
echo '#!/bin/sh' > .ccwrap
@@ -175,7 +175,7 @@ real-all:
echo 'if [ "$$1" = "--hostcxx" ]; then shift; CC="$(HOSTCXX)"; fi' >> .ccwrap
echo 'eval $$CC $$*' >> .ccwrap
chmod +x .ccwrap
- scan-build $(CONFIG_SCANBUILD_REPORT_LOCATION) -analyze-headers --use-cc=$(top)/.ccwrap --use-c++=$(top)/.ccwrap $(MAKE) INNER_SCANBUILD=y
+ scan-build $(CONFIG_LP_SCANBUILD_REPORT_LOCATION) -analyze-headers --use-cc=$(top)/.ccwrap --use-c++=$(top)/.ccwrap $(MAKE) INNER_SCANBUILD=y
else
real-all: real-target
endif
diff --git a/payloads/libpayload/Makefile.inc b/payloads/libpayload/Makefile.inc
index ea1bcff25c..a5de4b3ef8 100644
--- a/payloads/libpayload/Makefile.inc
+++ b/payloads/libpayload/Makefile.inc
@@ -31,26 +31,26 @@
export KERNELVERSION := 0.2.0
-ARCHDIR-$(CONFIG_ARCH_ARMV7) := armv7
-ARCHDIR-$(CONFIG_ARCH_X86) := x86
+ARCHDIR-$(CONFIG_LP_ARCH_ARMV7) := armv7
+ARCHDIR-$(CONFIG_LP_ARCH_X86) := x86
DESTDIR ?= install
real-target: lib
-classes-$(CONFIG_PCI) += libpci
-classes-$(CONFIG_LIBC) += libc
-classes-$(CONFIG_CURSES) += libcurses
-classes-$(CONFIG_PDCURSES) += libmenu libform libpanel
-classes-$(CONFIG_CBFS) += libcbfs
-classes-$(CONFIG_LZMA) += liblzma
+classes-$(CONFIG_LP_PCI) += libpci
+classes-$(CONFIG_LP_LIBC) += libc
+classes-$(CONFIG_LP_CURSES) += libcurses
+classes-$(CONFIG_LP_PDCURSES) += libmenu libform libpanel
+classes-$(CONFIG_LP_CBFS) += libcbfs
+classes-$(CONFIG_LP_LZMA) += liblzma
libraries := $(classes-y)
classes-y += head.o
subdirs-y := arch/$(ARCHDIR-y)
subdirs-y += crypto libc drivers libpci
-subdirs-$(CONFIG_CURSES) += curses
-subdirs-$(CONFIG_CBFS) += libcbfs
-subdirs-$(CONFIG_LZMA) += liblzma
+subdirs-$(CONFIG_LP_CURSES) += curses
+subdirs-$(CONFIG_LP_CBFS) += libcbfs
+subdirs-$(CONFIG_LP_LZMA) += liblzma
INCLUDES := -Iinclude -Iinclude/$(ARCHDIR-y) -I$(obj)
CFLAGS = $(EXTRA_CFLAGS) $(INCLUDES) -Os -pipe -nostdinc
diff --git a/payloads/libpayload/arch/armv7/Makefile.inc b/payloads/libpayload/arch/armv7/Makefile.inc
index a27fdd4b0a..cd909bb5a6 100644
--- a/payloads/libpayload/arch/armv7/Makefile.inc
+++ b/payloads/libpayload/arch/armv7/Makefile.inc
@@ -36,4 +36,4 @@ libc-y += virtual.c
libc-y += memcpy.S memset.S
libc-y += exception_asm.S exception.c
libc-y += cache.c
-libcbfs-$(CONFIG_CBFS) += dummy_media.c
+libcbfs-$(CONFIG_LP_CBFS) += dummy_media.c
diff --git a/payloads/libpayload/arch/armv7/coreboot.c b/payloads/libpayload/arch/armv7/coreboot.c
index bc9b47e8ae..076010d64d 100644
--- a/payloads/libpayload/arch/armv7/coreboot.c
+++ b/payloads/libpayload/arch/armv7/coreboot.c
@@ -56,7 +56,7 @@ static void cb_parse_memory(void *ptr, struct sysinfo_t *info)
for (i = 0; i < count; i++) {
struct cb_memory_range *range = MEM_RANGE_PTR(mem, i);
-#ifdef CONFIG_MEMMAP_RAM_ONLY
+#ifdef CONFIG_LP_MEMMAP_RAM_ONLY
if (range->type != CB_MEM_RAM)
continue;
#endif
@@ -78,7 +78,7 @@ static void cb_parse_serial(void *ptr, struct sysinfo_t *info)
info->serial = ((struct cb_serial *)ptr);
}
-#ifdef CONFIG_CHROMEOS
+#ifdef CONFIG_LP_CHROMEOS
static void cb_parse_vbnv(unsigned char *ptr, struct sysinfo_t *info)
{
struct cb_vbnv *vbnv = (struct cb_vbnv *)ptr;
@@ -126,7 +126,7 @@ static void cb_parse_mrc_cache(unsigned char *ptr, struct sysinfo_t *info)
info->mrc_cache = phys_to_virt(cbmem->cbmem_tab);
}
-#ifdef CONFIG_NVRAM
+#ifdef CONFIG_LP_NVRAM
static void cb_parse_optiontable(void *ptr, struct sysinfo_t *info)
{
/* ptr points to a coreboot table entry and is already virtual */
@@ -142,7 +142,7 @@ static void cb_parse_checksum(void *ptr, struct sysinfo_t *info)
}
#endif
-#ifdef CONFIG_COREBOOT_VIDEO_CONSOLE
+#ifdef CONFIG_LP_COREBOOT_VIDEO_CONSOLE
static void cb_parse_framebuffer(void *ptr, struct sysinfo_t *info)
{
/* ptr points to a coreboot table entry and is already virtual */
@@ -233,7 +233,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_ASSEMBLER:
cb_parse_string(ptr, &info->assembler);
break;
-#ifdef CONFIG_NVRAM
+#ifdef CONFIG_LP_NVRAM
case CB_TAG_CMOS_OPTION_TABLE:
cb_parse_optiontable(ptr, info);
break;
@@ -241,7 +241,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
cb_parse_checksum(ptr, info);
break;
#endif
-#ifdef CONFIG_COREBOOT_VIDEO_CONSOLE
+#ifdef CONFIG_LP_COREBOOT_VIDEO_CONSOLE
// FIXME we should warn on serial if coreboot set up a
// framebuffer buf the payload does not know about it.
case CB_TAG_FRAMEBUFFER:
@@ -251,7 +251,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_MAINBOARD:
info->mainboard = (struct cb_mainboard *)ptr;
break;
-#ifdef CONFIG_CHROMEOS
+#ifdef CONFIG_LP_CHROMEOS
case CB_TAG_GPIO:
cb_parse_gpios(ptr, info);
break;
@@ -284,8 +284,9 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
int get_coreboot_info(struct sysinfo_t *info)
{
- int ret = cb_parse_header(phys_to_virt(CONFIG_COREBOOT_INFO_RANGE_BASE),
- CONFIG_COREBOOT_INFO_RANGE_SIZE, info);
+ int ret = cb_parse_header(
+ phys_to_virt(CONFIG_LP_COREBOOT_INFO_RANGE_BASE),
+ CONFIG_LP_COREBOOT_INFO_RANGE_SIZE, info);
return (ret == 1) ? 0 : -1;
}
diff --git a/payloads/libpayload/arch/armv7/main.c b/payloads/libpayload/arch/armv7/main.c
index 93cfce5c63..4e7c05dfe1 100644
--- a/payloads/libpayload/arch/armv7/main.c
+++ b/payloads/libpayload/arch/armv7/main.c
@@ -48,7 +48,7 @@ void start_main(void)
lib_get_sysinfo();
/* Optionally set up the consoles. */
-#ifndef CONFIG_SKIP_CONSOLE_INIT
+#ifndef CONFIG_LP_SKIP_CONSOLE_INIT
console_init();
#endif
diff --git a/payloads/libpayload/arch/x86/Makefile.inc b/payloads/libpayload/arch/x86/Makefile.inc
index 0977eb1638..8efbc12831 100644
--- a/payloads/libpayload/arch/x86/Makefile.inc
+++ b/payloads/libpayload/arch/x86/Makefile.inc
@@ -33,7 +33,7 @@ libc-y += timer.c coreboot.c util.S
libc-y += exec.S virtual.c
libc-y += string.c
-libcbfs-$(CONFIG_CBFS) += rom_media.c
+libcbfs-$(CONFIG_LP_CBFS) += rom_media.c
# Multiboot support is configurable
-libc-$(CONFIG_MULTIBOOT) += multiboot.c
+libc-$(CONFIG_LP_MULTIBOOT) += multiboot.c
diff --git a/payloads/libpayload/arch/x86/coreboot.c b/payloads/libpayload/arch/x86/coreboot.c
index 43aa97069c..05ab336940 100644
--- a/payloads/libpayload/arch/x86/coreboot.c
+++ b/payloads/libpayload/arch/x86/coreboot.c
@@ -57,7 +57,7 @@ static void cb_parse_memory(void *ptr, struct sysinfo_t *info)
for (i = 0; i < count; i++) {
struct cb_memory_range *range = MEM_RANGE_PTR(mem, i);
-#ifdef CONFIG_MEMMAP_RAM_ONLY
+#ifdef CONFIG_LP_MEMMAP_RAM_ONLY
if (range->type != CB_MEM_RAM)
continue;
#endif
@@ -79,7 +79,7 @@ static void cb_parse_serial(void *ptr, struct sysinfo_t *info)
info->serial = ((struct cb_serial *)ptr);
}
-#ifdef CONFIG_CHROMEOS
+#ifdef CONFIG_LP_CHROMEOS
static void cb_parse_vboot_handoff(unsigned char *ptr, struct sysinfo_t *info)
{
struct cb_vboot_handoff *vbho = (struct cb_vboot_handoff *)ptr;
@@ -141,7 +141,7 @@ static void cb_parse_acpi_gnvs(unsigned char *ptr, struct sysinfo_t *info)
info->acpi_gnvs = phys_to_virt(cbmem->cbmem_tab);
}
-#ifdef CONFIG_NVRAM
+#ifdef CONFIG_LP_NVRAM
static void cb_parse_optiontable(void *ptr, struct sysinfo_t *info)
{
/* ptr points to a coreboot table entry and is already virtual */
@@ -157,7 +157,7 @@ static void cb_parse_checksum(void *ptr, struct sysinfo_t *info)
}
#endif
-#ifdef CONFIG_COREBOOT_VIDEO_CONSOLE
+#ifdef CONFIG_LP_COREBOOT_VIDEO_CONSOLE
static void cb_parse_framebuffer(void *ptr, struct sysinfo_t *info)
{
/* ptr points to a coreboot table entry and is already virtual */
@@ -254,7 +254,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_ASSEMBLER:
cb_parse_string(ptr, &info->assembler);
break;
-#ifdef CONFIG_NVRAM
+#ifdef CONFIG_LP_NVRAM
case CB_TAG_CMOS_OPTION_TABLE:
cb_parse_optiontable(ptr, info);
break;
@@ -262,7 +262,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
cb_parse_checksum(ptr, info);
break;
#endif
-#ifdef CONFIG_COREBOOT_VIDEO_CONSOLE
+#ifdef CONFIG_LP_COREBOOT_VIDEO_CONSOLE
// FIXME we should warn on serial if coreboot set up a
// framebuffer buf the payload does not know about it.
case CB_TAG_FRAMEBUFFER:
@@ -271,7 +271,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
#endif
case CB_TAG_MAINBOARD:
info->mainboard = (struct cb_mainboard *)ptr;
-#ifdef CONFIG_CHROMEOS
+#ifdef CONFIG_LP_CHROMEOS
case CB_TAG_GPIO:
cb_parse_gpios(ptr, info);
break;
diff --git a/payloads/libpayload/arch/x86/main.c b/payloads/libpayload/arch/x86/main.c
index 1bac7a8aaa..c788f0f670 100644
--- a/payloads/libpayload/arch/x86/main.c
+++ b/payloads/libpayload/arch/x86/main.c
@@ -50,7 +50,7 @@ void start_main(void)
lib_get_sysinfo();
/* Optionally set up the consoles. */
-#ifndef CONFIG_SKIP_CONSOLE_INIT
+#ifndef CONFIG_LP_SKIP_CONSOLE_INIT
console_init();
#endif
diff --git a/payloads/libpayload/arch/x86/multiboot.c b/payloads/libpayload/arch/x86/multiboot.c
index fa0c576dc9..c2c360732f 100644
--- a/payloads/libpayload/arch/x86/multiboot.c
+++ b/payloads/libpayload/arch/x86/multiboot.c
@@ -45,7 +45,7 @@ static void mb_parse_mmap(struct multiboot_header *table,
while(ptr < (start + table->mmap_length)) {
struct multiboot_mmap *mmap = (struct multiboot_mmap *) ptr;
-#ifdef CONFIG_MEMMAP_RAM_ONLY
+#ifdef CONFIG_LP_MEMMAP_RAM_ONLY
/* 1 == normal RAM. Ignore everything else for now */
if (mmap->type == 1) {
@@ -56,7 +56,7 @@ static void mb_parse_mmap(struct multiboot_header *table,
if (++info->n_memranges == SYSINFO_MAX_MEM_RANGES)
return;
-#ifdef CONFIG_MEMMAP_RAM_ONLY
+#ifdef CONFIG_LP_MEMMAP_RAM_ONLY
}
#endif
diff --git a/payloads/libpayload/arch/x86/rom_media.c b/payloads/libpayload/arch/x86/rom_media.c
index e338d1ca1b..5b8cbade1f 100644
--- a/payloads/libpayload/arch/x86/rom_media.c
+++ b/payloads/libpayload/arch/x86/rom_media.c
@@ -83,19 +83,19 @@ int init_x86rom_cbfs_media(struct cbfs_media *media) {
struct cbfs_header *header = (struct cbfs_header*)
*(uint32_t*)(0xfffffffc);
if (CBFS_HEADER_MAGIC != ntohl(header->magic)) {
-#if defined(CONFIG_ROM_SIZE)
+#if defined(CONFIG_LP_ROM_SIZE)
printk(BIOS_ERR, "Invalid CBFS master header at %p\n", header);
- media->context = (void*)CONFIG_ROM_SIZE;
+ media->context = (void*)CONFIG_LP_ROM_SIZE;
#else
return -1;
#endif
} else {
uint32_t romsize = ntohl(header->romsize);
media->context = (void*)romsize;
-#if defined(CONFIG_ROM_SIZE)
- if (CONFIG_ROM_SIZE != romsize)
+#if defined(CONFIG_LP_ROM_SIZE)
+ if (CONFIG_LP_ROM_SIZE != romsize)
printk(BIOS_INFO, "Warning: rom size unmatch (%d/%d)\n",
- CONFIG_ROM_SIZE, romsize);
+ CONFIG_LP_ROM_SIZE, romsize);
#endif
}
media->open = x86_rom_open;
diff --git a/payloads/libpayload/arch/x86/sysinfo.c b/payloads/libpayload/arch/x86/sysinfo.c
index 6c1ef3fc1c..8e8b1c8d0a 100644
--- a/payloads/libpayload/arch/x86/sysinfo.c
+++ b/payloads/libpayload/arch/x86/sysinfo.c
@@ -38,8 +38,8 @@
*/
struct sysinfo_t lib_sysinfo = {
.cpu_khz = 200,
-#ifdef CONFIG_SERIAL_CONSOLE
- .ser_ioport = CONFIG_SERIAL_IOBASE,
+#ifdef CONFIG_LP_SERIAL_CONSOLE
+ .ser_ioport = CONFIG_LP_SERIAL_IOBASE,
#else
.ser_ioport = 0x3f8,
#endif
@@ -52,7 +52,7 @@ int lib_get_sysinfo(void)
/* Get the CPU speed (for delays). */
lib_sysinfo.cpu_khz = get_cpu_speed();
-#ifdef CONFIG_MULTIBOOT
+#ifdef CONFIG_LP_MULTIBOOT
/* Get the information from the multiboot tables,
* if they exist */
get_multiboot_info(&lib_sysinfo);
diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc
index 4eca091fda..32ec5689d0 100755
--- a/payloads/libpayload/bin/lpgcc
+++ b/payloads/libpayload/bin/lpgcc
@@ -68,14 +68,14 @@ else
exit 1
fi
-if [ "$CONFIG_ARCH_ARMV7" = "y" ]; then
+if [ "$CONFIG_LP_ARCH_ARMV7" = "y" ]; then
_ARCHINCDIR=$_INCDIR/armv7
_ARCHLIBDIR=$_LIBDIR/armv7
_ARCHEXTRA=""
_ARCH=armv7
fi
-if [ "$CONFIG_ARCH_X86" = "y" ]; then
+if [ "$CONFIG_LP_ARCH_X86" = "y" ]; then
_ARCHINCDIR=$_INCDIR/x86
_ARCHLIBDIR=$_LIBDIR/x86
_ARCHEXTRA="-m32 "
@@ -135,11 +135,11 @@ done
_CFLAGS="$_ARCHEXTRA -nostdinc -nostdlib -I$BASE/../build -I$_INCDIR -I$_ARCHINCDIR -D__LIBPAYLOAD__=1"
-if [ "$CONFIG_PDCURSES" = y ]; then
+if [ "$CONFIG_LP_PDCURSES" = y ]; then
_CFLAGS="$_CFLAGS -I$BASE/../curses/PDCurses-3.4"
fi
-if [ "$CONFIG_TINYCURSES" = y ]; then
+if [ "$CONFIG_LP_TINYCURSES" = y ]; then
_CFLAGS="$_CFLAGS -I$BASE/../curses"
fi
diff --git a/payloads/libpayload/configs/config.panther b/payloads/libpayload/configs/config.panther
index 005c6eb71d..ec0f11d8bd 100644
--- a/payloads/libpayload/configs/config.panther
+++ b/payloads/libpayload/configs/config.panther
@@ -7,65 +7,65 @@
#
# Generic Options
#
-# CONFIG_EXPERIMENTAL is not set
-# CONFIG_OBSOLETE is not set
-# CONFIG_DEVELOPER is not set
-CONFIG_CHROMEOS=y
+# CONFIG_LP_EXPERIMENTAL is not set
+# CONFIG_LP_OBSOLETE is not set
+# CONFIG_LP_DEVELOPER is not set
+CONFIG_LP_CHROMEOS=y
#
# Architecture Options
#
-# CONFIG_ARCH_ARMV7 is not set
-# CONFIG_ARCH_POWERPC is not set
-CONFIG_ARCH_X86=y
-# CONFIG_MEMMAP_RAM_ONLY is not set
-# CONFIG_MULTIBOOT is not set
+# CONFIG_LP_ARCH_ARMV7 is not set
+# CONFIG_LP_ARCH_POWERPC is not set
+CONFIG_LP_ARCH_X86=y
+# CONFIG_LP_MEMMAP_RAM_ONLY is not set
+# CONFIG_LP_MULTIBOOT is not set
#
# Standard Libraries
#
-CONFIG_LIBC=y
-# CONFIG_CURSES is not set
-CONFIG_CBFS=y
-CONFIG_LZMA=y
+CONFIG_LP_LIBC=y
+# CONFIG_LP_CURSES is not set
+CONFIG_LP_CBFS=y
+CONFIG_LP_LZMA=y
#
# Console Options
#
-CONFIG_SKIP_CONSOLE_INIT=y
-CONFIG_CBMEM_CONSOLE=y
-CONFIG_SERIAL_CONSOLE=y
-CONFIG_8250_SERIAL_CONSOLE=y
-CONFIG_SERIAL_IOBASE=0x3f8
-# CONFIG_SERIAL_SET_SPEED is not set
-# CONFIG_SERIAL_ACS_FALLBACK is not set
-CONFIG_VIDEO_CONSOLE=y
-# CONFIG_VGA_VIDEO_CONSOLE is not set
-# CONFIG_GEODELX_VIDEO_CONSOLE is not set
-CONFIG_COREBOOT_VIDEO_CONSOLE=y
-CONFIG_PC_KEYBOARD=y
-CONFIG_PC_KEYBOARD_LAYOUT_US=y
-# CONFIG_PC_KEYBOARD_LAYOUT_DE is not set
+CONFIG_LP_SKIP_CONSOLE_INIT=y
+CONFIG_LP_CBMEM_CONSOLE=y
+CONFIG_LP_SERIAL_CONSOLE=y
+CONFIG_LP_8250_SERIAL_CONSOLE=y
+CONFIG_LP_SERIAL_IOBASE=0x3f8
+# CONFIG_LP_SERIAL_SET_SPEED is not set
+# CONFIG_LP_SERIAL_ACS_FALLBACK is not set
+CONFIG_LP_VIDEO_CONSOLE=y
+# CONFIG_LP_VGA_VIDEO_CONSOLE is not set
+# CONFIG_LP_GEODELX_VIDEO_CONSOLE is not set
+CONFIG_LP_COREBOOT_VIDEO_CONSOLE=y
+CONFIG_LP_PC_KEYBOARD=y
+CONFIG_LP_PC_KEYBOARD_LAYOUT_US=y
+# CONFIG_LP_PC_KEYBOARD_LAYOUT_DE is not set
#
# Drivers
#
-CONFIG_PCI=y
-CONFIG_NVRAM=y
-# CONFIG_RTC_PORT_EXTENDED_VIA is not set
-# CONFIG_SPEAKER is not set
-# CONFIG_STORAGE is not set
-CONFIG_USB=y
-# CONFIG_USB_UHCI is not set
-# CONFIG_USB_OHCI is not set
-# CONFIG_USB_EHCI is not set
-CONFIG_USB_XHCI=y
-CONFIG_USB_HID=y
-CONFIG_USB_HUB=y
-CONFIG_USB_MSC=y
-CONFIG_USB_PCI=y
-# CONFIG_USB_MEMORY is not set
-# CONFIG_BIG_ENDIAN is not set
-CONFIG_LITTLE_ENDIAN=y
-CONFIG_IO_ADDRESS_SPACE=y
-CONFIG_ARCH_SPECIFIC_OPTIONS=y
+CONFIG_LP_PCI=y
+CONFIG_LP_NVRAM=y
+# CONFIG_LP_RTC_PORT_EXTENDED_VIA is not set
+# CONFIG_LP_SPEAKER is not set
+# CONFIG_LP_STORAGE is not set
+CONFIG_LP_USB=y
+# CONFIG_LP_USB_UHCI is not set
+# CONFIG_LP_USB_OHCI is not set
+# CONFIG_LP_USB_EHCI is not set
+CONFIG_LP_USB_XHCI=y
+CONFIG_LP_USB_HID=y
+CONFIG_LP_USB_HUB=y
+CONFIG_LP_USB_MSC=y
+CONFIG_LP_USB_PCI=y
+# CONFIG_LP_USB_MEMORY is not set
+# CONFIG_LP_BIG_ENDIAN is not set
+CONFIG_LP_LITTLE_ENDIAN=y
+CONFIG_LP_IO_ADDRESS_SPACE=y
+CONFIG_LP_ARCH_SPECIFIC_OPTIONS=y
diff --git a/payloads/libpayload/configs/defconfig b/payloads/libpayload/configs/defconfig
index b41727f794..c4e0d15f2d 100644
--- a/payloads/libpayload/configs/defconfig
+++ b/payloads/libpayload/configs/defconfig
@@ -7,72 +7,72 @@
#
# Generic Options
#
-# CONFIG_EXPERIMENTAL is not set
-# CONFIG_OBSOLETE is not set
-# CONFIG_DEVELOPER is not set
-# CONFIG_CHROMEOS is not set
+# CONFIG_LP_EXPERIMENTAL is not set
+# CONFIG_LP_OBSOLETE is not set
+# CONFIG_LP_DEVELOPER is not set
+# CONFIG_LP_CHROMEOS is not set
#
# Architecture Options
#
-# CONFIG_ARCH_ARMV7 is not set
-CONFIG_ARCH_X86=y
-# CONFIG_MEMMAP_RAM_ONLY is not set
-# CONFIG_MULTIBOOT is not set
+# CONFIG_LP_ARCH_ARMV7 is not set
+CONFIG_LP_ARCH_X86=y
+# CONFIG_LP_MEMMAP_RAM_ONLY is not set
+# CONFIG_LP_MULTIBOOT is not set
#
# Standard Libraries
#
-CONFIG_LIBC=y
-CONFIG_CURSES=y
-# CONFIG_TINYCURSES is not set
-CONFIG_PDCURSES=y
-CONFIG_CBFS=y
-CONFIG_LZMA=y
+CONFIG_LP_LIBC=y
+CONFIG_LP_CURSES=y
+# CONFIG_LP_TINYCURSES is not set
+CONFIG_LP_PDCURSES=y
+CONFIG_LP_CBFS=y
+CONFIG_LP_LZMA=y
#
# Console Options
#
-# CONFIG_SKIP_CONSOLE_INIT is not set
-CONFIG_CBMEM_CONSOLE=y
-CONFIG_SERIAL_CONSOLE=y
-CONFIG_X86_SERIAL_CONSOLE=y
-CONFIG_SERIAL_IOBASE=0x3f8
-# CONFIG_SERIAL_SET_SPEED is not set
-# CONFIG_SERIAL_ACS_FALLBACK is not set
-CONFIG_VIDEO_CONSOLE=y
-CONFIG_VGA_VIDEO_CONSOLE=y
-# CONFIG_GEODELX_VIDEO_CONSOLE is not set
-CONFIG_COREBOOT_VIDEO_CONSOLE=y
-CONFIG_PC_KEYBOARD=y
-CONFIG_PC_KEYBOARD_LAYOUT_US=y
-# CONFIG_PC_KEYBOARD_LAYOUT_DE is not set
+# CONFIG_LP_SKIP_CONSOLE_INIT is not set
+CONFIG_LP_CBMEM_CONSOLE=y
+CONFIG_LP_SERIAL_CONSOLE=y
+CONFIG_LP_X86_SERIAL_CONSOLE=y
+CONFIG_LP_SERIAL_IOBASE=0x3f8
+# CONFIG_LP_SERIAL_SET_SPEED is not set
+# CONFIG_LP_SERIAL_ACS_FALLBACK is not set
+CONFIG_LP_VIDEO_CONSOLE=y
+CONFIG_LP_VGA_VIDEO_CONSOLE=y
+# CONFIG_LP_GEODELX_VIDEO_CONSOLE is not set
+CONFIG_LP_COREBOOT_VIDEO_CONSOLE=y
+CONFIG_LP_PC_KEYBOARD=y
+CONFIG_LP_PC_KEYBOARD_LAYOUT_US=y
+# CONFIG_LP_PC_KEYBOARD_LAYOUT_DE is not set
#
# Drivers
#
-CONFIG_PCI=y
-CONFIG_NVRAM=y
-# CONFIG_RTC_PORT_EXTENDED_VIA is not set
-CONFIG_SPEAKER=y
-CONFIG_STORAGE=y
-# CONFIG_STORAGE_64BIT_LBA is not set
-CONFIG_STORAGE_ATA=y
-CONFIG_STORAGE_ATAPI=y
-CONFIG_STORAGE_AHCI=y
-CONFIG_STORAGE_AHCI_ONLY_TESTED=y
-CONFIG_USB=y
-CONFIG_USB_UHCI=y
-CONFIG_USB_OHCI=y
-CONFIG_USB_EHCI=y
-CONFIG_USB_XHCI=y
-CONFIG_USB_HID=y
-CONFIG_USB_HUB=y
-CONFIG_USB_MSC=y
-CONFIG_USB_GEN_HUB=y
-CONFIG_USB_PCI=y
-# CONFIG_USB_MEMORY is not set
-# CONFIG_BIG_ENDIAN is not set
-CONFIG_LITTLE_ENDIAN=y
-CONFIG_IO_ADDRESS_SPACE=y
-CONFIG_ARCH_SPECIFIC_OPTIONS=y
+CONFIG_LP_PCI=y
+CONFIG_LP_NVRAM=y
+# CONFIG_LP_RTC_PORT_EXTENDED_VIA is not set
+CONFIG_LP_SPEAKER=y
+CONFIG_LP_STORAGE=y
+# CONFIG_LP_STORAGE_64BIT_LBA is not set
+CONFIG_LP_STORAGE_ATA=y
+CONFIG_LP_STORAGE_ATAPI=y
+CONFIG_LP_STORAGE_AHCI=y
+CONFIG_LP_STORAGE_AHCI_ONLY_TESTED=y
+CONFIG_LP_USB=y
+CONFIG_LP_USB_UHCI=y
+CONFIG_LP_USB_OHCI=y
+CONFIG_LP_USB_EHCI=y
+CONFIG_LP_USB_XHCI=y
+CONFIG_LP_USB_HID=y
+CONFIG_LP_USB_HUB=y
+CONFIG_LP_USB_MSC=y
+CONFIG_LP_USB_GEN_HUB=y
+CONFIG_LP_USB_PCI=y
+# CONFIG_LP_USB_MEMORY is not set
+# CONFIG_LP_BIG_ENDIAN is not set
+CONFIG_LP_LITTLE_ENDIAN=y
+CONFIG_LP_IO_ADDRESS_SPACE=y
+CONFIG_LP_ARCH_SPECIFIC_OPTIONS=y
diff --git a/payloads/libpayload/crypto/sha1.c b/payloads/libpayload/crypto/sha1.c
index c973e183db..615ed7222f 100644
--- a/payloads/libpayload/crypto/sha1.c
+++ b/payloads/libpayload/crypto/sha1.c
@@ -30,7 +30,7 @@ typedef unsigned int u_int;
/* Moved from libpayload.h */
-#ifdef CONFIG_LITTLE_ENDIAN
+#ifdef CONFIG_LP_LITTLE_ENDIAN
#define BYTE_ORDER LITTLE_ENDIAN
#else
#define BYTE_ORDER BIG_ENDIAN
diff --git a/payloads/libpayload/curses/Makefile.inc b/payloads/libpayload/curses/Makefile.inc
index 5d14431cda..025a0511d3 100644
--- a/payloads/libpayload/curses/Makefile.inc
+++ b/payloads/libpayload/curses/Makefile.inc
@@ -27,142 +27,142 @@
## SUCH DAMAGE.
##
-ifeq ($(CONFIG_TINYCURSES),y)
+ifeq ($(CONFIG_LP_TINYCURSES),y)
INCLUDES += -Icurses
endif
-libcurses-$(CONFIG_TINYCURSES) += keyboard.c
-libcurses-$(CONFIG_TINYCURSES) += tinycurses.c
-libcurses-$(CONFIG_TINYCURSES) += colors.c
+libcurses-$(CONFIG_LP_TINYCURSES) += keyboard.c
+libcurses-$(CONFIG_LP_TINYCURSES) += tinycurses.c
+libcurses-$(CONFIG_LP_TINYCURSES) += colors.c
-includes-$(CONFIG_TINYCURSES) += curses.h
+includes-$(CONFIG_LP_TINYCURSES) += curses.h
-ifeq ($(CONFIG_PDCURSES),y)
+ifeq ($(CONFIG_LP_PDCURSES),y)
INCLUDES += -D_LP64=0 -Icurses/PDCurses-3.4 -Icurses/pdcurses-backend -Icurses/menu -Icurses/form
endif
-libcurses-$(CONFIG_PDCURSES) += pdcurses-backend/pdcdisp.c
-libcurses-$(CONFIG_PDCURSES) += pdcurses-backend/pdcgetsc.c
-libcurses-$(CONFIG_PDCURSES) += pdcurses-backend/pdckbd.c
-libcurses-$(CONFIG_PDCURSES) += pdcurses-backend/pdcscrn.c
-libcurses-$(CONFIG_PDCURSES) += pdcurses-backend/pdcsetsc.c
-libcurses-$(CONFIG_PDCURSES) += pdcurses-backend/pdcutil.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/addch.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/move.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/overlay.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/refresh.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/terminfo.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/window.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/util.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/inopts.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/addstr.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/keyname.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/instr.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/clear.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/addchstr.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/kernel.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/pad.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/insstr.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/border.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/getyx.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/getstr.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/getch.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/termattr.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/outopts.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/color.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/deleteln.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/initscr.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/slk.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/delch.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/touch.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/mouse.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/scanw.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/scroll.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/printw.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/bkgd.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/inch.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/attr.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/insch.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/inchstr.c
-libcurses-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/beep.c
+libcurses-$(CONFIG_LP_PDCURSES) += pdcurses-backend/pdcdisp.c
+libcurses-$(CONFIG_LP_PDCURSES) += pdcurses-backend/pdcgetsc.c
+libcurses-$(CONFIG_LP_PDCURSES) += pdcurses-backend/pdckbd.c
+libcurses-$(CONFIG_LP_PDCURSES) += pdcurses-backend/pdcscrn.c
+libcurses-$(CONFIG_LP_PDCURSES) += pdcurses-backend/pdcsetsc.c
+libcurses-$(CONFIG_LP_PDCURSES) += pdcurses-backend/pdcutil.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/addch.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/move.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/overlay.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/refresh.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/terminfo.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/window.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/util.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/inopts.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/addstr.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/keyname.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/instr.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/clear.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/addchstr.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/kernel.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/pad.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/insstr.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/border.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/getyx.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/getstr.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/getch.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/termattr.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/outopts.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/color.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/deleteln.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/initscr.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/slk.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/delch.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/touch.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/mouse.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/scanw.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/scroll.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/printw.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/bkgd.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/inch.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/attr.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/insch.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/inchstr.c
+libcurses-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/beep.c
-includes-$(CONFIG_PDCURSES) += pdcurses-backend/nc_alloc.h
-includes-$(CONFIG_PDCURSES) += pdcurses-backend/ncurses_cfg.h
-includes-$(CONFIG_PDCURSES) += PDCurses-3.4/curses.h
-includes-$(CONFIG_PDCURSES) += PDCurses-3.4/term.h
-includes-$(CONFIG_PDCURSES) += PDCurses-3.4/panel.h
-includes-$(CONFIG_PDCURSES) += menu/eti.h
-includes-$(CONFIG_PDCURSES) += menu/menu.h
-includes-$(CONFIG_PDCURSES) += menu/mf_common.h
-includes-$(CONFIG_PDCURSES) += form/form.h
+includes-$(CONFIG_LP_PDCURSES) += pdcurses-backend/nc_alloc.h
+includes-$(CONFIG_LP_PDCURSES) += pdcurses-backend/ncurses_cfg.h
+includes-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/curses.h
+includes-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/term.h
+includes-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/panel.h
+includes-$(CONFIG_LP_PDCURSES) += menu/eti.h
+includes-$(CONFIG_LP_PDCURSES) += menu/menu.h
+includes-$(CONFIG_LP_PDCURSES) += menu/mf_common.h
+includes-$(CONFIG_LP_PDCURSES) += form/form.h
-libpanel-$(CONFIG_PDCURSES) += PDCurses-3.4/pdcurses/panel.c
+libpanel-$(CONFIG_LP_PDCURSES) += PDCurses-3.4/pdcurses/panel.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_req_name.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_item_nam.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_pad.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_cursor.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_item_new.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_attribs.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_item_opt.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_format.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_post.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_userptr.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_item_cur.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_driver.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_sub.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_win.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_global.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_item_vis.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_new.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_scale.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_spacing.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_opts.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_pattern.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_item_val.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_hook.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_item_use.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_items.c
-libmenu-$(CONFIG_PDCURSES) += menu/m_item_top.c
-libform-$(CONFIG_PDCURSES) += form/frm_page.c
-libform-$(CONFIG_PDCURSES) += form/frm_opts.c
-libform-$(CONFIG_PDCURSES) += form/frm_def.c
-libform-$(CONFIG_PDCURSES) += form/frm_req_name.c
-libform-$(CONFIG_PDCURSES) += form/fty_alpha.c
-libform-$(CONFIG_PDCURSES) += form/frm_driver.c
-libform-$(CONFIG_PDCURSES) += form/fld_user.c
-libform-$(CONFIG_PDCURSES) += form/frm_win.c
-libform-$(CONFIG_PDCURSES) += form/fld_newftyp.c
-#libform-$(CONFIG_PDCURSES) += form/fty_regex.c
-libform-$(CONFIG_PDCURSES) += form/fld_stat.c
-libform-$(CONFIG_PDCURSES) += form/fld_pad.c
-libform-$(CONFIG_PDCURSES) += form/fld_current.c
-libform-$(CONFIG_PDCURSES) += form/frm_post.c
-#libform-$(CONFIG_PDCURSES) += form/f_trace.c
-libform-$(CONFIG_PDCURSES) += form/fty_generic.c
-libform-$(CONFIG_PDCURSES) += form/fld_page.c
-libform-$(CONFIG_PDCURSES) += form/frm_hook.c
-libform-$(CONFIG_PDCURSES) += form/frm_scale.c
-libform-$(CONFIG_PDCURSES) += form/fty_int.c
-libform-$(CONFIG_PDCURSES) += form/fty_alnum.c
-libform-$(CONFIG_PDCURSES) += form/frm_cursor.c
-#libform-$(CONFIG_PDCURSES) += form/fty_ipv4.c
-libform-$(CONFIG_PDCURSES) += form/fld_link.c
-libform-$(CONFIG_PDCURSES) += form/fld_arg.c
-libform-$(CONFIG_PDCURSES) += form/fld_move.c
-libform-$(CONFIG_PDCURSES) += form/fld_def.c
-libform-$(CONFIG_PDCURSES) += form/fld_type.c
-libform-$(CONFIG_PDCURSES) += form/fld_max.c
-libform-$(CONFIG_PDCURSES) += form/fld_ftlink.c
-libform-$(CONFIG_PDCURSES) += form/fld_ftchoice.c
-libform-$(CONFIG_PDCURSES) += form/fld_info.c
-libform-$(CONFIG_PDCURSES) += form/frm_user.c
-#libform-$(CONFIG_PDCURSES) += form/fty_num.c
-libform-$(CONFIG_PDCURSES) += form/frm_sub.c
-libform-$(CONFIG_PDCURSES) += form/fty_enum.c
-libform-$(CONFIG_PDCURSES) += form/frm_data.c
-libform-$(CONFIG_PDCURSES) += form/fld_opts.c
-libform-$(CONFIG_PDCURSES) += form/fld_attr.c
-libform-$(CONFIG_PDCURSES) += form/fld_dup.c
-libform-$(CONFIG_PDCURSES) += form/fld_just.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_req_name.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_item_nam.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_pad.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_cursor.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_item_new.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_attribs.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_item_opt.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_format.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_post.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_userptr.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_item_cur.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_driver.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_sub.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_win.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_global.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_item_vis.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_new.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_scale.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_spacing.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_opts.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_pattern.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_item_val.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_hook.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_item_use.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_items.c
+libmenu-$(CONFIG_LP_PDCURSES) += menu/m_item_top.c
+libform-$(CONFIG_LP_PDCURSES) += form/frm_page.c
+libform-$(CONFIG_LP_PDCURSES) += form/frm_opts.c
+libform-$(CONFIG_LP_PDCURSES) += form/frm_def.c
+libform-$(CONFIG_LP_PDCURSES) += form/frm_req_name.c
+libform-$(CONFIG_LP_PDCURSES) += form/fty_alpha.c
+libform-$(CONFIG_LP_PDCURSES) += form/frm_driver.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_user.c
+libform-$(CONFIG_LP_PDCURSES) += form/frm_win.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_newftyp.c
+#libform-$(CONFIG_LP_PDCURSES) += form/fty_regex.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_stat.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_pad.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_current.c
+libform-$(CONFIG_LP_PDCURSES) += form/frm_post.c
+#libform-$(CONFIG_LP_PDCURSES) += form/f_trace.c
+libform-$(CONFIG_LP_PDCURSES) += form/fty_generic.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_page.c
+libform-$(CONFIG_LP_PDCURSES) += form/frm_hook.c
+libform-$(CONFIG_LP_PDCURSES) += form/frm_scale.c
+libform-$(CONFIG_LP_PDCURSES) += form/fty_int.c
+libform-$(CONFIG_LP_PDCURSES) += form/fty_alnum.c
+libform-$(CONFIG_LP_PDCURSES) += form/frm_cursor.c
+#libform-$(CONFIG_LP_PDCURSES) += form/fty_ipv4.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_link.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_arg.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_move.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_def.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_type.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_max.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_ftlink.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_ftchoice.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_info.c
+libform-$(CONFIG_LP_PDCURSES) += form/frm_user.c
+#libform-$(CONFIG_LP_PDCURSES) += form/fty_num.c
+libform-$(CONFIG_LP_PDCURSES) += form/frm_sub.c
+libform-$(CONFIG_LP_PDCURSES) += form/fty_enum.c
+libform-$(CONFIG_LP_PDCURSES) += form/frm_data.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_opts.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_attr.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_dup.c
+libform-$(CONFIG_LP_PDCURSES) += form/fld_just.c
diff --git a/payloads/libpayload/curses/keyboard.c b/payloads/libpayload/curses/keyboard.c
index 9648dde573..927e06f17f 100644
--- a/payloads/libpayload/curses/keyboard.c
+++ b/payloads/libpayload/curses/keyboard.c
@@ -45,7 +45,7 @@ static int _halfdelay = 0;
/* ============== Serial ==================== */
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
/* We treat serial like a vt100 terminal. For now we
do the cooking in here, but we should probably eventually
pass it to dedicated vt100 code */
@@ -146,12 +146,12 @@ static int cook_serial(unsigned char ch)
static int curses_getchar(int _delay)
{
-#if defined(CONFIG_USB_HID) || defined(CONFIG_PC_KEYBOARD) || defined(CONFIG_SERIAL_CONSOLE)
+#if defined(CONFIG_LP_USB_HID) || defined(CONFIG_LP_PC_KEYBOARD) || defined(CONFIG_LP_SERIAL_CONSOLE)
unsigned short c;
#endif
do {
-#ifdef CONFIG_USB_HID
+#ifdef CONFIG_LP_USB_HID
usb_poll();
if ((curses_flags & F_ENABLE_CONSOLE) &&
usbhid_havechar()) {
@@ -159,7 +159,7 @@ static int curses_getchar(int _delay)
if (c != 0) return c;
}
#endif
-#ifdef CONFIG_PC_KEYBOARD
+#ifdef CONFIG_LP_PC_KEYBOARD
if ((curses_flags & F_ENABLE_CONSOLE) &&
keyboard_havechar()) {
c = keyboard_getchar();
@@ -167,7 +167,7 @@ static int curses_getchar(int _delay)
}
#endif
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
if ((curses_flags & F_ENABLE_SERIAL) &&
serial_havechar()) {
c = serial_getchar();
@@ -225,7 +225,7 @@ int nocbreak(void)
return 0;
}
-#ifdef CONFIG_VGA_VIDEO_CONSOLE
+#ifdef CONFIG_LP_VGA_VIDEO_CONSOLE
void curses_enable_vga(int state)
{
if (state)
@@ -243,7 +243,7 @@ void curses_enable_vga(int state) { }
int curses_vga_enabled(void) { return 0; }
#endif
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
void curses_enable_serial(int state)
{
if (state)
diff --git a/payloads/libpayload/curses/local.h b/payloads/libpayload/curses/local.h
index b7c459d2a0..73fb005c5a 100644
--- a/payloads/libpayload/curses/local.h
+++ b/payloads/libpayload/curses/local.h
@@ -70,13 +70,13 @@
/* Flags used to determine what output methods are available */
-#ifdef CONFIG_VIDEO_CONSOLE
+#ifdef CONFIG_LP_VIDEO_CONSOLE
#define F_ENABLE_CONSOLE 0x01
#else
#define F_ENABLE_CONSOLE 0x00
#endif
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
#define F_ENABLE_SERIAL 0x02
#else
#define F_ENABLE_SERIAL 0x00
diff --git a/payloads/libpayload/curses/pdcurses-backend/pdcdisp.c b/payloads/libpayload/curses/pdcurses-backend/pdcdisp.c
index ab73831aa6..308370e5bf 100644
--- a/payloads/libpayload/curses/pdcurses-backend/pdcdisp.c
+++ b/payloads/libpayload/curses/pdcurses-backend/pdcdisp.c
@@ -66,8 +66,8 @@ chtype fallback_acs_map[128] =
'|', '<', '>', '*', '!', 'f', 'o', ' ',
};
-#ifdef CONFIG_SERIAL_CONSOLE
-#ifdef CONFIG_SERIAL_ACS_FALLBACK
+#ifdef CONFIG_LP_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_ACS_FALLBACK
chtype serial_acs_map[128];
#else
/* See acsc of vt100. */
@@ -93,7 +93,7 @@ chtype serial_acs_map[128] =
#endif
#endif
-#ifdef CONFIG_VIDEO_CONSOLE
+#ifdef CONFIG_LP_VIDEO_CONSOLE
/* See acsc of linux. */
chtype console_acs_map[128] =
{
@@ -122,10 +122,10 @@ void PDC_gotoyx(int row, int col)
{
PDC_LOG(("PDC_gotoyx() - called: row %d col %d\n", row, col));
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
serial_set_cursor(col, row);
#endif
-#ifdef CONFIG_VIDEO_CONSOLE
+#ifdef CONFIG_LP_VIDEO_CONSOLE
video_console_set_cursor(col, row);
#endif
}
@@ -139,7 +139,7 @@ void PDC_transform_line(int lineno, int x, int len, const chtype *srcp)
PDC_LOG(("PDC_transform_line() - called: line %d, len %d, curses_flags %d\n", lineno, len, curses_flags));
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
int serial_is_bold = 0;
int serial_is_reverse = 0;
int serial_is_altcharset = 0;
@@ -157,7 +157,7 @@ void PDC_transform_line(int lineno, int x, int len, const chtype *srcp)
{
ch = srcp[j];
attr = ch;
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
if (curses_flags & F_ENABLE_SERIAL) {
if (attr & A_BOLD) {
if (!serial_is_bold) {
@@ -222,7 +222,7 @@ void PDC_transform_line(int lineno, int x, int len, const chtype *srcp)
}
#endif
-#ifdef CONFIG_VIDEO_CONSOLE
+#ifdef CONFIG_LP_VIDEO_CONSOLE
unsigned char c = pdc_atrtab[srcp[j] >> PDC_ATTR_SHIFT];
if (curses_flags & F_ENABLE_CONSOLE) {
diff --git a/payloads/libpayload/curses/pdcurses-backend/pdckbd.c b/payloads/libpayload/curses/pdcurses-backend/pdckbd.c
index 49b80c74fc..d1061b2499 100644
--- a/payloads/libpayload/curses/pdcurses-backend/pdckbd.c
+++ b/payloads/libpayload/curses/pdcurses-backend/pdckbd.c
@@ -5,7 +5,7 @@
unsigned long pdc_key_modifiers = 0L;
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
/* We treat serial like a vt100 terminal. For now we
do the cooking in here, but we should probably eventually
pass it to dedicated vt100 code */
@@ -108,7 +108,7 @@ void PDC_set_keyboard_binary(bool on)
bool PDC_check_key(void)
{
-#ifdef CONFIG_USB_HID
+#ifdef CONFIG_LP_USB_HID
usb_poll();
if ((curses_flags & F_ENABLE_CONSOLE) &&
usbhid_havechar()) {
@@ -116,14 +116,14 @@ bool PDC_check_key(void)
}
#endif
-#ifdef CONFIG_PC_KEYBOARD
+#ifdef CONFIG_LP_PC_KEYBOARD
if ((curses_flags & F_ENABLE_CONSOLE) &&
keyboard_havechar()) {
return TRUE;
}
#endif
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
if ((curses_flags & F_ENABLE_SERIAL) &&
serial_havechar()) {
return TRUE;
@@ -139,7 +139,7 @@ int PDC_get_key(void)
{
int c = 0;
-#ifdef CONFIG_USB_HID
+#ifdef CONFIG_LP_USB_HID
usb_poll();
if ((curses_flags & F_ENABLE_CONSOLE) &&
usbhid_havechar()) {
@@ -147,14 +147,14 @@ int PDC_get_key(void)
}
#endif
-#ifdef CONFIG_PC_KEYBOARD
+#ifdef CONFIG_LP_PC_KEYBOARD
if ((curses_flags & F_ENABLE_CONSOLE) &&
keyboard_havechar() && (c==0)) {
c = keyboard_getchar();
}
#endif
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
if ((curses_flags & F_ENABLE_SERIAL) &&
serial_havechar() && (c==0)) {
c = cook_serial(serial_getchar());
diff --git a/payloads/libpayload/curses/pdcurses-backend/pdcscrn.c b/payloads/libpayload/curses/pdcurses-backend/pdcscrn.c
index e741b15d09..c4922ec409 100644
--- a/payloads/libpayload/curses/pdcurses-backend/pdcscrn.c
+++ b/payloads/libpayload/curses/pdcurses-backend/pdcscrn.c
@@ -72,7 +72,7 @@ int PDC_scr_open(int argc, char **argv)
SP->lines = PDC_get_rows();
SP->cols = PDC_get_columns();
-#ifdef CONFIG_SPEAKER
+#ifdef CONFIG_LP_SPEAKER
SP->audible = TRUE;
#endif
diff --git a/payloads/libpayload/curses/pdcurses-backend/pdcsetsc.c b/payloads/libpayload/curses/pdcurses-backend/pdcsetsc.c
index d016063ff0..b2997a16f9 100644
--- a/payloads/libpayload/curses/pdcurses-backend/pdcsetsc.c
+++ b/payloads/libpayload/curses/pdcurses-backend/pdcsetsc.c
@@ -13,12 +13,12 @@ int PDC_curs_set(int visibility)
ret_vis = SP->visibility;
SP->visibility = visibility;
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
if (curses_flags & F_ENABLE_SERIAL) {
serial_cursor_enable(visibility);
}
#endif
-#ifdef CONFIG_VIDEO_CONSOLE
+#ifdef CONFIG_LP_VIDEO_CONSOLE
if (curses_flags & F_ENABLE_CONSOLE) {
video_console_cursor_enable(visibility);
}
diff --git a/payloads/libpayload/curses/pdcurses-backend/pdcutil.c b/payloads/libpayload/curses/pdcurses-backend/pdcutil.c
index 030f4622e2..c40e2ed1eb 100644
--- a/payloads/libpayload/curses/pdcurses-backend/pdcutil.c
+++ b/payloads/libpayload/curses/pdcurses-backend/pdcutil.c
@@ -11,7 +11,7 @@ void PDC_beep(void)
{
PDC_LOG(("PDC_beep() - called\n"));
-#ifdef CONFIG_SPEAKER
+#ifdef CONFIG_LP_SPEAKER
speaker_tone(1760, 500); /* 1760 == note A6 */
#endif
}
diff --git a/payloads/libpayload/curses/tinycurses.c b/payloads/libpayload/curses/tinycurses.c
index fe6e7dee41..d5bf23f1af 100644
--- a/payloads/libpayload/curses/tinycurses.c
+++ b/payloads/libpayload/curses/tinycurses.c
@@ -111,8 +111,8 @@ chtype fallback_acs_map[128] =
'|', '<', '>', '*', '!', 'f', 'o', ' ',
};
-#ifdef CONFIG_SERIAL_CONSOLE
-#ifdef CONFIG_SERIAL_ACS_FALLBACK
+#ifdef CONFIG_LP_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_ACS_FALLBACK
chtype serial_acs_map[128];
#else
/* See acsc of vt100. */
@@ -138,7 +138,7 @@ chtype serial_acs_map[128] =
#endif
#endif
-#ifdef CONFIG_VIDEO_CONSOLE
+#ifdef CONFIG_LP_VIDEO_CONSOLE
/* See acsc of linux. */
chtype console_acs_map[128] =
{
@@ -191,7 +191,7 @@ NCURSES_CH_T _nc_render(WINDOW *win, NCURSES_CH_T ch)
int beep(void)
{
/* TODO: Flash the screen if beeping fails? */
-#ifdef CONFIG_SPEAKER
+#ifdef CONFIG_LP_SPEAKER
speaker_tone(1760, 500); /* 1760 == note A6 */
#endif
return OK;
@@ -202,12 +202,12 @@ int cbreak(void) { /* TODO */ return 0; }
// int color_content(short color, short *r, short *g, short *b) {}
int curs_set(int on)
{
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
if (curses_flags & F_ENABLE_SERIAL) {
serial_cursor_enable(on);
}
#endif
-#ifdef CONFIG_VIDEO_CONSOLE
+#ifdef CONFIG_LP_VIDEO_CONSOLE
if (curses_flags & F_ENABLE_CONSOLE) {
video_console_cursor_enable(on);
}
@@ -315,12 +315,12 @@ WINDOW *initscr(void)
for (i = 0; i < 128; i++)
acs_map[i] = (chtype) i | A_ALTCHARSET;
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
if (curses_flags & F_ENABLE_SERIAL) {
serial_clear();
}
#endif
-#ifdef CONFIG_VIDEO_CONSOLE
+#ifdef CONFIG_LP_VIDEO_CONSOLE
if (curses_flags & F_ENABLE_CONSOLE) {
/* Clear the screen and kill the cursor */
@@ -719,7 +719,7 @@ int whline(WINDOW *win, chtype ch, int n)
(((c) & 0x4400) >> 2) | ((c) & 0xAA00) | (((c) & 0x1100) << 2)
int wnoutrefresh(WINDOW *win)
{
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
// FIXME.
int serial_is_bold = 0;
int serial_is_reverse = 0;
@@ -732,7 +732,7 @@ int wnoutrefresh(WINDOW *win)
int x, y;
chtype ch;
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
serial_end_bold();
serial_end_altcharset();
#endif
@@ -744,7 +744,7 @@ int wnoutrefresh(WINDOW *win)
/* Position the serial cursor */
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
if (curses_flags & F_ENABLE_SERIAL)
serial_set_cursor(win->_begy + y, win->_begx +
win->_line[y].firstchar);
@@ -753,7 +753,7 @@ int wnoutrefresh(WINDOW *win)
for (x = win->_line[y].firstchar; x <= win->_line[y].lastchar; x++) {
attr_t attr = win->_line[y].text[x].attr;
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
if (curses_flags & F_ENABLE_SERIAL) {
ch = win->_line[y].text[x].chars[0];
@@ -819,7 +819,7 @@ int wnoutrefresh(WINDOW *win)
}
#endif
-#ifdef CONFIG_VIDEO_CONSOLE
+#ifdef CONFIG_LP_VIDEO_CONSOLE
unsigned int c =
((int)color_pairs[PAIR_NUMBER(attr)]) << 8;
@@ -860,12 +860,12 @@ int wnoutrefresh(WINDOW *win)
win->_line[y].lastchar = _NOCHANGE;
}
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
if (curses_flags & F_ENABLE_SERIAL)
serial_set_cursor(win->_begy + win->_cury, win->_begx + win->_curx);
#endif
-#ifdef CONFIG_VIDEO_CONSOLE
+#ifdef CONFIG_LP_VIDEO_CONSOLE
if (curses_flags & F_ENABLE_CONSOLE)
video_console_set_cursor(win->_begx + win->_curx, win->_begy + win->_cury);
#endif
diff --git a/payloads/libpayload/drivers/Makefile.inc b/payloads/libpayload/drivers/Makefile.inc
index 901c77e69d..b31e341efb 100644
--- a/payloads/libpayload/drivers/Makefile.inc
+++ b/payloads/libpayload/drivers/Makefile.inc
@@ -29,65 +29,65 @@
## SUCH DAMAGE.
##
-libc-$(CONFIG_PCI) += pci.c
+libc-$(CONFIG_LP_PCI) += pci.c
-libc-$(CONFIG_SPEAKER) += speaker.c
+libc-$(CONFIG_LP_SPEAKER) += speaker.c
-libc-$(CONFIG_X86_SERIAL_CONSOLE) += serial.c
+libc-$(CONFIG_LP_X86_SERIAL_CONSOLE) += serial.c
-libc-$(CONFIG_PC_KEYBOARD) += keyboard.c
+libc-$(CONFIG_LP_PC_KEYBOARD) += keyboard.c
-libc-$(CONFIG_CBMEM_CONSOLE) += cbmem_console.c
+libc-$(CONFIG_LP_CBMEM_CONSOLE) += cbmem_console.c
-libc-$(CONFIG_NVRAM) += nvram.c
-libc-$(CONFIG_NVRAM) += options.c
+libc-$(CONFIG_LP_NVRAM) += nvram.c
+libc-$(CONFIG_LP_NVRAM) += options.c
# Video console drivers
-libc-$(CONFIG_VIDEO_CONSOLE) += video/video.c
-libc-$(CONFIG_VGA_VIDEO_CONSOLE) += video/vga.c
+libc-$(CONFIG_LP_VIDEO_CONSOLE) += video/video.c
+libc-$(CONFIG_LP_VGA_VIDEO_CONSOLE) += video/vga.c
# Geode LX console drivers
-libc-$(CONFIG_GEODELX_VIDEO_CONSOLE) += video/geodelx.c
-libc-$(CONFIG_GEODELX_VIDEO_CONSOLE) += video/font8x16.c
+libc-$(CONFIG_LP_GEODELX_VIDEO_CONSOLE) += video/geodelx.c
+libc-$(CONFIG_LP_GEODELX_VIDEO_CONSOLE) += video/font8x16.c
# coreboot generic framebuffer driver
libc-$(CONFIG_COREBOOT_VIDEO_CONSOLE) += video/corebootfb.c
libc-$(CONFIG_COREBOOT_VIDEO_CONSOLE) += video/font8x16.c
# AHCI/ATAPI driver
-libc-$(CONFIG_STORAGE) += storage/storage.c
-libc-$(CONFIG_STORAGE_AHCI) += storage/ahci.c
-libc-$(CONFIG_STORAGE_AHCI) += storage/ahci_common.c
-ifeq ($(CONFIG_STORAGE_ATA),y)
-libc-$(CONFIG_STORAGE_ATA) += storage/ata.c
-libc-$(CONFIG_STORAGE_ATA) += storage/ahci_ata.c
+libc-$(CONFIG_LP_STORAGE) += storage/storage.c
+libc-$(CONFIG_LP_STORAGE_AHCI) += storage/ahci.c
+libc-$(CONFIG_LP_STORAGE_AHCI) += storage/ahci_common.c
+ifeq ($(CONFIG_LP_STORAGE_ATA),y)
+libc-$(CONFIG_LP_STORAGE_ATA) += storage/ata.c
+libc-$(CONFIG_LP_STORAGE_ATA) += storage/ahci_ata.c
endif
-ifeq ($(CONFIG_STORAGE_ATAPI),y)
-libc-$(CONFIG_STORAGE_ATAPI) += storage/atapi.c
-libc-$(CONFIG_STORAGE_ATAPI) += storage/ahci_atapi.c
+ifeq ($(CONFIG_LP_STORAGE_ATAPI),y)
+libc-$(CONFIG_LP_STORAGE_ATAPI) += storage/atapi.c
+libc-$(CONFIG_LP_STORAGE_ATAPI) += storage/ahci_atapi.c
endif
# 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_HID) += usb/usbhid.c
-libc-$(CONFIG_USB_MSC) += usb/usbmsc.c
+libc-$(CONFIG_LP_USB) += usb/usbinit.c
+libc-$(CONFIG_LP_USB) += usb/usb.c
+libc-$(CONFIG_LP_USB) += usb/usb_dev.c
+libc-$(CONFIG_LP_USB) += usb/quirks.c
+libc-$(CONFIG_LP_USB_GEN_HUB) += usb/generic_hub.c
+libc-$(CONFIG_LP_USB_HUB) += usb/usbhub.c
+libc-$(CONFIG_LP_USB_UHCI) += usb/uhci.c
+libc-$(CONFIG_LP_USB_UHCI) += usb/uhci_rh.c
+libc-$(CONFIG_LP_USB_OHCI) += usb/ohci.c
+libc-$(CONFIG_LP_USB_OHCI) += usb/ohci_rh.c
+libc-$(CONFIG_LP_USB_EHCI) += usb/ehci.c
+libc-$(CONFIG_LP_USB_EHCI) += usb/ehci_rh.c
+libc-$(CONFIG_LP_USB_XHCI) += usb/xhci.c
+libc-$(CONFIG_LP_USB_XHCI) += usb/xhci_debug.c
+libc-$(CONFIG_LP_USB_XHCI) += usb/xhci_devconf.c
+libc-$(CONFIG_LP_USB_XHCI) += usb/xhci_events.c
+libc-$(CONFIG_LP_USB_XHCI) += usb/xhci_commands.c
+libc-$(CONFIG_LP_USB_XHCI) += usb/xhci_rh.c
+libc-$(CONFIG_LP_USB_HID) += usb/usbhid.c
+libc-$(CONFIG_LP_USB_MSC) += usb/usbmsc.c
# used by both USB HID and keyboard
libc-y += hid.c
diff --git a/payloads/libpayload/drivers/keyboard.c b/payloads/libpayload/drivers/keyboard.c
index ddedbd3942..8525a3e7fa 100644
--- a/payloads/libpayload/drivers/keyboard.c
+++ b/payloads/libpayload/drivers/keyboard.c
@@ -41,7 +41,7 @@ struct layout_maps {
static struct layout_maps *map;
static struct layout_maps keyboard_layouts[] = {
-#ifdef CONFIG_PC_KEYBOARD_LAYOUT_US
+#ifdef CONFIG_LP_PC_KEYBOARD_LAYOUT_US
{ .country = "us", .map = {
{ /* No modifier */
0x00, 0x1B, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
@@ -97,7 +97,7 @@ static struct layout_maps keyboard_layouts[] = {
}
}},
#endif
-#ifdef CONFIG_PC_KEYBOARD_LAYOUT_DE
+#ifdef CONFIG_LP_PC_KEYBOARD_LAYOUT_DE
{ .country = "de", .map = {
{ /* No modifier */
0x00, 0x1B, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
diff --git a/payloads/libpayload/drivers/nvram.c b/payloads/libpayload/drivers/nvram.c
index 86ff670425..a046c8e6cd 100644
--- a/payloads/libpayload/drivers/nvram.c
+++ b/payloads/libpayload/drivers/nvram.c
@@ -60,7 +60,7 @@
* doesn't try to do this on its own.
*/
#define RTC_PORT_STANDARD 0x70
-#ifdef CONFIG_RTC_PORT_EXTENDED_VIA
+#ifdef CONFIG_LP_RTC_PORT_EXTENDED_VIA
#define RTC_PORT_EXTENDED 0x74
#else
#define RTC_PORT_EXTENDED 0x72
diff --git a/payloads/libpayload/drivers/serial.c b/payloads/libpayload/drivers/serial.c
index 0d2964b771..92782a0ee6 100644
--- a/payloads/libpayload/drivers/serial.c
+++ b/payloads/libpayload/drivers/serial.c
@@ -39,7 +39,7 @@ static int serial_is_mem_mapped = 0;
static uint8_t serial_read_reg(int offset)
{
-#ifdef CONFIG_IO_ADDRESS_SPACE
+#ifdef CONFIG_LP_IO_ADDRESS_SPACE
if (!serial_is_mem_mapped)
return inb(IOBASE + offset);
else
@@ -49,7 +49,7 @@ static uint8_t serial_read_reg(int offset)
static void serial_write_reg(uint8_t val, int offset)
{
-#ifdef CONFIG_IO_ADDRESS_SPACE
+#ifdef CONFIG_LP_IO_ADDRESS_SPACE
if (!serial_is_mem_mapped)
outb(val, IOBASE + offset);
else
@@ -57,7 +57,7 @@ static void serial_write_reg(uint8_t val, int offset)
writeb(val, MEMBASE + offset);
}
-#ifdef CONFIG_SERIAL_SET_SPEED
+#ifdef CONFIG_LP_SERIAL_SET_SPEED
static void serial_hardware_init(int speed, int word_bits,
int parity, int stop_bits)
{
@@ -102,7 +102,7 @@ void serial_init(void)
(lib_sysinfo.serial->type == CB_SERIAL_TYPE_MEMORY_MAPPED);
if (!serial_is_mem_mapped) {
-#ifdef CONFIG_IO_ADDRESS_SPACE
+#ifdef CONFIG_LP_IO_ADDRESS_SPACE
if ((inb(IOBASE + 0x05) == 0xFF) &&
(inb(IOBASE + 0x06) == 0xFF)) {
printf("IO space mapped serial not present.");
@@ -114,8 +114,8 @@ void serial_init(void)
#endif
}
-#ifdef CONFIG_SERIAL_SET_SPEED
- serial_hardware_init(CONFIG_SERIAL_BAUD_RATE, 8, 0, 1);
+#ifdef CONFIG_LP_SERIAL_SET_SPEED
+ serial_hardware_init(CONFIG_LP_SERIAL_BAUD_RATE, 8, 0, 1);
#endif
console_add_input_driver(&consin);
console_add_output_driver(&consout);
diff --git a/payloads/libpayload/drivers/storage/ahci.c b/payloads/libpayload/drivers/storage/ahci.c
index 5711fa263d..4eef8435f6 100644
--- a/payloads/libpayload/drivers/storage/ahci.c
+++ b/payloads/libpayload/drivers/storage/ahci.c
@@ -152,7 +152,7 @@ static int ahci_dev_init(hba_ctrl_t *const ctrl,
switch (port->signature) {
case HBA_PxSIG_ATA:
printf("ahci: ATA drive on port #%d.\n", portnum);
-#ifdef CONFIG_STORAGE_ATA
+#ifdef CONFIG_LP_STORAGE_ATA
dev->ata_dev.identify = ahci_identify_device;
dev->ata_dev.read_sectors = ahci_ata_read_sectors;
return ata_attach_device(&dev->ata_dev, PORT_TYPE_SATA);
@@ -160,7 +160,7 @@ static int ahci_dev_init(hba_ctrl_t *const ctrl,
break;
case HBA_PxSIG_ATAPI:
printf("ahci: ATAPI drive on port #%d.\n", portnum);
-#ifdef CONFIG_STORAGE_ATAPI
+#ifdef CONFIG_LP_STORAGE_ATAPI
dev->atapi_dev.identify = ahci_identify_device;
dev->atapi_dev.packet_read_cmd = ahci_packet_read_cmd;
return atapi_attach_device(&dev->atapi_dev, PORT_TYPE_SATA);
@@ -217,7 +217,7 @@ static void ahci_port_probe(hba_ctrl_t *const ctrl,
ahci_dev_init(ctrl, port, portnum);
}
-#ifdef CONFIG_STORAGE_AHCI_ONLY_TESTED
+#ifdef CONFIG_LP_STORAGE_AHCI_ONLY_TESTED
static u32 working_controllers[] = {
0x8086 | 0x2929 << 16, /* Mobile ICH9 */
0x8086 | 0x1e03 << 16, /* Mobile Panther Point PCH */
@@ -233,7 +233,7 @@ static void ahci_init_pci(pcidev_t dev)
const u16 vendor = pci_read_config16(dev, 0x00);
const u16 device = pci_read_config16(dev, 0x02);
-#ifdef CONFIG_STORAGE_AHCI_ONLY_TESTED
+#ifdef CONFIG_LP_STORAGE_AHCI_ONLY_TESTED
const u32 vendor_device = pci_read_config32(dev, 0x0);
for (i = 0; i < ARRAY_SIZE(working_controllers); ++i)
if (vendor_device == working_controllers[i])
diff --git a/payloads/libpayload/drivers/storage/ata.c b/payloads/libpayload/drivers/storage/ata.c
index e7d45fd8cd..f1cf28f91e 100644
--- a/payloads/libpayload/drivers/storage/ata.c
+++ b/payloads/libpayload/drivers/storage/ata.c
@@ -212,7 +212,7 @@ int ata_attach_device(ata_dev_t *const dev, const storage_port_t port_type)
ata_strncpy(model, id + 27, sizeof(model));
printf("ata: Identified %s [%s]\n", model, fw);
-#ifdef CONFIG_STORAGE_64BIT_LBA
+#ifdef CONFIG_LP_STORAGE_64BIT_LBA
if (id[ATA_CMDS_AND_FEATURE_SETS + 1] & (1 << 10)) {
printf("ata: Support for LBA-48 enabled.\n");
dev->read_cmd = ATA_READ_DMA_EXT;
diff --git a/payloads/libpayload/drivers/storage/storage.c b/payloads/libpayload/drivers/storage/storage.c
index ae60309401..ccfd02cc23 100644
--- a/payloads/libpayload/drivers/storage/storage.c
+++ b/payloads/libpayload/drivers/storage/storage.c
@@ -28,7 +28,7 @@
*/
#include <libpayload.h>
-#ifdef CONFIG_STORAGE_AHCI
+#ifdef CONFIG_LP_STORAGE_AHCI
# include <storage/ahci.h>
#endif
#include <storage/storage.h>
@@ -110,7 +110,7 @@ ssize_t storage_read_blocks512(const size_t dev_num,
*/
void storage_initialize(void)
{
-#ifdef CONFIG_STORAGE_AHCI
+#ifdef CONFIG_LP_STORAGE_AHCI
ahci_initialize();
#endif
}
diff --git a/payloads/libpayload/drivers/usb/ehci.c b/payloads/libpayload/drivers/usb/ehci.c
index 82802a7f0d..b9837017e4 100644
--- a/payloads/libpayload/drivers/usb/ehci.c
+++ b/payloads/libpayload/drivers/usb/ehci.c
@@ -805,7 +805,7 @@ ehci_init (unsigned long physical_bar)
return controller;
}
-#ifdef CONFIG_USB_PCI
+#ifdef CONFIG_LP_USB_PCI
hci_t *
ehci_pci_init (pcidev_t addr)
{
diff --git a/payloads/libpayload/drivers/usb/ohci.c b/payloads/libpayload/drivers/usb/ohci.c
index 9f15dd0930..0683de3c5d 100644
--- a/payloads/libpayload/drivers/usb/ohci.c
+++ b/payloads/libpayload/drivers/usb/ohci.c
@@ -251,7 +251,7 @@ ohci_init (unsigned long physical_bar)
return controller;
}
-#ifdef CONFIG_USB_PCI
+#ifdef CONFIG_LP_USB_PCI
hci_t *
ohci_pci_init (pcidev_t addr)
{
diff --git a/payloads/libpayload/drivers/usb/usb.c b/payloads/libpayload/drivers/usb/usb.c
index 47f8eb6e3a..6b54dbbada 100644
--- a/payloads/libpayload/drivers/usb/usb.c
+++ b/payloads/libpayload/drivers/usb/usb.c
@@ -464,7 +464,7 @@ set_address (hci_t *controller, int speed, int hubport, int hubaddr)
break;
case hid_device:
usb_debug ("HID\n");
-#ifdef CONFIG_USB_HID
+#ifdef CONFIG_LP_USB_HID
controller->devices[adr]->init = usb_hid_init;
return adr;
#else
@@ -482,7 +482,7 @@ set_address (hci_t *controller, int speed, int hubport, int hubaddr)
break;
case msc_device:
usb_debug ("MSC\n");
-#ifdef CONFIG_USB_MSC
+#ifdef CONFIG_LP_USB_MSC
controller->devices[adr]->init = usb_msc_init;
return adr;
#else
@@ -491,7 +491,7 @@ set_address (hci_t *controller, int speed, int hubport, int hubaddr)
break;
case hub_device:
usb_debug ("hub\n");
-#ifdef CONFIG_USB_HUB
+#ifdef CONFIG_LP_USB_HUB
controller->devices[adr]->init = usb_hub_init;
return adr;
#else
diff --git a/payloads/libpayload/drivers/usb/usbhid.c b/payloads/libpayload/drivers/usb/usbhid.c
index b8c04f1d1a..51c3d46c25 100644
--- a/payloads/libpayload/drivers/usb/usbhid.c
+++ b/payloads/libpayload/drivers/usb/usbhid.c
@@ -138,7 +138,7 @@ struct layout_maps {
static const struct layout_maps *map;
static const struct layout_maps keyboard_layouts[] = {
-// #ifdef CONFIG_PC_KEYBOARD_LAYOUT_US
+// #ifdef CONFIG_LP_PC_KEYBOARD_LAYOUT_US
{ .country = "us", .map = {
{ /* No modifier */
-1, -1, -1, -1, 'a', 'b', 'c', 'd',
diff --git a/payloads/libpayload/drivers/usb/usbinit.c b/payloads/libpayload/drivers/usb/usbinit.c
index ca0bf76866..90c31d7ef5 100644
--- a/payloads/libpayload/drivers/usb/usbinit.c
+++ b/payloads/libpayload/drivers/usb/usbinit.c
@@ -36,7 +36,7 @@
#include "xhci.h"
#include <usb/usbdisk.h>
-#ifdef CONFIG_USB_PCI
+#ifdef CONFIG_LP_USB_PCI
/**
* Initializes USB controller attached to PCI
*
@@ -71,7 +71,7 @@ static int usb_controller_initialize(int bus, int dev, int func)
pciid >> 16, pciid & 0xFFFF, func);
switch (prog_if) {
case 0x00:
-#ifdef CONFIG_USB_UHCI
+#ifdef CONFIG_LP_USB_UHCI
usb_debug("UHCI controller\n");
uhci_pci_init (pci_device);
#else
@@ -80,7 +80,7 @@ static int usb_controller_initialize(int bus, int dev, int func)
break;
case 0x10:
-#ifdef CONFIG_USB_OHCI
+#ifdef CONFIG_LP_USB_OHCI
usb_debug("OHCI controller\n");
ohci_pci_init(pci_device);
#else
@@ -89,7 +89,7 @@ static int usb_controller_initialize(int bus, int dev, int func)
break;
case 0x20:
-#ifdef CONFIG_USB_EHCI
+#ifdef CONFIG_LP_USB_EHCI
usb_debug("EHCI controller\n");
ehci_pci_init(pci_device);
#else
@@ -98,7 +98,7 @@ static int usb_controller_initialize(int bus, int dev, int func)
break;
case 0x30:
-#ifdef CONFIG_USB_XHCI
+#ifdef CONFIG_LP_USB_XHCI
usb_debug("xHCI controller\n");
xhci_pci_init(pci_device);
#else
@@ -156,17 +156,17 @@ static void usb_scan_pci_bus(int bus)
}
#endif
-#ifdef CONFIG_USB_MEMORY
+#ifdef CONFIG_LP_USB_MEMORY
static void usb_scan_memory(void)
{
-#ifdef CONFIG_USB_XHCI
- xhci_init(CONFIG_USB_XHCI_BASE_ADDRESS);
+#ifdef CONFIG_LP_USB_XHCI
+ xhci_init(CONFIG_LP_USB_XHCI_BASE_ADDRESS);
#endif
-#ifdef CONFIG_USB_EHCI
- ehci_init(CONFIG_USB_EHCI_BASE_ADDRESS);
+#ifdef CONFIG_LP_USB_EHCI
+ ehci_init(CONFIG_LP_USB_EHCI_BASE_ADDRESS);
#endif
-#ifdef CONFIG_USB_OHCI
- ohci_init(CONFIG_USB_OHCI_BASE_ADDRESS);
+#ifdef CONFIG_LP_USB_OHCI
+ ohci_init(CONFIG_LP_USB_OHCI_BASE_ADDRESS);
#endif
}
#endif
@@ -176,10 +176,10 @@ static void usb_scan_memory(void)
*/
int usb_initialize(void)
{
-#ifdef CONFIG_USB_PCI
+#ifdef CONFIG_LP_USB_PCI
usb_scan_pci_bus(0);
#endif
-#ifdef CONFIG_USB_MEMORY
+#ifdef CONFIG_LP_USB_MEMORY
usb_scan_memory();
#endif
return 0;
diff --git a/payloads/libpayload/drivers/usb/xhci.c b/payloads/libpayload/drivers/usb/xhci.c
index 0bd54c7d74..2e9dd3b912 100644
--- a/payloads/libpayload/drivers/usb/xhci.c
+++ b/payloads/libpayload/drivers/usb/xhci.c
@@ -297,7 +297,7 @@ _free_controller:
return NULL;
}
-#ifdef CONFIG_USB_PCI
+#ifdef CONFIG_LP_USB_PCI
hci_t *
xhci_pci_init (pcidev_t addr)
{
@@ -344,8 +344,8 @@ xhci_reinit (hci_t *controller)
return;
/* Enable all available slots */
- xhci->opreg->config = xhci->capreg->MaxSlots & CONFIG_MASK_MaxSlotsEn;
- xhci->max_slots_en = xhci->capreg->MaxSlots & CONFIG_MASK_MaxSlotsEn;
+ xhci->opreg->config = xhci->capreg->MaxSlots & CONFIG_LP_MASK_MaxSlotsEn;
+ xhci->max_slots_en = xhci->capreg->MaxSlots & CONFIG_LP_MASK_MaxSlotsEn;
/* Set DCBAA */
xhci->opreg->dcbaap_lo = virt_to_phys(xhci->dcbaa);
diff --git a/payloads/libpayload/drivers/usb/xhci_private.h b/payloads/libpayload/drivers/usb/xhci_private.h
index 6f7893ee31..945c7f1982 100644
--- a/payloads/libpayload/drivers/usb/xhci_private.h
+++ b/payloads/libpayload/drivers/usb/xhci_private.h
@@ -389,7 +389,7 @@ typedef struct xhci {
u32 dcbaap_lo;
u32 dcbaap_hi;
u32 config;
-#define CONFIG_MASK_MaxSlotsEn 0xff
+#define CONFIG_LP_MASK_MaxSlotsEn 0xff
u8 res3[0x3ff-0x3c+1];
struct {
u32 portsc;
diff --git a/payloads/libpayload/drivers/video/video.c b/payloads/libpayload/drivers/video/video.c
index b8fe5d9687..ed47234345 100644
--- a/payloads/libpayload/drivers/video/video.c
+++ b/payloads/libpayload/drivers/video/video.c
@@ -31,27 +31,27 @@
#include <libpayload.h>
#include <video_console.h>
-#ifdef CONFIG_GEODELX_VIDEO_CONSOLE
+#ifdef CONFIG_LP_GEODELX_VIDEO_CONSOLE
extern struct video_console geodelx_video_console;
#endif
-#ifdef CONFIG_COREBOOT_VIDEO_CONSOLE
+#ifdef CONFIG_LP_COREBOOT_VIDEO_CONSOLE
extern struct video_console coreboot_video_console;
#endif
-#ifdef CONFIG_VGA_VIDEO_CONSOLE
+#ifdef CONFIG_LP_VGA_VIDEO_CONSOLE
extern struct video_console vga_video_console;
#endif
static struct video_console *console_list[] =
{
-#ifdef CONFIG_GEODELX_VIDEO_CONSOLE
+#ifdef CONFIG_LP_GEODELX_VIDEO_CONSOLE
&geodelx_video_console,
#endif
-#ifdef CONFIG_COREBOOT_VIDEO_CONSOLE
+#ifdef CONFIG_LP_COREBOOT_VIDEO_CONSOLE
&coreboot_video_console,
#endif
-#ifdef CONFIG_VGA_VIDEO_CONSOLE
+#ifdef CONFIG_LP_VGA_VIDEO_CONSOLE
&vga_video_console,
#endif
};
diff --git a/payloads/libpayload/include/cbfs_core.h b/payloads/libpayload/include/cbfs_core.h
index f9d1fc313d..d908d83d9c 100644
--- a/payloads/libpayload/include/cbfs_core.h
+++ b/payloads/libpayload/include/cbfs_core.h
@@ -88,7 +88,7 @@
/** this is the master cbfs header - it needs to be located somewhere available
to bootblock (to load romstage). Where it actually lives is up to coreboot.
On x86, a pointer to this header will live at 0xFFFFFFFC.
- For other platforms, you need to define CONFIG_CBFS_HEADER_ROM_OFFSET */
+ For other platforms, you need to define CONFIG_LP_CBFS_HEADER_ROM_OFFSET */
struct cbfs_header {
uint32_t magic;
diff --git a/payloads/libpayload/include/endian.h b/payloads/libpayload/include/endian.h
index d4ddb5df4f..ada6bc65b0 100644
--- a/payloads/libpayload/include/endian.h
+++ b/payloads/libpayload/include/endian.h
@@ -45,7 +45,7 @@ static inline uint64_t swap_bytes64(uint64_t in)
/* Endian functions from glibc 2.9 / BSD "endian.h" */
-#if defined CONFIG_BIG_ENDIAN
+#if defined CONFIG_LP_BIG_ENDIAN
#define htobe16(in) (in)
#define htobe32(in) (in)
@@ -55,7 +55,7 @@ static inline uint64_t swap_bytes64(uint64_t in)
#define htole32(in) swap_bytes32(in)
#define htole64(in) swap_bytes64(in)
-#elif defined CONFIG_LITTLE_ENDIAN
+#elif defined CONFIG_LP_LITTLE_ENDIAN
#define htobe16(in) swap_bytes16(in)
#define htobe32(in) swap_bytes32(in)
diff --git a/payloads/libpayload/include/kconfig.h b/payloads/libpayload/include/kconfig.h
index 3d7d768f9c..adb3403cf2 100644
--- a/payloads/libpayload/include/kconfig.h
+++ b/payloads/libpayload/include/kconfig.h
@@ -5,10 +5,10 @@
/*
* Getting something that works in C and CPP for an arg that may or may
- * not be defined is tricky. Here, if we have "#define CONFIG_BOOGER 1"
+ * not be defined is tricky. Here, if we have "#define CONFIG_LP_BOOGER 1"
* we match on the placeholder define, insert the "0," for arg1 and generate
* the triplet (0, 1, 0). Then the last step cherry picks the 2nd arg (a one).
- * When CONFIG_BOOGER is not defined, we generate a (... 1, 0) pair, and when
+ * When CONFIG_LP_BOOGER is not defined, we generate a (... 1, 0) pair, and when
* the last step cherry picks the 2nd arg, we get a zero.
*/
#define __ARG_PLACEHOLDER_1 0,
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h
index 14f8a38164..29b5629348 100644
--- a/payloads/libpayload/include/libpayload.h
+++ b/payloads/libpayload/include/libpayload.h
@@ -56,7 +56,7 @@
#include <arch/virtual.h>
#include <sysinfo.h>
#include <pci.h>
-#ifdef CONFIG_LAR
+#ifdef CONFIG_LP_LAR
#include <lar.h>
#endif
@@ -339,7 +339,7 @@ struct timeval {
int gettimeofday(struct timeval *tv, void *tz);
/** @} */
-#ifdef CONFIG_LAR
+#ifdef CONFIG_LP_LAR
/**
* @defgroup lar LAR functions
* @{
diff --git a/payloads/libpayload/include/stdlib.h b/payloads/libpayload/include/stdlib.h
index cf37c8056f..92a13e38e7 100644
--- a/payloads/libpayload/include/stdlib.h
+++ b/payloads/libpayload/include/stdlib.h
@@ -36,7 +36,7 @@
* @defgroup malloc Memory allocation functions
* @{
*/
-#if defined(CONFIG_DEBUG_MALLOC) && !defined(IN_MALLOC_C)
+#if defined(CONFIG_LP_DEBUG_MALLOC) && !defined(IN_MALLOC_C)
#define free(p) \
({ \
extern void print_malloc_map(void); \
diff --git a/payloads/libpayload/include/storage/storage.h b/payloads/libpayload/include/storage/storage.h
index ef61cd287d..a3cebd90bd 100644
--- a/payloads/libpayload/include/storage/storage.h
+++ b/payloads/libpayload/include/storage/storage.h
@@ -34,7 +34,7 @@
#include <unistd.h>
-#ifndef CONFIG_STORAGE_64BIT_LBA
+#ifndef CONFIG_LP_STORAGE_64BIT_LBA
typedef u32 lba_t;
#else
typedef u64 lba_t;
diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h
index e2ceffc259..92b8dcabf0 100644
--- a/payloads/libpayload/include/sysinfo.h
+++ b/payloads/libpayload/include/sysinfo.h
@@ -63,7 +63,7 @@ struct sysinfo_t {
u32 cmos_range_start;
u32 cmos_range_end;
u32 cmos_checksum_location;
-#ifdef CONFIG_CHROMEOS
+#ifdef CONFIG_LP_CHROMEOS
u32 vbnv_start;
u32 vbnv_size;
#endif
@@ -83,7 +83,7 @@ struct sysinfo_t {
struct cb_framebuffer *framebuffer;
-#ifdef CONFIG_CHROMEOS
+#ifdef CONFIG_LP_CHROMEOS
int num_gpios;
struct cb_gpio gpios[SYSINFO_MAX_GPIOS];
#endif
@@ -93,14 +93,14 @@ struct sysinfo_t {
struct cb_header *header;
struct cb_mainboard *mainboard;
-#ifdef CONFIG_CHROMEOS
+#ifdef CONFIG_LP_CHROMEOS
void *vboot_handoff;
u32 vboot_handoff_size;
void *vdat_addr;
u32 vdat_size;
#endif
-#ifdef CONFIG_ARCH_X86
+#ifdef CONFIG_LP_ARCH_X86
int x86_rom_var_mtrr_index;
#endif
diff --git a/payloads/libpayload/libc/Makefile.inc b/payloads/libpayload/libc/Makefile.inc
index edeb0d99fe..53f3c9b1bb 100644
--- a/payloads/libpayload/libc/Makefile.inc
+++ b/payloads/libpayload/libc/Makefile.inc
@@ -28,14 +28,14 @@
## SUCH DAMAGE.
##
-libc-$(CONFIG_LIBC) += malloc.c printf.c console.c string.c
-libc-$(CONFIG_LIBC) += memory.c ctype.c ipchecksum.c lib.c
-libc-$(CONFIG_LIBC) += rand.c time.c exec.c
-libc-$(CONFIG_LIBC) += readline.c getopt_long.c sysinfo.c
-libc-$(CONFIG_LIBC) += args.c strings.c
-libc-$(CONFIG_LIBC) += strlcpy.c
-libc-$(CONFIG_LIBC) += qsort.c
-libc-$(CONFIG_LIBC) += hexdump.c
+libc-$(CONFIG_LP_LIBC) += malloc.c printf.c console.c string.c
+libc-$(CONFIG_LP_LIBC) += memory.c ctype.c ipchecksum.c lib.c
+libc-$(CONFIG_LP_LIBC) += rand.c time.c exec.c
+libc-$(CONFIG_LP_LIBC) += readline.c getopt_long.c sysinfo.c
+libc-$(CONFIG_LP_LIBC) += args.c strings.c
+libc-$(CONFIG_LP_LIBC) += strlcpy.c
+libc-$(CONFIG_LP_LIBC) += qsort.c
+libc-$(CONFIG_LP_LIBC) += hexdump.c
# should be moved to coreboot directory
-libc-$(CONFIG_LAR) += lar.c
+libc-$(CONFIG_LP_LAR) += lar.c
diff --git a/payloads/libpayload/libc/console.c b/payloads/libpayload/libc/console.c
index 54844db79b..a362481b15 100644
--- a/payloads/libpayload/libc/console.c
+++ b/payloads/libpayload/libc/console.c
@@ -49,16 +49,16 @@ void console_add_input_driver(struct console_input_driver *in)
void console_init(void)
{
-#ifdef CONFIG_VIDEO_CONSOLE
+#ifdef CONFIG_LP_VIDEO_CONSOLE
video_console_init();
#endif
-#ifdef CONFIG_SERIAL_CONSOLE
+#ifdef CONFIG_LP_SERIAL_CONSOLE
serial_init();
#endif
-#ifdef CONFIG_PC_KEYBOARD
+#ifdef CONFIG_LP_PC_KEYBOARD
keyboard_init();
#endif
-#ifdef CONFIG_CBMEM_CONSOLE
+#ifdef CONFIG_LP_CBMEM_CONSOLE
cbmem_console_init();
#endif
}
@@ -94,7 +94,7 @@ int puts(const char *s)
int havekey(void)
{
-#ifdef CONFIG_USB
+#ifdef CONFIG_LP_USB
usb_poll();
#endif
struct console_input_driver *in;
@@ -111,7 +111,7 @@ int havekey(void)
int getchar(void)
{
while (1) {
-#ifdef CONFIG_USB
+#ifdef CONFIG_LP_USB
usb_poll();
#endif
struct console_input_driver *in;
diff --git a/payloads/libpayload/libc/exec.c b/payloads/libpayload/libc/exec.c
index 13a1e5a8cd..4360bd595c 100644
--- a/payloads/libpayload/libc/exec.c
+++ b/payloads/libpayload/libc/exec.c
@@ -30,7 +30,7 @@
#include <libpayload-config.h>
#include <libpayload.h>
-#ifdef CONFIG_ARCH_X86
+#ifdef CONFIG_LP_ARCH_X86
extern void i386_do_exec(long addr, int argc, char **argv, int *ret);
#endif
@@ -46,7 +46,7 @@ int exec(long addr, int argc, char **argv)
{
int val = -1;
-#ifdef CONFIG_ARCH_X86
+#ifdef CONFIG_LP_ARCH_X86
i386_do_exec(addr, argc, argv, &val);
#endif
return val;
diff --git a/payloads/libpayload/libc/malloc.c b/payloads/libpayload/libc/malloc.c
index 851ef574e2..f022f7349a 100644
--- a/payloads/libpayload/libc/malloc.c
+++ b/payloads/libpayload/libc/malloc.c
@@ -68,7 +68,7 @@ typedef u64 hdrtype_t;
static int free_aligned(void* addr);
void print_malloc_map(void);
-#ifdef CONFIG_DEBUG_MALLOC
+#ifdef CONFIG_LP_DEBUG_MALLOC
static int heap_initialized = 0;
static int minimal_free = 0;
#endif
@@ -77,7 +77,7 @@ static void setup(hdrtype_t volatile *start, int size)
{
*start = FREE_BLOCK(size);
-#ifdef CONFIG_DEBUG_MALLOC
+#ifdef CONFIG_LP_DEBUG_MALLOC
heap_initialized = 1;
minimal_free = size;
#endif
@@ -282,7 +282,7 @@ static struct align_region_t* align_regions = 0;
static struct align_region_t *allocate_region(int alignment, int num_elements)
{
struct align_region_t *new_region;
-#ifdef CONFIG_DEBUG_MALLOC
+#ifdef CONFIG_LP_DEBUG_MALLOC
printf("%s(old align_regions=%p, alignment=%u, num_elements=%u)\n",
__func__, align_regions, alignment, num_elements);
#endif
@@ -344,7 +344,7 @@ look_further:
{
if ((reg->alignment == align) && (reg->free >= (size + align - 1)/align))
{
-#ifdef CONFIG_DEBUG_MALLOC
+#ifdef CONFIG_LP_DEBUG_MALLOC
printf(" found memalign region. %x free, %x required\n", reg->free, (size + align - 1)/align);
#endif
break;
@@ -353,12 +353,12 @@ look_further:
}
if (reg == 0)
{
-#ifdef CONFIG_DEBUG_MALLOC
+#ifdef CONFIG_LP_DEBUG_MALLOC
printf(" need to allocate a new memalign region\n");
#endif
/* get align regions */
reg = allocate_region(align, (size<1024)?(1024/align):(((size-1)/align)+1));
-#ifdef CONFIG_DEBUG_MALLOC
+#ifdef CONFIG_LP_DEBUG_MALLOC
printf(" ... returned %p\n", align_regions);
#endif
}
@@ -394,7 +394,7 @@ look_further:
}
/* This is for debugging purposes. */
-#ifdef CONFIG_DEBUG_MALLOC
+#ifdef CONFIG_LP_DEBUG_MALLOC
void print_malloc_map(void)
{
void *ptr = hstart;
diff --git a/payloads/libpayload/libc/time.c b/payloads/libpayload/libc/time.c
index 7b6bf47cdf..ec1c85ce8c 100644
--- a/payloads/libpayload/libc/time.c
+++ b/payloads/libpayload/libc/time.c
@@ -34,7 +34,7 @@
#include <libpayload-config.h>
#include <libpayload.h>
-#ifdef CONFIG_ARCH_X86
+#ifdef CONFIG_LP_ARCH_X86
#include <arch/rdtsc.h>
#endif
@@ -70,7 +70,7 @@ static void update_clock(void)
}
}
-#ifdef CONFIG_NVRAM
+#ifdef CONFIG_LP_NVRAM
static unsigned int day_of_year(int mon, int day, int year)
{
diff --git a/payloads/libpayload/libcbfs/Makefile.inc b/payloads/libpayload/libcbfs/Makefile.inc
index 0d3e1ec59a..72f6b790ad 100644
--- a/payloads/libpayload/libcbfs/Makefile.inc
+++ b/payloads/libpayload/libcbfs/Makefile.inc
@@ -27,6 +27,6 @@
## SUCH DAMAGE.
##
-libcbfs-$(CONFIG_CBFS) += cbfs.c
-libcbfs-$(CONFIG_CBFS) += ram_media.c
+libcbfs-$(CONFIG_LP_CBFS) += cbfs.c
+libcbfs-$(CONFIG_LP_CBFS) += ram_media.c
diff --git a/payloads/libpayload/libcbfs/cbfs.c b/payloads/libpayload/libcbfs/cbfs.c
index c143abb5e0..561055534a 100644
--- a/payloads/libpayload/libcbfs/cbfs.c
+++ b/payloads/libpayload/libcbfs/cbfs.c
@@ -31,7 +31,7 @@
#ifdef LIBPAYLOAD
# include <libpayload-config.h>
-# ifdef CONFIG_LZMA
+# ifdef CONFIG_LP_LZMA
# include <lzma.h>
# define CBFS_CORE_WITH_LZMA
# endif
@@ -55,15 +55,15 @@
# include <console/console.h>
# define ERROR(x...) printk(BIOS_ERR, "CBFS: " x)
# define LOG(x...) printk(BIOS_INFO, "CBFS: " x)
-# if CONFIG_DEBUG_CBFS
+# if CONFIG_LP_DEBUG_CBFS
# define DEBUG(x...) printk(BIOS_SPEW, "CBFS: " x)
# else
# define DEBUG(x...)
# endif
#endif
-#if defined(CONFIG_CBFS_HEADER_ROM_OFFSET) && (CONFIG_CBFS_HEADER_ROM_OFFSET)
-# define CBFS_HEADER_ROM_ADDRESS (CONFIG_CBFS_HEADER_ROM_OFFSET)
+#if defined(CONFIG_LP_CBFS_HEADER_ROM_OFFSET) && (CONFIG_LP_CBFS_HEADER_ROM_OFFSET)
+# define CBFS_HEADER_ROM_ADDRESS (CONFIG_LP_CBFS_HEADER_ROM_OFFSET)
#else
/* ugly hack: this assumes that "media" exists
in the scope where the macro is used. */
diff --git a/payloads/libpayload/libcbfs/cbfs_core.c b/payloads/libpayload/libcbfs/cbfs_core.c
index d14cf61a67..a3d3e02467 100644
--- a/payloads/libpayload/libcbfs/cbfs_core.c
+++ b/payloads/libpayload/libcbfs/cbfs_core.c
@@ -69,7 +69,7 @@ const struct cbfs_header *cbfs_get_header(struct cbfs_media *media)
media->open(media);
DEBUG("CBFS_HEADER_ROM_ADDRESS: 0x%x/0x%x\n", CBFS_HEADER_ROM_ADDRESS,
- CONFIG_ROM_SIZE);
+ CONFIG_LP_ROM_SIZE);
header = media->map(media, CBFS_HEADER_ROM_ADDRESS, sizeof(*header));
media->close(media);
@@ -118,7 +118,7 @@ struct cbfs_file *cbfs_get_file(struct cbfs_media *media, const char *name)
// TODO Add a "size" in CBFS header for a platform independent way to
// determine the end of CBFS data.
-#if defined(CONFIG_ARCH_X86) && CONFIG_ARCH_X86
+#if defined(CONFIG_LP_ARCH_X86) && CONFIG_LP_ARCH_X86
romsize -= htonl(header->bootblocksize);
#endif
DEBUG("CBFS location: 0x%x~0x%x, align: %d\n", offset, romsize, align);
diff --git a/payloads/libpayload/liblzma/Makefile.inc b/payloads/libpayload/liblzma/Makefile.inc
index 2dd4a2d900..7df45f2014 100644
--- a/payloads/libpayload/liblzma/Makefile.inc
+++ b/payloads/libpayload/liblzma/Makefile.inc
@@ -27,5 +27,5 @@
## SUCH DAMAGE.
##
-liblzma-$(CONFIG_LZMA) += lzma.c
+liblzma-$(CONFIG_LP_LZMA) += lzma.c
diff --git a/payloads/libpayload/tests/libpayload-config.h b/payloads/libpayload/tests/libpayload-config.h
index 6fe99a9a79..68995b8461 100644
--- a/payloads/libpayload/tests/libpayload-config.h
+++ b/payloads/libpayload/tests/libpayload-config.h
@@ -4,27 +4,27 @@
* Sat Mar 9 10:22:45 2013
*/
#define AUTOCONF_INCLUDED
-#define CONFIG_SPEAKER 1
-#define CONFIG_STORAGE 1
-#define CONFIG_LIBC 1
-#define CONFIG_CBFS 1
-#define CONFIG_VGA_VIDEO_CONSOLE 1
-#define CONFIG_SERIAL_CONSOLE 1
-#define CONFIG_PC_KEYBOARD 1
-#define CONFIG_ARCH_X86 1
-#define CONFIG_STORAGE_ATA 1
-#define CONFIG_ARCH_SPECIFIC_OPTIONS 1
-#define CONFIG_STORAGE_AHCI_ONLY_TESTED 1
-#define CONFIG_X86_SERIAL_CONSOLE 1
-#define CONFIG_PDCURSES 1
-#define CONFIG_NVRAM 1
-#define CONFIG_PC_KEYBOARD_LAYOUT_US 1
-#define CONFIG_STORAGE_AHCI 1
-#define CONFIG_MULTIBOOT 1
-#define CONFIG_SERIAL_IOBASE 0x3f8
-#define CONFIG_CURSES 1
-#define CONFIG_CBMEM_CONSOLE 1
-#define CONFIG_LITTLE_ENDIAN 1
-#define CONFIG_PCI 1
-#define CONFIG_STORAGE_ATAPI 1
-#define CONFIG_VIDEO_CONSOLE 1
+#define CONFIG_LP_SPEAKER 1
+#define CONFIG_LP_STORAGE 1
+#define CONFIG_LP_LIBC 1
+#define CONFIG_LP_CBFS 1
+#define CONFIG_LP_VGA_VIDEO_CONSOLE 1
+#define CONFIG_LP_SERIAL_CONSOLE 1
+#define CONFIG_LP_PC_KEYBOARD 1
+#define CONFIG_LP_ARCH_X86 1
+#define CONFIG_LP_STORAGE_ATA 1
+#define CONFIG_LP_ARCH_SPECIFIC_OPTIONS 1
+#define CONFIG_LP_STORAGE_AHCI_ONLY_TESTED 1
+#define CONFIG_LP_X86_SERIAL_CONSOLE 1
+#define CONFIG_LP_PDCURSES 1
+#define CONFIG_LP_NVRAM 1
+#define CONFIG_LP_PC_KEYBOARD_LAYOUT_US 1
+#define CONFIG_LP_STORAGE_AHCI 1
+#define CONFIG_LP_MULTIBOOT 1
+#define CONFIG_LP_SERIAL_IOBASE 0x3f8
+#define CONFIG_LP_CURSES 1
+#define CONFIG_LP_CBMEM_CONSOLE 1
+#define CONFIG_LP_LITTLE_ENDIAN 1
+#define CONFIG_LP_PCI 1
+#define CONFIG_LP_STORAGE_ATAPI 1
+#define CONFIG_LP_VIDEO_CONSOLE 1
diff --git a/payloads/libpayload/util/kconfig/confdata.c b/payloads/libpayload/util/kconfig/confdata.c
index b1f31d8d5e..a28b930ff0 100644
--- a/payloads/libpayload/util/kconfig/confdata.c
+++ b/payloads/libpayload/util/kconfig/confdata.c
@@ -219,22 +219,22 @@ load:
sym = NULL;
switch (line[0]) {
case '#':
- if (memcmp(line + 2, "CONFIG_", 7))
+ if (memcmp(line + 2, "CONFIG_LP_", 10))
continue;
- p = strchr(line + 9, ' ');
+ p = strchr(line + 12, ' ');
if (!p)
continue;
*p++ = 0;
if (strncmp(p, "is not set", 10))
continue;
if (def == S_DEF_USER) {
- sym = sym_find(line + 9);
+ sym = sym_find(line + 12);
if (!sym) {
- conf_warning("trying to assign nonexistent symbol %s", line + 9);
+ conf_warning("trying to assign nonexistent symbol %s", line + 12);
break;
}
} else {
- sym = sym_lookup(line + 9, 0);
+ sym = sym_lookup(line + 12, 0);
if (sym->type == S_UNKNOWN)
sym->type = S_BOOLEAN;
}
@@ -252,11 +252,11 @@ load:
}
break;
case 'C':
- if (memcmp(line, "CONFIG_", 7)) {
+ if (memcmp(line, "CONFIG_LP_", 10)) {
conf_warning("unexpected data");
continue;
}
- p = strchr(line + 7, '=');
+ p = strchr(line + 10, '=');
if (!p)
continue;
*p++ = 0;
@@ -267,13 +267,13 @@ load:
*p2 = 0;
}
if (def == S_DEF_USER) {
- sym = sym_find(line + 7);
+ sym = sym_find(line + 10);
if (!sym) {
- conf_warning("trying to assign nonexistent symbol %s", line + 7);
+ conf_warning("trying to assign nonexistent symbol %s", line + 10);
break;
}
} else {
- sym = sym_lookup(line + 7, 0);
+ sym = sym_lookup(line + 10, 0);
if (sym->type == S_UNKNOWN)
sym->type = S_OTHER;
}
@@ -489,19 +489,19 @@ int conf_write(const char *name)
case S_TRISTATE:
switch (sym_get_tristate_value(sym)) {
case no:
- fprintf(out, "# CONFIG_%s is not set\n", sym->name);
+ fprintf(out, "# CONFIG_LP_%s is not set\n", sym->name);
break;
case mod:
- fprintf(out, "CONFIG_%s=m\n", sym->name);
+ fprintf(out, "CONFIG_LP_%s=m\n", sym->name);
break;
case yes:
- fprintf(out, "CONFIG_%s=y\n", sym->name);
+ fprintf(out, "CONFIG_LP_%s=y\n", sym->name);
break;
}
break;
case S_STRING:
str = sym_get_string_value(sym);
- fprintf(out, "CONFIG_%s=\"", sym->name);
+ fprintf(out, "CONFIG_LP_%s=\"", sym->name);
while (1) {
l = strcspn(str, "\"\\");
if (l) {
@@ -517,12 +517,12 @@ int conf_write(const char *name)
case S_HEX:
str = sym_get_string_value(sym);
if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
- fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
+ fprintf(out, "CONFIG_LP_%s=%s\n", sym->name, str);
break;
}
case S_INT:
str = sym_get_string_value(sym);
- fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
+ fprintf(out, "CONFIG_LP_%s=%s\n", sym->name, str);
break;
}
}
@@ -730,19 +730,19 @@ int conf_write_autoconf(void)
case no:
break;
case mod:
- fprintf(out, "CONFIG_%s=m\n", sym->name);
- fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name);
+ fprintf(out, "CONFIG_LP_%s=m\n", sym->name);
+ fprintf(out_h, "#define CONFIG_LP_%s_MODULE 1\n", sym->name);
break;
case yes:
- fprintf(out, "CONFIG_%s=y\n", sym->name);
- fprintf(out_h, "#define CONFIG_%s 1\n", sym->name);
+ fprintf(out, "CONFIG_LP_%s=y\n", sym->name);
+ fprintf(out_h, "#define CONFIG_LP_%s 1\n", sym->name);
break;
}
break;
case S_STRING:
str = sym_get_string_value(sym);
- fprintf(out, "CONFIG_%s=\"", sym->name);
- fprintf(out_h, "#define CONFIG_%s \"", sym->name);
+ fprintf(out, "CONFIG_LP_%s=\"", sym->name);
+ fprintf(out_h, "#define CONFIG_LP_%s \"", sym->name);
while (1) {
l = strcspn(str, "\"\\");
if (l) {
@@ -762,14 +762,14 @@ int conf_write_autoconf(void)
case S_HEX:
str = sym_get_string_value(sym);
if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
- fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
- fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str);
+ fprintf(out, "CONFIG_LP_%s=%s\n", sym->name, str);
+ fprintf(out_h, "#define CONFIG_LP_%s 0x%s\n", sym->name, str);
break;
}
case S_INT:
str = sym_get_string_value(sym);
- fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
- fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str);
+ fprintf(out, "CONFIG_LP_%s=%s\n", sym->name, str);
+ fprintf(out_h, "#define CONFIG_LP_%s %s\n", sym->name, str);
break;
default:
break;
diff --git a/payloads/libpayload/util/kconfig/mconf.c b/payloads/libpayload/util/kconfig/mconf.c
index 5e93a308d8..fcebc50001 100644
--- a/payloads/libpayload/util/kconfig/mconf.c
+++ b/payloads/libpayload/util/kconfig/mconf.c
@@ -232,7 +232,7 @@ save_config_help[] = N_(
"leave this blank.\n"),
search_help[] = N_(
"\n"
- "Search for CONFIG_ symbols and display their relations.\n"
+ "Search for CONFIG_LP_ symbols and display their relations.\n"
"Regular expressions are allowed.\n"
"Example: search for \"^FOO\"\n"
"Result:\n"
@@ -249,7 +249,7 @@ search_help[] = N_(
"Selected by: BAR\n"
"-----------------------------------------------------------------\n"
"o The line 'Prompt:' shows the text used in the menu structure for\n"
- " this CONFIG_ symbol\n"
+ " this CONFIG_LP_ symbol\n"
"o The 'Defined at' line tell at what file / line number the symbol\n"
" is defined\n"
"o The 'Depends on:' line tell what symbols needs to be defined for\n"
@@ -265,9 +265,9 @@ search_help[] = N_(
"Only relevant lines are shown.\n"
"\n\n"
"Search examples:\n"
- "Examples: USB => find all CONFIG_ symbols containing USB\n"
- " ^USB => find all CONFIG_ symbols starting with USB\n"
- " USB$ => find all CONFIG_ symbols ending with USB\n"
+ "Examples: USB => find all CONFIG_LP_ symbols containing USB\n"
+ " ^USB => find all CONFIG_LP_ symbols starting with USB\n"
+ " USB$ => find all CONFIG_LP_ symbols ending with USB\n"
"\n");
static int indent;
@@ -388,8 +388,8 @@ static void search_conf(void)
again:
dialog_clear();
dres = dialog_inputbox(_("Search Configuration Parameter"),
- _("Enter CONFIG_ (sub)string to search for "
- "(with or without \"CONFIG\")"),
+ _("Enter CONFIG_LP_ (sub)string to search for "
+ "(with or without \"CONFIG_LP\")"),
10, 75, "");
switch (dres) {
case 0:
@@ -401,9 +401,9 @@ again:
return;
}
- /* strip CONFIG_ if necessary */
+ /* strip CONFIG_LP_ if necessary */
dialog_input = dialog_input_result;
- if (strncasecmp(dialog_input_result, "CONFIG_", 7) == 0)
+ if (strncasecmp(dialog_input_result, "CONFIG_LP_", 10) == 0)
dialog_input += 7;
sym_arr = sym_re_search(dialog_input);
@@ -704,7 +704,7 @@ static void show_help(struct menu *menu)
if (menu_has_help(menu))
{
if (sym->name) {
- str_printf(&help, "CONFIG_%s:\n\n", sym->name);
+ str_printf(&help, "CONFIG_LP_%s:\n\n", sym->name);
str_append(&help, _(menu_get_help(menu)));
str_append(&help, "\n");
}