RE: Modifications and testing of linux bootldr on ipaq.

From: Hicks, Jamey (Jamey.Hicks@compaq.com)
Date: Wed Aug 22 2001 - 07:39:21 EDT


Drew,

The bootldr is position dependent because gcc does not generate position
independent code, even with -fpic (or maybe that was -fPIC -- I'm not sure
we tested both versions of the pic option).

What you are describing is also not position independent, although it would
give you another position in memory.

There is some initialization code in the bootldr that can only be tested
with it written to flash, but what you describe (or using the c0022000
bootldr) will enable you to test most of it.

What sort of modifications are you making?

Jamey

> -----Original Message-----
> From: Drew Maule [mailto:gte458h@prism.gatech.edu]
> Sent: Wednesday, August 22, 2001 12:26 AM
> To: bootldr@handhelds.org
> Subject: Re: [Bootldr] Modifications and testing of linux bootldr on
> ipaq.
>
>
> Just curious . . . how come the bootldr is position
> dependent? Why won't
> creating a link script file with the starting address
> as 0x140000 work, if I want to put a modified bootloader at a
> partition
> starting at this address? Where in the code is this
> limitation placed?
>
> The only reason I care so much is that I want to see if I can
> successfully
> boot a kernel, and if in the process I'm overwriting
> the one in ram which I'm using as the test bootldr, how can I be so
> sure??? I guess the only fall-back is to make sure I can
> still successfully call "load bootldr" with the test bootldr
> in ram, and
> if I succeed at this and I think I'm pretty successful with
> my modification up to the point of memcpying the kernel to 0xc0008000,
> I can then do a final load of the test bootldr to the
> "bootldr" partition. At the very least, I can always be
> guaranteed that
> "load bootldr" will work, and then I can copy back a
> reliable bootldr.
>
> I would just feel much better if I could have a test bootldr
> in another
> partition, and use it. The only other workaround to the
> above problem is that I can compile the kernel to be loaded
> at a different
> offset which will not overlap with the bootldr in ram.
> Is there anywhere in the bootldr code that 0xc0008000 is
> hardcoded in, or
> does it all read from the parameter "kernel_in_ram"?
> Will this second possibility work, and where exactly in the
> kernel must
> I specify that it will be written to a higher offset?
>
> Thanks.
>
> "David A. Panariti" wrote:
>
> > When you build a bootldr from the CVS repository, two bootldrs are
> > built:
> >
> > bootldr (a.k.a bootldr-0000-vM.vm.vu-features...)
> > wince-bootldr (a.k.a bootldr-c000-vM.vm.vu-features...)
> >
> > the bootldrs are not position independent, but the wince-bootldr is
> > linked at 0xc0022000 and can be loaded into ram and called just like
> > you want.
> > I do it so often, in fact, that I made the call . command call the
> > last download address since I was tired of typing it all the time.
> > (Why I don't have a dl-bl command, I don't know)
> >
> > In any case, you can:
> >
> > boot> load ram 0xc0022000 1
> > boot> call .
> >
> > to test new bootldrs. Note, if you do any thing to the very early
> > boot code you may still make a brick since calling 0xc0022000 is NOT
> > THE SAME as pressing reset. Also, at a few key points, different
> > actions are performed based on whether or not it is a flash resident
> > or ram resident bootldr.
> > Also, 0xc0022000 is very close to the beginning of DRAM.
> All download
> > commands use 0xc0000000 as a d/l buffer. Also,
> 0xc0000000.. is used by
> > the boot code to hold the linux image. Downloading a large image or
> > booting linux will cause the ram bootldr to be overwritten and you
> > will hang. Reset gets back the flash bootldr and usually nothing is
> > hurt.
> >
> > regards,
> >
> > davep
> >
> > --
> > David Panariti Compaq Computer Corporation
> > Scalable Computing Group Cambridge Research Lab
> > David.Panariti@Compaq.Com 617-551-7620
>
> --
> Drew Maule
> "All great empires of the future will be empires of the
> mind." Winston Churchill
>
>
>
> _______________________________________________
> Bootldr mailing list
> Bootldr@handhelds.org
> http://handhelds.org/mailman/listinfo/bootldr
>



This archive was generated by hypermail 2.1.5 : Fri Jan 17 2003 - 17:47:02 EST