SAM9X75 Curiosity Development Board: Fast Boot Demonstration

Last modified by Microchip on 2026/08/11 16:09

Introduction

Booting an embedded Linux® system rapidly is essential for time-sensitive applications, where every second counts. A quick boot not only enhances the user experience but also enables devices to be operational almost instantly, which is critical in fields such as industrial automation, medical devices and consumer electronics. Fast boot techniques minimize system downtime and improve overall efficiency.

This training will guide you through proven strategies to achieve a fast boot on Microchip microprocessors (MPUs). Specifically, you will learn how to launch a Microchip Graphics Suite (MGS) GUI-based application on a Microchip MPU running Linux in under 3 seconds.

While this training uses MGS applications as examples, the techniques and methods demonstrated can be applied to launch any application of your choice after the system boots.

Information

Note: MGS is an open-source graphics software development toolkit that enables you to create modern, responsive Graphical User Interfaces (GUIs) for consumer, automotive, industrial and medical end products.

Summary of Steps

  • Minimize boot time
  • Minimize Linux Kernel load and startup time
  • Minimize application startup time
  • Prepare SD™ memory card
  • Fast boot MGS application from SD memory card
Information

Note: In this tutorial, you may either:

  1. Download and build the individual files as instructed, or
  2. Download the binary files necessary to flash an SD memory card.

Prerequisites

Hardware

You will use the SAM9X75 Curiosity Development Board and an AC69T88A High-Performance LVDS WVGA LCD Display Module with maXTouch Technology display board.

Refer to " Hardware Guide for SAM9X75 Curiosity with 5" LVDS WVGA maXTouch Technology Display Module" for instructions on how to assemble the Liquid Crystal Display (LCD) onto the SAM9X75 Curiosity Development Board.

SAM9X75 and AC69T88A image

Minimize Boot Time

In this section, you will download, configure, and build the second-stage bootloader (at91bootstrap). This bootloader initializes Dynamic Random-Access Memory (DRAM), loads the Linux kernel and Device Tree Source (DTS) into memory, and then transfers execution directly to the kernel to achieve fast booting.

Information

Note: For more in-depth information about at91bootstrap, see "at91bootstrap: A Second Stage Bootloader for Microchip MPUs."

Create a project directory.

Name your project directory "fastboot".

$ mkdir fastboot

Download at91bootstrap from the linux4sam remote repository within GitHub.

$ cd fastboot
$ git clone https://github.com/linux4sam/at91bootstrap.git
$ cd at91bootstrap/
$ git checkout 4.0.11
Information

Note: When you git clone from a remote repository, you are creating a copy in your host computer’s project directory (also known to git as the working directory or local directory).


Configure using sam9x75_curiositysd_linux_image_dt_defconfig.

After cloning at91bootstrap to your project directory, you need to configure the build. To do this, download the sam9x75_curiositysd_linux_image_dt_defconfig file and copy it to fastboot/at91bootstrap/configs/.

Using this configuration file will set up at91bootstrap (the second-stage bootloader) to load the Linux kernel directly, thereby eliminating the need for U-Boot (the third-stage bootloader) in the boot sequence.

Information

Note: The config files are annotated with the choice of external boot memory. In this case, we choose to boot at91bootstrap from the SD memory card.

  • sd – SD memory card
    • The default configuration files are also annotated with the choice of what at91bootstrap will load next, either a third-stage bootloader (uboot) and/or an application (linux_image_dt). Here we choose to load the Linux kernel.
  • linux_image_dt– Linux kernel and device tree

Change the directory to the ~/fastboot/at91bootstrap folder and begin the configuration process:

$ make sam9x75_curiositysd_linux_image_dt_defconfig

Customize the at91bootstrap configuration to minimize boot time.

To customize the default configuration settings, use menuconfig, which allows you to view the default configuration and make the required changes.

$ make menuconfig

at91bootstrap configuration

Observe that the Board Type (sam9x75) ---> has been selected.

Highlight Image Loading Strategy and observe that Support loading Linux directly has been selected.

Image Loading Strategy

Highlight Hardware Initialization Options ---> and press Enter.

De-select the Display Banner option by pressing <N>. Select <Exit>.

Display banner

