kernel: include metadata for built-in modules#14218
kernel: include metadata for built-in modules#14218openwrt-bot merged 2 commits intoopenwrt:mainfrom
Conversation
|
@guidosarducci From what I'm reading this seems optional... Wonder if an idea might be make this configurable, enable by default and disable for tiny targets? |
@Ansuel Hmmm, I considered doing that but concluded it wasn't worth it and simply caused more problems.
Are there other major considerations? What would be your idea of a negligible size increase? Maybe mine doesn't align... |
All good point and correct. My idea wasn't of a tiny variant of ubox, just a config to disable the inclusion of these additional files in the final image. If it does add major complication and it's not worth it... Totally ok with this. Anyway aside from this small thing the change looks good to me. I think we first have to merge ubox before this correct? I would love some feedback from @hauke or @ynezz on this topic. |
|
I've tried to make this independent of the ubox PR, so kmodloader will check for the presence of modules.builtin and not abort if missing, just continue as before. This is the same behavior I see on Ubuntu.
Also, updating kmodloader immediately gives you modinfo parameters data, since this is already included in our current loadable modules. Makes it easy to test only ubox PR with e.g. 'modinfo mac80211'.
…________________________________
From: Christian Marangi ***@***.***>
Sent: Friday, December 15, 2023 4:32:30 PM
To: openwrt/openwrt ***@***.***>
Cc: guidosarducci ***@***.***>; Mention ***@***.***>
Subject: Re: [openwrt/openwrt] kernel: include metadata for built-in modules (PR #14218)
Are there other major considerations? What would be your idea of a negligible size increase? Maybe mine doesn't align...
All good point and correct. My idea wasn't of a tiny variant of ubox, just a config to disable the inclusion of these additional files in the final image. If it does add major complication and it's not worth it... Totally ok with this.
Anyway aside from this small thing the change looks good to me. I think we first have to merge ubox before this correct?
I would love some feedback from @hauke<https://github.com/hauke> or @ynezz<https://github.com/ynezz> on this topic.
—
Reply to this email directly, view it on GitHub<#14218 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADNNWOOQGKQ5REKT6SIMRXTYJTTZXAVCNFSM6AAAAABAUKIXZ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJYGYZTQOJRGY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
Thanks.BTW, I noticed some pre-existing code duplication in get_module_info() and print_modinfo() that we might look at in the future to shrink ubox a little.
Would like to hear others thoughts too.
…________________________________
From: Christian Marangi ***@***.***>
Sent: Friday, December 15, 2023 4:32:40 PM
To: openwrt/openwrt ***@***.***>
Cc: guidosarducci ***@***.***>; Mention ***@***.***>
Subject: Re: [openwrt/openwrt] kernel: include metadata for built-in modules (PR #14218)
@Ansuel approved this pull request.
—
Reply to this email directly, view it on GitHub<#14218 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADNNWOLC2ZNH75L5KG5GG4LYJTT2RAVCNFSM6AAAAABAUKIXZ2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTOOBVGA3TOMZRHE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
812dc89 to
70ed367
Compare
|
Rebased against master and fixed wrong handle for @nbd168 . |
70ed367 to
2722ea7
Compare
|
Rebased against master again. |
2722ea7 to
fe68769
Compare
|
And another rebase. |
80dee83 to
ea89f18
Compare
|
@guidosarducci I want to merge this... can you rebase? |
ea89f18 to
4e9f9d9
Compare
|
@Ansuel OK, rebased again. Thanks for reviewing and merging! Would you have a chance to look at openwrt/ubox#1 as well? |
Add modules.builtin to the kernel package for improved handling of loadable
and builtin modules. As with other distros, this allows 'modprobe <module>'
to consistently return success for both loaded/built-in modules, a useful
feature for presence-testing.
Given OpenWrt's few built-in modules, this change and related kmodloader
support add ~1 KB to the compressed image size.
Using sch_fq_codel (builtin) and sch_cake (loadable) for example:
root@OpenWrt:/# modprobe sch_fq_codel && echo SUCCESS || echo FAIL
SUCCESS
root@OpenWrt:/# modprobe sch_cake && echo SUCCESS || echo FAIL
SUCCESS
root@OpenWrt:/# rmmod sch_fq_codel
module is builtin
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Add modules.builtin.modinfo to the kernel package, to support presence
testing using module aliases and printing module details with 'modinfo'.
With related kmodloader changes this adds ~2 KB to compressed image sizes.
root@OpenWrt:/# modinfo unix
name: unix
filename: (builtin)
alias: net-pf-1
license: GPL
root@OpenWrt:/# modprobe net-pf-1 && echo SUCCESS || echo FAIL
SUCCESS
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
4e9f9d9 to
e1d8e57
Compare
|
I think this may be breaking the build for me when openwrt/include/kernel-build.mk Line 68 in 9658050 |
|
Merging pull request #14218 (with all 190 CI checks green) resulted in
buildbot failures in `Kernel/CollectDebug` step, likely due to the fact,
that CI builds don't use same config options as on buildbot,
specifically CI builds currently don't have `COLLECT_KERNEL_DEBUG`
config option enabled.
So lets try to prevent those regressions in the future by aligning the
CI build process with the build config options used later on the
buildbots.
References: 066b0fee7668 ("kernel: copy only *.ko for debug info")
References: openwrt/openwrt#14218
Signed-off-by: Petr Štetiar <ynezz@true.cz>
|
Yep, that fixes it, thanks! |
|
@981213 @ynezz Thanks for investigating. Any reason not to keep the modinfo files for debug purposes in 066b0fe? Changing the openwrt/include/kernel-build.mk Line 68 in 9658050 to include |
We need this separated debug info archive because we strip debug info out of modules in firmwares. |
Merging pull request #14218 (with all 190 CI checks green) resulted in
buildbot failures in `Kernel/CollectDebug` step, likely due to the fact,
that CI builds don't use same config options as on buildbot,
specifically CI builds currently don't have `COLLECT_KERNEL_DEBUG`
config option enabled.
So lets try to prevent those regressions in the future by aligning the
CI build process with the build config options used later on the
buildbots.
References: 066b0fee7668 ("kernel: copy only *.ko for debug info")
References: openwrt/openwrt#14218
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Description
Add
modules.builtinandmodules.builtin.modinfoto thekernelpackage for improved handling of built-in modules. As with other distros, this enablesmodprobe <module>to consistently return success for both loaded/built-in modules, a useful feature for presence-testing. and allowsmodinfoto print related module details.Given OpenWrt's few built-in modules, this change and the related
kmodloadersupport only add ~2.5 KB to a compressed filesystem image size.Related
A separate PR updates
kmodloaderto parse and use these files: openwrt/ubox#1These PRs are complementary but independent since
kmodloaderwill still work without the files above.Examples
Some samples of new and changed functionality (with updated
kmodloader) are below.Testing
kmodloadercontinues to function with or withoutmodules.builtinandmodules.builtin.modinfo.kmodloader, with inclusion ofmodules.builtinandmodules.builtin.modinfo, increased OpenWrt compressed filesystem image size by ~2.5 KB.kmodloaderPR above.Review
CC previous contributors: @blogic @nbd168 @hauke @Ansuel @neheb @yousong
Thanks in advance for your feedback...