4.1 Building the Target Image

The software for the target system can be built using the Buildroot tool. This process is performed on a Linux host PC. Note that Greengrass core software is included in the Microchip Linux distribution.

Note: The steps below describe how to build an SD card image from scratch and are for information only. This procedure is not required.

“$” indicates a command on the host PC.

“#” indicates a command on the target board.

  1. Change directory to a base location. In this example, cd to your home directory:

    $ cd

  2. Create gg directory:

    $ mkdir gg

  3. Change to the new directory:

    $ cd gg

  4. Clone the following buildroot-external repository:

    $ git clone git://github.com/linux4sam/buildroot-external-microchip

  5. Clone and checkout linux4sam buildroot repository:

    $ git clone git://github.com/linux4sam/buildroot-at91.git -b linux4sam_2020.04

  6. Change to the buildroot directory:

    $ cd buildroot-at91/

  7. Set up the configuration for buildroot:

    $BR2_EXTERNAL=../buildroot-external-microchip make sama5d27-wlsom1-ek_headless_defconfig

  8. Make the buildroot project:

    $ make

At this point, Buildroot has created an entire SD card image “./output/images/sdcard.img”. This image should now be copied to an SD card. You can use any number of different tools, such as Etcher, or you can carefully use the “dd” command that is built into Linux. Be careful that your destination drive is the SD card, because if you type the wrong name, a hard drive on your host PC could be erased.