This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Redboot startup problem


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?

Regards
Manfred


-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]