User Tools

Site Tools


docs:techref:bootloader:routerboot

RouterBOOT

RouterBOOT is MikroTik's closed source bootloader. The information contained in this page is based on reverse engineering experiments and may not be fully accurate.

Findings

Version 6.46.4 on RB493G

Routerboot will load an ELF binary under the following conditions:

  • 0x8000-0000 ⇐ load address < 0x8070-0000
  • load address + size < 0x8070-0000

Any other value will trigger a « kernel is out of range » error. Thus only 7MB is available to load an ELF binary from TFTP.

The load address doesn’t seem to have to satisfy any wide alignment: 0x802D-1BC4 was successfully loaded.

RouterBOOT seems to honor the entry point address (TBC).

It also appears that RouterBOOT tftp routine loads at offset 0x80A0-0000

Implications

The standard self-decompressing kernel is linked at a load address that starts after the decompressed kernel (it is computed in arch/mips/boot/compressed/calc_vmlinuz_load_addr): it's thus not suitable because it makes the problem worse.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
docs/techref/bootloader/routerboot.txt · Last modified: 2020/06/05 13:47 by f00b4r0