]> git.ozlabs.org Git - petitboot/commitdiff
discover/platform-powerpc: Don't rely on NVRAM working
authorJeremy Kerr <jk@ozlabs.org>
Thu, 22 May 2014 10:31:16 +0000 (18:31 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 30 Jun 2014 03:32:06 +0000 (11:32 +0800)
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 <jk@ozlabs.org>
discover/platform-powerpc.c

index 28c081d7540332281e972609f935496141905a21..a115e34bf38375a45243ec933243559f5317eb4d 100644 (file)
@@ -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);