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.

AM62P: Questions regarding Bazel and kernel builds

Part Number: AM62P

Tool/software:

Hi AM62P Android Champ !

I have some questions about tools/bazel run //common:ti_config -- menuconfig in the kernel.

We use the Bazel system for building and changing menuconfig.

My questions are as follows:

  1. The touch IC our customer uses is Goodix.

  2. How can I create a Goodix KO (kernel object) file using Bazel?

  3. When I add an xx.ko file to _TI_MODULE_OUTS = [ ] in $YOUR_PATH/ti-kernel-aosp/BUILD.bazel and then build the kernel using tools/bazel run //common:ti_dist -- --dist_dir=/home/willyhong/ti_am62p/aosp15/device/ti/am62x-kernel/kernel/6.6, an error occurs.

Thanks.

Regards, 

Jack

  • Here's a more detailed explanation of your menuconfig steps and the error you're encountering, translated into English:

    I'm providing more detailed information regarding menuconfig.

    1. Guide Document: https://software-dl.ti.com/processor-sdk-android/esd/AM62PX/10_01_01/docs/android/Foundational_Components_Kernel.html#android-build-kernel

    2. Run menuconfig: tools/bazel run //common:ti_config -- menuconfig

    3. Modify Touchscreen Driver in menuconfig:

      • Navigate to Device Drivers -> Input device support -> Touchscreens.

      • Delete "Ilitek ILi210X base touchscreen."

      • Navigate to Device Drivers -> Input device support -> Touchscreens.

      • Select (M) "Goodix I2C touchscreen."

    4. Save and Exit: Save the changes and exit menuconfig.

    5. Verify Fragment File: Confirm the changes in /home/willyhong/ti_am62p/kernel/common/arch/arm64/configs/ti_gkt.fragment.

    6. Confirm Goodix Setting: Verify that CONFIG_TOUCHSCREEN_GOODIX=m is set in the fragment file.

    7. Edit BUILD.bazel: Edit the /home/willyhong/ti_am62p/kernel/common/BUILD.bazel file.

    8. Add Goodix KO to _TI_MODULE_OUTS: On line 753, add the following to _TI_MODULE_OUTS = [ ] as per "Guide Document 3.1.4 Enabling a new driver": "drivers/input/touchscreen/goodix.ko",

    9. Save and Rebuild Kernel: Save the BUILD.bazel file and then rebuild the kernel.

    10. Kernel Build Command: tools/bazel run //common:ti_dist -- --dist_dir=/home/willyhong/ti_am62p/aosp15/device/ti/am62x-kernel/kernel/6.6

    11. Error Encountered: The following error occurs:

      ERROR: /home/willyhong/ti_am62p/kernel/common/BUILD.bazel:905:13: Building kernel (lto=default;notrim) @@//common:ti failed: (Exit 1): bash failed: error executing KernelBuild command (from target //common:ti) /bin/bash -c ... (remaining 1 argument skipped)
      

    Please advise.

    Regards, 

    Jack

  • Hi,

    If your driver was already in kernel , your step are ok except non need to remove ili210x touchscreen driver. if you remove ili driver you should remove too from list.

    i test same as you except i don't remove ilie touchscreen driver and i have same error because driver name is goodix_ts.ko and not goodix 
    so if i add 

    diff --git a/BUILD.bazel b/BUILD.bazel
    index 67aa83326284..9f4d3eb86a2e 100644
    --- a/BUILD.bazel
    +++ b/BUILD.bazel
    @@ -793,6 +793,7 @@ _TI_MODULE_OUTS = [
         "drivers/iio/adc/ti_am335x_adc.ko",
         "drivers/iio/buffer/kfifo_buf.ko",
         "drivers/input/misc/tps65219-pwrbutton.ko",
    +    "drivers/input/touchscreen/goodix_ts.ko",
         "drivers/input/touchscreen/ili210x.ko",
         "drivers/irqchip/irq-pruss-intc.ko",
         "drivers/irqchip/irq-ti-sci-inta.ko",
    


    it's working.

    Regards.
    Guillaume

  • Thanks, resolved by fixing ko filename.