[PATCH] kern.bootfile is not set for PandaBoard

Giovanni Trematerra gianni at freebsd.org
Thu Oct 25 07:54:31 UTC 2012


Hi there,
the kernelname global variable isn't set for PandaBoard and that
results in a wrong value for the sysctl kern.bootfile.
below a patch for all Texas Instrument boards.
I tested it on my PandaBoard.

Could someone review and commit it?

Thank you

--
Gianni

==================================================
diff --git a/sys/arm/ti/ti_machdep.c b/sys/arm/ti/ti_machdep.c
index e6d3382..83011fb 100644
--- a/sys/arm/ti/ti_machdep.c
+++ b/sys/arm/ti/ti_machdep.c
@@ -306,6 +306,7 @@ initarm(struct arm_boot_params *abp)
        struct pv_addr dpcpu;
        vm_offset_t dtbp, freemempos, l2_start, lastaddr;
        uint32_t memsize, l2size;
+       char *env;
        void *kmdp;
        u_int l1pagetable;
        int i = 0, j = 0, err_devmap = 0;
@@ -491,6 +492,10 @@ initarm(struct arm_boot_params *abp)
        print_kernel_section_addr();
        print_kenv();

+       env = getenv("kernelname");
+       if (env != NULL)
+               strlcpy(kernelname, env, sizeof(kernelname));
+
        if (err_devmap != 0)
                printf("WARNING: could not fully configure devmap, error=%d\n",
                    err_devmap);


More information about the freebsd-embedded mailing list