Highlight Select slow clock configuration profile and change the setting to Use Internal RC oscillator as a source of slow clock.

Switching the slow clock source to the internal oscillator will eliminate the settling time required by the external crystal (which is selected by default). This will reduce boot time by almost one second.

Highlight Slow Clock Configuration Options ---> and press Enter.

Slow Clock Configuration Options

Use Internal RC oscillator as a source of slow clock

You may exit menuconfig by repeatedly typing "ESC-ESC" until it closes. Save the changes before exiting.


Build at91bootstrap.

After applying the boot-time optimizations, build at91bootstrap before setting up the build environment.

$ make ARCH=arm CROSS_COMPILE=<path_to>/<cross_compiler>
Warning

A working cross-toolchain for an Arm®-based MPU target is required to build at91bootstrap.

Warning

Ensure you set the CROSS_COMPILE=<path_to>/<cross_compiler> and ARCH=arm environment variables.

For example, if your cross-compiler executable is arm-linux-gcc then CROSS_COMPILE=<path_to>/arm-linux-

Alternatively, you can specify these as command-line variables. For example:

$ make ARCH=arm CROSS_COMPILE=<path_to>/<cross_compiler>

The resulting binary images will be found in the at91bootstrap/binaries directory. The at91bootstrap.bin image will be used in a later section.

Information

Note: In this training, you may either:

  1. Download and build the individual files as instructed, or
  2. Download the binary files necessary to flash an SD memory card.

Back to Top

Minimizing Linux Kernel Load and Startup Time

Minimize Boot Time by limiting subsystems loaded

The Linux kernel load and startup time can be reduced by configuring only the necessary peripherals and subsystems required by the MGS application. Therefore, from the SAM9X75 Curiosity default device tree, you will disable all the peripherals that are not used by the MGS application. You will also disable them from the kernel configuration. The fewer subsystems and drivers the Kernel must initialize, the faster it will boot. Finally, you will add support for the LCD.

Get linux-at91.

Download linux-at91 from the Microchip GitHub repository.

$ cd fastboot
$ git clone https://github.com/linux4sam/linux-at91.git
$ cd linux-at91
$ git checkout linux4microchip-2025.04

Open the device tree file and disable all unused peripherals.

To make changes to the device tree, open the at91-sam9x75_curiosity.dts file using a text editor of your choice or download the at91-sam9x75_curiosity.dts.

$ cd linux-at91/arch/arm/boot/dts/microchip
$ vi at91-sam9x75_curiosity.dts

You can now edit the *.dts file.

Add the following bold line:

