Date: Thu, 25 Oct 2012 09:54:24 +0200 From: Giovanni Trematerra <gianni@freebsd.org> To: freebsd-embedded@freebsd.org, Tim Kientzle <tim@kientzle.com> Subject: [PATCH] kern.bootfile is not set for PandaBoard Message-ID: <CACfq090qwi8Wk=0khgxASZQ_r3SU4Zhw2-Y8wnG9kv97UiUbfg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACfq090qwi8Wk=0khgxASZQ_r3SU4Zhw2-Y8wnG9kv97UiUbfg>