[yocto] [meta-chip][RFC PATCH 3/3] chip: Add chip-u-boot-scr recipe and flash script

Trevor Woerner twoerner at gmail.com
Sun Jun 18 22:19:00 PDT 2017

On Fri 2017-06-16 @ 05:15:40 PM, drew.moseley at mender.io wrote:
> diff --git a/README b/README
> index cccf59e..cf52e05 100644
> --- a/README
> +++ b/README
> @@ -59,4 +59,28 @@ To build a machine supported by this BSP layer follow the next steps:

Please wrap the additions to the README to 80 columns.

>  II. Flashing a C.H.I.P. board
>  ========================================
> -<TODO>
> +As part of the build including this BSP layer, a U-Boot script and a shell script
> +are created to assist in flashing your images to the CHIP board.  Note that this
> +script assumes a maximum size for your UBI image of 0x0A000000 bytes.  If your UBI
> +image exceeds that, then you will need to adapt this to your environment.
> +
> +To successfully run this script you will first need to set your board into FEL mode.
> +chip. https://docs.getchip.com/chip.html#flash-chip-with-an-os
> +Insert a wire into the U14 header between pin 7 (FEL) and GND.  Then connect the
> +board with a USB cable to your build system.
> +
> +You need to specify the base filename of your UBI image using the UBI_IMAGE shell
> +variable before invoking the generated script as follows:
> +
> +$ UBI_IMAGE=core-image-full-cmdline-chip.ubi ./tmp/deploy/images/chip/flash_CHIP_board.sh

Outside of a udev tweak, this script needs to be run as root. It's traditional
to indicate commands run as root by prefixing them with a PS1 of '#'.

> +
> +This script will take some time to execute.  If you have a serial console connected to
> +your board, you will see the progress and a message on the console will indicate when
> +the flashing is completed. Additionally, once the image is properly flashed, the status
> +LED on the CHIP board will flash 30 times per second indicating that it is safe to power
> +down your board and disable FEL mode.
> +
> +WARNING: This will erase the entire contents of your CHIP board.
> +
> +NOTE: This setup is still compatible with the CHIP flashing utility available
> +at http://flash.getchip.com if you choose to reinstall the stock images.

More information about the yocto mailing list