Linux Kernel - 4.19
Linux 4.19 for AT91 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-4.19-at91
Tag
linux4sam_6.2-icp tag
Enhancements are added on top of the official v4.19 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.19.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.19.78
- Added support for SAMA5D2-ICP board
- SAMA5D2 ICP drivers:
- MCP16502 PMIC driver
- KSZ 8563 ethernet switch driver
- USB 2534 hub generic driver
- LAN7850 driver with suspend / resume fix
- Driver for the WILC3000 and WILC1000 release 15.2 in place in the Linux4SAM kernel and ready to use
linux4sam_6.2 tag
Enhancements are added on top of the official v4.19 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.19.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.19.78
- Added support for SAMA5D27 WLSOM1 EK board
- Added support for SAM9X60 EK board
- SAM9X60 SoC drivers:
- PLL Fractional support
- PIT64 driver used for clock event
- PIO drive strength and slew rate support
- PWM support
- QSPI controller support
- NAND controller support
- ISI support
- ADC support
- Reworked USB gadget driver. Updated endpoint allocation scheme. Fixed driver when working in FIFO mode only
- I2S Multi Channel driver with support of up to 8 channels in TDM mode
- Power management: ULP0 PM and Idle
- Watchdog support
- TRNG support
- RTC support
- SAMA5D27 WLSOM1 drivers:
- Backup and self-refresh support for LPDDR2
- PTC support for QT1 Mutual/Self Capacitance and Q2 wings
linux4sam_6.1 tag
Enhancements are added on top of the official v4.19 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.19.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.19.56
- Redesign of the Image Sensor Controller (ISC) driver with new White balance enhanced features.
- Driver for the WILC3000 and WILC1000 release 15.2 in place in the Linux4SAM kernel and ready to use
- TWI hardware filters support that filter out possible glitches on the TWI wires for both SAMA5D4 Xplained and SAMA5D2 Xplained
- Add 9bit/Multidrop support in USART driver
- PIOBU pin controller driver
- MCP16502 PMIC driver
- ACT8945A: PM support (integrated in mainline)
- Ethernet: add runtime PM support (integrated in mainline)
- Ethernet: add backup and self-refresh support (integrated in mainline)
- Ethernet: use of NAPI GRO helpers to improve RX performance
- QSPI: move driver under the SPI-MEM interface. The controller can be used with NAND or NOR flashes.
- Support for Omnivision ov5640 now available for both SAMA5D2 Xplained and SAMA5D27 SOM1 EK
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: Enumerating objects: 5812545, done. remote: Total 5812545 (delta 0), reused 0 (delta 0), pack-reused 5812545 Receiving objects: 100% (5812545/5812545), 1.63 GiB | 4.89 MiB/s, done. Resolving deltas: 100% (4862825/4862825), done. Checking connectivity... done. Checking out files: 100% (56330/56330), done. $ cd linux-at91
The source code has been taken from the master branch which is pointing on the latest branch we use.
$ 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] linux-4.14-at91 -> linux4sam/linux-4.14-at91 * [new branch] linux-4.19-at91 -> linux4sam/linux-4.19-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/linux-4.14-at91 origin/linux-4.19-at91 origin/master $ git checkout origin/linux-4.19-at91 -b linux-4.19-at91 Branch linux-4.19-at91 set up to track remote branch linux-4.19-at91 from origin. Switched to a new branch 'linux-4.19-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
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.(This link points to a non-existent 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-nattis-2-natte-2.dtb DTC arch/arm/boot/dts/at91-sama5d27_som1_ek.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-tse850-3.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-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
- 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
- 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)
- Use the Wakeup Feature of the Shutdown Controller.
- How to use record audio stream with PDMIC