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.

How to reconfigure and rebuild Linux kernel in Arago project?

Hi,

    Could you please give me some jump start for reconfgiure and rebuild kernel in your Arago project? I found some information on the forum. But, they are not really up to date. If it's possible, please also show me some tips about using "bitbake" command. 

Thank you,

M Ho

  • Hello M Ho,

    You can reconfigure and build the kernel trough this command sequence:

    MACHINE=am335x-evm bitbake linux-processor-sdk -c cleanall
    MACHINE=am335x-evm bitbake linux-processor-sdk -c menuconfig
    MACHINE=am335x-evm bitbake linux-processor-sdk

    You can find a getting started with OE training here.
    You can access the bitbake users manual over this link.
    You can refer to a bitbake cheat sheet for a quick start here, here and here.

    Best regards,
    Kemal

  • Hi Kemal,

         Thank you for the links.

    M Ho

  • Hi Kemal,
    I tried to change some configuration and run the command "MACHINE=am335x-evm bitbake linux-processor-sdk". I got the following message. I tried to run "MACHINE=am335x-evm bitbake linux-processor-sdk -c cleanall" and "-c clean". Also, "MACHINE=am335x-evm bitbake tisdk-rootfs-image -c clean". None of these help.
    What is the right way to "clean" and rebuild without restart the whole thing?

    -------------------------------------
    ERROR: linux-processor-sdk-4.4.12+gitAUTOINC+3639bea54a-r22d do_populate_sysroot: The recipe linux-processor-sdk is trying to install files into a shared area when those files already exist. Those files and their manifest location are:
    /home/minching/tmp/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm/sysroot-providers/virtual_kernel
    /home/minching/tmp/tisdk/build/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm/sysroot-providers/linux-processor-sdk
    Please verify which recipe should provide the above files.
    The build has stopped as continuing in this scenario WILL break things, if not now, possibly in the future (we've seen builds fail several months later). If the system knew how to recover from this automatically it would however there are several different scenarios which can result in this and we don't know which one this is. It may be you have switched providers of something like virtual/kernel (e.g. from linux-yocto to linux-yocto-dev), in that case you need to execute the clean task for both recipes and it will resolve this error. It may be you changed DISTRO_FEATURES from systemd to udev or vice versa. Cleaning those recipes should again resolve this error however switching DISTRO_FEATURES on an existing build directory is not supported, you should really clean out tmp and rebuild (reusing sstate should be safe). It could be the overlapping files detected are harmless in which case adding them to SSTATE_DUPWHITELIST may be the correct solution. It could also be your build is including two different conflicting versions of things (e.g. bluez 4 and bluez 5 and the correct solution for that would be to resolve the conflict. If in doubt, please ask on the mailing list, sharing the error and filelist above.
    ERROR: linux-processor-sdk-4.4.12+gitAUTOINC+3639bea54a-r22d do_populate_sysroot: If the above message is too much, the simpler version is you're advised to wipe out tmp and rebuild (reusing sstate is fine). That will likely fix things in most (but not all) cases.
    ERROR: linux-processor-sdk-4.4.12+gitAUTOINC+3639bea54a-r22d do_populate_sysroot: Function failed: sstate_task_postfunc
    ERROR: Logfile of failure stored in: /home/minching/tmp/tisdk/build/arago-tmp-external-linaro-toolchain/work/am335x_evm-linux-gnueabi/linux-processor-sdk/4.4.12+gitAUTOINC+3639bea54a-r22d/temp/log.do_populate_sysroot.9799
    ERROR: Task 52 (/home/minching/tmp/tisdk/sources/meta-processor-sdk/recipes-kernel/linux/linux-processor-sdk_4.4.bb, do_populate_sysroot) failed with exit code '1'

    Second Keyboard Interrupt, stopping...

    --------------------

    Thank you,
    M Ho
  • I found if it worked after I removed "arago-tmp-external-linaro-toolchain". My problem is solved. 

    M Ho

  • Hi Kemal,
    After I went through some more bitbake tips, I tried to do fragment configuration for the kernel. (by add more file into meta-custom layer) I have use diffconfig to generate the fragment.cfg and put it into meta-custom/receipes-kernel/linux/linux-processor-sdk/. The bitbake command can find my the cfg file and install it to "build/arago-tmp-external-linaro-toolchain/work/am335x_evm-linux-gnueabi/linux-processor-sdk/4.4.12+gitAUTOINC+3639bea54a-r22d-custom1/rtl8188.cfg'. But, it didn't apply the change into the final .config file. Based on your experience, what did I missed?

    Here are some more info:
    my bbappend:
    ---------------------------
    FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

    SRC_URI += "file://0001-Create-dummy-patch-for-oe-training.patch \
    file://rtl8188.cfg \
    "

    MACHINE_KERNEL_PR_append = "-custom1"

    ---------------------------

    my rtl8188.cfg
    ----------------------------
    CONFIG_RTL8192CU=m
    CONFIG_RTLWIFI=m
    CONFIG_RTLWIFI_USB=m
    CONFIG_RTLWIFI_DEBUG=y
    CONFIG_RTL8192C_COMMON=m
    ----------------------------


    I also tried to use defconfig method. It does work. But, I would like to use fragment configuration method.

    Any suggestion?

    M Ho
  • Hi M Ho,

    Check this link, here in this post I've applied patch within the OE.

    Best regards,
    Kemal