{
    model = "Microchip SAM9X75 Curiosity";
    compatible = "microchip,sam9x75-curiosity", "microchip,sam9x7", "atmel,at91sam9";

. . .
. . .
chosen {
        stdout-path = "serial0:115200n8";
};

The loglevel is set to 0, indicating minimal kernel debug messages, only those with the highest priority.

Change the status from “okay” to disabled for the following peripherals: adc, can0, can1, classd, dbgu, flx4, flx5, flx6, i2s, macb0, pwm0, sdmmc1, qspi, usb0, usb1, usb2, isi.

Information

Note: Disable the drivers that are not required by the application. 

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * at91-sam9x75_curiosity.dts - Device Tree file for Microchip SAM9X75 Curiosity board
 *
 * Copyright (C) 2023 Microchip Technology Inc. and its subsidiaries
 *
 * Author: Varshini Rajendran <varshini.rajendran@microchip.com>
 */
/dts-v1/;
#include "sam9x7.dtsi"
#include <dt-bindings/input/input.h>

/ {
 model = "Microchip SAM9X75 Curiosity";
 compatible = "microchip,sam9x75-curiosity", "microchip,sam9x7", "atmel,at91sam9";

 aliases {
  i2c0 = &i2c6;
 };

 chosen {
 
  stdout-path = "serial0:115200n8";
 };

 gpio-keys {
  compatible = "gpio-keys";
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_key_gpio_default>;

  button-user {
   label = "USER";
   gpios = <&pioC 9 GPIO_ACTIVE_LOW>;
   linux,code = <KEY_0>;
   wakeup-source;
  };
 };

 leds {
  compatible = "gpio-leds";
  pinctrl-names = "default";
  led_red: led-red {
   pinctrl-0 = <&pinctrl_red_led_gpio_default>;
   label = "red";
   gpios = <&pioC 14 GPIO_ACTIVE_HIGH>;
   status = "okay";
  };

  led_green: led-green {
   pinctrl-0 = <&pinctrl_green_led_gpio_default>;
   label = "green";
   gpios = <&pioC 21 GPIO_ACTIVE_HIGH>;
   status = "okay";
  };

  led_blue: led-blue {
   pinctrl-0 = <&pinctrl_blue_led_gpio_default>;
   label = "blue";
   gpios = <&pioC 20 GPIO_ACTIVE_HIGH>;
   linux,default-trigger = "heartbeat";
   status = "okay";
  };
 };

 memory@20000000 {
  device_type = "memory";
  reg = <0x20000000 0x10000000>;
 };
};

&classd {
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_classd>;
 atmel,pwm-type = "diff";
 atmel,non-overlap-time = <10>;
 status = "disabled";
};

&adc {
 vddana-supply = <&vdd_3v3>;
 vref-supply = <&vdd_3v3>;
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_adc_default &pinctrl_adtrg_default>;
 status = "disabled";
};

&dbgu {
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_dbgu>;
 status = "okay";
};

&dma0 {
 status = "okay";
};

&ebi {
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_ebi_addr_nand &pinctrl_ebi_data_0_7>;
 status = "okay";

 nand_controller: nand-controller {
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_nand_oe_we &pinctrl_nand_cs &pinctrl_nand_rb>;
  status = "okay";

  nand@2 {
   reg = <0x2 0x0 0x800000>;
   rb-gpios = <&pioD 14 GPIO_ACTIVE_HIGH>;
   cs-gpios = <&pioD 4 GPIO_ACTIVE_HIGH>;
   nand-bus-width = <8>;
   nand-ecc-mode = "hw";
   nand-ecc-strength = <8>;
   nand-ecc-step-size = <512>;
   nand-on-flash-bbt;
   label = "atmel_nand";
  };
 };
};

&ehci0 {
 status = "okay";
};

&flx1 {
 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
 status = "okay";

 uart1: serial@200 {
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_flx1_usart_default>;
  status = "okay";
 };
};

&flx6 {
 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
 status = "okay";
};

&i2c6 {
 #address-cells = <1>;
 #size-cells = <0>;
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_flx6_twi_default>;
 i2c-analog-filter;
 i2c-digital-filter;
 i2c-digital-filter-width-ns = <35>;
 status = "okay";

 pmic@5b {
  compatible = "microchip,mcp16502";
  reg = <0x5b>;

  regulators {
   vdd_3v3: VDD_IO {
    regulator-name = "VDD_IO";
    regulator-min-microvolt = <3000000>;
    regulator-max-microvolt = <3600000>;
    regulator-initial-mode = <2>;
    regulator-allowed-modes = <2>, <4>;
    regulator-always-on;

    regulator-state-standby {
     regulator-on-in-suspend;
     regulator-mode = <4>;
    };

    regulator-state-mem {
     regulator-mode = <4>;
    };
   };

   vddioddr: VDD_DDR {
    regulator-name = "VDD_DDR";
    regulator-min-microvolt = <1283000>;
    regulator-max-microvolt = <1450000>;
    regulator-initial-mode = <2>;
    regulator-allowed-modes = <2>, <4>;
    regulator-always-on;

    regulator-state-standby {
     regulator-on-in-suspend;
     regulator-mode = <4>;
    };

    regulator-state-mem {
     regulator-on-in-suspend;
     regulator-mode = <4>;
    };
   };

   vddcore: VDD_CORE {
    regulator-name = "VDD_CORE";
    regulator-min-microvolt = <500000>;
    regulator-max-microvolt = <1210000>;
    regulator-initial-mode = <2>;
    regulator-allowed-modes = <2>, <4>;
    regulator-always-on;

    regulator-state-standby {
     regulator-on-in-suspend;
     regulator-mode = <4>;
    };

    regulator-state-mem {
     regulator-mode = <4>;
    };
   };

   vddcpu: VDD_OTHER {
    regulator-name = "VDD_OTHER";
    regulator-min-microvolt = <1700000>;
    regulator-max-microvolt = <3600000>;
    regulator-initial-mode = <2>;
    regulator-allowed-modes = <2>, <4>;
    regulator-ramp-delay = <3125>;
    regulator-always-on;

    regulator-state-standby {
     regulator-on-in-suspend;
     regulator-mode = <4>;
    };

    regulator-state-mem {
     regulator-mode = <4>;
    };
   };

   vldo1: LDO1 {
    regulator-name = "LDO1";
    regulator-min-microvolt = <1200000>;
    regulator-max-microvolt = <3700000>;
    regulator-always-on;

    regulator-state-standby {
     regulator-on-in-suspend;
    };
   };

   vldo2: LDO2 {
    regulator-name = "LDO2";
    regulator-min-microvolt = <1200000>;
    regulator-max-microvolt = <3700000>;

    regulator-state-standby {
     regulator-on-in-suspend;
    };
   };
  };
 };
};

&i2s {
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_i2s_default>;
 #sound-dai-cells = <0>;
 status = "disabled";
};

&main_xtal {
 clock-frequency = <24000000>;
};

&ohci0 {
 num-ports = <3>;
 atmel,vbus-gpio = <0
      &pioC 27 GPIO_ACTIVE_HIGH
      &pioC 31 GPIO_ACTIVE_HIGH>;
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_usb_default>;
 status = "okay";
};

&pinctrl {

 classd {
  pinctrl_classd: classd {
   atmel,pins =
    <AT91_PIOA 18 AT91_PERIPH_C AT91_PINCTRL_PULL_UP
     AT91_PIOA 19 AT91_PERIPH_C AT91_PINCTRL_PULL_DOWN>;
  };
 };

 adc {
  pinctrl_adc_default: adc-default {
   atmel,pins = <AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_NONE>;
  };

  pinctrl_adtrg_default: adtrg-default {
   atmel,pins = <AT91_PIOB 18 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;
  };
 };

 dbgu {
  pinctrl_dbgu: dbgu {
   atmel,pins = <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
          AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>;
  };
 };

 ebi {
  pinctrl_ebi_data_0_7: ebi-data-lsb-0 {
   atmel,pins =
    <AT91_PIOD 6 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
     AT91_PIOD 7 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
     AT91_PIOD 8 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
     AT91_PIOD 9 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
     AT91_PIOD 10 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
     AT91_PIOD 11 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
     AT91_PIOD 12 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
     AT91_PIOD 13 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)>;
  };

  pinctrl_ebi_addr_nand: ebi-addr-0 {
   atmel,pins =
    <AT91_PIOD 2 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
     AT91_PIOD 3 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)>;
  };
 };

 qspi {
  pinctrl_qspi: pinctrl-qspi {
   atmel,pins =
    <AT91_PIOB 19 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS
     AT91_PIOB 20 AT91_PERIPH_A AT91_PINCTRL_SLEWRATE_DIS
     AT91_PIOB 21 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_SLEWRATE_DIS)
     AT91_PIOB 22 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_SLEWRATE_DIS)
     AT91_PIOB 23 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_SLEWRATE_DIS)
     AT91_PIOB 24 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_SLEWRATE_DIS)>;
  };
 };

 flexcom {
  pinctrl_flx6_twi_default: flx6-twi-default {
   atmel,pins =
    <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
     AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
  };

  pinctrl_flx1_usart_default: flx1-usart-default {
   atmel,pins =
    <AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE
     AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE>;
  };
 };

 gpio-keys {
  pinctrl_key_gpio_default: key-gpio-default {
   atmel,pins = <AT91_PIOC 9 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
  };
 };

 i2s {
  pinctrl_i2s_default: i2s {
   atmel,pins =
    <AT91_PIOB 26 AT91_PERIPH_D AT91_PINCTRL_NONE  /* I2SCK */
     AT91_PIOB 15 AT91_PERIPH_D AT91_PINCTRL_NONE  /* I2SWS */
     AT91_PIOB 16 AT91_PERIPH_D AT91_PINCTRL_NONE  /* I2SDIN */
     AT91_PIOB 17 AT91_PERIPH_D AT91_PINCTRL_NONE  /* I2SDOUT */
     AT91_PIOB 25 AT91_PERIPH_D AT91_PINCTRL_NONE>;  /* I2SMCK */
  };
 };

 leds {
  pinctrl_red_led_gpio_default: red-led-gpio-default {
   atmel,pins = <AT91_PIOC 14 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
  };
  pinctrl_green_led_gpio_default: green-led-gpio-default {
   atmel,pins = <AT91_PIOC 21 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
  };
  pinctrl_blue_led_gpio_default: blue-led-gpio-default {
   atmel,pins = <AT91_PIOC 20 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
  };
 };

 nand {
  pinctrl_nand_oe_we: nand-oe-we-0 {
   atmel,pins =
    <AT91_PIOD 0 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)
     AT91_PIOD 1 AT91_PERIPH_A (AT91_PINCTRL_NONE | AT91_PINCTRL_SLEWRATE_DIS)>;
  };

  pinctrl_nand_rb: nand-rb-0 {
   atmel,pins =
    <AT91_PIOD 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
  };

  pinctrl_nand_cs: nand-cs-0 {
   atmel,pins =
    <AT91_PIOD 4 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
  };
 };

 ohci0 {
  pinctrl_usb_default: usb-default {
   atmel,pins = <AT91_PIOC 27 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
          AT91_PIOC 31 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
  };
 };

 sdmmc0 {
  pinctrl_sdmmc0_default: sdmmc0-default {
   atmel,pins =
    <AT91_PIOA 2 AT91_PERIPH_A (AT91_PINCTRL_DRIVE_STRENGTH_HI | AT91_PINCTRL_SLEWRATE_ENA)     /* PA2 CK  periph A with pullup */
     AT91_PIOA 1 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI | AT91_PINCTRL_SLEWRATE_ENA)  /* PA1 CMD periph A with pullup */
     AT91_PIOA 0 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI | AT91_PINCTRL_SLEWRATE_ENA)  /* PA0 DAT0 periph A */
     AT91_PIOA 3 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI | AT91_PINCTRL_SLEWRATE_ENA)  /* PA3 DAT1 periph A with pullup */
     AT91_PIOA 4 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI | AT91_PINCTRL_SLEWRATE_ENA)  /* PA4 DAT2 periph A with pullup */
     AT91_PIOA 5 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI | AT91_PINCTRL_SLEWRATE_ENA)>; /* PA5 DAT3 periph A with pullup */
  };
 };

 sdmmc1 {
  pinctrl_sdmmc1_default: sdmmc1-default {
   atmel,pins =
    <AT91_PIOA 11 AT91_PERIPH_B (AT91_PINCTRL_DRIVE_STRENGTH_HI | AT91_PINCTRL_SLEWRATE_ENA)
     AT91_PIOA 10 AT91_PERIPH_B (AT91_PINCTRL_DRIVE_STRENGTH_HI | AT91_PINCTRL_SLEWRATE_ENA)
     AT91_PIOA 9  AT91_PERIPH_B (AT91_PINCTRL_DRIVE_STRENGTH_HI | AT91_PINCTRL_SLEWRATE_ENA)
     AT91_PIOA 6  AT91_PERIPH_B (AT91_PINCTRL_DRIVE_STRENGTH_HI | AT91_PINCTRL_SLEWRATE_ENA)
     AT91_PIOA 7  AT91_PERIPH_B (AT91_PINCTRL_DRIVE_STRENGTH_HI | AT91_PINCTRL_SLEWRATE_ENA)
     AT91_PIOA 8  AT91_PERIPH_B (AT91_PINCTRL_DRIVE_STRENGTH_HI | AT91_PINCTRL_SLEWRATE_ENA)>;
  };
 };

 usb0 {
  pinctrl_usba_vbus: usba-vbus {
   atmel,pins = <AT91_PIOC 8 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
  };
 };
}; /* pinctrl */

