Gateworks Avila GW234x

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 22:34, 14 January 2008 (edit)
Samueldg (Talk | contribs)
(Using MINICOM)
← Previous diff
Revision as of 22:38, 14 January 2008 (edit) (undo)
Samueldg (Talk | contribs)
(Avila Gateworks)
Next diff →
Line 1: Line 1:
=Avila Gateworks= =Avila Gateworks=
 +==Thanks to==
 +'''Brainslayer''' (Sebastian) to all the help send to me (and the patient he has) to explain many things about this topic (and others).
 +
 +All '''developer team''' for this great firmware.
 +
 +Avila for this device.
 +
==Prerequisites== ==Prerequisites==
===RedHat 5 or similar=== ===RedHat 5 or similar===

Revision as of 22:38, 14 January 2008

Contents

Avila Gateworks

Thanks to

Brainslayer (Sebastian) to all the help send to me (and the patient he has) to explain many things about this topic (and others).

All developer team for this great firmware.

Avila for this device.

Prerequisites

RedHat 5 or similar

I'm using CentOS 5 to write this.

I have been installed minicom, tftp-server and telnet packages (and their dependences) previously and copied zImage and root.fs to /tftpboot/.

Then I configure /etc/xinetd.d/tftp file as this:

  $ cat /etc/xinetd.d/tftp
  # default: off
  # description: The tftp server serves files using the trivial file transfer \
  #       protocol.  The tftp protocol is often used to boot diskless \
  #       workstations, download configuration files to network-aware printers, \
  #       and to start the installation process for some operating systems.
  service tftp
  {
          socket_type             = dgram
          protocol                = udp
          wait                    = yes
          user                    = root
          server                  = /usr/sbin/in.tftpd
          server_args             = -s /tftpboot
          disable                 = no
          per_source              = 11
          cps                     = 100 2
          flags                   = IPv4
  }

And verified that xinetd daemon is runing after the configuration:

  $ service xinetd restart
  Parando xinetd:                                            [  OK  ]
  Iniciando xinetd:                                          [  OK  ]
  $ service xinetd status
  Se está ejecutando xinetd (pid 10353)...

Windows

See: Intall into GW2348

Accesing via telnet

By default you can access the device using a serial port cable (not null-modem) or using telnet.

Using TELNET

1) Configure your ethernet to have the 192.168.3.1/24 ip address

  $ ip addr add 192.168.3.1/24 brd 192.168.3.255 dev eth0 label eth0:3

Where eth0 is your ethernet interface and eth0:3 is the alias (used if you have more than one IP assigned to the interface).

If you have an address assigned to the 192.168.3.0/24 subnetwork, delete it previously:

  $ ip addr del 192.168.3.1/24 brd 192.168.3.255 dev eth0 label eth0:3

2) Open a terminal window (a window better than a tab in some terminals programs) and send a ping to the GW234X.

  $ ping 192.168.3.2
  PING 192.168.3.2 (192.168.3.2) 56(84) bytes of data.

3) Open a new terminal window and prepare to do the telnet to the GW234X. Very important is that you don't hit RETURN yet.

  $ telnet 192.168.3.2 9000

Where 192.168.3.2 is the default GW234X ip for access RedBoot and 9000 is the default port where RedBoot has a telnet daemon listening.

4) Go to the TELNET terminal and prepare de RETURN key and the CTRL+C combination.

5) Take in view the 2 terminal windows to see when the GW234X is answering the pings and plug-off/plug-on the power to the GW234X.

6) When the ping has the first answer pres RETURN and very quickly the CTRL+C keys.

7) If you were lucked, you can see the RedBoot Prompt:

  $ telnet 192.168.3.2 9000
  Trying 192.168.3.2...
  Connected to 192.168.3.2 (192.168.3.2).
  Escape character is '^]'.
  == Executing boot script in 2.490 seconds - enter ^C to abort
  ^C
  RedBoot> 

8) If you were too slow hitting CTRL+C or hitting RETURN you will not have the RedBoot prompt and will need to go to step 3.

Using MINICOM

1) Configure MINICOM with the default values: 115200,8,N,1 without hardware/software flow control.

2) Save configuration (usefull to not reconfigure the access next time).

3) Connect a serial cable (DB9 MALE to DB9 FEMALE) from your PC to the GW234X.

4) Plug-off and plug-on the power to the GW234X.

5) Remember that you will need to hit CTRL+C keys, but now you, really, not need to do it quickly.

6) Play with RedBoot.

RedBoot commands summary

Here is it:

  RedBoot> help
  Manage aliases kept in FLASH memory
     alias name [value]
  Set/Query the system console baud rate
     baudrate [-b <rate>]
  Manage machine caches
     cache [ON | OFF]
  Display/switch console channel
     channel [-1|<channel number>]
  Compute a 32bit checksum [POSIX algorithm] for a range of memory
     cksum -b <location> -l <length>
  Display disks/partitions.
     disks 
  Display (hex dump) a range of memory
     dump -b <location> [-l <length>] [-s] [-1|2|4]
  Execute an image - with MMU off
     exec [-w timeout] [-b <load addr> [-l <length>]]
          [-r <ramdisk addr> [-s <ramdisk length>]]
          [-c "kernel command line"] [<entry_point>]
  Manage FLASH images
     fis {cmds}
  Manage configuration kept in FLASH memory
     fconfig [-i] [-l] [-n] [-f] [-d] | [-d] nickname [value]
  Execute code at a location
     go [-w <timeout>] [-c] [-n] [entry]
  Help about help?
     help [<topic>]
  Display command history
     history 
  Set/change IP addresses
     ip_address [-l <local_ip_address>[/<mask_len>]] [-h <server_address>]
  Load a file
     load [-r] [-v] [-d] [-h <host>] [-p <TCP port>][-m <varies>] [-c <channel_number>] 
          [-b <base_address>] <file_name>
  Dump information on PCI devices
     lspci 
  Compare two blocks of memory
     mcmp -s <location> -d <location> -l <length> [-1|-2|-4]
  Copy memory from one address to another
     mcopy -s <location> -d <location> -l <length> [-1|-2|-4]
  Fill a block of memory with a pattern
     mfill -b <location> -l <length> -p <pattern> [-1|-2|-4]
  Network connectivity test
     ping [-v] [-n <count>] [-l <length>] [-t <timeout>] [-r <rate>]
          [-i <IP_addr>] -h <IP_addr>
  Reset the system
     reset 
  Set/Read MAC address for NPE ethernet ports
     set_npe_mac [-p <portnum>] [xx:xx:xx:xx:xx:xx]
  Swap bytes in 16-bit or 32-bit words in a block of memory
     swab -b <location> -l <length> [-2|-4]
  Display RedBoot version information
     version 
  Display (hex dump) a range of memory
     x -b <location> [-l <length>] [-s] [-1|2|4]