[uClinux-dev] Help with Motorola 68vz328ads eval board

Georges Menie g.menie at wanadoo.fr
Mon Mar 17 14:54:20 EST 2003

On Mon, 2003-03-17 at 05:16, Frank W. Miller wrote:
> Okie doke, I got kermit and the bbug script and they appear to be 
> working.  I tried to download the stock ucdimm image (after converting 
> with the Perl script to a b-record file) and no go.  I downloaded the 
> init.b and that worked ok.  It appears to just set a bunch of value into 
> registers that I'm assuming do some basic configuration of the system 
> elements.
> >before uploading and running image.bin, check your
> >linux-x.x.x/System.map file, all the address there should be existing
> >RAM address on your board, if not, then modify the linker script
> >(xxx.ld) to locate everything in RAM.
> >IMHO, the easiest way is to choose the option to run the kernel from ROM
> >and to change the corresponding linker script (rom.ld probably) to map
> >everything in RAM (reserve the upper part of RAM like if it were ROM...)
> >for example, if you have 8MB SDRAM, set the 2 upper MB as 'rom' in the
> >linker script and the first 6MB as 'ram'. recompile everything.
> >
> >the address to upload would be the beginning of the 'rom' section,
> >and the address to start the image would be specified by the symbol
> >_start (or _stext maybe) in the System.map file.
> >
> >  
> >
> I looked at System.map and it appears that all the text is being placed 
> at 0x1000000 which is way beyond the end of physical memory (8 Mbytes).  
> I noticed that the image.brec (converted image.bin) is 4066682 bytes.  
> I'll need to probably used the upper 4 Mbytes for the kernel on this 
> first pass.  I'll work on slimming it down later.  One question is how 
> much of the b-record file actually ends up in memory, maybe I'll need 
> less.  Anyway, I went to 
> linux-2.4.X/arch/m68knommu/platform/68VZ328/ucdimm and found rom.ld.  I 
> hope this is the file that you are referring to for my initial 
> platform?  So, now to the question.  To do what you suggest, how do I 
> change this file?  It looks like this:
>     {
>     romvec: ORIGIN = 0x10c10000, LENGTH = 0x00000400
>     flash: ORIGIN = 0x10c10400, LENGTH = 0x001fec00
>     eflash: ORIGIN = 0x10d00000, LENGTH = 0
>     ramvec: ORIGIN = 0x00000000, LENGTH = 1024
>     ram: ORIGIN = 0x00020000, LENGTH = 0x00800000 - 0x00020000
>     eram: ORIGIN = 0x00800000, LENGTH = 0
>     }
> INCLUDE arch/m68knommu/platform/68VZ328/ucdimm/fixed.ld
> Do I shift romvec and ram?

yes, here is what i'm using for my board (you may have a look at the de2
subdir in .../platform/68VZ328, in the file himem.ld)

  romvec : ORIGIN = 0x00600000, LENGTH = 1k
  flash  : ORIGIN = 0x00600400, LENGTH = 2M - 1k
  eflash : ORIGIN = 0x00800000, LENGTH = 0
  ramvec : ORIGIN = 0x00000000, LENGTH = 1k
  ram    : ORIGIN = 0x00000400, LENGTH = 6M - 1k
  eram   : ORIGIN = 0x00600000, LENGTH = 0

ramvec, ram and eram should define the rw memory map used by uClinux,
romvec, flash and eflash define the ro part. the above example is for
8MB SDRAM mapped from 0 to 0x00800000, this setting should give you an
upload address of 0x00600000 and a run address of 0x00600400, if you
need to reserve 4Mb then adjust the adresses.

When I started to port uClinux on my board, I did not need 4Mb for the
initial image to run, 2Mb were enough, but try with 4Mb and check the
generated image.bin size, it contains the kernel + the initial root file
system which are to be loaded in the rom part.


More information about the uClinux-dev mailing list