I'm still a little bit new to dt.  I thought the bootargs in chosen
node will always apply when dt is enabled.  It just took me some time
to figure out that u-boot 'bootargs' env will anyway overwrite the
one from chosen.

static int bootm_linux_fdt(int machid, bootm_headers_t *images)
{
        ......

        fdt_chosen(*of_flat_tree, 1);

        ......
}

int fdt_chosen(void *fdt, int force)
{
        ......

        /*
         * Create /chosen properites that don't exist in the fdt.
         * If the property exists, update it only if the "force" parameter
         * is true.
         */
        str = getenv("bootargs");
        if (str != NULL) {
                path = fdt_getprop(fdt, nodeoffset, "bootargs", NULL);
                if ((path == NULL) || force) {
                        err = fdt_setprop(fdt, nodeoffset,
                                "bootargs", str, strlen(str)+1);
                        if (err < 0)
                                printf("WARNING: could not set bootargs %s.\n",
                                        fdt_strerror(err));
                }
        }

        ......
}

The 'force' is hard-coded as 1, so it always overwrites.  Knowing
that may save your some time, if you are green hands as me ;)

-- 
Regards,
Shawn


_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to