Linux® Kernel - 6.1

Last modified by Microchip on 2025/11/04 13:33

Linux 6.1 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.1-mchp

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

Tags

linux4microchip-2023.10 tag

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

Here is a little summary of the main additional enhancements:

  • Integration of stable kernel updates up to v6.1.55
  • Add initial support for SAM9x75 Curiosity
  • Add initial support for SAMA5D29 Curiosity
  • Add SAM9x75 XLCD controller driver
  • Add Sitronix ST7262 panel support
  • Add AC69T88A LVDS Display Panel
  • Add SAM9x75  Quad Serial Peripheral Interface (QSPI) controller driver
  • Add SAM9x75 NAND controller driver
  • Display in kernel config in /proc/config.gz
  • Crypto: fallback for unsupported Encapsulating Security Payload (ESP) header, match Advanced Encryption Standard (AES) Cipher Block Chaining (CBC) block size with generic implementation
  • IIO: add support for MCP3564 - 2/4/8 channel 153.6 ksps low-noise 24 bit Delta-Sigma Analog-to-Digital Converter (ADC)
  • Add initial support for RNBD451 Bluetooth® Low Energy (BLE) Module
  • Add support for AT25FF321A 4MB Serial Peripheral Interface (SPI) flash memory
  • Add support for LAN8830, LAN8840, LAN8840, KSZ8091, KSZ9477, VSC8541 Ethernet Physical Layer (PHY)

linux4microchip-2023.04 tag

Enhancements are added on top of the official v6.1 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.1.x version is merged in our branch.

Here is a little summary of the main additional enhancements:

  • Integration of stable kernel updates up to v6.1.22
  • Runtime Power Management (PM) support for at_xdmac DMA driver
  • System suspend/resume for at_xdmac Direct Memory Access (DMA) driver
  • Fixes for at_xdmac DMA driver to avoid failure on DMA channels on system suspend/resume
  • Runtime PM support for Microchip Sony®/Philips® Digital Interface Format Receiver (SPDIFTX) driver
  • System suspend/resume support for Microchip SPDIFTX driver
  • Cleanups and improvements for Microchip SPDIFTX driver
  • Runtime PM support for Microchip Pulse Density Modulation Controller (PDMC) driver
  • System suspend/resume support for Microchip PDMC driver
  • Fix poc noises when starting capture for Microchip PDMC driver
  • Runtime PM support for Microchip SPDIFRX driver
  • System suspend/resume support for Microchip SPDIFRX driver
  • Fix controls for Microchip SPDIFRX driver to avoid concurrency on hardware resources
  • Cleanups and improvements for Microchip SPDIFRX driver
  • Removed atmel-sdramc driver and handled the clocks on the proper clock drivers
  • Fix the imbalanced reference counter on the Ethernet device that made Ultra Low-Power (ULP) modes fail
  • Runtime PM support on SPI driver
  • Delay timer support on Microchip PIT64B driver
  • Cleanups on pinctrl driver to avoid potential leaks and simplify code
  • Support for line bias flags that have been implemented in General Purpose Input/Output (GPIO) Application Programming Interface (API) for at91 pio4 pinctrl driver
  • Support for push-pull configuration in at91 pio4 pinctrl driver
  • Zero-length message digest support for hmac in atmel-sha driver
  • Detection of in-place operations with two sg lists in atmel-tdes and atmel-aes drivers
  • Match cfb block size with generic implementation in atmel-aes driver
  • Microchip Image Sensor Controller / Extended Image Sensor Controller (ISC/XISC) mainline compatible drivers
  • Enable PAC1934 support on SAMA7G5-EK, SAMA5D2-ICP, SAM9X60-EK boards
  • Fix PTP TX timestamp handling due to padding and improve PTP TX timestamp on Media Access Controller B (MACB) driver
  • Enable Precision Time Protocol (PTP) support on SAMA7G5
  • Enable SAMA7G54 Systems in Packages (SiPs)

Required packages

