This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Redboot startup problem
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Manfred Huber <mhuber at t-online dot de>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Sat, 18 Nov 2006 22:00:57 +0100
- Subject: Re: [ECOS] Redboot startup problem
- References: <455D7F18.9030700@t-online.de>
On Fri, Nov 17, 2006 at 10:21:28AM +0100, Manfred Huber wrote:
> Hi all,
>
> I'm pretty new to eCos and this is my first posting on this list.
> At the moment I try to get Redboot running on custom NET+ARM
> Hardware. I use a fairly recent (06/10/29) snapshot and the
> netarm HAL from ftp.mind.be
>
> After quite a few steps on a pretty steep learning curve I have
> redboot running with the following packages:
>
> >------------------
> $ ecosconfig check
> Target: netarm
> Template: redboot
> Added:
> CYGPKG_IO_FLASH
> CYGPKG_IO
> CYGPKG_ERROR
> CYGPKG_FS_JFFS2
> CYGPKG_IO_FILEIO
> CYGPKG_LINUX_COMPAT
> CYGPKG_COMPRESS_ZLIB
> CYGPKG_MEMALLOC
> No conflicts
> >------------------
>
> redboot is coming up and all fis commands seem to work fine.
> Next step is getting the fs commands and jffs2 to work.
> I use the following settings:
>
> >-------------------
> CYGPKG_IO_FLASH_BLOCK_DEVICE = true
> CYGDAT_IO_FLASH_BLOCK_DEVICE_NAME_1 = "/dev/flash1" (default)
> CYGNUM_IO_FLASH_BLOCK_CFG_STATIC_1 = false
> CYGINT_IO_FLASH_BLOCK_CFG_1 = true
> CYGDAT_IO_FLASH_BLOCK_FIS_NAME_1 = "jffs2" (default)
> >-------------------
>
> Creating the "jffs2" fis directory entry was no problem.
> Next I tried mounting the /dev/flash 1 device with jffs2
> which also worked without a hint of a problem.
> fs info and fs list look fine:
>
> >--------------------
> RedBoot> fs info
> Filesystems available:
> jffs2
>
> Mounted filesystems:
> Device Filesystem Mounted on
> /dev/flash1 jffs2 /
>
> RedBoot> fs list
> 1 drwxr-xr-x 1 size 0 .
> 1 drwxr-xr-x 1 size 0 ..
> RedBoot>
> >--------------------
>
> So far so good but next I tried to create a directory (fs mkdir)
> or to write a file (fs write) and these operations do not work.
>
> Using gdb and a JTAG debugger i found out the following:
>
> The startup code in vectors.s is starting the following chain of calls:
>
> >----------------------------
> start()
> cyg_hal_invoke_constructors()
> cyg_io_init()
> flashiodev_init()
> flash_fis_op()
> fis_lookup("jffs2"...)
> fis_read_directory()
> >-----------------------------
>
> fis_read_directory() relies on a varible named
> fis_addr and this variable is not yet set at this point of time.
> This leads to an error which is propagated back to cyg_io_init()
> which in turn clears the CYG_DEVTAB_STATUS_AVAIL flag for
> the /dev/flash1 device.
>
> fis_addr is initialized to the correct value at a later time
> when cyg_start() is running but then it is too late.
>
> All the trouble I had so far where due to problems with
> the HAL but at this time it looks to me like a problem with the
> Redboot code itself.
>
> Any ideas?
I think this used to work. I'm note sore because i've personally only
ever used static configuration of flashiodev.
Could you try using anoncvs from before the big changes on 2006/07/20
and before the changes on 2006/05/09. See if these work or it is
broken back then.
Thanks
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss