pass in commandline arguments
authorAlyssa Rosenzweig <alyssa@backtick.town>
Wed, 7 Sep 2016 14:39:48 +0000 (07:39 -0700)
committerAlyssa Rosenzweig <alyssa@backtick.town>
Wed, 7 Sep 2016 14:39:48 +0000 (07:39 -0700)
arm_chainloader/loader.cc

index c426631..466c3f5 100644 (file)
@@ -82,11 +82,17 @@ struct LoaderImpl {
                        panic("error reading fdt");
                }
 
-               int res = fdt_check_header(reinterpret_cast<void*>(fdt));
-               if (res != 0) {
+                void* v_fdt = reinterpret_cast<void*>(fdt);
+
+                int res;
+
+               if ((res = fdt_check_header(v_fdt)) != 0) {
                        panic("fdt blob invalid, fdt_check_header returned %d", res);
                }
 
+                /* pass in command line args */
+                fdt_setprop(v_fdt, 0, "chosen/cmdline", cmdline, strlen((char*) cmdline));
+
                logf("valid fdt loaded at 0x%X\n", (unsigned int)fdt);
 
                return reinterpret_cast<void*>(fdt);
This page took 0.023433 seconds and 4 git commands to generate.