<commit_before>.. _deploy_boards:

Deploying a board in LAVA
^^^^^^^^^^^^^^^^^^^^^^^^^

When adding a device to LAVA a number of steps are involved. First of all an
image needs to be created and put onto an SD card, then the sd card must be
partitioned in a particular way and various tools installed, along with
configuration of the network where required.

Once the master image has been created a number of files need to be added to
the lava instance so that it is aware of the new board, and finally the
scheduler must be informed of the new device.

Preparing a master image
************************

Builds submitted to LAVA can often be bad and not even bootable. This presents
a problem to LAVA since the dispatcher must always be able to work with target
devices. The solution used in LAVA is called a "master image". The master image
basically puts a known, reliable image onto an SD-card. The lava-dispatcher
can tell u-boot whether to boot to the "master image" or boot into the image
to be tested. This has drawbacks, namely no bootloader testing, but its the
best option available right now.

There are three ways you can obtain a master image. LAVA maintains a set
of `pre-built master images`_ that you can 'dd' to your sd card. The
following commands show how to set up a panda image::

    DEV=/dev/sdX #X should be something like b
    wget http://images.validation.linaro.org/lava-masters/panda-master.img.tgz
    tar -xzf panda-master.img.tgz
    sudo dd bs=4M if=panda-master.img of=${DEV}

.. _pre-built master images: http://images.validation.linaro.org/lava-masters/

Alternatively you can create your own master image, if you don't find a
suitable pre-built one. You will need a SD card with at least 4GB.
Creating master images can be done by using the
`lava-master-image-scripts`_ project:

.. _lava-master-image-scripts: http://git.linaro.org/lava/lava-master-image-scripts.git/blob_plain/HEAD:/README

::

    bzr branch lp:lava-master-image-scripts
    cd lava-master-image-scripts
    ./lava-create-master <board><commit_msg>Change lava-master-image-scripts repo reference from launchapd to git.<commit_after>.. _deploy_boards:

Deploying a board in LAVA
^^^^^^^^^^^^^^^^^^^^^^^^^

When adding a device to LAVA a number of steps are involved. First of all an
image needs to be created and put onto an SD card, then the sd card must be
partitioned in a particular way and various tools installed, along with
configuration of the network where required.

Once the master image has been created a number of files need to be added to
the lava instance so that it is aware of the new board, and finally the
scheduler must be informed of the new device.

Preparing a master image
************************

Builds submitted to LAVA can often be bad and not even bootable. This presents
a problem to LAVA since the dispatcher must always be able to work with target
devices. The solution used in LAVA is called a "master image". The master image
basically puts a known, reliable image onto an SD-card. The lava-dispatcher
can tell u-boot whether to boot to the "master image" or boot into the image
to be tested. This has drawbacks, namely no bootloader testing, but its the
best option available right now.

There are three ways you can obtain a master image. LAVA maintains a set
of `pre-built master images`_ that you can 'dd' to your sd card. The
following commands show how to set up a panda image::

    DEV=/dev/sdX #X should be something like b
    wget http://images.validation.linaro.org/lava-masters/panda-master.img.tgz
    tar -xzf panda-master.img.tgz
    sudo dd bs=4M if=panda-master.img of=${DEV}

.. _pre-built master images: http://images.validation.linaro.org/lava-masters/

Alternatively you can create your own master image, if you don't find a
suitable pre-built one. You will need a SD card with at least 4GB.
Creating master images can be done by using the
`lava-master-image-scripts`_ project:

.. _lava-master-image-scripts: http://git.linaro.org/lava/lava-master-image-scripts.git/blob_plain/HEAD:/README

::

    git clone https://git.linaro.org/lava/lava-master-image-scripts.git
    cd lava-master-image-scripts
    ./lava-create-master <board>
{'fraction_non_alphanumeric': 0.08549654679685639, 'fraction_numerical': 0.0009526077637532746, 'mean_word_length': 3.935370152761457, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1178189', 'n_tokens_mistral': 1236, 'n_tokens_neox': 1171, 'n_words': 588}