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@google.com> Reviewed-on: http://review.coreboot.org/270 Tested-by: build bot (Jenkins) Reviewed-by: Peter Stuge <peter@stuge.se>
This commit is contained in:
parent
6a11333133
commit
76c44aeea9
|
@ -1,2 +1,3 @@
|
|||
source src/drivers/generic/debug/Kconfig
|
||||
source src/drivers/generic/generic/Kconfig
|
||||
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
subdirs-y += debug
|
||||
subdirs-y += generic
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
config DRIVERS_GENERIC_GENERIC
|
||||
bool
|
|
@ -0,0 +1 @@
|
|||
# Empty
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue