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-AM62B-P1:如何在重新编译 RT-Linux 映像之前修改驱动程序源代码

Guru**** 2482225 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1446710/sk-am62b-p1-how-to-modify-driver-source-code-before-rebuild-rt-linux-image

器件型号:SK-AM62B-P1

工具与软件:

大家好

过去、我将按照以下步骤修改驱动程序并重新编译默认 Linux 映像

1.   machine=am62xx-evm bitbake -c cleanstate tisdk-default-image

2.   machine=am62xx-evm bitbake -c cleanstate linux-ti-staging

3.   machine=am62xx-evm bitbake -c menuconfig linux-ti-staging

4. 修改驱动程序(build/arago-tmp-default-glibc/work-shared/am62xx-evm/kernel-source/sound/core/pcm_lib.c)

5.   machine=am62xx-evm bitbake linux-ti-staging

6.   machine=am62xx-evm bitbake tisdk-default-image

驱动程序源代码和映像可以重建且非常有用。

但是、如果我设置为重建 RT-Linux、驱动程序的修改 似乎不起作用

1.   machine=am62xx-evm bitbake -c cleanstate tisdk-default-image

2.   machine=am62xx-evm bitbake -c cleanstate linux-ti-staging

3.   machine=am62xx-evm bitbake -c menuconfig  linux-ti-staging

4. 修改驱动程序(build/arago-tmp-default-glibc/work-shared/am62xx-evm/kernel-source/sound/core/pcm_lib.c)

5.   machine=am62xx-evm bitbake linux-ti-staging

6.   machine=am62xx-evm  arago_rt_enable=1  bitbake tisdk-default-image

我是否丢失了一些设置? 还是修改了错误的源代码?

谢谢

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Weiyu:

    https://software-dl.ti.com/processor-sdk-linux-rt/esd/AM62X/10_00_07_04/exports/docs/linux/Foundational_Components_Kernel_Users_Guide.html#geting-the-kernel-source-code

    使用以下命令编译 RT Linux 内核: 

    make ARCH=ARM64 CROSS_COMPILE="$CROSS_COMPILE_64" defconfig ti_ARM64_prune.config ti_rt.config
    make ARCH=ARM64 CROSS_COMPILE="$CROSS_COMPILE_64"映像 

    此致、
    Suren
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Suren

    感谢您的答复

    但我还有3个问题

    1.运行"make command"的路径在哪里? 在 SDK 路径中?  

    2.命令的不同之处是什么  

    MACHINE=am62xx-EVM bitbake linux-ti-staging

    MACHINE=am62xx-EVM ARAGO_RT_ENABLE=1  bitbake tisdk-default-image

    make ARCH=ARM64 CROSS_COMPILE="$CROSS_COMPILE_64" defconfig ti_ARM64_prune.config ti_rt.config 
    make ARCH=ARM64 CROSS_COMPILE="$CROSS_COMPILE_64"映像 

    3.所以,为什么我可以使用下面的命令来重建默认的内核和映像,当我修改驱动程序源代码

    MACHINE=am62xx-EVM bitbake linux-ti-staging

    MACHINE=am62xx-evm bitbake  tisdk-default-image

    但 在修改驱动程序源代码时、我无法使用以下命令重新构建 RT 内核和映像

    MACHINE=am62xx-EVM bitbake linux-ti-staging

    MACHINE=am62xx-EVM ARAGO_RT_ENABLE=1  bitbake tisdk-default-image

    谢谢  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    运行"make 命令"的路径在哪里? 在 SDK 路径中?  [报价]

    如果已安装 SDK、您应该会在目录中看到顶级 makefile。  

    https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/10_00_07_04/exports/docs/linux/Overview/Top_Level_Makefile .html

    [报价 userid="603935" url="~/support/processors-group/processors/f/processors-forum/1446710/sk-am62b-p1-how-to-modify-driver-source-code-before-rebuild-rt-linux-image/5552563 #5552563"]

    2.命令的不同之处是什么  

    MACHINE=am62xx-EVM bitbake linux-ti-staging

    MACHINE=am62xx-EVM ARAGO_RT_ENABLE=1  bitbake tisdk-default-image

    [报价]

    第一个构建常规标准 Linux 映像 并仅编译内核、而另一个构建 RT-Linux 映像并包含所有内容(u-boot、内核、内核模块等)、并创建最终的 SD 卡映像。

    [报价 userid="603935" url="~/support/processors-group/processors/f/processors-forum/1446710/sk-am62b-p1-how-to-modify-driver-source-code-before-rebuild-rt-linux-image/5552563 #5552563"]MACHINE=am62xx-evm arago_rt_enable=1  bitbake tisdk-default-image

    您是否无法通过使用上述命令进行修改来编译 Linux 内核? 是否发现任何故障? 请共享构建日志以了解错误是什么。

    此致、

    Suren

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Suren

    感谢您的答复。

    但我想你误解了。

    如果我修改源代码(build/Arago-tmp-default-glibc/work-shared/am62xx-evm/kernel-source/sound/core/pcm_lib.c)、

    并执行以下命令:

    MACHINE=am62xx-evm bitbake  tisdk-default-image

    它可以编译源代码、重新构建内核并生成映像、

    但是、如果我以低于命令的方式运行、

    MACHINE=am62xx-EVM ARAGO_RT_ENABLE=1  bitbake tisdk-default-image   

    它还可以成功地重建内核和生成映像、但源代码无法编译

    为什么 在我重新构建默认映像时可以编译源代码(build/Arago-tmp-default-glibc/work-shared/am62xx-evm/kernel-source/sound/core/pcm_lib.c)、但 RT-Linux 映像不能相同?

    谢谢

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    请尝试指定  ARAGO_RT_ENABLE=1 所有构建步骤。 就像您的定义一样 有限状态机 .

    此致、Andreas