Help compiling OpenWrt for RB5009

Good night/day everyone.

I too have become the proud owner of an RB5009 (the non-PoE out UG+S+IN model), and since we will need Asterix in the future, as well as running a PPPoE server on OpenWrt being much easier than on RouterOS (I need to run diagnostics with our personal and the ISP's VDSL2 equipment (we will be switching over to fiber soon, after we manage to unclog the pipes), since for some odd reason we are unable to use our own equipment, despite there being no whitelist or any obvious non-standard settings. and other customers (I have a friend who just joined them, with my recommendation) having no issues using whatever hardware they want with them (we too had no such issues when we were with them a few years ago)).

I am currently trying to compile version v23.05.0, however I cannot seem to apply the appropriate patch linked in the wiki page for some reason.

The errors are as follows:

mikrotik.patch:161: space before tab in indent.
 	cat "bin/aux-loader.elf" "$@" > "$@.tmp" &&	\
mikrotik.patch:162: space before tab in indent.
 	cat "$@.tmp" > "$@" && rm -f "$@.tmp"
error: corrupt binary patch at line 173: zcmeI1eSB2ana7`d?_?%#gd`*o6KZY{fuxuX7&NGrn->ra3MQkn+xC+gk_j2}o*6U&
error: patch failed: target/linux/generic/files/drivers/platform/mikrotik/rb_softconfig.c:58
error: target/linux/generic/files/drivers/platform/mikrotik/rb_softconfig.c: patch does not apply

I am far from knowledgeable when it comes to patches, so I have no idea how to even tell how the patch should be.

Update: It seems that wget downloaded an html file instead of the patch, so never mind for now.

Add .txt to the patch URL before wgetting it :slight_smile:

1 Like

I just figured it out a second before you posted, but thank you regardless.

Updated: All is well now, however updating the feeds is taking a long time, due to (expected) slow download speeds.

make informed me that the adron's config is out of sync, so I am running menu config.

Should I enable ramdisk (TARGET_ROOTFS_INITRAMFS)?

This is my first time compiling OpenWrt.

Update: It appears that according to the wiki, it should be enabled, at least for the RouterBoards.

At the very bottom of the 0paste page there is a 'Raw' button to get the plain text patch as well.

@moriel5 I'm not sure how old your config was, but CONFIG_TARGET_ROOTFS_INITRAMFS=y is switched on by default. What isn't is CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA=y, which you need as well.


I'm just using adron's config, according to the instructions on his GitHub project page (it's located in issue #2).
Thanks, I'll do that.

Edit: It appears that LZMA is already part of the configuration.

Update: Now I wonder whether or not I should enable performance events and counters.

I tried continuing, however quite a few of the options lack information that would allow me to intelligently decide what to select, and following the defaults works for the most part, however there are parts where it looks like it may be a mistake to follow the defaults (like not enabling package feeds). so I am quite stuck at this point.

I suggest you open a new topic for your issues, that's not the point of this thread. As for 'new' features in menuconfig, there's 99% a default which is capitalised (e.g. Y/n).

1 Like

Yeah, that would be a good idea, thank you for that. And sorry for polluting this thread.

I'll check if someone has already opened such a thread, and if not, I'll do so myself.

A post was merged into an existing topic: Add support for MikroTik RB5009UG

I created the separate RB5009UPr target to the tree, with necessary changes for PoE. I'm on top of 23.05-rc3 with the patches blob applied as a start point.

Instead of going locally with patches, can you recommend the the most fresh git(hub) with all of them applied to the branch, so I can rebase on top of it?

Does anyone who compiled successfully have answer to this issue.
I saw several config and build.config files that have these set


but with that my build fails.

Update - I've changed the values to 5 and 1024, compiled and then flashed the build 23.05. Works OK.