I’m trying to compile my own image of OpenWrt. I’m following the tutorial http://wiki.mikrotik.com/wiki/Manual:Metarouter but when it ends, then the following message appears:
Applying patch platform/099-mips_module_reloc_fix.patch
patching file arch/mips/kernel/module.c
Hunk #1 FAILED at 191
1 out of 1 hunk FAILED – rejects in file arch/mips/kernel/module.c
Patch platform/099-mips_module_reloc_fix.patch does not apply (enforce with -f)
What version of the MT patch are you using, and what version of OpenWRT are you trying to apply the patch to? Not all combinations have been tested, and it’s been a while since MT has updated the patch. You will probably have to compare the part of the patch that failed to be applied (usually output as the file name with a .rej suffixed to the end) with the context provided for the patch in the patch file, and figure out how to modify the file being patched manually.
OpenWrt version: development branch as is indicated in the tutorial and also in the wiki - openwrt (http://wiki.openwrt.org/toh/mikrotik/rb433). I get this branch from svn co svn://svn.openwrt.org/openwrt/trunk
This packages are cross-compiled using ubuntu 10.10 32bits.
Perhaps you should take a look at my response to another poster who asked a similar question in this thread.
MikroTik’s v1.2 patch, which is 2 years old, requires kernel 2.6.31, which was ripped from OpenWRT ‘trunk’ a few weeks ago. You should either try building Kamikaze using my patch (linked to in the other thread), or getting revision 31411 from OpenWRT SVN, which was the last revision of ‘trunk’ to have 2.6.31 support. (No guarantees that r31411 will work; I have not tried it. I can only tell you that r31412 is where they removed 2.6.31 according to SVN changelogs.)
MikroTik’s v1.1 patch requires kernel 2.6.27, which is not supported in Kamikaze, Backfire, or Attitude Adjustment/trunk. So you will have the same problem there. Back when MikroTik released that patch, trunk had 2.6.27 support, and when MikroTik released v1.2, trunk had 2.6.31. OpenWRT ‘trunk’ is a moving target and constantly changing, so the instructions on the Wiki page are outdated and don’t work anymore unless you can grab the same release of ‘trunk’ that MikroTik was using when they crafted these patches.
You will either have to restore 2.6.31 support to whatever version of OpenWRT you want to build using MikroTik’s patch, or try your hand at porting their patches to a recent version of the kernel. Recent versions of ‘trunk’ only build against kernels 3.1, 3.2, and 3.3.