&rtt {
 atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
};

&qspi {
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_qspi>;
 status = "disabled";

 flash@0 {
  #address-cells = <1>;
  #size-cells = <1>;
  compatible = "jedec,spi-nor";
  reg = <0>;
  spi-max-frequency = <100000000>;
  spi-tx-bus-width = <4>;
  spi-rx-bus-width = <4>;
  m25p,fast-read;

  at91bootstrap@0 {
   label = "qspi: at91bootstrap";
   reg = <0x0 0x40000>;
  };

  bootloader@40000 {
   label = "qspi: bootloader";
   reg = <0x40000 0xc0000>;
  };

  bootloaderenvred@100000 {
   label = "qspi: bootloader env redundant";
   reg = <0x100000 0x40000>;
  };

  bootloaderenv@140000 {
   label = "qspi: bootloader env";
   reg = <0x140000 0x40000>;
  };

  dtb@180000 {
   label = "qspi: device tree";
   reg = <0x180000 0x80000>;
  };

  kernel@200000 {
   label = "qspi: kernel";
   reg = <0x200000 0x600000>;
  };
 };
};

&sdmmc0 {
 bus-width = <4>;
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_sdmmc0_default>;
 cd-gpios = <&pioA 23 GPIO_ACTIVE_LOW>;
 disable-wp;
 status = "okay";
};

