From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 21 Apr 2009 15:32:10 +0100 (BST) Received: from gateway12.websitewelcome.com ([67.18.44.21]:19419 "HELO gateway12.websitewelcome.com") by ftp.linux-mips.org with SMTP id S20026873AbZDUOcA (ORCPT ); Tue, 21 Apr 2009 15:32:00 +0100 Received: (qmail 26411 invoked from network); 21 Apr 2009 14:34:01 -0000 Received: from gator750.hostgator.com (174.132.194.2) by gateway12.websitewelcome.com with SMTP; 21 Apr 2009 14:34:01 -0000 Received: from [217.109.65.213] (port=1675 helo=[127.0.0.1]) by gator750.hostgator.com with esmtpa (Exim 4.69) (envelope-from ) id 1LwH0q-0006Tg-11; Tue, 21 Apr 2009 09:31:52 -0500 Message-ID: <49EDD8DA.7060009@paralogos.com> Date: Tue, 21 Apr 2009 16:31:54 +0200 From: "Kevin D. Kissell" User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: nagalakshmi veeramallu CC: Geert Uytterhoeven , "M. Warner Losh" , florian@openwrt.org, linux-mips@linux-mips.org Subject: Re: in mips how to change the start address to the new second boot loader ? References: <200904201100.39164.florian@openwrt.org> <20090420.085929.-1089997132.imp@bsdimp.com> <49EDC965.60507@paralogos.com> <10f740e80904210710sdc9e5c2ic310e689ca6677b5@mail.gmail.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------080803030107080303060308" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator750.hostgator.com X-AntiAbuse: Original Domain - linux-mips.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - paralogos.com Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 22401 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: kevink@paralogos.com Precedence: bulk X-list: linux-mips This is a multi-part message in MIME format. --------------080803030107080303060308 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Either you have control of what is in the boot ROM at 0x1fc00000 or you do not. If you have control, you can do whatever you like - read switches, reference environment variables stored in FLASH somehow, whatever - to decide how you want to proceed. But it's your problem to know where the switches are, where and how the NVRAM is to be accessed and interpreted, etc. If you do not have control over the code at 0x1fc00000, you need to find out what options it provides, either by RTFM or by reverse engineering. There is no magic here, just low-level, brute-force programming. Regards, Kevin K. nagalakshmi veeramallu wrote: > Hi, > will this approach work? if i used "start" environmental variable will > it go to new boot loader address directly. > > > Regards, > Lucky > > > On Tue, Apr 21, 2009 at 7:40 PM, Geert Uytterhoeven > > wrote: > > On Tue, Apr 21, 2009 at 15:46, nagalakshmi veeramallu > > > wrote: > > hi, > > -- if we set environmental variable “start” as “go > > new_address”, will it go directly to the new bootloader in the next > > power-on. > > what about using system environmental "start" ,can you tell me > at which > > context after power on environmental variables come onto picture. > > Environment variables are parsed by the boot loader, whose code > resides at, > guess what, 0x1fc00000... > > > On Tue, Apr 21, 2009 at 6:55 PM, Kevin D. Kissell > > > > wrote: > >> > >> nagalakshmi veeramallu wrote: > >> > >> - Mips atlas board has jumper which will redirect > accesses from > >> “Bootcode” range to either “Monitor flash” (0x1e000000) or the > upper 4MB of > >> “System flash” (0x1dc00000) based on jumper settings. if my kmc > board have > >> some jumper like this, can I redirect the start address. > >> > >> Of course, what is really happening there is that the Atlas > boot ROM has a > >> vector at 0x1fc00000 which reads the jumper and jumps to one > address or the > >> other depending on the jumper setting. If you control what is > in ROM at > >> 0x1fc00000 and you have a software-readable jumper on your KMC > board, you > >> can do the same thing. > >> > >> Regards, > >> > >> Kevin K. > >> > > > > > > > > -- > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- > geert@linux-m68k.org > > In personal conversations with technical people, I call myself a > hacker. But > when I'm talking to journalists I just say "programmer" or > something like that. > -- > Linus Torvalds > > --------------080803030107080303060308 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit Either you have control of what is in the boot ROM at 0x1fc00000 or you do not.  If you have control, you can do whatever you like - read switches, reference environment variables stored in FLASH somehow, whatever - to decide how you want to proceed.  But it's your problem to know where the switches are, where and how the NVRAM is to be accessed and interpreted, etc.  If you do not have control over the code at 0x1fc00000, you need to find out what options it provides, either by RTFM or by reverse engineering.

There is no magic here, just low-level, brute-force programming.

          Regards,

          Kevin K.

nagalakshmi veeramallu wrote:
Hi,
will this approach work? if i used "start" environmental variable will it go to new boot loader address directly.


Regards,
Lucky


On Tue, Apr 21, 2009 at 7:40 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
On Tue, Apr 21, 2009 at 15:46, nagalakshmi veeramallu
> hi,
>          --          if we set environmental variable “start” as “go
> new_address”, will it go directly to the new bootloader in the next
> power-on.
> what about using system environmental "start" ,can you tell me at which
> context after power on environmental variables come onto picture.

Environment variables are parsed by the boot loader, whose code resides at,
guess what, 0x1fc00000...

> On Tue, Apr 21, 2009 at 6:55 PM, Kevin D. Kissell <kevink@paralogos.com>
> wrote:
>>
>> nagalakshmi veeramallu wrote:
>>
>> -           Mips atlas board has jumper  which will redirect accesses from
>> “Bootcode” range to either “Monitor flash” (0x1e000000) or the upper 4MB of
>> “System flash” (0x1dc00000) based on jumper settings. if my kmc board have
>> some jumper like this, can I redirect the start address.
>>
>> Of course, what is really happening there is that the Atlas boot ROM has a
>> vector at 0x1fc00000 which reads the jumper and jumps to one address or the
>> other depending on the jumper setting. If you control what is in ROM at
>> 0x1fc00000 and you have a software-readable jumper on your KMC board, you
>> can do the same thing.
>>
>>           Regards,
>>
>>           Kevin K.
>>
>
>



--
Gr{oetje,eeting}s,

                                               Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                                           -- Linus Torvalds


--------------080803030107080303060308--