[BUG] It seems that all official kernels are built with option SMALL_FLASH

I wanted to make my OpenWrt firmware (ipq806x) compatible with the official one. And it fails to do so. It's all because in my .config file there is an option CONFIG_KERNEL_KALLSYMS=y, and in the official kernel there is no this option.

Probably guilty of this:

config KERNEL_KALLSYMS
  bool "Compile the kernel with symbol table information"
  default y if !SMALL_FLASH
  help
    This will give you more information in stack traces from kernel oopses.

That is, it can be seen that there is a difference when build one target and build all targets at a time.

Recently there was a similar problem with the build system:

PS. It's too bad that the all official firmwares does not contain a kernel config! This really needs to be fixed!

No, it is explicitly disabled for official release builds:

config_seed = CONFIG_BUILDBOT=y
    CONFIG_DEVEL=y
    CONFIG_IMAGEOPT=y
    CONFIG_VERSIONOPT=y
    CONFIG_CCACHE=n
    CONFIG_KERNEL_KALLSYMS=n
    CONFIG_AUTOREMOVE=y
    CONFIG_PACKAGE_luci=y
    CONFIG_PACKAGE_luci-ssl=y
    CONFIG_IB=y
    CONFIG_SDK=y

You can also find the build configuration in each target specific firmware download folder:
https://downloads.openwrt.org/releases/21.02.1/targets/ipq806x/generic/config.buildinfo

You can install kmod-ikconfig to get /proc/config.gz which contains the config the kernel was built with.

2 Likes

XZ-packed kernel dimensions (ipq806x):

  1. CONFIG_KERNEL_KALLSYMS=y : 2928495 bytes
  2. CONFIG_KERNEL_KALLSYMS=n : 2749079 bytes

Reducing the size by 175 KiB is very very useful?

That is more than the entire available overlay space on certain devices. OpenWrt caters to the lowest common denominator, not to the most capable device.

1 Like

I understand it. It's just strange that this parameter is used for all platforms (boards).
I have never seen a QCOM IPQxxxx device with flash drive less than 64MB.

There are surprisingly more then you think with 32MB NOR-s and IPQ40xx

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.