&sdmmc1 {
 bus-width = <4>;
 mmc-ddr-3_3v;
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_sdmmc1_default>;
 status = "disabled";
};

&slow_xtal {
 clock-frequency = <32768>;
};


&trng {
 status = "okay";
};

&usb0 {
 atmel,vbus-gpio = <&pioC 8 GPIO_ACTIVE_HIGH>;
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_usba_vbus>;
 status = "disabled";
};

&watchdog {
 status = "okay";
};

/* Refer LVDS display from devices tree overlay for below inserted nodes:  
https://github.com/linux4sam/dt-overlay-at91/blob/master/sam9x75_curiosity/sam9x75_curiosity_lvds_display.dtso
*/

&{/} {
        mic23150_reg: mic23150_regulator {
               compatible = "regulator-fixed";
               regulator-name = "panel-power-supply";
               regulator-min-microvolt = <3300000>;
               regulator-max-microvolt = <3300000>;
               gpio = <&pioC 30 GPIO_ACTIVE_HIGH>; /* LCD_MODULE_ENABLE */
               enable-active-high;
               status = "okay";
        };

 lvds_panel_bl: backlight {
  compatible = "pwm-backlight";
  pwms = <&pwm0 0 1000000 0>;
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_pwm>;
  brightness-levels = <0 32 64 128 256 512 1024>;
  default-brightness-level = <6>;
  status="okay";
 };

 panel {
  compatible = "microchip,ac69t88a", "simple-panel";
  backlight = <&lvds_panel_bl>;
  power-supply = <&mic23150_reg>;
  status="okay";
  #address-cells = <1>;
  #size-cells = <0>;

  port@0 {
   reg = <0>;
   panel_in: endpoint {
    remote-endpoint = <&lvds_out_panel>;
   };
  };
 };
};

