This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-TDA4VM: Custom kernel config and workflow

Part Number: SK-TDA4VM


Tool/software:

I'm trying to create a custom kernel in a repeatable, scriptable fashion that I can check into CM, and I am new to the TI toolchain and workflow.  I thought I had a workable solution but my kernel changes are not actually having any effect.  Below is my process.  Please let me know what I'm doing wrong.

1.  Forked https://git.ti.com/git/arago-project/oe-layersetup.git (commit ed9d4cc) and, created my own master branch, and set my new master branch as default.
2.  Created a Makefile in the repo root directory with the following contents:

MAKEFILE_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
A72_IPK_DIR := $(MAKEFILE_PATH)build/arago-tmp-default-glibc/deploy/ipk/aarch64/
R5_IPK_DIR := $(MAKEFILE_PATH)build/arago-tmp-default-baremetal-k3r5/deploy/ipk/

.PHONY: installable-packages-list

all::
     @./oe-layertool-setup.sh -f configs/processor-sdk-analytics/processor-sdk-analytics-10.01.00-config.txt; \
     echo 'ARAGO_BRAND = "edgeai"' >> build/conf/local.conf; \
     echo 'IMAGE_INSTALL:append = " vim"' >> build/conf/local.conf; \
     cd build; \
     source conf/setenv; \
     MACHINE="j721e-sk" bitbake -k tisdk-edgeai-image

I checked this into CM, cloned it back down, ran "make" and successfully created a loadable image that successfully booted.  This verified that I could at least create an image.  Is this the correct work flow?

Next, I wanted to enable building of all the IMX camera drivers as modules.  So, I created the following custom layer.

sources/meta-windhover
├── conf
│   └── layer.conf
├── COPYING.MIT
├── README
└── recipes-kernel
        └── linux
                ├── linux-ti-staging
                 │     └── camera-modules.cfg
                └── linux-ti-staging_%.bbappend

layer.conf:

# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "meta-windhover"
BBFILE_PATTERN_meta-windhover = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-windhover = "20"

LAYERDEPENDS_meta-windhover = "core meta-ti-bsp"
LAYERSERIES_COMPAT_meta-windhover = "scarthgap"

linux/linux-ti-staging_%.bbappend:

FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

SRC_URI += "file://camera-modules.cfg"

camera-modules.cfg:

CONFIG_VIDEO_IMX208=m
CONFIG_VIDEO_IMX214=m
CONFIG_VIDEO_IMX219=m
CONFIG_VIDEO_IMX258=m
CONFIG_VIDEO_IMX274=m
CONFIG_VIDEO_IMX290=m
CONFIG_VIDEO_IMX296=m
CONFIG_VIDEO_IMX319=m
CONFIG_VIDEO_IMX334=m
CONFIG_VIDEO_IMX335=m
CONFIG_VIDEO_IMX355=m
CONFIG_VIDEO_IMX390=m
CONFIG_VIDEO_IMX412=m
CONFIG_VIDEO_IMX415=m

Finally, I added the two lines to the "all" recipe in the Makefile:

MACHINE="j721e-sk" bitbake-layers add-layer ../sources/meta-windhover; \
MACHINE="j721e-sk" recipetool newappend ../sources/meta-windhover/ linux-ti-staging; \

First, please let me know if there is a better workflow.  I verified that "build/conf/bblayers.conf" contains my new layer.  When I run "make", it successfully creates an image that boots.  But when I run "zcat /proc/config.gz | grep CONFIG_VIDEO_IMX", I see that none of my changes have gone into effect.  What am I doing wrong?  

p.s. I apologize for the post formatting.  I tried using the "</> CODE " block but found that some of the text I had to put into the block caused the block to actually disappear from the post.  

  • Is my "linux-ti-staging_%.bbappend" file correct?  

  • Hi Mathew,

    The ti build process for config fragments is non-standard compared to Yocto's config fragment standard build process.

    It would be easier replace the defconfig entirely. You can create your own defconfig (with the config fragment additions), and place that within the correct directory. Below is the file structure:

    meta-jared
    ├── conf
    │   ├── distro
    │   │   └── jared.conf
    │   └── layer.conf
    └── recipes-kernel
        └── linux
            ├── linux-ti-staging-6.6
            │   └── k3
            │       └── defconfig
            └── linux-ti-staging_6.6.bbappend

    My linux-ti-staging_6.6.bbappend:

    FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-6.6:"
    
    SRC_URI:remove = "file://defconfig"
    SRC_URI:append = "file://defconfig;subdir=."

    Best,
    Jared

  • Thanks.  I'll try that when I can build again.  https://git.yoctoproject.org/meta-ti is returning 500 right now.  Waiting for it to come back up.

    I actually got my setup above to work, though I'm not entirely sure what fixed it yet.    Once that server comes back up, I'll isolate what actually fixed it.

  • Hi Mathew,

    Sounds good. Once the server comes back up, please let me know what you did to fix your setup.

    It would be good to know for future issues.

    Best,
    Jared