Review the Linux Kernel recipe - ArrowElectronics/arrow-soc-workshops GitHub Wiki

This recipe's function is to move the Linux devicetree source (dts) file from the custom meta layer to the ${WORKDIR}. Yocto will create a machine readable devicetree blob (dtb) version. It will then be combined with the SD card image as described in the previous section. Recall that the devicetree was defined in the my-custom-soc-board.conf MACHINE configuration file with the KERNEL_DEVICETREE variable.

The recipe will also specify Linux Kernel configuration fragments to customize the Kernel build configuration.

Open the recipe socfpga_yocto_workshop/poky/meta-my-custom-soc-board/recipes-kernel/linux/linux-altera-ltsi_4.14%.bbappend in the default editor, gedit. A .bbappend file will append its text to that of the .bb file with the same base filename

The following line extends the bitbake search path to the poky/meta-my-custom-soc-board/recipes-kernel/linux/config sub directory.

FILESEXTRAPATHS_prepend := "${THISDIR}/config:"

The SRC_URI_append statement below only applies to the my-custom-soc-board MACHINE for the listed files. .cfg files are automatically identified as Linux Kernel defconfig fragment files. The contents of each listed .cfg file is appended to the Linux Kernel defconfig file which in turn defines which modules (drivers) are included with the build.

SRC_URI_append_my-custom-soc-board +=     " \

file://socfpga_cyclone5_my_custom_soc_board.dts
file://socfpga-4.14-ltsi/cfg/altvipfb.cfg
file://socfpga-4.14-ltsi/cfg/block.cfg
file://socfpga-4.14-ltsi/cfg/cma.cfg
file://socfpga-4.14-ltsi/cfg/configfs.cfg
file://socfpga-4.14-ltsi/cfg/gpio-keys.cfg
file://socfpga-4.14-ltsi/cfg/led-triggers.cfg
file://socfpga-4.14-ltsi/cfg/usb-gadget.cfg \

The following line of code copies the Linux devicetree dts file to the dts source folder.

cp ${TOPDIR}/../meta-my-custom-soc-board/recipes-kernel/linux/config/devicetree/socfpga_cyclone5_my_custom_soc_board.dts ${S}/arch/${ARCH}/boot/dts

Review the Linux Kernel Development Manual for a more in depth understanding of Linux Kernel recipes.

Copy the Linux devicetree files

DE10-nano

    $ cd ~/socfpga-workshop/socfpga_yocto_workshop/poky/meta-my-custom-soc-board/recipes-kernel/linux/config/devicetree

    $ cp socfpga_cyclone5_de10nano.dts socfpga_cyclone5_my_custom_soc_board.dts

    $ cp socfpga_cyclone5_de10nano.dtsi my_custom_soc_board_fpga.dtsi

DataStorm DAQ

    $ cd ~/socfpga-workshop/socfpga_yocto_workshop/poky/meta-my-custom-soc-board/recipes-kernel/linux/config/devicetree

    $ cp socfpga_cyclone5_datastormdaq.dts socfpga_cyclone5_my_custom_soc_board.dts

    $ cp socfpga_cyclone5_datastormdaq.dtsi my_custom_soc_board_fpga.dtsi

SoCKit

    $ cd ~/socfpga-workshop/socfpga_yocto_workshop/poky/meta-my-custom-soc-board/recipes-kernel/linux/config/devicetree

    $ cp socfpga_cyclone5_sockit.dts socfpga_cyclone5_my_custom_soc_board.dts

    $ cp socfpga_cyclone5_sockit.dtsi my_custom_soc_board_fpga.dtsi



Next - Create Linux Root File System image configuration

Return to - Create u boot for the custom board

⚠️ **GitHub.com Fallback** ⚠️