Skip to content

Configure your mother board

This page gives an example where you are using a SOM supported by Welma but with a different mother board.

This example is based on a SOM sm2s-imx93 and only considers modification of the kernel device tree.

  • Copy Welma's machine conf to your layer:
cp meta-welma-sm2s-imx9/conf/machine/sm2s-imx93-mbep5.conf \
   meta-project/conf/machine/sm2s-imx93-custom.conf
  • Adjust KERNEL_DEVICETREE to build your own device tree overlay (specific to your mother board):

    KERNEL_DEVICETREE += "msc/imx93/overlay-custom.dtb"
    

  • Add this device tree overlay in the kernel recipe:

    meta-project/recipes-kernel/linux/linux-imx_%.bbappend
    FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
    SRC_URI += "file://0001-msc-sm2s-imx93-support-for-custom-board.patch"
    

... and add the patch in meta-project/recipes-kernel/linux/linux-imx/.

  • Modify U-Boot to select this overlay at startup:

    diff meta-project/recipes-bsp/u-boot/u-boot-imx/distro-bootcmd.env
    -fdt_overlay_opt=conf-overlay-baseboard-ep5.dtb
    +fdt_overlay_opt=conf-overlay-custom.dtb
    

  • Modify the local.conf template:

    diff meta-project/conf/templates/default/local.conf.sample
    -MACHINE ?= "sm2s-imx93-mbep5"
    +MACHINE ?= "sm2s-imx93-custom"