Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Oct 2012 05:48:53 +0000 (UTC)
From:      Tim Kientzle <kientzle@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r242125 - head/sys/arm/ti
Message-ID:  <201210260548.q9Q5mr4k032675@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kientzle
Date: Fri Oct 26 05:48:53 2012
New Revision: 242125
URL: http://svn.freebsd.org/changeset/base/242125

Log:
  set the kernelname from the boot loader environment.
  This fixes kern.bootfile sysctl.
  
  Submitted by:	Giovanni Trematerra

Modified:
  head/sys/arm/ti/ti_machdep.c

Modified: head/sys/arm/ti/ti_machdep.c
==============================================================================
--- head/sys/arm/ti/ti_machdep.c	Fri Oct 26 05:41:58 2012	(r242124)
+++ head/sys/arm/ti/ti_machdep.c	Fri Oct 26 05:48:53 2012	(r242125)
@@ -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?201210260548.q9Q5mr4k032675>