Accton AS5710_54X: Remove partitions read-only permission from DTS

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
Alpha Networks SNQ60A0_320F: Remove Demo OS partition work around

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
Add more dependencies to debian-prepare-build-host target

Issue #39:
The following missing dependencies were added:

* libncurses5
* libncurses5-dev
* bc

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
Allow platform specific Busybox customizations

Issue #37 - This commit adds support for customizing busybox
config on a per platform basis.

We're currently supporting only config customizations similar to
how its done for the kernel.

Custom configs can be placed under: machine/<platform>/busybox/config
and the build system will pick it from there.

The customizations are optional and the build system will use
existing defaults if its not defined by a platform.

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
Revise times of checking mgmt port link status to 100

The polling loop of checking link status is a total 5 seconds in the
worst case. It may be timeout eventually if the link partner has
capibility of 1000FD.

I added a debug message to show total times of checking the link status
of mgmt port.

    [ -r $operstate ] && while [ $i -lt 100 ] ; do
        if [ "$(cat $operstate)" = "up" ] ; then
            _log_info_msg "up. (waited $i times)\n"
            return 0
        fi
        sleep 0.1
        i=$(( $i + 1 ))
    done

If both mgmt port and its link partner have 1000FD capability with
auto-negotiation enabled, they will spend more time to accomplish the
negotiation.

We did hundreds of testing on Accton AS5710_54x. The test result are:

- 40 times (55%)
- 50 times (45%)
- 69 times (8%)
- 79 times (2%)

It indicates most of time mgmt port is link-up in 5 seconds (40 times
and 50 times). It has 10% of probability over 5 seconds (69 times and
79 times). So that we decided to enlarge the total seconds to 10 i.e.,
100 times.

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
QuantaMesh 3000 Series T3048-LY2

================================================================================
- A powerful Top-of-Rack Switch for Cloud Datacenters
- 48 1/10GbE SFP+ and 4 40GbE QSFP+ ports
- 1 RJ-45 out-of-band management port (10/100/1000M)
- 1 RJ-45 console port

How to compile ONIE
================================================================================
$ cd machine/quanta/quanta_ly2
$ ./build.sh all

How to compile demo installer.
================================================================================
$ cd machine/quanta/quanta_ly2
$ ./build.sh demo

How to compile html and pdf documents.
================================================================================
$ cd machine/quanta/quanta_ly2
$ ./build.sh docs

For further information, please take a look at ``machine/quanta/quanta_ly2/INSTALL``

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
Accton AS5710_54X: Support kernel module

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
x86_64 demo: export GRUB_SERIAL_COMMAND and GRUB_CMDLINE_LINUX

After the commit f0901d4, demo installer does not export
'GRUB_SERIAL_COMMAND' and 'GRUB_CMDLINE_LINUX' before calling
'50_onie_grub'. It always writes default serial configs into
grub.cfg in onie-boot. ONIE's serial console will be out of
control after installing the demo os.

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
Alpha_Networks SNX6070_486f: Add machine directory and the patches for SNX6070-486F.

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
i2ctools: Add gitignore patch

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
u-boot: Add to support building PBL image

To enable the feature, insert "UBOOT_PBL_ENABLE = yes" into
$(MACHINEDIR)/machine.make.

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
Updater can't extract correct 'ver' and 'onie_bootcmd' from u-boot.pbl

The Freescale PBL image has special format that different from
u-boot.bin.  ONIE updater cannot extract 'ver' and 'onie_bootcmd'
from the PBL image easily.

The patch will pack u-boot.bin and u-boot.pbl into the ONIE updater
if 'UBOOT_PBL_ENABLE' is turned on.  The updater will write u-boot.pbl
to MTD device and parse u-boot.bin to get 'ver' and 'onie_bootcmd'.

Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
fetch-package: always verify cached packages

The fetch-package script has a bug where a corrupt package marked as
BAD on one run will be seen as OK on subsequent runs.  The problem is
on subsequent runs the script only checks for the presence of the
package, but not the checksum.

This patch makes fetch-package validate the checksum in all cases.  If
the package already exists only the download is skipped, but the
cached package is still validated.
package mirror: use http://mirror.opencompute.org/onie

Fixes #9

This patch changes the default package mirror to
http://mirror.opencompute.org/onie.

Testing Done:

From a clean build tree (the build directory was completely empty)
built the kvm_x86_64 machine and fsl_p2020rdbpca (PowerPC) machines.
apply-config-patch: revise pattern to exactly match a word

Signed-off-by: david_yang <david_yang@accton.com>
Add to support onie-syseeprom command in busybox

The patch supports r/w sys_eeprom (a.k.a. hardware information)
on either I2C or MTD device.  To enable the feature, the EEPROM
configuration have to be specified in $(MACHINEDIR)/busybox/config.
For instance:

    # Configuration for I2C EEPROM
    CONFIG_SYS_EEPROM=y
    CONFIG_SYS_EEPROM_DEVICE_I2C=y
    CONFIG_SYS_EEPROM_I2C_DEVICE="/dev/i2c-1"
    CONFIG_SYS_EEPROM_I2C_ADDR=0x57
    CONFIG_SYS_EEPROM_OFFSET=0
    CONFIG_SYS_EEPROM_SIZE=512
    CONFIG_SYS_EEPROM_MAX_SIZE=512

    # Configuration for MTD EEPROM
    CONFIG_SYS_EEPROM=y
    CONFIG_SYS_EEPROM_DEVICE_MTD=y
    CONFIG_SYS_EEPROM_MTD_DEVICE="/dev/mtd-board_eeprom"
    CONFIG_SYS_EEPROM_ERASE_SIZE=0x10000
    CONFIG_SYS_EEPROM_OFFSET=0
    CONFIG_SYS_EEPROM_SIZE=512
    CONFIG_SYS_EEPROM_MAX_SIZE=512

Both CONFIG_SYS_EEPROM_OFFSET and CONFIG_SYS_EEPROM_MAX_SIZE are
optional whose default values are 0 and 2048.

Signed-off-by: david_yang <david_yang@accton.com>
Write platform name and ONIE version to sys_eeprom during updating ONIE

Signed-off-by: david_yang <david_yang@accton.com>
i2ctools: Make onie-syseeprom be an optional feature

The feature is enabled by default.  However, it is deprecated now.
It is recommended to enable the command in busybox instead.  To
disable the feature, please insert "I2CTOOLS_SYSEEPROM = no" into
$(MACHINEDIR)/machine.make.

Signed-off-by: david_yang <david_yang@accton.com>
i2ctools: Make machine's patches be optional

If the machine's patch directory is absent, it will neither load,
apply, nor complain the patches.  However, the series must be in the
patch directory if the directory is present.

Signed-off-by: david_yang <david_yang@accton.com>
busybox: Add to support machine's patches

The machine's patches for busybox is optional.  i.e., If the
machine's patch directory is absent, it will neither load, apply,
nor complain the patches.  However, the series must be in the
patch directory if the directory is present.

Signed-off-by: david_yang <david_yang@accton.com>