&pwm0 {
 status = "okay";
};

&i2c6 {
 #address-cells = <1>;
 #size-cells = <0>;
 status = "okay";
 atmel_mxt_ts@4a {
  compatible = "atmel,atmel_mxt_ts";
  reg = <0x4a>;
  interrupt-parent = <&pioA>;
  interrupts = <20 0x8>; /* MXT_IRQ_PA20 */
  vdda-supply = <&mic23150_reg>;
  status = "okay";
 };
};

&hlcdc {
 clocks = <&pmc PMC_TYPE_PERIPHERAL 25>, <&pmc PMC_TYPE_CORE PMC_LVDSPLL>, <&clk32k 1>;
 clock-names = "periph_clk", "lvds_pll_clk", "slow_clk";
 status="okay";

 hlcdc-display-controller {
  port@0 {
   #address-cells = <1>;
   #size-cells = <0>;
   hlcdc_panel_output: endpoint@0 {
    reg = <0>;
    remote-endpoint = <&lvds_in_lcdc>;
   };
  };
 };

 hlcdc_pwm: hlcdc-pwm {
  status = "disabled";
 };
};

&lvds_controller {
 status = "okay";

 ports {
  #address-cells = <1>;
  #size-cells = <0>;
  port@0 {
   reg = <0>;
   lvds_in_lcdc: endpoint {
    remote-endpoint = <&hlcdc_panel_output>;
   };
  };

  port@1 {
   reg = <1>;
   lvds_out_panel: endpoint {
    remote-endpoint = <&panel_in>;
   };
  };
 };
};

