This is an old revision of the document!
We provide a script that does automates the build for SoC-FPGA using the Linaro toolchain.
The script takes up to 3 parameters, but if left blank, it uses defaults:
The script will:
wget https://raw.githubusercontent.com/analogdevicesinc/wiki-scripts/master/linux/build_socfpga_kernel_image.sh && chmod +x build_socfpga_kernel_image.sh && ./build_socfpga_kernel_image.sh
Release names and Branches |
---|
altera_4.0 |
altera_4.4 |
altera_4.6 |
altera_4.9 |
altera_4.14 |
dave@hal9000:~/github-linux-build/linux$ git checkout origin/altera_4.14 -b altera_4.14 Branch altera_4.14 set up to track remote branch altera_4.14 from origin. Switched to a new branch '2015_R2'
There are a few toolchains that can be used.
Other toolchains/compilers for ARM may work as well, but the ones described here have been tested and found to work.
Alternatively, the Linaro toolchain/compiler can be used to compile to kernel. Linaro compilers (that work with Intel SoC-FPGA) can be downloaded from: https://releases.linaro.org/components/toolchain/binaries/latest-5/arm-linux-gnueabi/
Example:
wget https://releases.linaro.org/components/toolchain/binaries/latest-5/arm-linux-gnueabi/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabi.tar.xz tar -xvf gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabi.tar.xz
export ARCH=arm export CROSS_COMPILE=$(pwd)/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-
dave@hal9000:~/github-linux-build/linux$ make socfpga_adi_defconfig # # configuration written to .config # dave@hal9000:~/github-linux-build/linux$
dave@hal9000:~/github-linux-build/linux$ make -j5 zImage 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$
device tree | board | chip |
---|---|---|
socfpga_arria10_socdk_ad9136_fmc_ebz.dts | eval-ad9135 EVAL-AD9136 | AD9136 |
socfpga_arria10_socdk_ad9172_fmc.dts | eval-ad9135 EVAL-AD9136 | AD9171, AD9172, AD9173, AD9174, AD9175 and AD9176 |
socfpga_arria10_socdk_adin1300_dual-mii.dts | TBA | ADIN1300 |
socfpga_arria10_socdk_adin1300_dual-rgmii.dts | TBA | ADIN1300 |
socfpga_arria10_socdk_adrv9008-1.dts | ADRV9008-1W/PCBZ | ADRV9008-1 |
socfpga_arria10_socdk_adrv9008-2.dts | ADRV9008-2W/PCBZ | ADRV9008-2 |
socfpga_arria10_socdk_adrv9009.dts | ADRV9009-W/PCBZ | ADRV9009 |
socfpga_arria10_socdk_adrv9371.dts | ADRV9371 board | AD9371 |
dave@hal9000:~/github-linux-build/linux$ make socfpga_arria10_socdk_adin1300_dual-mii.dtb DTC arch/arm/boot/dts/socfpga_arria10_socdk_adin1300_dual-mii.dtb dave@hal9000:~/github-linux-build/linux$
dave@hal9000:~/github-linux-build/linux$ cp arch/arm/boot/zImage /media/BOOT/zImage dave@hal9000:~/github-linux-build/linux$ cp arch/arm/boot/dts/socfpga_arria10_socdk_adin1300_dual-mii.dtb /media/BOOT/socfpga_arria10_socdk_sdmmc.dtb