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.

TI6638 kernel module in Arago project.



Hi all! I need tips for own kernel module development in Arago project. I have TI6638 evm and I am trying to enable SRIO interface. So far I can compile and see my own module but can not call /drivers/rapidio/ functions in my module because of unknown symbol error when modprobed. I have added rapidio in Kconfig at /arch/arm and enabled it with menuconfig and can see objects in /drivers/rapidio folder. The problem seems to be that I get kernel compiled with MACHINE=keystone-evm TOOLCHAIN_BRAND=linaro bitbake -c deploy -f linux-keystone but do not know how to get this kernel to the rootfs? Doing MACHINE=keystone-evm TOOLCHAIN_BRAND=linaro bitbake myimage will erase my compiled kernel replace it with old one. I think next step is that I have to do patches and defconfig changes e.g. but it sounds heavy because I just want to test driver and it is not final version. So if anyone has faced similar, I would be interested to hear solution :)

br,

jv

  • Hi JV,

    Please copy the updated defconfig files to yocto build system to build the file system.

    Example: If linux-keystone-3.10.bb used to build kernel then,

    Please copy your latest "defconfig" file to ../mcsdk/sources/meta-ti/recipes-kernel/linux/linux-keystone-3.10/ and rename as defconfig. 

    Please refer below thread for more information.

    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/329660.aspx

    Thanks.

  • Thank you for the answer!
    I made .bbappend file to add my changes to the kernel and it seems to be work, but now my modules in deploy folder gets -dirty string and also I got two different versions in rootfs; /lib/modules/3.10.10 and lib/modules/3.10.10-dirty. I do not need both of them and -dirty is 'right one' because it implements my changes. How can I resolve this -dirty issue so that I have /lib/modules/3.10.10 that implements my changes?


    br,

    jv

  • Hi,

    It seems to me that you have tried to boot the system with 2 different kernel images which are 3.10.10 and 3.10.10-dirty,

    You can have both the folders and it won't give any issues also,

    3.10.10-dirty

    3.10.10

    When you are booting the kernel image name which is "3.10.10" then modprobe command ll check the "3.10.10" for *.ko and When you are booting the kernel image name which is "3.10.10-dirty" then modprobe command ll check the "3.10.10-dirty" for *.ko

    I'm not a keystone guy,

    Typically when we build drivers as modules then you have to send those modules with versions to your rootfs folder by using the following command,

    make modules_install ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-  INSTALL_MOD_PATH<rootfs location>

    Ex:

    make modules_install ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-  INSTALL_MOD_PATH=/usr/locat/targetNFS

  • Yes, that is correct, with -dirty I can modprobe my module with right behaviour. Problem is that when kernel is compiled with .bappend file and defconfig, result is -dirty kernel. And bitbaking rootfs after that will override -dirty kernel and replacing it with older one.

    With my previous experience with yocto .bbappend files to the kernel has worked fine, so I'm little bit confused why my changes are not applicable. I just try to understand why it is -dirty and not normal version, .bbappend should work and make changes without -dirty?

    br,

    jv

  • Hi JV,

    1. Have you followed the steps provided on my previous post? Any update?

    2. Could you please share the modified bb file?

    Thanks.

  • Hi Rajasekaran!

    1. It's working now in some level, still get this -dirty version in modules at deploy folder, but kernel gets updated. I use linux<version>.bbappend and own defconfig files.

    2. I do not modiffy .bb file, I use prosedure #1.

    br,

    jv

  • Hi JV,

    Have you tried clean build?

    The yocto build should have downloaded the Linux source under yocto work directory for building. Please move that linux source directory and try building the linux recipe again.

    Thanks.

  • Hi!

    Clean build is too heavy in debugging, any solution to just get your kernel module changes get applicable in rootfs???

    What I have tried is compile and deploy my kernel and rootfs, then make changes to my module(just debug print), then compile again bitbake -c compile -f linux --> bitbake -c deploy -f linux and get kernel compiled and new version is in  /deploy/images folder. I have now three different version of modules, modules-3.10.10-keystone-evm.tgz(original),  modules-3.10.10-dirty-keystone-evm.tgz(implements my patches and defconfig) AND modules-3.10.10-0001- g520ba8d--keystone-evm.tgz(only added debug prints for module).

    Then in boot rootfs does not recognize /lib/modules/3.10.10-0001- g520ba8d ...

    Bitbaking rootfs overrides my changes and there is only 2 modules versions; modules-3.10.10-keystone-evm.tgz(original),  modules-3.10.10-dirty-keystone-evm.tgz(implements my patches and defconfig).

    I tried also to copy uImage to nfs boot folder but no effect.

    Is there a way to get kernel module changes to board easily, only updating kernel? It is heavy in development stage recompile rootfs or patching against clean build all the time! I have previously used other vendor's products and there Yocto development was much more easier...