public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] making netstat () diagnostic function
@ 2001-08-23 15:31 Trenton D. Adams
  2001-08-23 19:10 ` [ECOS] How to build RedBoot for S3C4510 Simon
  0 siblings, 1 reply; 5+ messages in thread
From: Trenton D. Adams @ 2001-08-23 15:31 UTC (permalink / raw)
  To: 'eCos Discussion'

I want to make a netstat () diagnostic function.  That is if it's not
going to take to long.  If it does, I'll drop it.  I can't imagine it
taking very long if I can find out all the structure information I need.

From what I understand, there's a global "fds" variable right?  This
holds file descriptors including sockets right?

I assume that these defines below are the file descriptor types for the
"f_type" field in the "file" structure?

Info below is from io/common/current/include/file.h
// Type of "file"
#define	DTYPE_VNODE	1	/* file */
#define	DTYPE_SOCKET	2	/* communications endpoint */
#define	DTYPE_PIPE	3	/* pipe */

struct file {
    short	f_flag;		/* file state */
    short	f_type;		/* descriptor type */
    struct	fileops {
        int	(*fo_read)(struct file *fp, struct uio *uio);
        int	(*fo_write)(struct file *fp, struct uio *uio);
        int	(*fo_ioctl)(struct file *fp, CYG_ADDRWORD com,
                            CYG_ADDRWORD data);
        int	(*fo_select)(struct file *fp, int which);
        int	(*fo_close)(struct file *fp);
    } *f_ops;
    CYG_ADDRWORD	f_offset;
    CYG_ADDRWORD	f_data;		/* vnode or socket */
};


Where would I find what "f_data" is pointing to in the case of a socket?
I assume it's a structure of some sort that holds all the information
about the socket in question, right?

What is "f_offset"?


Trenton D. Adams
Extreme Engineering
#17, 6025 - 12 St. SE
Calgary, Alberta, Canada
T2H 2K1

Phone: 403 640 9494 ext-208
Fax: 403 640 9599

http://www.extremeeng.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ECOS] How to build RedBoot for S3C4510
  2001-08-23 15:31 [ECOS] making netstat () diagnostic function Trenton D. Adams
@ 2001-08-23 19:10 ` Simon
  2001-08-23 19:15   ` Gary Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: Simon @ 2001-08-23 19:10 UTC (permalink / raw)
  To: ecos-discuss

Hi all,
    Does anyone know how to build a RedBoot for S3C4510? I wanna this
redboot image to be programmed into the flash memory and make the whole
system boot from it. I know the chip is used on ARM's E7T board, and there
is a package for this board in eCos. But it seems it does not replace the
original bootloader in this board.
    So...does anyone know how to build a pure redboot which is executed at
first atfer power on?

Simon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [ECOS] How to build RedBoot for S3C4510
  2001-08-23 19:10 ` [ECOS] How to build RedBoot for S3C4510 Simon
@ 2001-08-23 19:15   ` Gary Thomas
  2001-08-23 20:09     ` Simon
  0 siblings, 1 reply; 5+ messages in thread
From: Gary Thomas @ 2001-08-23 19:15 UTC (permalink / raw)
  To: Simon; +Cc: ecos-discuss

On 24-Aug-2001 Simon wrote:
> Hi all,
>     Does anyone know how to build a RedBoot for S3C4510? I wanna this
> redboot image to be programmed into the flash memory and make the whole
> system boot from it. I know the chip is used on ARM's E7T board, and there
> is a package for this board in eCos. But it seems it does not replace the
> original bootloader in this board.
>     So...does anyone know how to build a pure redboot which is executed at
> first atfer power on?

Actually, the RedBoot in that package does replace the original code in
function (i.e. only RedBoot runs from reset).  This is an artifact of how
the hardware is wired up on the board - there is a switch to decide how
the FLASH is mapped.

