$ 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. 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/masterIf 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'
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
$ 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 menuconfigAnd 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 readyNow 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.
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.
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.