This is the mail archive of the
ecos-devel@sources.redhat.com
mailing list for the eCos project.
Re: Porting RedBoot to a 64MB GRG based board
- From: Mark Salter <msalter at redhat dot com>
- To: Dan Searle <dan dot searle at adelix dot com>
- Cc: ecos-devel at sources dot redhat dot com
- Date: Wed, 26 Jan 2005 10:41:35 -0500
- Subject: Re: Porting RedBoot to a 64MB GRG based board
- References: <327476032.20050126151119@adelix.com>
On Wed, 2005-01-26 at 15:11 +0000, Dan Searle wrote:
> Hi,
>
> I have a development board based on the GRG (ADI Coyote) reference
> design. The only real difference is that my board has 64MB of SDRAM
> instead of the standard 32 for GRG boards. The RAM is a 2 chip setup
> with 256Mbit chips instead of 128Mbit.
>
> I have managed to recompile the RedBoot 1.94 sources using the
> following sequence of commands...
>
> cd /home/admin/redboot/redboot-intel-xscale-040330
> export TOPDIR=`pwd`
> export ECOS_REPOSITORY=${TOPDIR}/packages
> export VERSION=current
> mkdir ${TOPDIR}/build
> cd ${TOPDIR}/build
> ../packages/ecosadmin.tcl add ../npe-1.4.epk
> cp ../IxNpeMicrocode.c ${ECOS_REPOSITORY}/devs/eth/intel/npe/v1_4/src/npeDl
> ecosconfig new grg redboot
> ecosconfig import ${ECOS_REPOSITORY}/hal/arm/xscale/grg/${VERSION}/misc/redboot_ROM.ecm
> ecosconfig remove i82559_eth_driver
> ecosconfig remove devs_eth_arm_grg_i82559
> ecosconfig add intel_npe
> ecosconfig add grg_npe
> ecosconfig tree
> perl -pi.bak -e 's/xscale-elf-/arm-linux-/g' `find -name makefile`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You really should use an arm-elf or xscale-elf toolchain.
> perl -pi.bak -e 's/CFLAGS :=/CFLAGS := -D__ECOS=1 -U__linux/g' `find -name makefile`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This shouldn't be necessary (probably due to using linux toolchain
> make
>
> I got errors as some #ifdefs are broken, so I had to edit the
> IxOsServices.c file and fix the #ifdefs to make sure it uses the
> __ECOS code fragment for the MutexTryLock function.
Again, this should not be neccessary.
>
> Anyway, it now builds and runs from the Flash chip on my board
> perfectly, except that it only recognises the first 32MB of RAM.
>
> I realised that the SDRAM controller would need configuring
> differently so edited the files:
>
> build/install/include/cyg/hal/grg.h:
> #define IXP425_SDRAM_CONFIG_INIT (SDRAM_CONFIG_CAS_3 |
> SDRAM_CONFIG_2x8Mx16)
> now reads:
> #define IXP425_SDRAM_CONFIG_INIT (SDRAM_CONFIG_CAS_3 |
> SDRAM_CONFIG_2x16Mx16)
>
> I also changed the source file in the packages directory to avoid a
> "ecosconfig tree" from reverting my changes.
>
> I then saw that there were various references to: 0x02000000 through
> the source code realating to RAM size. I have changed all of these
> (not all references to 0x02000000, just the ones to do with RAM size).
>
Did you change the SDRAM_SIZE macro?
And the ram size references in the grg/current/include/pkgconf dir?
> Now when I do a:
>
> make clean
> make
>
> Then re-flash my board using a JTAG and boot RedBoot, it crashes:
>
> +$T0a0f:5001790c;0d:00012b64;#81
>
> Some GDB gibberish which I can't make sence of.
>
> What am I doing wrong? Can anyone point out the proper way to
> re-configure RedBoot to use 64MB of RAM rather than 32?
Probably a pagetable issue. See hal_platform_extras.h
>
> Would it be sufficient to just reconfigure the SDRAM init register and
> pass exec -c"mem=64M@0x0" to the kernel?
Probably.
--Mark