This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
resources:eval:user-guides:ad-fmcomms2-ebz:software:linux:zynq_2015r2 [11 Jan 2018 10:01] Alexandru Ardelean modify title to something more generic |
resources:eval:user-guides:ad-fmcomms2-ebz:software:linux:zynq_2015r2 [11 Jan 2018 10:17] Alexandru Ardelean create symlink to generic new linux-build zynq page |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Building the Zynq Linux kernel and devicetrees from source ====== | + | {{page>:resources:tools-software:linux-build:generic:zynq}} |
- | + | ||
- | ===== On the development host ===== | + | |
- | + | ||
- | <code> | + | |
- | git clone https://github.com/analogdevicesinc/linux.git | + | |
- | </code> | + | |
- | + | ||
- | or do a git pull in the existing repository. | + | |
- | + | ||
- | ==== Checkout the Release branch ==== | + | |
- | + | ||
- | <note tip> | + | |
- | If not otherwise required always use the latest release! | + | |
- | </note> | + | |
- | + | ||
- | ^ Release names and Branches ^ | + | |
- | | 2014_R2 | | + | |
- | | 2015_R2 | | + | |
- | | 2016_R1 | | + | |
- | | 2016_R2 | | + | |
- | | 2017_R1 | | + | |
- | + | ||
- | <code> | + | |
- | dave@hal9000:~/github-linux-build/linux$ git checkout origin/2015_R2 -b 2015_R2 | + | |
- | Branch 2015_R2 set up to track remote branch 2015_R2 from origin. | + | |
- | Switched to a new branch '2015_R2' | + | |
- | </code> | + | |
- | ==== Add arm-xilinx-linux-gnueabi-gcc to PATH ==== | + | |
- | + | ||
- | ^ Release names and Branches ^ Required Vivado/SDK versions ^ | + | |
- | | 2014_R2 | Vivado 2014.2 | | + | |
- | | 2015_R2 | Vivado 2015.2 | | + | |
- | | 2016_R1 | Vivado 2015.4.2 | | + | |
- | | 2016_R2 | Vivado 2016.2 | | + | |
- | | 2017_R1 | Vivado 2016.4 | | + | |
- | + | ||
- | Vivado 2015.2 SDK may be installed into a different directory | + | |
- | + | ||
- | <code> | + | |
- | dave@hal9000:~/github-linux-build/linux$ source /opt/Xilinx/SDK/2015.2/settings64.sh | + | |
- | </code> | + | |
- | ==== Setup cross compile environment variables ==== | + | |
- | <code> | + | |
- | dave@hal9000:~/github-linux-build/linux$ export ARCH=arm | + | |
- | + | ||
- | dave@hal9000:~/github-linux-build/linux$ export CROSS_COMPILE=arm-xilinx-linux-gnueabi- | + | |
- | </code> | + | |
- | ==== Configure the kernel ==== | + | |
- | <code> | + | |
- | dave@hal9000:~/github-linux-build/linux$ make zynq_xcomm_adv7511_defconfig | + | |
- | # | + | |
- | # configuration written to .config | + | |
- | # | + | |
- | dave@hal9000:~/github-linux-build/linux$ | + | |
- | </code> | + | |
- | ==== Build the kernel ==== | + | |
- | + | ||
- | <code> | + | |
- | dave@hal9000:~/github-linux-build/linux$ make -j5 UIMAGE_LOADADDR=0x8000 uImage | + | |
- | scripts/kconfig/conf --silentoldconfig Kconfig | + | |
- | CHK include/config/kernel.release | + | |
- | CHK include/generated/uapi/linux/version.h | + | |
- | UPD include/config/kernel.release | + | |
- | CHK include/generated/utsrelease.h | + | |
- | + | ||
- | [ -- snip --] | + | |
- | + | ||
- | AS arch/arm/boot/compressed/bswapsdi2.o | + | |
- | AS arch/arm/boot/compressed/piggy.gzip.o | + | |
- | LD arch/arm/boot/compressed/vmlinux | + | |
- | OBJCOPY arch/arm/boot/zImage | + | |
- | Kernel: arch/arm/boot/zImage is ready | + | |
- | UIMAGE arch/arm/boot/uImage | + | |
- | Image Name: Linux-3.17.0-126697-g611e217-dir | + | |
- | Created: Fri Nov 28 10:20:40 2014 | + | |
- | Image Type: ARM Linux Kernel Image (uncompressed) | + | |
- | Data Size: 3195872 Bytes = 3120.97 kB = 3.05 MB | + | |
- | Load Address: 00008000 | + | |
- | Entry Point: 00008000 | + | |
- | dave@hal9000:~/github-linux-build/linux$ | + | |
- | </code> | + | |
- | ==== Build the devicetree FCMOMMS2/3/4/5 ==== | + | |
- | + | ||
- | === Build the one that fits your FPGA carrier and FMC card === | + | |
- | + | ||
- | | zynq-zc702-adv7511-ad9361-fmcomms2-3.dts | [[xilinx>ZC702]], the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms2-ebz|AD-FMCOMMS2-EBZ]] or [[/resources/eval/user-guides/ad-fmcomms3-ebz|AD-FMCOMMS3-EBZ]] board | | + | |
- | | zynq-zc702-adv7511-ad9361-fmcomms5.dts | [[xilinx>ZC702]], the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms5-ebz|AD-FMCOMMS5-EBZ]] | | + | |
- | | zynq-zc702-adv7511-ad9364-fmcomms4.dts | [[xilinx>ZC702]], the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms4-ebz|AD-FMCOMMS4-EBZ]] board | | + | |
- | | zynq-zc706-adv7511-ad9361-fmcomms2-3.dts | [[xilinx>ZC706]], the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms2-ebz|AD-FMCOMMS2-EBZ]] or [[/resources/eval/user-guides/ad-fmcomms3-ebz|AD-FMCOMMS3-EBZ]] board | | + | |
- | | zynq-zc706-adv7511-ad9361-fmcomms2-3-pr.dts | [[xilinx>ZC706]], the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms2-ebz|AD-FMCOMMS2-EBZ]] or [[/resources/eval/user-guides/ad-fmcomms3-ebz|AD-FMCOMMS3-EBZ]] board | | + | |
- | | zynq-zc706-adv7511-ad9361-fmcomms5.dts | [[xilinx>ZC706]], the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms5-ebz|AD-FMCOMMS5-EBZ]] board | | + | |
- | | zynq-zc706-adv7511-ad9364-fmcomms4.dts | [[xilinx>ZC706]], the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms4-ebz|AD-FMCOMMS4-EBZ]] board | | + | |
- | | zynq-zc706-adv7511-ad9434-fmc-500ebz.dts | [[xilinx>ZC706]], the on-board [[adi>ADV7511]] and the [[/resources/fpga/xilinx/fmc/ad9434?s[]=ad9434&s[]=fmc&s[]=500ebz|AD9434-FMC-500EBZ]] board | | + | |
- | | zynq-zed-adv7511-ad9361-fmcomms2-3.dts | [[http://zedboard.org/product/zedboard|Zed Board]], the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms2-ebz|AD-FMCOMMS2-EBZ]] or [[/resources/eval/user-guides/ad-fmcomms3-ebz|AD-FMCOMMS3-EBZ]] board | | + | |
- | | zynq-zed-adv7511-ad9364-fmcomms4.dts | [[http://zedboard.org/product/zedboard|Zed Board]], the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms4-ebz|AD-FMCOMMS4-EBZ]] board | | + | |
- | | zynq-zed-adv7511-ad9467-fmc-250ebz.dts | [[http://zedboard.org/product/zedboard|Zed Board]], the on-board [[adi>ADV7511]] and the [[/resources/eval/ad9467-fmc-250ebz|AD9467-FMC-250EBZ]] board | | + | |
- | | zynq-mini-itx-adv7511-ad9361-fmcomms2-3.dts | [[http://zedboard.org/product/mini-itx|Mini-ITX]], the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms2-ebz|AD-FMCOMMS2-EBZ]] or [[/resources/eval/user-guides/ad-fmcomms3-ebz|AD-FMCOMMS3-EBZ]] board | | + | |
- | | zynq-mini-itx-adv7511-ad9361-fmcomms2-3-pr.dts | [[http://zedboard.org/product/mini-itx|Mini-ITX]], the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms2-ebz|AD-FMCOMMS2-EBZ]] or [[/resources/eval/user-guides/ad-fmcomms3-ebz|AD-FMCOMMS3-EBZ]] board | | + | |
- | | zynq-mini-itx-adv7511-ad9364-fmcomms4.dts | [[http://zedboard.org/product/mini-itx|Mini-ITX]], the on-board [[adi>ADV7511]] and the [[/resources/eval/user-guides/ad-fmcomms4-ebz|AD-FMCOMMS4-EBZ]] board | | + | |
- | + | ||
- | + | ||
- | + | ||
- | <code> | + | |
- | dave@hal9000:~/github-linux-build/linux$ make zynq-zc702-adv7511-ad9361.dtb | + | |
- | DTC arch/arm/boot/dts/zynq-zc702-adv7511-ad9361.dtb | + | |
- | dave@hal9000:~/github-linux-build/linux$ | + | |
- | </code> | + | |
- | + | ||
- | ==== Copy the generated files to your SD Card ==== | + | |
- | + | ||
- | <code> | + | |
- | dave@hal9000:~/github-linux-build/linux$ cp arch/arm/boot/uImage /media/BOOT/uImage | + | |
- | dave@hal9000:~/github-linux-build/linux$ cp arch/arm/boot/dts/zynq-zc702-adv7511-ad9361.dtb /media/BOOT/devicetree.dtb | + | |
- | </code> | + | |
- | + | ||
- | ===== On the target platform ===== | + | |
- | + | ||
- | ==== Modifying devicetrees ==== | + | |
- | + | ||
- | 1. Make sure the boot partition is mounted. On new images, this can be done by right-clicking the boot icon on the desktop and selecting the "Mount Volume" option. The partition will then be mounted at /media/analog/boot. | + | |
- | + | ||
- | 2. Convert the compiled devicetree related to the target back into an editable format. | + | |
- | + | ||
- | <code> | + | |
- | dave@hal9000:/media/analog/boot/zynq-zc702-adv7511$ dtc -I dtb -O dts -o devicetree.dts devicetree.dtb | + | |
- | </code> | + | |
- | + | ||
- | 3. Modify the devicetree.dts file as required. | + | |
- | + | ||
- | 4. Recompile the devicetree file. Note that this will overwrite the original dtb file, copy or rename the original file if you want to keep it before running this step. | + | |
- | + | ||
- | <code> | + | |
- | dave@hal9000:/media/analog/boot/zynq-zc702-adv7511$ dtc -I dts -O dtb -o devicetree.dtb devicetree.dts | + | |
- | </code> | + |