Date: Wed, 31 Jan 2007 08:01:34 +0200 From: John Hay <jhay@meraka.org.za> To: freebsd-arm@freebsd.org Subject: setting kernel env variables Message-ID: <20070131060134.GA19344@zibbi.meraka.csir.co.za>
next in thread | raw e-mail | index | archive | help
Hi, I needed to be able to set the countrycode of my atheros card, but with the arm that cannot use the loader yet, I tried to add it statically with the env keyword in the kernel config file. Something like this: env "/conf/SMALL-ARM.env" and then in that file: hw.ath.countrycode="710" When that didn't work, I looked through the code and found that the arm kernel didn't use it. So I looked at how it was done on the i386 and did the same for the arm. So is this the right place to set kern_envp or is there a better place? Index: arm/xscale/ixp425/avila_machdep.c =================================================================== RCS file: /home/ncvs/src/sys/arm/xscale/ixp425/avila_machdep.c,v retrieving revision 1.2 diff -u -r1.2 avila_machdep.c --- arm/xscale/ixp425/avila_machdep.c 6 Dec 2006 06:34:54 -0000 1.2 +++ arm/xscale/ixp425/avila_machdep.c 16 Dec 2006 10:11:16 -0000 @@ -532,6 +532,9 @@ phys_avail[i++] = 0; phys_avail[i] = 0; + if (envmode == 1) + kern_envp = static_env; + /* Do basic tuning, hz etc */ init_param1(); init_param2(physmem); John -- John Hay -- John.Hay@meraka.csir.co.za / jhay@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070131060134.GA19344>