Modify

Opened 7 years ago

Closed 7 years ago

Last modified 22 months ago

#5339 closed defect (fixed)

Kernel for Marvell Orion bigger than it's mtd size due to OpenWrt mtd patch

Reported by: Maddes <maddes_trac@…> Owned by: developers
Priority: high Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: kernel mtd size offset Cc:

Description

Trunk: r16438
No other feeds installed

Build Environment: Debian 5.0

The kernel for Marvell Orion exceeds 1MB and the OpenWrt patch restricts the "kernel" mtd to exactly 1MB (0x00100000).
Therefore the kernel does not fit inside its own mtd, and if flashed the end of the kernel will be the start of the rootfs.
The OpenWrt patch "100-openwrt_partition_map.patch" also messes a lot with the original mtd defintion.

Attached is a replacement for "100-openwrt_partition_map.patch" (copy to target/linux/orion/patches)
It keeps the original size for the kernel in a non-overlapping mtd defintion, keeps the original mtd order, takes care of eRcOmM hell and provides the original overlapping mtd0 as an additional mtd definition.
The patch has been enhanced that the size of the kernel (and offset of rootfs) can be changed without having to deal with diff/patch stuff. This is done by "changing" the rootfs to the same value.[BR]]
This way everyone can reduce the kernel size if they want more rootfs space, but the OpenWrt source stays close to the vanilla kernel.

Please check and apply to the repository. Thanks.

Attachments (3)

100-openwrt_partition_map.patch (829 bytes) - added by Maddes <maddes_trac@…> 7 years ago.
100-openwrt_partition_map.2.patch (1005 bytes) - added by Maddes <maddes_trac@…> 7 years ago.
Smaller kernel size will be great. A cleaner patch file (as attached) would still be useful.
100-openwrt_partition_map.3.patch (1005 bytes) - added by Maddes <maddes_trac@…> 7 years ago.
mtd kernel size 0x00120000, replaces target/linux/orion/patches/100-openwrt_partition_map.patch

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by Maddes <maddes_trac@…>

comment:1 Changed 7 years ago by kaloz

NAK - the problem will be solved with the lzma zImage patch in .30, as soon as the rootfs splitting bug is fixed there.

Changed 7 years ago by Maddes <maddes_trac@…>

Smaller kernel size will be great. A cleaner patch file (as attached) would still be useful.

comment:2 Changed 7 years ago by Maddes <maddes_trac@…>

With r16666 (all packages) the kernel has currently a size of 1.115.080 bytes (=0x001103C8).
I would suggest to set it to 0x0012000, that would currently leave 64KB buffer for new kernel packages for now (not much "waste").

Please add the 100-openwrt_partition_map.3.patch, so that at least people can use the current trunk without modification for the time being.

If LZMA compression really brings the kernel size down way below 1MB, then 0x00100000 would be fine. But that should be done when LZMA and the rootfs splitting bug is fixed.

All mtd variants available at ftp://ftp.maddes.net/openwrt/kamikaze/orion/patches/

Changed 7 years ago by Maddes <maddes_trac@…>

mtd kernel size 0x00120000, replaces target/linux/orion/patches/100-openwrt_partition_map.patch

comment:3 Changed 7 years ago by kaloz

if you want to help, track down the rootfs_split but on orion with 2.6.30, where the kernel size isn't an issue.

comment:4 Changed 7 years ago by Maddes <maddes_trac@…>

Would like but I'm not an Linux developer, doesn't even know how to debug on Linux.
Are there any information to get into it?
Btw I'm maddes.b in the forums.

comment:5 Changed 7 years ago by Maddes <maddes_trac@…>

Does r16939 include the solution for this rootfs splitting bug?

comment:6 Changed 7 years ago by kaloz

yeah.. I'll do one more test and upgrade the kernel

comment:7 Changed 7 years ago by kaloz

  • Resolution set to fixed
  • Status changed from new to closed

the 2.6.30 upgrade has been commited

comment:8 Changed 22 months ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.