You should be able to take the at91/eb40 package and modify it to suit 
your needs.  Everything should be in there.  Note however that the released
code is somewhat hardwired to that particular configuration.  You may need
to adapt it to your hardware.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] How to build RedBoot for S3C4510
  2001-08-23 19:15   ` Gary Thomas
@ 2001-08-23 20:09     ` Simon
  2001-08-24  4:57       ` Gary Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: Simon @ 2001-08-23 20:09 UTC (permalink / raw)
  To: Gary Thomas; +Cc: ecos-discuss

Hi Gary,
    Thanks for your reply. But the redboot.bin from e7t package seems not to
work. I have to mention at first that I program the flash via JTAG port, and
download via serial port. I have inspected the redboot.bin and found that
the first word of this binary image is not a "branch" instruction like
0xEA.....
    Any suggestion? Or does anyone know how to solve this problem?
Simon

----- Original Message -----
From: "Gary Thomas" <gthomas@redhat.com>
To: "Simon" <simoncc@ms46.url.com.tw>
Cc: <ecos-discuss@sourceware.cygnus.com>
Sent: Friday, August 24, 2001 10:23 AM
Subject: RE: [ECOS] How to build RedBoot for S3C4510



On 24-Aug-2001 Simon wrote:
> Hi all,
>     Does anyone know how to build a RedBoot for S3C4510? I wanna this
> redboot image to be programmed into the flash memory and make the whole
> system boot from it. I know the chip is used on ARM's E7T board, and there
> is a package for this board in eCos. But it seems it does not replace the
> original bootloader in this board.
>     So...does anyone know how to build a pure redboot which is executed at
> first atfer power on?

Actually, the RedBoot in that package does replace the original code in
function (i.e. only RedBoot runs from reset).  This is an artifact of how
the hardware is wired up on the board - there is a switch to decide how
the FLASH is mapped.

You should be able to take the at91/eb40 package and modify it to suit
your needs.  Everything should be in there.  Note however that the released
code is somewhat hardwired to that particular configuration.  You may need
to adapt it to your hardware.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] How to build RedBoot for S3C4510
  2001-08-23 20:09     ` Simon
@ 2001-08-24  4:57       ` Gary Thomas
  0 siblings, 0 replies; 5+ messages in thread
From: Gary Thomas @ 2001-08-24  4:57 UTC (permalink / raw)
  To: Simon; +Cc: ecos-discuss

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2118 bytes --]

That image may *not* work on your hardware.  Like I said, it's tailored to
the EB40 environment and expects to run from the top 1/2 of the FLASH.

The provided image is for a little endian system, so the 0xEA comes in byte 3.
0x000000 0e 00 00 ea 18 f0 9f e5 18 f0 9f e5 18 f0 9f e5  |...ê.ð.å.ð.å.ð.å|
0x000010 18 f0 9f e5 00 00 00 00 18 f0 9f e5 18 f0 9f e5  |.ð.å.....ð.å.ð.å|

On 24-Aug-2001 Simon wrote:
> Hi Gary,
>     Thanks for your reply. But the redboot.bin from e7t package seems not to
> work. I have to mention at first that I program the flash via JTAG port, and
> download via serial port. I have inspected the redboot.bin and found that
> the first word of this binary image is not a "branch" instruction like
> 0xEA.....
>     Any suggestion? Or does anyone know how to solve this problem?
> Simon
> 
> ----- Original Message -----
> From: "Gary Thomas" <gthomas@redhat.com>
> To: "Simon" <simoncc@ms46.url.com.tw>
> Cc: <ecos-discuss@sourceware.cygnus.com>
> Sent: Friday, August 24, 2001 10:23 AM
> Subject: RE: [ECOS] How to build RedBoot for S3C4510
> 
> 
> 
> On 24-Aug-2001 Simon wrote:
>> Hi all,
>>     Does anyone know how to build a RedBoot for S3C4510? I wanna this
>> redboot image to be programmed into the flash memory and make the whole
>> system boot from it. I know the chip is used on ARM's E7T board, and there
>> is a package for this board in eCos. But it seems it does not replace the
>> original bootloader in this board.
>>     So...does anyone know how to build a pure redboot which is executed at
>> first atfer power on?
> 
> Actually, the RedBoot in that package does replace the original code in
> function (i.e. only RedBoot runs from reset).  This is an artifact of how
> the hardware is wired up on the board - there is a switch to decide how
> the FLASH is mapped.
> 
> You should be able to take the at91/eb40 package and modify it to suit
> your needs.  Everything should be in there.  Note however that the released
> code is somewhat hardwired to that particular configuration.  You may need
> to adapt it to your hardware.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-08-24  4:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-23 15:31 [ECOS] making netstat () diagnostic function Trenton D. Adams
2001-08-23 19:10 ` [ECOS] How to build RedBoot for S3C4510 Simon
2001-08-23 19:15   ` Gary Thomas
2001-08-23 20:09     ` Simon
2001-08-24  4:57       ` Gary Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).