Skip to contentSkip to conversation

Routerstationpro: The size of the kernel image is too big

PATCH In review [email protected] 1 participant 3 messages Mar 28, 2013

lore
Share & tools
lore
#0 lore raw

cover Routerstationpro: The size of the kernel image is too big

Hi Bruce, Richard,

I'd previously sent a patch to the poky list which Richard has merged, commit 83716e40edacfd20dec8ef41f415ad5828d4643b:
"routerstationpro: use KERNEL_IMAGE_MAXSIZE to test the image"

The patch here is for yocto #3515. I am sending two more patches to the oe-core list:

I recommend that these three patches be applied in this order:
#3515
1. [OE-core] [PATCH 1/2] kernel.bbclass: omit vmlinux from rpm file when it is the alternative image
2. [poky] [PATCH 1/1] routerstationpro: swap KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE

#3514
3. [OE-core] [PATCH 2/2] kernel.bbclass: do_sizecheck: update path to build image and do not delete

When these three are merged then I would consider #3514 and #3515 closed.

Michel

#1 lore raw

PATCH 1/1 routerstationpro: swap KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE

From: Michel Thebeau <[email protected]>

The routerstationpro has a 16mb flash which the kernel image should fit into. The default build type for vmlinux then should be the stripped arch/mips/boot/vmlinux.bin.

Swapping KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE for rsp causes vmlinux.bin to be linked in tmp/deploy/images instead of vmlinux, and causes vmlinux.bin to appear in the kernel rpm file.

[YOCTO #3515]

---
 meta-yocto-bsp/conf/machine/routerstationpro.conf |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-yocto-bsp/conf/machine/routerstationpro.conf +2 -2
index e5e4d1a..a727e2a 100644
@@ -6,8 +6,8 @@ require conf/machine/include/tune-mips32.inc
 
 MACHINE_FEATURES = "screen keyboard pci usbhost ext2 ext3 serial"
 
-KERNEL_IMAGETYPE = "vmlinux"
-KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
+KERNEL_ALT_IMAGETYPE = "vmlinux"
+KERNEL_IMAGETYPE = "vmlinux.bin"
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
 PREFERRED_VERSION_linux-yocto ?= "3.4%"
Signature · 1 line
1.7.9.7
#2 lore raw

Re: [PATCH 1/1] routerstationpro: swap KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE

Quoted 23 lines · On 13-03-28 03:32 PM, [email protected] wrote:

From: Michel Thebeau <[email protected]>

The routerstationpro has a 16mb flash which the kernel image should fit into. The default build type for vmlinux then should be the stripped arch/mips/boot/vmlinux.bin.

Swapping KERNEL_IMAGETYPE and KERNEL_ALT_IMAGETYPE for rsp causes vmlinux.bin to be linked in tmp/deploy/images instead of vmlinux, and causes vmlinux.bin to appear in the kernel rpm file.

[YOCTO #3515]

---
 meta-yocto-bsp/conf/machine/routerstationpro.conf |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-yocto-bsp/conf/machine/routerstationpro.conf +0 -0
index e5e4d1a..a727e2a 100644

meta-yocto-bsp/conf/machine/routerstationpro.conf require conf/machine/include/tune-mips32.inc · line 10

Quoted 7 lines
meta-yocto-bsp/conf/machine/routerstationpro.conf +2 -2
@@ -6,8 +6,8 @@ require conf/machine/include/tune-mips32.inc
 
 MACHINE_FEATURES = "screen keyboard pci usbhost ext2 ext3 serial"
 
-KERNEL_IMAGETYPE = "vmlinux"
-KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
+KERNEL_ALT_IMAGETYPE = "vmlinux"
+KERNEL_IMAGETYPE = "vmlinux.bin"

I'd noted in email that arch/mips/boot/vmlinux.bin is looks like the stripped file we were looking for. But it doesn't load:

RedBoot> load -m tftp -h 192.168.1.6 mthebeau/vmlinux.bin Unrecognized image type: 0x0

I was able to load the larger vmlinux and boot it.

And as previously noted by , using tmp/sysroots/x86_64-linux/usr/bin/mips32-poky-linux/mips-poky-linux-strip would get a bootable image as well from the vmlinux.

I'll try to figure out what the difference is between that and vmlinux.bin.

M

Quoted 4 lines
meta-yocto-bsp/conf/machine/routerstationpro.conf +0 -0
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
 PREFERRED_VERSION_linux-yocto ?= "3.4%"