Skip to contentSkip to conversation

Tosa kernel bloat

DISCUSSION Junqian Gordon Xu 6 participants 9 messages Dec 28, 2007 – Jan 1, 2008

lore
Share & tools
lore
#0 lore raw

Tosa kernel is bloated with the recent patch and change to defconfig-tosa

|`/home/gordon/oe/build/tmp/work/tosa-angstrom-linux-gnueabi/linux-rp-2.6.23-r14/linux-2.6.23'
| Size is 1296464
| FATAL: This kernel is too big for your PXA Zaurus and will destroy data if you flash it. Please reduce the size of the kernel by making more of it modular.

Anybody else experience this? I guess kernel size below 1280000 is ok? I'm not sure where I should look to trim it down?

Regards
Gordon

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Junqian Gordon Xu schreef:

Quoted 10 lines

Tosa kernel is bloated with the recent patch and change to defconfig-tosa

|`/home/gordon/oe/build/tmp/work/tosa-angstrom-linux-gnueabi/linux-rp-2.6.23-r14/linux-2.6.23'
| Size is 1296464
| FATAL: This kernel is too big for your PXA Zaurus and will destroy 

data if you flash it. Please reduce the size of the kernel by making more of it modular.

Anybody else experience this? I guess kernel size below 1280000 is ok? I'm not sure where I should look to trim it down?

Is that also the case in the angstrom stable branch?

regards,

Koen

- --
[email protected] will go go away in december 2007, please use [email protected] instead.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFHdMmqMkyGM64RGpERApOTAJwJS0aNs5EWEAfAzZDg/ysIcmbrjACfXYAg twGk159NAGv4UuScqp1pid0=
=e/cH
-----END PGP SIGNATURE-----

#2 lore raw
Quoted 5 lines · Koen Kooi

Junqian Gordon Xu schreef:

Quoted 1 line

Tosa kernel is bloated with the recent patch and change to

defconfig-tosa

Is that also the case in the angstrom stable branch?

Yes.
This is the case for linux-rp-2.6.23-r12 (angstrom stable branch) and linux-rp-2.6.23-r14: (angstrom dev branch)
The tosa kernel compiled fine with linux-rp-2.6.23-r10 (metadata from december, 8th)

To cut the kernel size down, some of the following built-in features may be set as modules instead:

-------8<---------8<---------
CONFIG_USB_ETH_RNDIS=y
CONFIG_MSDOS_PARTITION=y
CONFIG_USB_GADGET_SELECTED=y
CONFIG_USB_GADGET_PXA2XX=y
CONFIG_USB_EZUSB=y
CONFIG_USB_HIDINPUT=y
CONFIG_VIDEO_V4L1=y
CONFIG_VIDEO_V4L1_COMPAT=y
CONFIG_VIDEO_V4L2=y
CONFIG_NET_RADIO=y
CONFIG_SCSI_MULTI_LUN=y
-------8<---------8<---------

Regards,

-- cyril

#3 lore raw
Quoted 5 lines · cyril Romain

To cut the kernel size down, some of the following built-in features may be set as modules instead:

-------8<---------8<---------
CONFIG_USB_ETH_RNDIS=y

thats option not module

Quoted 1 line

CONFIG_MSDOS_PARTITION=y

thats option not module

Quoted 1 line

CONFIG_USB_GADGET_SELECTED=y

thats auto option

Quoted 1 line

CONFIG_USB_GADGET_PXA2XX=y

thats option not module

CONFIG_USB_GADGET would be good choice instead

Quoted 3 lines

CONFIG_USB_EZUSB=y

CONFIG_USB_HIDINPUT=y

thats option not module

Quoted 1 line

CONFIG_VIDEO_V4L1=y

thats option not module

Quoted 1 line

CONFIG_VIDEO_V4L1_COMPAT=y

thats option not module

Quoted 1 line

CONFIG_VIDEO_V4L2=y

thats option not module

Quoted 1 line

CONFIG_NET_RADIO=y

thats option not module

Quoted 1 line

CONFIG_SCSI_MULTI_LUN=y

thats option not module

Signature · 5 lines
JID: hrw-jabber.org
OpenEmbedded developer/consultant

   Gdyby człowiek musiał zezwalać innym na to, co toleruje u siebie,
   życie byłoby nie do wytrzymania.             [Georges Courteline]
#4 lore raw
In reply to cyril Romain
Quoted 11 lines · cyril Romain
Quoted 5 lines · Koen Kooi

Junqian Gordon Xu schreef:

Quoted 1 line

Tosa kernel is bloated with the recent patch and change to

defconfig-tosa

Is that also the case in the angstrom stable branch?

Yes.
This is the case for linux-rp-2.6.23-r12 (angstrom stable branch) and linux-rp-2.6.23-r14: (angstrom dev branch)
The tosa kernel compiled fine with linux-rp-2.6.23-r10 (metadata from december, 8th)

Since there is little to trim down for tosa kernel (WM9712 and tosa_ts are possible targets, but need to patch kernel to make those modularizable). The only option for now is to disable KEXEC and ATAGS. Please review the patch for both stable and dev.

Regards
Gordon

# old_revision [93692aaac63b82b355275bee987480a1232079a1]
#
# patch "packages/linux/linux-rp-2.6.23/defconfig-tosa"
#  from [1980d93e930a1fd5959d13384211a7f445751136]
#    to [f7677a83e981b7570f63b19ba6fde79500d32e64]
#
============================================================
--- packages/linux/linux-rp-2.6.23/defconfig-tosa 1980d93e930a1fd5959d13384211a7f445751136
+++ packages/linux/linux-rp-2.6.23/defconfig-tosa f7677a83e981b7570f63b19ba6fde79500d32e64
@@ -142,8 +142,8 @@ CONFIG_XSCALE_PMU=y
 #
 CONFIG_ARM_THUMB=y
 CONFIG_XSCALE_PMU=y
