BUG: as of 2967e24d0 "ramips: switch to Linux 6.6' ERX kernel is too big

Alexandru Ardelean ardeleanalex at gmail.com
Mon May 20 01:24:02 PDT 2024


On Mon, May 20, 2024 at 4:51 AM Russell Senior
<russell at personaltelco.net> wrote:
>
> (try#2, damn you gmail)
>
> I mentioned this on IRC and as a github comment on the commit
> (https://github.com/openwrt/openwrt/commit/2967e24d02775f63d9e363e6e0d351716dcc3f7c)
>
> My build started failing on the commit. The message I get from the
> build system is:
>
>   "WARNING: Image file
> /home/openwrt/src/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/ubnt_edgerouter-x-kernel.bin
> is too big: 3165615 > 3145728"
>
> I tried a vanilla config:
>
>   CONFIG_TARGET_ramips=y
>   CONFIG_TARGET_ramips_mt7621=y
>   CONFIG_TARGET_ramips_mt7621_DEVICE_ubnt_edgerouter-x=y
>   CONFIG_DEVEL=y
>   CONFIG_BUILD_LOG=y
>
>   "WARNING: Image file
> /home/openwrt/src/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/ubnt_edgerouter-x-kernel.bin
> is too big: 3165361 > 3145728"
>
> I notice that there are two kernel partitions on the NAND flash, each
> of which is 3MB:
>
> [    1.011604] 6 fixed-partitions partitions found on MTD device mt7621-nand
> [    1.025136] Creating 6 MTD partitions on "mt7621-nand":
> [    1.035552] 0x000000000000-0x000000080000 : "u-boot"
> [    1.054525] 0x000000080000-0x0000000e0000 : "u-boot-env"
> [    1.072180] 0x0000000e0000-0x000000140000 : "factory"
> [    1.089606] 0x000000140000-0x000000440000 : "kernel1"
> [    1.147424] 0x000000440000-0x000000740000 : "kernel2"
> [    1.204979] 0x000000740000-0x00000ff00000 : "ubi"
>
> Which suggests two possible fixes:
>
>  a) cannibalize the second kernel parition (might require a different
> u-boot?); or
>
>  b) use an intermediate u-boot that looks for the kernel in a ubi partition.
>
> or
>
>  c) make the damn kernel smaller.
>
> Thoughts?

d) Start looking into Zephyr as an alternative, until it may get too
bloated (in 10-20-30 years?)

On a similar note, there were these ar71xx tiny images (up until
2018), which (before) were just normal images (on which) OpenWrt would
run on.
i.e. the 4 MB flash, 32 MB RAM configuration (and maybe before that
even 2 MB flash and 16 MB of RAM)
When those (4/32 MB images) were dropped, it seemed (to me at least)
to trigger this notion that Linux (the kernel), got fat.
You can still fit a Linux kernel onto those old images, but it's
(more) like a weight-loss exercise, which doesn't fit most users.
There used to be this joke, that you can run linux on a potato [1]
Oh well  ¯\_(ツ)_/¯

[1] https://www.bbspot.com/News/2008/12/linux-on-a-potato.html
(for your own amusement, there's also these)
   [2] https://www.bbspot.com/News/2001/06/gates.html
   [3] https://www.bbspot.com/News/2000/4/linux_distros.html
   [4] (this might be slightly offensive today, but ¯\_(ツ)_/¯ )
https://www.bbspot.com/News/2000/9/linux_laid.html

>
> --
> Russell Senior
> russell at personaltelco.net
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list