Wondering if anyone here might have some tips on building a Linux kernel that will boot on an RB1100-series board, bare-metal. I have a set of patches against 2.6.35 straight from MikroTik (includes support for all RouterBOARDs manufactured as of RouterOS 5.0; this is NOT the same as the MetaROUTER-only patches to 2.6.31 that MikroTik distributes publicly on the wiki). I have applied these patches and built a kernel using a PowerPC cross-compiler (gcc 4.1.2). The resulting kernel image boots up just fine inside of PowerPC MetaROUTER and runs great! However, when I try to Netboot the same kernel image (ELF-wrapped, either with or without an initrd attached), after RouterBOOT prints “jumping to kernel code”, it hangs. I get nothing further on the serial console.
Thinking it may just be a problem with console output, I have tried to append “console=ttyS0,115200” to the kernel boot parameters, but that didn’t fix it. I also tried “ttyS1”. Finally, I hooked a serial header to the second serial port block on the board to see if maybe the console output was accidentally being sent to that (again both with ttyS0 and ttyS1), and still nothing. I think that it really is hanging when trying to load the kernel. Unfortunately, I get no output to give me any clues as to what is going wrong, so I have no idea what to try next.
It’s always nice to know that you have other options for hardware that you own. Maybe I’ll run into something that I want to do with a high-end RouterBOARD that RouterOS can’t/won’t do. I don’t have any specific reason right now, but down the road, who knows…
Right now, I am actually more interested in netbooting a custom kernel with a custom userland so I can gain access to the raw filesystem on the NAND in order to experiment with MetaROUTER-related problems in the same manner that I was able to do with the MIPSBE platform.
I am also interested in seeing if I can get the dual-core versions of the 1100 (the Hx2 and AHx2) to boot the uniprocessor kernel so that I can use MetaROUTER on those devices.
It appears to be kernel size related. I remember reading elsewhere or hearing a rumor about a possible kernel size limit problem with RouterBOOT when netbooting, and I can confirm that if the kernel is > 4MB in size, RouterBOOT chokes on it, but does not give you an error. I am running 3.07 and this is still an issue, not just on MIPS, but also on PPC. (I stripped the initrd image from my custom kernel, which brought it down under 4MB, and it netbooted fine. So I am going to have to work on giving my kernel + initrd image a diet, apparently.)
Final update: got this to work. It wasn’t (just?) the size of the kernel, though. I was led to believe that the size was the problem after I read this: [u]http://lists.freebsd.org/pipermail/freebsd-mips/2012-March/001891.html[/u] – taking the initramfs out of the kernel shrunk the size below 4MB and perhaps coincidentally made it work.
I found, though, that if I enabled CONFIG_BLK_DEV_INITRD in the kernel build configuration, even if I left the initramfs off of the kernel, it still wouldn’t boot. So I dug around in the patch set from MikroTik, and found a patch to arch/powerpc/kernel/prom.c that made a call to memblock_reserve() if that config option was enabled. I rolled the patch to that particular file (prom.c) back, rebuilt the kernel, and voila: it booted. I’m not sure what the point of that change is or why it is needed, but for me, it works without it.
Where did you get the patch set with rb1100 supoprt? I’m stuck with the kernel booting. I’ve tried to boot the openwrt with P1020 config(which should be fine) but with no luck (kernel hungs on “jumping to kernel code”)
Sorry, didn’t see this until now. Under the terms of the GPL, MikroTik will give you Linux kernel patches on written request; just send e-mail to their support department. The particular patches I was working from when I started this thread were the ones they sent me for kernel 2.6.35, which is the kernel version they used for RouterOS 5. The RB1100 support was included in these patches.
Kernel 3.3.5 is what RouterOS 6 is based off of, and they actually have a download for those patches available here: http://www.mikrotik.com/download/share/linux_3_3_5_patch.gz. These patches might not be completely up-to-date, but obviously should include RB1100 support. If patches for your RouterBoard hardware are not included, for the absolute most current version, you can ask MikroTik support.
Press any key within 2 seconds to enter setup..
trying dhcp protocol… OK
resolved mac address 00:1D:72:92:FF:C4
Gateway: 10.0.0.1
transfer started … transfer ok, time=0.27s
setting up elf image… OK
jumping to kernel code