On Wed, Apr 3, 2024 at 11:56 AM Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> wrote: > > On Wed, Apr 3, 2024 at 11:34 AM Vincent Li <vincent.mc.li@xxxxxxxxx> wrote: > > > > On Wed, Apr 3, 2024 at 10:56 AM Andrii Nakryiko > > <andrii.nakryiko@xxxxxxxxx> wrote: > > > > > > On Wed, Apr 3, 2024 at 10:06 AM Vincent Li <vincent.mc.li@xxxxxxxxx> wrote: > > > > > > > > Hi, > > > > > > > > Once I enabled the open source firewall IPfire kernel 6.6.15 > > > > DEBUG_INFO_BTF, the IPfire ISO image is increased from about 450MB to > > > > about 1.5GB, I suspect because IPfire has many driver modules to > > > > > > BTF can't be that big. I think you just get all the DWARF for modules > > > and vmlinux itself. DWARF is necessary to generate BTF during the > > > build time, but it can be stripped out afterwards, leaving just (much > > > smaller) BTF intact. > > > > ok good to hear that :). I am new to this, how to strip > > kernel/modules DWARF after kernel/modules being built? > > > > > > > > > support as many hardware as possible, pahole generated BTF for all > > > > these modules, that could increase the size of the ISO image, so I > > > > wonder if I could disable modules BTF only but keep vmlinux BTF, or > > > > maybe selectively enable BTF for some modules, but not other modules? > > > > > > > > I found this discussion [0] making DEBUG_INFO_BTF_MODULES selectable > > > > independently. I am still not sure how to disable modules BTF, I tried > > > > make menuconfig, still not obvious to me how to disable > > > > DEBUG_INFO_BTF_MODULES > > > > > > I think CONFIG_DEBUG_INFO_BTF_MODULES=n should work fine, but see > > > above, I don't think the BTF is a problem here, it's not stripping out > > > DWARF. I manually change the CONFIG_DEBUG_INFO_BTF_MODULES=y to CONFIG_DEBUG_INFO_BTF_MODULES=n in .config, but make oldconfig always flip it back to y, if I run make bzImage without make oldconfig, it will have "Restart config..." like below and n flipped to y again when examining the .config # make bzImage SYNC include/config/auto.conf.cmd * * Restart config... * > > strip -g ? I don't know how this is normally done in Linux distros. > > > > > > > > > > > > [0] https://lore.kernel.org/bpf/CAKH8qBu0ptKbMVvoMpgN2tyk84ZGvwuCJLjesqw-_8QtSRLqpw@xxxxxxxxxxxxxx/T/#m73cee268387358ec645b665951feb931b294ec2d > > > > > > > > Thanks! > > > >