Linux Kernel - 6.12

Last modified by Microchip on 2025/12/02 11:52

Linux 6.12 for MPU source code

The Linux kernel for Microchip ARM-Based MPUs (aka AT91) is distributed as a GIT tree hosted on GitHub as a fork of the official Linus Torvalds' git tree. The objective of the Microchip Linux team is to integrate all the AT91-related material in the official Linux Kernel.
Before completing this inclusion process, which can take time, this website provides the Linux4SAM Linux Kernel git tree for AT91 devices at:

https://github.com/linux4microchip/linux/tree/linux-6.12-mchp

Tags

linux4microchip-2025.10 tag

Enhancements are added on top of the official v6.12 Linux kernel tag where most of the Microchip SoC features are already supported. Note as well that we re-integrate each and every stable kernel release on top of this Long Term Support (LTS) kernel revision. This means that each v6.12.x version is merged in our branch.

Here is a little summary of the main additional enhancements:

  • Integration of stable Long Term Support (LTS) kernel updates up to v6.12.48
  • Add initial support for SAMA7D65 Curiosity Pro board.
  • Add WPA3 support for WILC3000, unified WILC S02 device support, FW 16.5 WIFi / BLE driver.
  • Add support for DRM atomic operations.
  • Enhanced DRM/HLCDC, LVDS, and DSI controller support for SAMA7D65 and SAM9X7.
  • Fix UART and SPI FIFO size for SAMA5D2, SAMA7G5 and SAMA7D65.
  • Use  CLASSD conservative timings for SAMA5D2, SAM9x60 and SAM9x75.
  • Use GPIO to detect SD Card presence instead of polling for SAMA7D65 Curiosity.
  • Support for powering off the SD Card on SAMA7D6.
  • Add aliases for SDMMC in boards device trees.
  • Implement SDMMC tunning errata for SAMA5D2 and SAMA7D6
  • Add support for pin polarity for GPIOs used as ULP1 wake up sources.
  • Add support for SPI controller to use the optional GCLK as clock source.
  • Add I3C driver for SAMA7D65 and LSM6DSx sensor.
  • Improve ISC driver by exporting histogram statistics to users pace, add hue and saturation as v4l2 controls and improve Grey World AWB.
  • Implement USB device disconnect PHY workaround.
  • Add external REFCLK support in MACB for RMII / RGMII PHYs. Enable RMII support for SAMA7 GMAC.

linux4microchip-2025.04 tag

Enhancements are added on top of the official v6.12 Linux kernel tag where most of the Microchip SoC features are already supported. Note as well that we re-integrate each and every stable kernel release on top of this Long Term Support (LTS) kernel revision. This means that each v6.12.x version is merged in our branch.

Here is a little summary of the main additional enhancements:

  • Integration of stable Long Term Support (LTS) kernel updates up to v6.12.22
  • Improve support for SAMA7D65 Curiosity board.
  • Add initial support for SAMA7G54 SoM and SAM9x75 SoM
  • Add support for unified WILC S02 FW 3.1 and WILC 1000/3000 FW 16.4 WiFi / BLE driver.
  • Add initial support for GFX2D GPU
  • Add support for ASRC peripheral to peripheral for SAMA7G65
  • Enable WM8731 audio codec as a module.
  • Add shutdown controller support for SAM9X7 SoC.
  • Improve SoC driver with support for SAMA7D65.
  • Crypto: add fallback for unsupported ESP header length (not multiple of 4 words).
  • Clock: configure ACR register in all PLL settings. Update clock API usage for SAMA7G5 and SAMA7D65.
  • OP-TEE: Update SCMI for SAMA7G5 to include GCLK for PDMC0 and PDMC1.
  • QSPI: add support for SAMA7D65
  • Added support for PAC194X and PAC195X Current and Power Monitors
  • Added support for LAN9646 and updated support for LAN937X, KSZ9896, KSZ9477 gigabit Ethernet switches

Required packages

You must install essential host packages on your build host. These requirements are listed in the Linux kernel documentation with the chapter Install build requirements. You must follow this process which includes, but not limited to, the following packages:

  • build-essential
  • flex
  • bison
  • git
  • perl-base
  • libssl-dev
  • libncurses5-dev
  • libncursesw5-dev
  • ncurses-dev

Getting Kernel sources

To get the source code, you have to clone the repository:

$ git clone https://github.com/linux4microchip/linux.git
Cloning into 'linux'...
remote: Enumerating objects: 8587836, done.
remote: Total 8587836 (delta 0), reused 0 (delta 0), pack-reused 8587836
Receiving objects: 100% (8587836/8587836), 3.49 GiB | 13.44 MiB/s, done.
Resolving deltas: 100% (7117887/7117887), done.
Updating files: 100% (70687/70687), done.
$ cd linux

