[coreboot-gerrit] Patch set updated for coreboot: coreinfo: Drop LAR module

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Sun Mar 13 02:12:53 CET 2016


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14066

-gerrit

commit a145b7ca96193125ec539302ca22a56a534055e5
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date:   Fri Mar 11 23:24:01 2016 -0800

    coreinfo: Drop LAR module
    
    The Lame ARchiver has been deprecated for about a decade.
    Let's remove the code.
    
    Change-Id: Ia05690ab63c68dd0a76ae1f180cbfa29df1f02ad
    Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
---
 payloads/coreinfo/Kconfig      |   6 --
 payloads/coreinfo/Makefile     |   4 +-
 payloads/coreinfo/coreinfo.c   |   4 --
 payloads/coreinfo/lar_module.c | 140 -----------------------------------------
 4 files changed, 2 insertions(+), 152 deletions(-)

diff --git a/payloads/coreinfo/Kconfig b/payloads/coreinfo/Kconfig
index f1d1bf9..e71599c 100644
--- a/payloads/coreinfo/Kconfig
+++ b/payloads/coreinfo/Kconfig
@@ -98,12 +98,6 @@ config MODULE_RAMDUMP
 	bool "Enable the RAM dump module"
 	default y
 
-config MODULE_LAR
-	bool "Enable the coreboot v3 LAR module"
-	help
-	  LAR support must also be enabled in libpayload.
-	default n
-
 config MODULE_CBFS
 	bool "Enable the coreboot CBFS module"
 	default y
diff --git a/payloads/coreinfo/Makefile b/payloads/coreinfo/Makefile
index ab25bf3..47a7dfb 100644
--- a/payloads/coreinfo/Makefile
+++ b/payloads/coreinfo/Makefile
@@ -55,8 +55,8 @@ OBJCOPY ?= objcopy
 
 INCLUDES = -I$(coreinfo_obj) -include $(LIBPAYLOAD_DIR)/include/kconfig.h
 OBJECTS = cpuinfo_module.o cpuid.S.o pci_module.o coreboot_module.o \
-	  nvram_module.o bootlog_module.o ramdump_module.o lar_module.o \
-	  multiboot_module.o cbfs_module.o coreinfo.o
+	  nvram_module.o bootlog_module.o ramdump_module.o multiboot_module.o \
+	  cbfs_module.o coreinfo.o
 OBJS    = $(patsubst %,$(coreinfo_obj)/%,$(OBJECTS))
 TARGET  = $(coreinfo_obj)/coreinfo.elf
 
diff --git a/payloads/coreinfo/coreinfo.c b/payloads/coreinfo/coreinfo.c
index a7ed45e..449ac5d 100644
--- a/payloads/coreinfo/coreinfo.c
+++ b/payloads/coreinfo/coreinfo.c
@@ -24,7 +24,6 @@ extern struct coreinfo_module multiboot_module;
 extern struct coreinfo_module nvram_module;
 extern struct coreinfo_module bootlog_module;
 extern struct coreinfo_module ramdump_module;
-extern struct coreinfo_module lar_module;
 extern struct coreinfo_module cbfs_module;
 
 struct coreinfo_module *system_modules[] = {
@@ -52,9 +51,6 @@ struct coreinfo_module *firmware_modules[] = {
 #if IS_ENABLED(CONFIG_MODULE_BOOTLOG)
 	&bootlog_module,
 #endif
-#if IS_ENABLED(CONFIG_MODULE_LAR)
-	&lar_module,
-#endif
 #if IS_ENABLED(CONFIG_MODULE_CBFS)
 	&cbfs_module,
 #endif
diff --git a/payloads/coreinfo/lar_module.c b/payloads/coreinfo/lar_module.c
deleted file mode 100644
index 2cfd762..0000000
--- a/payloads/coreinfo/lar_module.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * This file is part of the coreinfo project.
- *
- * Copyright (C) 2008 Advanced Micro Devices, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#include "coreinfo.h"
-
-#if IS_ENABLED(CONFIG_MODULE_LAR)
-
-static struct LAR *lar;
-static int lcount, selected;
-static char **lnames;
-static const char *compression_table[4] = {"none", "LZMA", "NRV2B", "zeroes"};
-
-static int lar_module_init(void)
-{
-	int index = 0;
-	struct larent *larent;
-
-	lar = openlar(NULL);
-
-	if (lar == NULL)
-		return 0;
-
-	while ((larent = readlar(lar)))
-		lcount++;
-
-	lnames = malloc(lcount * sizeof(char *));
-
-	if (lnames == NULL)
-		return 0;
-
-	rewindlar(lar);
-
-	while ((larent = readlar(lar)))
-		lnames[index++] = strdup((const char *) larent->name);
-
-	return 0;
-}
-
-static int lar_module_redraw(WINDOW *win)
-{
-	int i, row = 2;
-	struct larstat stat;
-
-	print_module_title(win, "LAR Listing");
-
-	if (lar == 0) {
-		mvwprintw(win, 11, 61 / 2, "Bad or missing LAR");
-		return 0;
-	}
-
-	/* Draw a line down the middle. */
-	for (i = 2; i < 21; i++)
-		mvwaddch(win, i, 30, ACS_VLINE);
-
-	/* Draw the names down the left side. */
-	for (i = 0; i < lcount; i++) {
-		if (i == selected)
-			wattrset(win, COLOR_PAIR(3) | A_BOLD);
-		else
-			wattrset(win, COLOR_PAIR(2));
-
-		mvwprintw(win, 2 + i, 1, "%.25s", lnames[i]);
-	}
-
-	/* Get the information for the LAR. */
-	if (larstat(lar, lnames[selected], &stat)) {
-		printf("larstat failed\n");
-		return 0;
-	}
-
-	wattrset(win, COLOR_PAIR(2));
-
-	mvwprintw(win, row++, 32, "Offset: 0x%x", stat.offset);
-
-	if (stat.compression) {
-		mvwprintw(win, row++, 32, "Compression: %s",
-			  compression_table[stat.compression]);
-		mvwprintw(win, row++, 32, "Compressed length: %d", stat.len);
-		mvwprintw(win, row++, 32, "Compressed checksum: 0x%x",
-			  stat.compchecksum);
-	}
-
-	mvwprintw(win, row++, 32, "Length: %d", stat.reallen);
-	mvwprintw(win, row++, 32, "Checksum: 0x%x", stat.checksum);
-	mvwprintw(win, row++, 32, "Load address: 0x%llx", stat.loadaddress);
-	mvwprintw(win, row++, 32, "Entry point: 0x%llx", stat.entry);
-
-	return 0;
-}
-
-static int lar_module_handle(int key)
-{
-	int ret = 0;
-
-	if (lar == NULL)
-		return 0;
-
-	switch (key) {
-	case KEY_DOWN:
-		if (selected + 1 < lcount) {
-			selected++;
-			ret = 1;
-		}
-		break;
-	case KEY_UP:
-		if (selected > 0) {
-			selected--;
-			ret = 1;
-		}
-		break;
-	}
-
-	return ret;
-}
-
-struct coreinfo_module lar_module = {
-	.name = "LAR",
-	.init = lar_module_init,
-	.redraw = lar_module_redraw,
-	.handle = lar_module_handle
-};
-
-#else
-
-struct coreinfo_module lar_module = {
-};
-
-#endif



More information about the coreboot-gerrit mailing list