Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test compile tca6507 module for led #630

Closed
livelier opened this issue Oct 17, 2022 · 10 comments
Closed

Test compile tca6507 module for led #630

livelier opened this issue Oct 17, 2022 · 10 comments

Comments

@livelier
Copy link
Contributor

(livelier@60a67e6) 增加 CONFIG_LEDS_TCA6507=y
编译 5.10.y 固件后,在固件路径 /lib/modules/5.10.147-ophub/kernel/drivers/leds/ 下没有 tca6507.ko 模块文件。

o大,请教一下,要修改哪里,编译固件可以包含 tca6507.ko 这个模块

@ophub
Copy link
Owner

ophub commented Oct 17, 2022

#make ${MAKE_SET_STRING} menuconfig

个别选项有关联的选择,所以只选一个不行。
你进linux-5.10.y内核目录下,手动进面板选择上:
make menuconfig
/输入关键字找目标的路径,看好了按esc退出搜索,按照刚才看到的路径找到,按空格键选择成*
save保存,这样会自动把相关选项都选好。

@livelier
Copy link
Contributor Author

image

/ 查找并核对 LEDS_TCA6507 所有关联选项,对应 Symbol 选项全部都是 [=y]

只有 NEW_LEDS 选项,在 LED Support 菜单下没有找到。

Location:
     -> Device Drivers
(1)   -> LED Support (NEW_LEDS [=y])

CONFIG_NEW_LEDS=y 默认已经是 =y

这里修改为 CONFIG_LEDS_TCA6507=m,之后编译 s905x3-b 固件。

# CONFIG_LEDS_TCA6507 is not set

image

新编译的固件 /boot/config-5.10.147-ophub 第5709行 仍然是 # CONFIG_LEDS_TCA6507 is not set
并且 /lib/modules/5.10.147-ophub/kernel/drivers/leds/ 路径下没有发现 tca6507.ko

o大,这个情况,是我哪里操作的不正确吗? 😢

@ophub
Copy link
Owner

ophub commented Oct 19, 2022

https://github.com/livelier/amlogic-s9xxx-armbian/blob/11b56b81b251318e11455df0db7903d68e9f7ac2/.github/workflows/compile-kernel.yml#L84

config-5.10等内核配置文件修改了放你自己的仓库里。
把源码库:uses: ophub/amlogic-s9xxx-armbian@main
这个改成:uses: livelier/amlogic-s9xxx-armbian@main

用你的源码编译。
同理编译固件时如果你fork后修改了,想测试修改结果,编译固件的地方这个源码也是把来源改为你的仓库。
如果你没有修改源码来源,一直使用我的没修改的编译,就没法看到修改的结果。

@ophub ophub closed this as completed Oct 21, 2022
@livelier
Copy link
Contributor Author

o大,是不是内核包里,没有 tca6507.ko 的原因。我编译s905x3-b固件,在固件中始终没有 tca6507.ko 😂😂😂

https://github.com/ophub/kernel/blob/main/pub/stable/5.10.149/modules-5.10.149-ophub.tar.gz

另外在 workflow runs 发现了一些提示,o大,这是否对固件有影响,没看懂 😁😁😁

Build armbian #340
https://github.com/ophub/amlogic-s9xxx-armbian/actions/runs/3294034541/jobs/5431148771#step:5:229
https://github.com/ophub/amlogic-s9xxx-armbian/actions/runs/3294034541/jobs/5431148771#step:5:1100
Build armbian #339
https://github.com/ophub/amlogic-s9xxx-armbian/actions/runs/3294034004/jobs/5431147733#step:5:229
https://github.com/ophub/amlogic-s9xxx-armbian/actions/runs/3294034004/jobs/5431147733#step:5:1120

@ophub
Copy link
Owner

ophub commented Oct 22, 2022

这个错误可以怱略,没有.aria2文件就会走https方式下载工具链。

你用什么编译内核呢?在Actions里面每次都是全新编译,在ubuntu22.04(x86_64)服务器里交叉编译arm64内核。所以只要kernel源码里有,而且你.config里面选择了,就应该可以编译岀来。
你在armbian里面用find找不到吗?

find /usr/lib/modules/ -name *tca5607*

@livelier
Copy link
Contributor Author

livelier commented Oct 22, 2022

o大,我已经找到,我的错误在哪里啦 🤣🤣🤣,我少了把驱动编辑到内核里,这一个步骤。

添加驱动,要先编译内核,之后再编译固件。

编译好的内核上传到 复刻你的 kernel 仓库里,然后在复刻的 amlogic-s9xxx-armbian 库存里修改 配置文件 uses 以及 kernel 仓库的路径。

晚上回来,我操作一下。

@ophub
Copy link
Owner

ophub commented Oct 22, 2022

可以不编固件,直接在现在的armbian里面安装你编好的内核即可,内核可以直接上传到armbian里面安装,如上传5.15.xxx到任意目录,如/opt/5.15.xxx里

cd /opt/5.15.xxx
armbian-updare

这里有一个点,不能安装同名内核,如果你的系统正好是5.15.xxx,你就先不要进入上传的目录,随便在哪个目录下,armbian-updare 5.10.xxx这样,从github我的kernel库里线上更新为其他版本的内核。重启后再安装你编译好的内核即可

@livelier
Copy link
Contributor Author

livelier commented Oct 22, 2022

收到,感谢 o大 指点。

这个更新安装内核方法,在 #506 有写过。 😂😂😂

@livelier
Copy link
Contributor Author

@ophub o大,下次更新内核仓库,集成一下 tca6507驱动

https://github.com/ophub/kernel

还有配置文件 CONFIG_LEDS_TCA6507=y

https://github.com/ophub/amlogic-s9xxx-armbian/tree/main/compile-kernel/tools/config

led可以点亮了,我在调整调整之后,提交到仓库。

@ophub
Copy link
Owner

ophub commented Nov 14, 2022

191addb
启用了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants