Very large size of 2.6.29.4 for colibri-270

amm
2009-08-21
2013-04-15
  • amm
    amm
    2009-08-21

    Hi,
    When building 2.6.29.4 with your patch in openembedded environment, resulting kernel size was bigger than 5M. Googling a bit, I found somewhere that there used to be a patch to reduce binary size: binutils-buildid-arm.patch with is as follows:
    ---
    arch/arm/kernel/vmlinux.lds.S |    1 +
    1 file changed, 1 insertion(+)

    Index: linux-2.6.22/arch/arm/kernel/vmlinux.lds.S

    --- linux-2.6.22.orig/arch/arm/kernel/vmlinux.lds.S    2007-09-11 18:32:29.000000000 +0200
    +++ linux-2.6.22/arch/arm/kernel/vmlinux.lds.S    2007-09-11 18:33:42.000000000 +0200
    @@ -94,6 +94,7 @@
                 TEXT_TEXT
                 SCHED_TEXT
                 LOCK_TEXT
    +            *(.note.*)
    #ifdef CONFIG_MMU
                 *(.fixup)
    #endif

    but for 2.6.29.4, it should be as follows:
    --- vmlinux.lds.S.orig    2009-08-21 19:42:50.000000000 +0200
    +++ vmlinux.lds.S    2009-08-18 18:04:40.000000000 +0200
    @@ -95,6 +95,7 @@ SECTIONS
                 SCHED_TEXT
                 LOCK_TEXT
                 KPROBES_TEXT
    +            *(.note.*)
    #ifdef CONFIG_MMU
                 *(.fixup)
    #endif

    I don't know what the *(.note.*) sentence does, but after applying this patch, kernel size shrinks to a bit more than 2MB. Maybe you would like to consider it for future releases.
    Regards