3.1 Building and Flashing the Linux System Image for SAMA5D27-SOM1-EK1

To build and flash the Linux system image for the SAMA5D27-SOM1-EK1, the user needs to clone the Buildroot and Buildroot-external repositories, load the appropriate configuration file, build the system image, and use Etcher to flash the image onto an SD card.

The following are steps to build and flash the Linux system image for the SAMA5D27-SOM1-EK1:

Step 1: Cloning the Buildroot File System and Packages

  1. Clone the Buildroot repository from the linux4sam GitHub using the following command:
    git clone https://github.com/linux4microchip/buildroot-mchp.git
  2. The Buildroot repository is cloned to the \buildroot-mchp directory. The user needs to switch to the desired branch of the Buildroot repository using the following commands:
    $ cd buildroot-mchp/
    $ git checkout linux4microchip-2024.10 -b linux4microchip-2024.10
  3. Clone the Buildroot-external repository from the Linux4Microchip GitHub using the following command:
    git clone https://github.com/linux4microchip/buildroot-external-microchip.git
  4. The Buildroot-external repository is cloned to the buildroot-external-microchip directory. The user needs to switch to the desired branch of the buildroot-external repository using the following commands:
    $ cd buildroot-external-microchip/
    $ git checkout linux4microchip-2024.10 -b linux4microchip-2024.10

Step 2: Loading SAMA5D27-SOM1-EK1 Configuration File

  1. Use the predefined defconfig file to create the required .config configuration file. The defconfig file is available in the configs folder of the buildroot-external-microchip directory. For the SAMA5D27-SOM1-EK1 evaluation board, use the sama5d27_som1_ek_headless_wilcs02_defconfig file.
  2. To build the root file system with the Linux kernel, browse to the directory buildroot-at and create the .configfile by using the following commands:
    $ BR2_EXTERNAL=../wilcs02-buildroot-external-microchip/ make 
    sama5d27_som1_ek_headless_wilcs02_defconfig

Step 3: Building the Linux System Image

  1. Start the build operation using the $ make command from the buildroot-mchp directory.
    Note: Ensure that the host PC is connected to the internet before starting the build operation and do not use any build options.
  2. The build operation generates files in the buildroot-mchp/output/images directory when completed. The sdcard.img file is the whole image file that contains all necessary modules to boot up the board. The following figure illustrates the list of the generated files.
    Figure 3-1. List of Generated Files
  3. The user can find the driver source files at build/linux-custom/drivers/net/wireless/microchip/wilc1000.
    Note: The driver directory name is WILC1000 only for legacy reasons.

Step 3: Flashing the SD Card Image Using Etcher

The SD card image (sdcard.img) contains all the necessary modules required to boot up the board. Flash the image into the microSD card using the Etcher application.
  1. To download and install the Etcher application on the Linux host machine, go to Etcher.
    Note: Ensure to download the correct version of Etcher based on the version and operating system.
  2. Flashing using Etcher requires the following two simple steps:
    1. Double-click the downloaded .exe file to install and run Etcher application.
    2. Click Select image to choose the sdcard.img file or files.
      Figure 3-2. Selecting sdcard.img File
    3. Click Select target to download the sdcard.img file into target microSD card.
    4. Click Flash! to start the flashing process.
      Figure 3-3. Flashing sdcard.img File