From owner-freebsd-arm@FreeBSD.ORG Wed Jan 31 06:25:34 2007 Return-Path: X-Original-To: freebsd-arm@freebsd.org Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0D8B116A500 for ; Wed, 31 Jan 2007 06:25:34 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: from zibbi.meraka.csir.co.za (zibbi.meraka.csir.co.za [146.64.24.58]) by mx1.freebsd.org (Postfix) with ESMTP id 94D5D13C428 for ; Wed, 31 Jan 2007 06:25:33 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973) id 5F08533CAA; Wed, 31 Jan 2007 08:01:34 +0200 (SAST) Date: Wed, 31 Jan 2007 08:01:34 +0200 From: John Hay To: freebsd-arm@freebsd.org Message-ID: <20070131060134.GA19344@zibbi.meraka.csir.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: setting kernel env variables X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 06:25:34 -0000 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