&pinctrl {
 pwm {
  pinctrl_pwm: pwm_bl {
   atmel,pins = <AT91_PIOC 18 AT91_PERIPH_C AT91_PINCTRL_NONE>;
  };
 };
};

Save and exit the file.


Download the deconfig file for the Linux kernel. Copy the defconfig file to <linux>/arch/arm/boot/dts/microchip/.

Disable peripherals from the kernel configuration.

Add Low-Voltage Differential Signaling (LVDS) display configuration from the device tree overlay to Device Tree Source (DTS).

Make the following changes to the kernel configuration by running menuconfig.

$ cd ~/fastboot/linux-at91/
$ make menuconfig
Warning

Ensure you set the CROSS_COMPILE=<path_to>/<cross_compiler> and ARCH=arm environment variables; for example, if your cross-compiler executable is arm-linux-gcc then CROSS_COMPILE=<path_to>/arm-linux-.

A second method is to include these as command variables, for example, $ make ARCH=arm CROSS_COMPILE=<path_to>/<cross_compiler>.

Navigate to Networking Support and highlight Device Drivers ---> and press Enter.

Kernel Configuration Network Support

Navigate to each of the following unused peripherals and exclude them by pressing <N>.

  • Memory Technology Device (MTD) support
  • Block devices
  • SCSI device support
  • SPI support
  • PPS support
  • Hardware Monitoring support
  • Multimedia support
  • Sound card support
  • USB support
  • Staging drivers
  • Industrial I/O support

Kernel Configuration Device Drivers page 1

Kernel Configuration Device Drivers page 2

Kernel Configuration Device Drivers page 3

Navigate to Device Drivers ---> I2C Support and press Enter. Ensure I2C device interface is selected.

I2C Support

Navigate to I2C Hardware Bus Support -->  and press Enter. Ensure the ATMEL AT91 I2C Two-Wire interface (TWI) is enabled.

ATMEL AT91 I2C Two-Wire interface

Exit menuconfig by repeatedly typing "ESC-ESC" until it closes. Save the changes before exiting.

Warning

To achieve fast boot times, several kernel modules and peripheral supports have been disabled, including Memory Technology Device (MTD) support, block devices, SCSI device support, SPI support, PPS support, hardware monitoring support, multimedia support, sound card support, USB support, staging drivers, and industrial I/O support. Additionally, networking support has been de-selected.

Please be aware that while disabling these modules helps optimize boot speed, your application may require one or more of these features depending on its functionality and hardware requirements. Before finalizing your configuration, carefully review which modules and drivers your application needs and enable them as necessary.

Apart from the modules listed above, other configurations have also been disabled to further reduce boot time. Those mentioned here are among the most important and commonly required for customer applications.

Check the defconfig file for more information.


Build linux-at91.

Run the make command along with the ARCH and CROSS_COMPILE variables.

$ cd fastboot/linux-at91
$ make ARCH=arm CROSS_COMPILE=<path_to>/<cross_compiler>
Warning

A working cross-toolchain for an Arm-based MPU target is required to build linux-at91.

Warning

Ensure you set the CROSS_COMPILE=<path_to>/<cross_compiler> and ARCH=arm environment variables; for example, if your cross-compiler executable is arm-linux-gcc then CROSS_COMPILE=<path_to>/arm-linux-.

A second method is that you may include these as command variables, for example, $ make ARCH=arm CROSS_COMPILE=<path_to>/<cross_compiler>.

The resulting device tree image is linux-at91/arch/arm/boot/dts/at91-sam9x75_curiosity.dtb and the kernel image is linux-at91/arch/arm/boot/zImage.

Information

Note: In this training, you may either:

  1. Download and build the individual files as instructed, or
  2. Download the binary files necessary to Flash an SD memory card.

Back to Top

Minimize Application Startup Time

The Linux kernel loads an init script that loads other services and applications. To minimize boot time, you will replace the standard init script with a minimal script.

The minimal script performs the following:

  • Mount the /proc
  • Mounts /sysfs, which is needed to control the backlight brightness from within the application
  • Loads the final application, which is a basic automotive dashboard graphical display developed using the Microchip Graphic Suite (MGS)

