Linux Kernel - 4.9


Linux 4.9 for AT91 source code

The Linux kernel for Microchip ARM-Based PMUs (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-4.9-at91

Tags

linux4sam_5.8 tag

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

Here is a little summary of the main additional enhancements:

  • Integration of stable kernel updates up to v4.9.87
  • Addition of the Peripheral Touch Controller (PTC) input driver with firmware and configuration files management
  • Addition of the new SAMA5D2 PTC EK board
  • Use of bounce buffer with SPI on ARM9 SoCs
  • fix SMC register offset for SAMA5D2
  • fix 10/100 Ethernet macb settings for SAMA5D3 by removing support for scatter-gather

linux4sam_5.7 tag

  • Integration of stable kernel updates up to v4.9.52
  • Support for low power Backup+Self-Refresh mode for SAMA5D2 and the SAMA5D2 Xplained board
  • SAMA5D2: most of the driver converted to support the Backup+Self-Refresh mode
  • Low power modes: use of kernel command line parameters to choose the Power Management scheme (ULP0, ULP1, Backup+Self-Refresh)
  • Addition of the new SAMA5D27 SOM1 EK board containing the SAMA5D27 SiP
  • SAMA5D4: addition of the G1 Video Decoder (Vdec) drivers
  • Kernel configuration: Use of the High resolution timers option by default
  • Kernel configuration: Use of the tick-less system configuration by default
  • Kernel configuration: Use of CONFIG_JUMP_LABEL for improving network performance
  • SAMA5D2: ADC add hardware trigger and buffer support
  • SAMA5D2: ISC: format configuration enhancement
  • Addition of another camera sensor: the ov7670
  • Addition of several peripherals in device tree: CAN, PWM for instance
  • fixes: SAMA5D4-compatible watchdog, SAMAD2 LCD drive strength on base signals, use of CPU I/O for SAM9 SPI controller, USB host vbus on SAMA5D2

linux4sam_5.6 tag

  • Integration of stable kernel updates up to v4.9.30
  • SAMA5D2: QSPI: enhancement with 4-bit addressing and Serial Flash Discoverable Parameters (SFDP) tables
  • SAMA5D2: CAN driver support for latest CAN_FD IP enhancements
  • SAMA5D2: Ultra Low Power mode ULP1 support
  • SAMA5D2: PWM driver
  • SAMA5D2: Audio PLL and ClassD audio amplifier drivers
  • SAMA5D2: I2S driver
  • pinctrl driver: add support for OUTPUT config
  • PWM: switch to atomic PWM
  • Hardware Crypto accelerators: SHA and AES: add support to hmac(shaX) and authenc(hmac(shaX), Y(aes)) modes
  • ISI and ISC with camera sensors are now all compatible with the V4L2 API
  • maXTouch driver: stabilize and integrate driver enhancements from atmel-maxtouch github repository
  • fixes: cpuIDLE, serial driver with DMA

Getting Kernel sources

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

$ git clone git://github.com/linux4sam/linux-at91.git
Cloning into 'linux-at91'...
remote: Counting objects: 4524288, done.
remote: Compressing objects: 100% (721/721), done.
remote: Total 4524288 (delta 385), reused 1 (delta 1), pack-reused 4523564
Receiving objects: 100% (4524288/4524288), 1.22 GiB | 1.35 MiB/s, done.
Resolving deltas: 100% (3777338/3777338), done.
Checking connectivity... done.
Checking out files: 100% (49565/49565), done.

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

Pointing 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 add linux4sam git://github.com/linux4sam/linux-at91.git
$ git remote update linux4sam
Fetching linux4sam
From git://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]                master     -> linux4sam/master

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

$ git branch -r
  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/master
$ git checkout origin/linux-4.9-at91 -b linux-4.9-at91
Branch linux-4.9-at91 set up to track remote branch linux-4.9-at91 from origin.
Switched to a new branch 'linux-4.9-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/at91_dt_defconfig
arch/arm/configs/sama5_defconfig

  • at91_dt_defconfig: for at91sam ARM926 series chips
  • sama5_defconfig: for SAMA5 series chips

Now we Configure and Build kernel for 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 default configuration using the menuconfig

$ make ARCH=arm menuconfig

And build the Linux kernel image, before you build you need 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 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/zImage is ready
  UIMAGE  arch/arm/boot/uImage
Image Name:   Linux-4.1.0-linux4sam_5.3+
Created:      Fri Sep  9 17:02:45 2016
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3441072 Bytes = 3360.42 kB = 3.28 MB
Load Address: 20008000
Entry Point:  20008000
  Image arch/arm/boot/uImage is ready

make ARCH=arm dtbs

[..]
  DTC     arch/arm/boot/dts/at91-kizbox2.dtb
  DTC     arch/arm/boot/dts/at91-sama5d2_ptc.dtb
  DTC     arch/arm/boot/dts/at91-sama5d27_som1_ek.dtb
  DTC     arch/arm/boot/dts/at91-sama5d27_som1_ek_pda4.dtb
  DTC     arch/arm/boot/dts/at91-sama5d27_som1_ek_pda7.dtb
  DTC     arch/arm/boot/dts/at91-sama5d27_som1_ek_pda7b.dtb
  DTC     arch/arm/boot/dts/at91-sama5d2_xplained.dtb
  DTC     arch/arm/boot/dts/at91-sama5d2_xplained_pda4.dtb
  DTC     arch/arm/boot/dts/at91-sama5d2_xplained_pda7.dtb
  DTC     arch/arm/boot/dts/at91-sama5d2_xplained_pda7b.dtb
  DTC     arch/arm/boot/dts/at91-sama5d3_xplained.dtb
  DTC     arch/arm/boot/dts/at91-sama5d3_xplained_pda4.dtb
  DTC     arch/arm/boot/dts/at91-sama5d3_xplained_pda7.dtb
  DTC     arch/arm/boot/dts/at91-sama5d3_xplained_pda7b.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-sama5d4_xplained_pda4.dtb
  DTC     arch/arm/boot/dts/at91-sama5d4_xplained_hdmi.dtb
  DTC     arch/arm/boot/dts/at91-sama5d4_xplained_pda7.dtb
  DTC     arch/arm/boot/dts/at91-sama5d4ek.dtb
  DTC     arch/arm/boot/dts/at91-sama5d4_xplained_pda7b.dtb
  DTC     arch/arm/boot/dts/at91-sama5d4ek_isi.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

linux-4.9-at91

Crypto Config: How to configure Crypto driver. (Sama5d29Curiosity, Sam9x75Curiosity, Sam9x60Curiosity, Sama5d2-icp, Sam9x60EK, Sama5d27WLSom1EK, Sama5d27Som1EK, Sama5d2PtcEK, Sama5d2Xplained, Sama5d4Xplained, Sama5d4ek, Sama5d3Xplained, Sama5d3xek)
USBGadget Config: Configure AT91 USB Gadget on Linux and Endpoint order management (composite USB). (Sama5d29Curiosity, Sam9x75Curiosity, Sam9x60Curiosity, Sama5d2-icp, Sam9x60EK, Sama5d27WLSom1EK, Sama5d27Som1EK, Sama5d2PtcEK, Sama5d2Xplained, Sama5d4Xplained, Sama5d4ek, Sama5d3Xplained, Sama5d3xek, AT91sam9x5-ek, other AT91SAM9 boards)
Pwm Faq: PWM Driver. (Sama5d29Curiosity, Sam9x75Curiosity, Sam9x60Curiosity, Sam9x60EK, Sama5d27WLSom1EK, Sama5d27Som1EK, Sama5d2PtcEK, Sama5d2Xplained, Sama5d4Xplained, Sama5d3Xplained, Sama5d3xek)
Using Atmel DRMDriver: Using Atmel KMS/DRM LCD driver. (Sama5d29Curiosity, Sam9x75Curiosity, Sam9x60Curiosity, Sam9x60EK, Sama5d27WLSom1EK, Sama5d27Som1EK, Sama5d2PtcEK, Sama5d2Xplained, Sama5d4Xplained, Sama5d4ek, Sama5d3Xplained, Sama5d3xek)
Using Max Touch: Introduction for how to use MaxTouch. (Sama5d29Curiosity, Sam9x75Curiosity, Sam9x60Curiosity)
Iio Adc Driver: Adc IIO driver introduction. (Sama5d4Xplained, Sama5d4ek, Sama5d3Xplained, Sama5d3xek, AT91sam9x5-ek, other AT91SAM9 boards)
Using PTC: How to use PTC. (Sama5d27WLSom1EK, Sama5d2PtcEK)
Using ISC: How to use the Image Sensor Controller. (Sama5d27WLSom1EK, Sama5d27Som1EK, Sama5d2Xplained)
Shutdown Wake Up: Use the Wakeup Feature of the Shutdown Controller.. (AT91sam9x5-ek)
PDMICAudio Record: Using the PDMIC to record audio stream. (Sama5d2Xplained)
Using Isi: How to use the Image Sensor Interface. (Sama5d4Xplained, Sama5d4ek, Sama5d3Xplained, Sama5d3xek)
r5 - 12 Oct 2018 - 11:01:20 - RazvanStefanescu
 
Linux & Open Source for AT91 Microchip Microprocessors

Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Microchip® and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries. This site is powered by the TWiki collaboration platform

Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.

Ideas, requests, contributions ? Connect to LinksToCommunities page.

Syndicate this siteRSS ATOM