]> git.ozlabs.org Git - petitboot/blobdiff - discover/platform-powerpc.c
discover/platform-powerpc: Don't rely on NVRAM working
[petitboot] / discover / platform-powerpc.c
index d1d4191ede7df64f485e75d59e6826237d7525b7..a115e34bf38375a45243ec933243559f5317eb4d 100644 (file)
@@ -344,8 +344,8 @@ static int parse_one_dns_config(struct config *config,
 static void populate_network_config(struct platform_powerpc *platform,
                struct config *config)
 {
+       char *val, *saveptr = NULL;
        const char *cval;
-       char *val;
        int i;
 
        cval = get_param(platform, "petitboot,network");
@@ -355,7 +355,7 @@ static void populate_network_config(struct platform_powerpc *platform,
        val = talloc_strdup(config, cval);
 
        for (i = 0; ; i++) {
-               char *tok, *saveptr;
+               char *tok;
 
                tok = strtok_r(i == 0 ? val : NULL, " ", &saveptr);
                if (!tok)
@@ -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);