You must install essential host packages on your build host. These requirements are listed in the Linux kernel documentation in the chapter Install build requirements. You must follow this process, which includes, but is 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, pointing to 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 linux4icrochip
From https://github.com/linux4microchip/linux
 * [new branch]                linux-5.10-mchp -> linux4microchip/linux-5.10-mchp
 * [new branch]                linux-5.15-mchp -> linux4microchip/linux-5.15-mchp
 * [new branch]                linux-6.1-mchp -> linux4microchip/linux-6.1-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
  origin/HEAD -> origin/master
  origin/linux-5.10-mchp
  origin/linux-5.15-mchp
  origin/linux-6.1-mchp
  origin/master
$ git checkout origin/linux-6.1-mchp -b linux-6.1-mchp
Branch linux-6.1-mchp set up to track remote branch linux-6.1-mchp from origin.
Switched to a new branch 'linux-6.1-mchp'

Set Up ARM Cross Compiler

  • Ubuntu:
    In Ubuntu 22.04 LTS, you can install the ARM Cross Compiler by doing:
sudo apt-get install gcc-arm-linux-gnueabi
export CROSS_COMPILE=arm-linux-gnueabi-
   
  • Others:
    For others, you can download the ARM cross compiler and set up the environment by doing:
wget -c https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf.tar.xz
tar -xf gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf.tar.xz
export CROSS_COMPILE=`pwd`/gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-
   

Configure and Build the Linux kernel

Now you have to configure the Linux kernel according to your hardware. We have two default configurations for the 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

Now we configure and build a kernel for the board:

$ make ARCH=arm sama5_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#

At this step, you can modify the default configuration using the menuconfig

$ make ARCH=arm menuconfig

Now, in the menuconfig dialog, you can easily add or remove some features. Once done, move to <Exit> with the arrows and press this button, hitting the Enter key to exit from this screen.

Build the Linux kernel image. Before you build, you need to set up the cross-compile toolchain. Check this section.

$ make ARCH=arm

[..]

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

Now you have a usable compressed kernel image zImage.

If you need a uImage, you can run this additional step:

make ARCH=arm uImage LOADADDR=0x20008000

[..]

  Kernel: arch/arm/boot/zImage is ready
  UIMAGE  arch/arm/boot/uImage
Image Name:   Linux-6.1.22-linux4microchip-20
Created:      Wed May  4 21:18:58 2022
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    5069704 Bytes = 4950.88 KiB = 4.83 MiB
Load Address: 20008000
Entry Point:  20008000
  Kernel: arch/arm/boot/uImage is ready

make ARCH=arm dtbs

[..]

  DTC     arch/arm/boot/dts/at91-kizbox2-2.dtb
  DTC     arch/arm/boot/dts/at91-kizbox3-hs.dtb
  DTC     arch/arm/boot/dts/at91-nattis-2-natte-2.dtb
  DTC     arch/arm/boot/dts/at91-sama5d27_som1_ek.dtb
  DTC     arch/arm/boot/dts/at91-sama5d27_wlsom1_ek.dtb
  DTC     arch/arm/boot/dts/at91-sama5d2_icp.dtb
  DTC     arch/arm/boot/dts/at91-sama5d2_ptc_ek.dtb
  DTC     arch/arm/boot/dts/at91-sama5d2_xplained.dtb
  DTC     arch/arm/boot/dts/at91-sama5d3_xplained.dtb
  DTC     arch/arm/boot/dts/at91-dvk_som60.dtb
  DTC     arch/arm/boot/dts/at91-gatwick.dtb
  DTC     arch/arm/boot/dts/at91-tse850-3.dtb
  DTC     arch/arm/boot/dts/at91-wb50n.dtb
  DTC     arch/arm/boot/dts/sama5d31ek.dtb
  DTC     arch/arm/boot/dts/sama5d33ek.dtb
  DTC     arch/arm/boot/dts/sama5d34ek.dtb
  DTC     arch/arm/boot/dts/sama5d35ek.dtb
  DTC     arch/arm/boot/dts/sama5d36ek.dtb
  DTC     arch/arm/boot/dts/sama5d36ek_cmp.dtb
  DTC     arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dtb
  DTC     arch/arm/boot/dts/at91-sama5d4_xplained.dtb
  DTC     arch/arm/boot/dts/at91-sama5d4ek.dtb
  DTC     arch/arm/boot/dts/at91-vinco.dtb
  DTC     arch/arm/boot/dts/at91-sama7g5ek.dtb
  DTC     arch/arm/boot/dts/at91-sam9x60_curiosity.dtb

[..]

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

Related Topics