onie-sysinfo: Adding h to known arguments

Fixing:
Illegal option -h

Test:
ONIE:~ # onie-sysinfo -h

Signed-off-by: Doron Tsur <doront@mellanox.com>
onie-sysinfo -e, onie-sysinfo -s: fixing EEPROM read error flow

Error flow note:
"ERROR: TLV code not present" is pointed to onie-syseeprom's stdout,
which is not printed.
An additional more generic "incorrect TLV field number" is printed at
/var/log/onie.log

Tests:
Good flow:
ONIE:~ # onie-sysinfo -e
ONIE:~ # onie-sysinfo -s
ONIE:~ # onie-sysinfo -a
ONIE:~ # tail /var/log/onie.log
Error flow:
- Edit /lib/onie/sysinfo-arch to point to incorrect TLV field number
ONIE:~ # onie-sysinfo -e
ONIE:~ # onie-sysinfo -s
ONIE:~ # onie-sysinfo -a
ONIE:~ # tail /var/log/onie.log

Signed-off-by: Doron Tsur <doront@mellanox.com>
Adding -P part number flag to onie-sysinfo

Tests:
ONIE:~ # onie-sysinfo
x86_64-mlnx_x86-r5.0
ONIE:~ # onie-sysinfo -a
MT*<SN>* MSX1710-BS2F2E F4:52:14:DF:87:1E ocp_master-201411160936.1100-dirty
33049 mlnx_x86 5.0 x86_64-mlnx_x86-r5.0 x86_64 1 gpt 2014-11-16T09:37+0200
ONIE:~ # onie-sysinfo -P
MSX1710-BS2F2E
ONIE:~ # onie-sysinfo -p
x86_64-mlnx_x86-r5.0
ONIE:~ # onie-sysinfo -h
onie-sysinfo [-hsevimrpcfdatP]
...
        -s
                Serial Number

        -P
                Part Number
...
ONIE:~ # onie-sysinfo -s
MT*<SN>*
ONIE:~ # onie-sysinfo -i
33049
ONIE:~ # onie-sysinfo -r
5.0
< Edit /lib/onie/sysinfo-arch to point to incorrect TLV field of part number >
ONIE:~ # onie-sysinfo -P
Unknown
ONIE:~ # onie-sysinfo -a
MT*<SN>* Unknown F4:52:14:DF:87:1E ...
ONIE:~ # tail /var/log/onie.log
Nov 16 09:37:36 <hostname> local0.info onie: ONIE: Unable to find
'Part Number' TLV in EEPROM data.
Nov 16 09:37:51 <hostname> local0.info onie: ONIE: Unable to find
'Part Number' TLV in EEPROM data.

Signed-off-by: Doron Tsur <doront@mellanox.com>
Add copyright notice for Doron Tsur <doront@mellanox.com>

Accidentally left Doron off the copyright notice during the first pass
through the files.
Add support for configrable syslinux menu default

The default syslinux menu entry can be selected by specifying a
parameter in machine.make of a platform - SYSLINUX_DEFAULT_MODE.

This parameter is documented in machine/kvm_x86_64/machine.make.

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
u-boot sys_eeprom: Add/Revise the command help messages

- Show message after executing the 'read' and 'erase' commands.
- Revise the help messages of 'usage', 'read', and 'erase'.
- Revise the 'read' command to always load EEPROM data from device
  to memory.

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
Accton u-boot sys_eeprom: Adjust patch chunks after revising common codes

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
functions net_intf(): Correct undefined variables, $dhcp and $ip

Accton AS6700_32X has 2 mgmt ports.  If specify static IP for eth1
via ``onie_debugargs``, ONIE still tries to configure eth0.

The test procedure is:

1. The outer mgmt port plugs cable whose link partner has DHCP
   server actived.
2. The inner mgmt port does not plug any cable.
3. Power on the box. Set setenv onie_debugargs
   ``ip=192.168.6.10:::255.255.255.0::eth1`` and then
   ``run onie_bootcmd``.

ONIE will show the following messages and try to run DHCPv4 discover
on 'eth0'.

    ONIE: eth0: Using static IP config: ip=192.168.6.10:::255.255.255.0::eth1
    Info: eth1:  Checking link... down.
    ONIE: eth1: link down.  Skipping configuration.
    ONIE: Failed to configure eth1 interface
    ONIE: Starting ONIE Service Discovery

According to the log, it showes ONIE trying to discover images via
eth0.  But eth0 was not configured IP (from static IP or DHCP).

    ONIE: Trying DHCPv4 on interface: eth0
    ...
    Info: Fetching tftp://192.168.1.99/onie-installer-accton_as6700_32x ...
    Info: Fetching tftp://192.168.1.99/onie-installer-powerpc ...
    Info: Fetching tftp://192.168.1.99/onie-installer ...
    ...

The ``net_intf()`` reporting Ethernet interfaces depends on some
conditions.  If ``$dhcp`` or ``$ip`` is existent, it will try to
report the specified interface. Otherwise, it reports all Ethernet
interfaces on the box.

We found ``$dhcp`` and ``$ip`` are undefined here. They should be
``$onie_dhcp`` and ``$onie_ip``.

After fixing the issue.  ONIE handles the correct interface by the
same test procedure:

    Starting: dropbear ssh daemon... done.
    Starting: telnetd... done.
    discover: installer mode detected.  Running installer.
    Starting: discover... done.

    Please press Enter to activate this console. Info: eth1:  Checking link... down.
    ONIE: eth1: link down.  Skipping configuration.
    ONIE: Failed to configure eth1 interface
    ONIE: Starting ONIE Service Discovery
    Info: Sleeping for 20 seconds
    4..3..2..1..

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
discover: Calling import_cmdline() before calling net_intf()

In /rootconf/default/bin/discover, it uses ``net_intf()`` to get the
valid Ethernet interface list.  ``net_intf()`` uses ``$onie_dhcp`` and
``$onie_ip`` as conditions to generate the list.  The script should
explicitly call ``import_cmdline()`` to export these variables before
calling ``net_intf()``.

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
Accton AS5610_52X: Correct GPIO (pca9506) nodes in DTS

There are 4 wrong GPIO nodes in DTS.  It showes error messages during
kernel booting:

    pca953x 17-0071: failed reading register
    pca953x 17-0072: failed reading register
    pca953x 17-0073: failed reading register

According to the HW spec, these 4 nodes are pca9506.

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
Alphanetworks x86_64 platforms: Add i2c-tools patches for onie syseeprom.

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
Added support for FreeBSD

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>