[coreboot] New patch to review for coreboot: a9dd41a sconfig: check whether component directory actually exists

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Sat Oct 15 00:26:59 CEST 2011


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

-gerrit

commit a9dd41a1c5f3f00ef790fb071c135900598acab5
Author: Stefan Reinauer <reinauer at chromium.org>
Date:   Fri Oct 14 12:41:46 2011 -0700

    sconfig: check whether component directory actually exists
    
    and add drivers/generic/generic back (empty), since it is used by many
    devicetree.cb files.
    
    Without this patch typos in component names in devicetree.cb cause
    the component to be silently ignored.
    
    Change-Id: I3cfca2725816f0cd7d72139ae53af815009e8ab4
    Signed-off-by: Stefan Reinauer <reinauer at google.com>
---
 src/drivers/generic/Kconfig              |    1 +
 src/drivers/generic/Makefile.inc         |    1 +
 src/drivers/generic/generic/Kconfig      |    2 ++
 src/drivers/generic/generic/Makefile.inc |    1 +
 util/sconfig/main.c                      |    7 +++++++
 5 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/drivers/generic/Kconfig b/src/drivers/generic/Kconfig
index fac6ee5..fbbfeb1 100644
--- a/src/drivers/generic/Kconfig
+++ b/src/drivers/generic/Kconfig
@@ -1,2 +1,3 @@
 source src/drivers/generic/debug/Kconfig
+source src/drivers/generic/generic/Kconfig
 
diff --git a/src/drivers/generic/Makefile.inc b/src/drivers/generic/Makefile.inc
index 0700a0c..08e6cc5 100644
--- a/src/drivers/generic/Makefile.inc
+++ b/src/drivers/generic/Makefile.inc
@@ -1 +1,2 @@
 subdirs-y += debug
+subdirs-y += generic
diff --git a/src/drivers/generic/generic/Kconfig b/src/drivers/generic/generic/Kconfig
new file mode 100644
index 0000000..864b878
--- /dev/null
+++ b/src/drivers/generic/generic/Kconfig
@@ -0,0 +1,2 @@
+config DRIVERS_GENERIC_GENERIC
+	bool
diff --git a/src/drivers/generic/generic/Makefile.inc b/src/drivers/generic/generic/Makefile.inc
new file mode 100644
index 0000000..b7db254
--- /dev/null
+++ b/src/drivers/generic/generic/Makefile.inc
@@ -0,0 +1 @@
+# Empty
diff --git a/util/sconfig/main.c b/util/sconfig/main.c
index c3448f3..dab04db 100755
--- a/util/sconfig/main.c
+++ b/util/sconfig/main.c
@@ -131,6 +131,13 @@ struct device *new_chip(struct device *parent, struct device *bus, char *path) {
 
 	struct stat st;
 	char *chip_h = malloc(strlen(path)+12);
+	sprintf(chip_h, "src/%s", path);
+	if ((stat(chip_h, &st) == -1) && (errno == ENOENT)) {
+		fprintf(stderr, "ERROR: Chip component %s does not exist.\n",
+				path);
+		exit(1);
+	}
+
 	sprintf(chip_h, "src/%s/chip.h", path);
 	if ((stat(chip_h, &st) == -1) && (errno == ENOENT))
 		new_chip->chiph_exists = 0;




More information about the coreboot mailing list