All the images, logos, and resources are compiled directly into the application. Therefore, the resources are immediately available and mapped into the application’s address space.

Create a custom init script.

Create an init file and open it using a text editor of your choice.

$ cd ~/fastboot
$ vi init

Copy the following lines to run the MGS application.

#!/bin/sh

mount -t proc none /proc && mount -t sysfs none /sys
cd /root
devmem 0xF8038370 w 0x0
devmem 0xF803803C w 0x8
./mgs_quickstart > /dev/ttyS0 &
/sbin/getty -L console 0 vt100
Information

Note: Please use the corresponding script based on the application you wish to run.

If you want to launch the MGS application, use the MGS script provided.

These scripts are examples; you can adapt them to run any other application as needed after boot.

Save the file and exit.

Change the init script to executable.

$ cd ~/fastboot
$ chmod +x init

 

Back to Top

Preparing SD Memory Card Image

In this section, you will download a demonstration image from the GitHub repository for the purpose of using the Root File System on the image. You will flash the image to an SD memory card and delete the files in the BOOT partition. Finally, you will copy the at91bootstrap.bin, at91-sam9x75_curiosity.dtb, and zImage files that you created in the previous section.


Flash the demo image to the SD memory card.

Information

Note: Follow the step mentioned on the "Sam9x75 Curiosity" page to flash the image using balenaEtcher.


Insert the SD memory card into a Linux desktop computer.


Delete the files in the BOOT(FAT32) partition.

Information

Note: In this training, you may either:

  1. Download and build the individual files as instructed, or
  2. Download the binary files necessary to flash an SD memory card.

Write the binary files, which were created in the previous sections, to the BOOT partition of the SD memory card.

Copy the at91boostrap.bin file.

$ cd ~/fastboot/at91bootstrap/binaries
$ cp at91bootstrap.bin /media/<username>/<partition_name>/boot.bin

Copy the at91-sam9x75_curiosity.dtb and zImage files.

$ cd ~/fastboot/linux-at91/arch/arm/boot/dts/
$ cp at91-sam9x75_curiosity.dtb /media/<username>/<partition_name>/at91-sam9x75_curiosity.dtb
$ cd ~/fastboot/linux-at91/arch/arm/boot/
$ cp zImage /media/<username>/<partition_name>/zImage

Now you have an SD memory card with the bootloader image (boot.bin), Linux kernel device tree (at91-sam9x75_curiosity.dtb), and the kernel (zImage) in the BOOT partition. You also have the Root File System in the ROOTFS partition of the SD card.


Copy the init images to the RootFS partition of the SD card.

$ cd ~/fastboot
$ sudo cp –p init /media/<username>/ROOTFS/sbin/init

Memory Map of SD card

Remove the SD memory card from the Linux computer. You have now created a bootable Linux system image on the SD memory card.

Information

Note: There are no u-boot images on the SD memory card. Recall that you configured and built at91bootstrap to load the Linux kernel directly. This will reduce boot time.

Information

After the system has completed the boot process, you can run any application as required. This means that once all necessary services and configurations are initialized, the system is ready to execute user applications or custom programs.

Back to Top

Fast Boot From SD Memory Card

The SAM9X75 Curiosity can be powered by one of two methods:

  • J1: An external power jack to supply +5 VDC via a 2.1 mm center-positive plug
  • J2: Powered through the USB Micro-B connector USB port A

Insert the SD card into slot J14 on the SAM9X75 Curiosity target board.

Mass storage SD card



Press the RESET push button SW3 (nRST).

Fast boot demo MGS application

Success

Congratulations, you have reduced the boot time of an embedded Linux system with an MGS application up and running!

Back to Top

Summary

In this training, you changed the standard Linux boot process on the Microchip microprocessors to reduce the boot time.

  • You configured and built at91bootstrap to load the Linux kernel directly.
  • You removed all subsystems and kernel drivers that are not used by the final application.
  • You used a pre-built RootFS on the SD card and replaced the standard init script with a minimal script that just loads the proc, the sysfs and MGS application.
  • The final application is an MGS QuickStart graphical demo on a Microchip LVDS display.

The result is a fast boot of the MGS application in less than three seconds on cold reset.

Back to Top

Learn More

Back to Top