-CONFIG_KEXEC=y
-CONFIG_ATAGS_PROC=y
+# CONFIG_KEXEC is not set
+# CONFIG_ATAGS_PROC is not set
 CONFIG_SHARP_PARAM=y
 CONFIG_SHARPSL_PM=y
 CONFIG_SHARP_SCOOP=y
#5 lore raw
In reply to Junqian Gordon Xu
Quoted 9 lines · Junqian Gordon Xu

Tosa kernel is bloated with the recent patch and change to defconfig-tosa

|`/home/gordon/oe/build/tmp/work/tosa-angstrom-linux-gnueabi/linux-rp-2
|.6.23-r14/linux-2.6.23' Size is 1296464
| FATAL: This kernel is too big for your PXA Zaurus and will destroy

data if you flash it. Please reduce the size of the kernel by making more of it modular.

Same on Poodle:

| make[1]: Leaving directory `/home/hrw/devel/build/angstrom/tmp/work/poodle-angstrom-linux-gnueabi/linux-rp-2.6.23-r14/linux-2.6.23' | Size is 1306384
| FATAL: This kernel is too big for your PXA Zaurus and will destroy data
if you flash it. Please reduce the size of the kernel by making more of
it modular.

Signature · 5 lines
JID: hrw-jabber.org
OpenEmbedded developer/consultant

           Q:      What's a light-year?
           A:      One-third less calories than a regular year.
#6 lore raw
Quoted 10 lines
Quoted 9 lines

Tosa kernel is bloated with the recent patch and change to defconfig-tosa

|`/home/gordon/oe/build/tmp/work/tosa-angstrom-linux-gnueabi/linux-rp-2
|.6.23-r14/linux-2.6.23' Size is 1296464
| FATAL: This kernel is too big for your PXA Zaurus and will destroy

data if you flash it. Please reduce the size of the kernel by making more of it modular.

Quoted 7 lines

Same on Poodle:
| make[1]: Leaving directory `/home/hrw/devel/build/angstrom/tmp/work/poodle-angstrom-linux-gnueabi/linux-rp-2.6.23-r14/linux-2.6.23' | Size is 1306384
| FATAL: This kernel is too big for your PXA Zaurus and will destroy data
if you flash it. Please reduce the size of the kernel by making more of
it modular.

I vaguely remember that the host toolset has an influence on that. Do you remember where the same kernel compiled ok for Richard but other guys got the too-big error? Did we ever found the actual cause of that?

:M:

#7 lore raw
Quoted 18 lines · Michael 'Mickey' Lauer
Quoted 10 lines
Quoted 9 lines

Tosa kernel is bloated with the recent patch and change to defconfig-tosa

|`/home/gordon/oe/build/tmp/work/tosa-angstrom-linux-gnueabi/linux-rp-2
|.6.23-r14/linux-2.6.23' Size is 1296464
| FATAL: This kernel is too big for your PXA Zaurus and will destroy

data if you flash it. Please reduce the size of the kernel by making more of it modular.

Quoted 7 lines

Same on Poodle:
| make[1]: Leaving directory `/home/hrw/devel/build/angstrom/tmp/work/poodle-angstrom-linux-gnueabi/linux-rp-2.6.23-r14/linux-2.6.23' | Size is 1306384
| FATAL: This kernel is too big for your PXA Zaurus and will destroy data
if you flash it. Please reduce the size of the kernel by making more of
it modular.

Quoted 4 lines

I vaguely remember that the host toolset has an influence on that. Do you remember where the same kernel compiled ok for Richard but other guys got the too-big error? Did we ever found the actual cause of that?

I don't think we did ever get to the bottom of that. It was a 64 bit machine compiling for 32 bit that showed the problem.

I have to admit I haven't tested the size of the kernels, I have that check disabled locally as I've been pushing kexec and relying on that. I pushed a load of defconfig fixes for poodle and its size should be under control now, I'm not sure about tosa.

We do have a problem with kernel sizes in recent kernels, one we can't really afford to ignore any longer. I made a post to LKML about some size tests I made. My conclusion is that the networking stack is the point of bloat in the zaurus kernels now and its the area we need to address. It seems its impossible to compile half the networking stack as a module and I'd like to see that changed. Any ideas or help here welcome!

Cheers,

Richard

#8 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Richard Purdie schreef:

Quoted 2 lines

We do have a problem with kernel sizes in recent kernels, one we can't really afford to ignore any longer.

- --- packages/linux/linux-rp.inc 0754d43aed9f1733a268bc5a327d596268b601e3 +++ packages/linux/linux-rp.inc 4b074ddc2ac5e4e9c7531684c078362c386641ba @@ -95,7 +95,7 @@ do_configure() {

        if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" =
"linux-uclibcgnueabi" ]; then
                echo "CONFIG_AEABI=y"                   >> ${S}/.config
- -               echo "CONFIG_OABI_COMPAT=y"             >> ${S}/.config
+               echo "# CONFIG_OABI_COMPAT is not set"             >>
${S}/.config
        else
                echo "# CONFIG_AEABI is not set"        >> ${S}/.config
                echo "# CONFIG_OABI_COMPAT is not set"  >> ${S}/.config

saves a few precious kB.

regards,

Koen

- --
[email protected] will go go away in december 2007, please use [email protected] instead.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFHem0zMkyGM64RGpERAlkNAKCYL0VKRpWLYudrTInnizFlw+lXiwCeMK2U KXIOpSsblomJoNTfwT5VWF4=
=nXRL
-----END PGP SIGNATURE-----