Linux Kernel - 5.10
Linux 5.10 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/linux4sam/linux-at91/tree/linux-5.10-at91
and now on:
https://github.com/linux4microchip/linux/tree/linux-5.10-mchp
Tags
Enhancements are added on top of the official v5.10 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 v5.10.x version is merged in our branch.
Here is a little summary of the main additional enhancements:
- Integration of stable kernel updates up to v5.10.80
- WILC: Update driver & firmware to 15.6. Addition of WPA3 security support
- WILC: New power sequencing driver
- Addition of the new SAMA5D29 SoC as part of the SAMA5D2 family
- I2C: bus recovery mechanism and digital filter for SAMA5D2 ICP and SAMA5D27 SOM1 EK boards
- Crypto: Import enhancements from Linux Mainline. They fix corner cases for few cipher modes for the crypto drivers: AES(ECB, CBC, CFB, OFB, CTR, XTS) and DES(OFB) modes
Enhancements are added on top of the official v5.10 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 v5.10.x version is merged in our branch.
Here is a little summary of the main additional enhancements:
- Integration of stable kernel updates up to v5.10.50
- Update WILC driver & firmware to 15.5
- SOC: added SAM9x60 SiPs
- ISC: rework and separate pipeline between old and new hardware revisions
- Crypto engines:
- fix corner cases for atmel-aes XTS, ECB, CBC, CFB OFB and CTR modes
- fix corner cases for atmel-tdes ECB, CBC, CFB and OFB modes
- SPI-NOR: OTP support, global unlock support for microchip's sst26vf064b and fixes for non-uniform erase
- QSPI: disable IP at suspend time
- NAND: updated ecc_stats.corrected counter
- SPI: fix CS and initialization bug, reduce spinlock usage, switch to transfer_one() method
- SDHCI: add GPIO card detect support to improve power management
- USB device controller (gadget) : remove endpoints from device tree
- I2C: fix bus recovery mechanism for SAMA5D4
- I2S: fix usage of capture and playback at the same time
- PWM: atmel-tcb-pwm: switched to new bindings, fixed sama5d2 support, added atomic support, removed atmel-tclib
- PIT64: add suspend/resume support
- RTC: add correction support for SAMA5D2 and SAMA5D4
- MCP16502: add ramp delay support and fixes
Getting Kernel sources
To get the source code, you have to clone the repository:
Cloning into 'linux-at91'...
remote: Enumerating objects: 8511469, done.
remote: Counting objects: 100% (269/269), done.
remote: Compressing objects: 100% (85/85), done.
remote: Total 8511469 (delta 196), reused 236 (delta 184), pack-reused 8511200
Receiving objects: 100% (8511469/8511469), 2.44 GiB | 16.48 MiB/s, done.
Resolving deltas: 100% (7162200/7162200), done.
Updating files: 100% (70674/70674), done.
$ cd linux-at91
The source code has been taken from the master branch which is pointing on the latest branch we use.
hand 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 update linux4sam
Fetching linux4sam
From https://github.com/linux4sam/linux-at91
* [new branch] linux-2.6.39-at91 -> linux4sam/linux-2.6.39-at91
* [new branch] linux-3.10-at91 -> linux4sam/linux-3.10-at91
* [new branch] linux-3.15-at91 -> linux4sam/linux-3.15-at91
* [new branch] linux-3.18-at91 -> linux4sam/linux-3.18-at91
* [new branch] linux-3.4.9-at91 -> linux4sam/linux-3.4.9-at91
* [new branch] linux-3.6.9-at91 -> linux4sam/linux-3.6.9-at91
* [new branch] linux-4.1-at91 -> linux4sam/linux-4.1-at91
* [new branch] linux-4.4-at91 -> linux4sam/linux-4.4-at91
* [new branch] linux-4.9-at91 -> linux4sam/linux-4.9-at91
* [new branch] linux-4.14-at91 -> linux4sam/linux-4.14-at91
* [new branch] linux-4.19-at91 -> linux4sam/linux-4.19-at91
* [new branch] linux-5.4-at91 -> linux4sam/linux-5.4-at91
* [new branch] linux-5.10-at91 -> linux4sam/linux-5.10-at91
* [new branch] master -> linux4sam/master
If you want to use another branch, you can list them and use one of them by doing this:
origin/HEAD -> origin/master
origin/linux-2.6.39-at91
origin/linux-3.10-at91
origin/linux-3.15-at91
origin/linux-3.18-at91
origin/linux-3.4.9-at91
origin/linux-3.6.9-at91
origin/linux-4.1-at91
origin/linux-4.4-at91
origin/linux-4.9-at91
origin/linux-4.14-at91
origin/linux-4.19-at91
origin/linux-5.4-at91
origin/linux-5.10-at91
origin/master
$ git checkout origin/linux-5.10-at91 -b linux-5.10-at91
Branch linux-5.10-at91 set up to track remote branch linux-5.10-at91 from origin.
Switched to a new branch 'linux-5.10-at91'
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/sama5_defconfig
- at91_dt_defconfig: for SAM9 (ARM926) series chips
- sama5_defconfig: for SAMA5 series chips
Now we Configure and Build kernel for board:
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 default configuration using the menuconfig
Now, in the menuconfig dialog, you can easily add or remove some features. Once done, Move to <Exit> with arrows and press this button hitting 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 this section.
[..]
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:
[..]
Kernel: arch/arm/boot/zImage is ready
UIMAGE arch/arm/boot/uImage
Image Name: Linux-5.10.50-linux4sam-2021.04
Created: Wed Aug 4 14:57:59 2021
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4891024 Bytes = 4776.39 KiB = 4.66 MiB
Load Address: 20008000
Entry Point: 20008000
Kernel: arch/arm/boot/uImage is ready
[..]
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
[..]
If the building process is successful, the final images can be found under arch/arm/boot/ directory.
Recent FAQ
- Using Max Touch
- Crypto hardware acceleration
- USB Gadget Configuration
- How to use Pulse Width Modulation driver
- How to use the Atmel KMS/DRM LCD driver
- Using I2SC (Inter-IC Sound Controller)
- Image Sensor Controller White balance features
- External Component on External Bus Interface
- Using ISI (Image Sensor Interface) in Linux4SAM 6.0 and later
- Sam 9 x 60 Ek Attaching Tm 5000 Display
- Addition to the other generic FAQ about LCD displays:
- Using the SAMA5D2-compatible Resistive Touchscreen
- Use of the AT91 ADC driver
- eMMC support for SAMA5D27 SOM1 EK board
- Using PTC (Peripheral Touch Controller)
- Using ISC (Image Sensor Controller)