The source code has been taken from the master branch which is pointing on the latest branch we use.

Information

 Note that you can also add this Linux4SAM repository as a remote GIT repository to your usual Linux git tree. It will save you a lot of bandwidth and download time:

$ git remote add linux4microchip https://github.com/linux4microchip/linux.git
$ git remote update linux4microchip
Fetching linux4microchip
From https://github.com/linux4microchip/linux
* [new branch]                linux-6.6-mchp -> linux4microchip/linux-6.6-mchp
* [new branch]                linux-6.12-mchp -> linux4microchip/linux-6.12-mchp
* [new branch]                master     -> linux4microchip/master

If you want to use another branch, you can list them and use one of them by doing this:

$ git branch -r
  linux4microchip/linux-6.1-mchp
  linux4microchip/linux-6.1-mchp+fpga
  linux4microchip/linux-6.6-mchp
  linux4microchip/linux-6.6-mchp+fpga
  linux4microchip/linux-6.12-mchp
  linux4microchip/master
$ git checkout -b linux-6.12-mchp --track remotes/linux4microchip/linux-6.12-mchp
Branch linux-6.12-mchp set up to track remote branch linux-6.12-mchp from linux4microchip.
Switched to a new branch 'linux-6.12-mchp'

Setup ARM Cross Compiler

  • First step is to dowload the ARM GNU Toolchain:

    wget -c https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-linux-gnueabihf.tar.xz 
  • Next step is to add the ARM GNU Toolchain into your system:

    tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-linux-gnueabihf.tar.xz
    export CROSS_COMPILE=`pwd`/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-

    or

    tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-linux-gnueabihf.tar.xz
    export CROSS_COMPILE=arm-none-linux-gnueabihf-
    export PATH=$PATH:/YOUR/PATH/TO/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-linux-gnueabihf/bin/
    • Information

       If you already have an old ARM GNU Toolchain need to clean up the PATH with:

      export PATH=${PATH/':/YOUR/PATH/TO/arm-gnu-toolchain-VERSION-x86_64-arm-none-linux-gnueabihf/bin/'/}
          

    Configure and Build the Linux kernel

    Now you have to configure the Linux kernel according to your hardware. We have two default configuration at91 SoC in arch/arm/configs

    arch/arm/configs/at91_dt_defconfig
    arch/arm/configs/sama5_defconfig
    arch/arm/configs/sama7_defconfig
    • at91_dt_defconfig: for SAM9 (ARM926) series chips
    • sama5_defconfig: for SAMA5 series chips
    • sama7_defconfig: for SAMA7 series chips

     

You can modify default configuration using the menuconfig.

$ make ARCH=arm menuconfig

You can add or remove some features in the menuconfig dialog. Once done, use the arrows to navigate to <Exit> and press this button with the Enter key to exit from this screen.

Build the Linux kernel image, before you build you need set up the cross compile toolchain, check the "Set Up ARM Cross Compiler" section.

$ make ARCH=arm

[..]

  Kernel: arch/arm/boot/Image is ready
  Kernel: arch/arm/boot/zImage is ready

Now you have an usable compressed kernel image zImage.

If you need an uImage you can run this additional step:

make ARCH=arm uImage LOADADDR=0x20008000

[..]

Kernel: arch/arm/boot/Image is ready
Kernel: arch/arm/boot/zImage is ready
UIMAGE  arch/arm/boot/uImage
Image Name:   Linux-6.12.22-linux4microchip-20
Created:      Thu May 22 18:05:21 2025
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    5688984 Bytes = 5555.65 KiB = 5.43 MiB
Load Address: 20008000
Entry Point:  20008000
Kernel: arch/arm/boot/uImage is ready
make ARCH=arm dtbs

[..]

  DTC     arch/arm/boot/dts/microchip/at91-sama5d27_som1_ek.dtb
  DTC     arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1_ek.dtb
  DTC     arch/arm/boot/dts/microchip/at91-sama5d29_curiosity.dtb
  DTC     arch/arm/boot/dts/microchip/at91-sama5d2_icp.dtb
  DTC     arch/arm/boot/dts/microchip/at91-sama5d3_eds.dtb
  DTC     arch/arm/boot/dts/microchip/at91-sama7d65_curiosity.dtb
  DTC     arch/arm/boot/dts/microchip/at91-sama7g54_curiosity.dtb
  DTC     arch/arm/boot/dts/microchip/at91-sama7g5ek.dtb

[..]

If the building process is successful, the final images can be found under the arch/arm/boot/ directory.

Related Topics