From: Jeremy Kerr Date: Thu, 22 May 2014 10:31:16 +0000 (+0800) Subject: discover/platform-powerpc: Don't rely on NVRAM working X-Git-Tag: v1.0.0~175 X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=commitdiff_plain;h=a70b45006752970840fdfff0a595d293b67a8548;hp=a51beb34277a01ca577c35d6a66ceab38e6de67c discover/platform-powerpc: Don't rely on NVRAM working Although we need nvram to save settings, we may be running on a nvram-less machine, but still need to detect as powerpc. This change removes the nvram check. Signed-off-by: Jeremy Kerr --- diff --git a/discover/platform-powerpc.c b/discover/platform-powerpc.c index 28c081d..a115e34 100644 --- a/discover/platform-powerpc.c +++ b/discover/platform-powerpc.c @@ -692,7 +692,7 @@ static bool probe(struct platform *p, void *ctx) struct stat statbuf; int rc; - /* we need a device tree and a working nvram binary */ + /* we need a device tree */ rc = stat("/proc/device-tree", &statbuf); if (rc) return false; @@ -700,10 +700,6 @@ static bool probe(struct platform *p, void *ctx) if (!S_ISDIR(statbuf.st_mode)) return false; - rc = process_run_simple(ctx, "nvram", "--print-config", NULL); - if (!WIFEXITED(rc) || WEXITSTATUS(rc) != 0) - return false; - platform = talloc(ctx, struct platform_powerpc); list_init(&platform->params);