Support for Mikrotik Hap AC2

MikroTIk itself released a different wireless package for IPQ40xx which can be downloaded from here:
i.e. within the ZIP file there´s a wifiwave2-7.1beta3-arm.npk which can easily unpacked. The folders also contain new firmware bin files. I´m curious whether they use any opensource parts...

1 Like

I use the source from "git clone -b hAP-ac2-cleanup" to compile a build.
However, the 5GHz download speed only around 16XMbit. Is it normal ? Any method to improve the speed ?

I saw some post said using ath10k-ct-smallbuffers driver. I don't know how to use .

Please help.

Thanks all

1 Like

That does not look correct, I remember getting much higher speeds.
Smallbuffers driver is already included due to 128M of RAM.

1 Like

thank for reply.

Is the smallbuffers driver default to use ?


Yes, its the only one packaged

I would like to try OpenWrt on my hAP AC2.
Where can I download the latest firmware build or do I need to compile my own?
If so, can someone provide a link to a tutorial or a guide on how to compile the firmware as I am new to this.

My current build of firmware for hAP AC2


This is my how to build firmware for hAP AC2

  1. Download ISO nemesis-xfce-20.10.11-k5.4.50-x86_64.iso (Arch Linux version of Porteus)

Logins and passwords (look at this screenshot):

  1. Install Nemesis on your flash drive or HDD >>>
    NOTE. File system that you will be clone openwrt must to be POSIX filesystem (like as ext2, ext4...) and to have a good supply of free space.
    By default all changes will be saved on /mnt/sdb1 (look at option changes=/dev/sdb1 in /boot/syslinux/porteus.cfg)
    3.Warning!* /mnt/sdb1 must to be POSIX filesystem (like as ext2, ext4...)
  2. Boot up from your USB Flash drive or HDD
    Nemesis via second menu - Xfce (changes)
  3. Open terminal and run these commands:
# where is /mnt/sdb1 is POSIX filesystem (like as ext2, ext4...)
cd /mnt/sdb1/
pacman -Syu
pacman -S bash bc bin86 binutils bzip2 cdrkit coreutils diffutils fastjar file-roller findutils firefox flex gawk gcc gettext git intltool libusb libxslt make ncurses openssl patch perl-extutils-makemaker pkgconf python3 rsync sharutils time unzip util-linux wget zlib
git config --global ""
git config --global "YourName"
git clone
cd openwrt
git remote add z1022
git fetch z1022
git merge z1022/hAP-ac2-cleanup
# it open another page, and i use Ctrl S [save], Ctrl X [exit]
git rebase
./scripts/feeds update -a && ./scripts/feeds install -a
# copy your .config to openwrt/
# you can rename config.buildinfo from ready mikrotik hap-ac2 firmware to .config
# and copy this .config to openwrt/
# press Ctrl+H to see hidden files and folders
make menuconfig
make -j$(nproc) clean download world
# for example
# make -j4 V=cs
# where 4 is CPU core - look at your PC configuration
# share your build of firmware for community.

#Initial compilation takes like an hour but subsequent builds are fast, make sure to run each time you rebase (aka update local OpenWRT repo)
./scripts/feeds update -a && ./scripts/feeds install -a
make clean

Снимок экрана от 2020-12-12 13-22-57-min


Technically you can use any Linux distro to compile OpenWrt as long as you have the required build dependencies.

I compiled this build on Ubuntu 20.10 without problems but I forgot to backup the compiled binaries before distrohopping to Arch Linux :upside_down_face:

can you show your 5GHz wifi download speed ?


I only have 75mbps internet but one day I've transferred a file from my phone to my laptop at 220mbps

First image is default settings and router mod.
Second image is ap mod, firewall and dnsmask disable.
I use @Blaze last build on cap ac. Internet speed is 300/15 Mb, maximum speed on my phone is 200/200 I tested.

Sorry guys,
I am not a developer, so would be really appreciated, if somebody creates the guideline:

  1. What and how should be backed up to have the ability to roll back to Router oS (what prerequisites should be?), - license file and that's all? what about making a full dump of existing Router firmware to be able fully recover the routes from this snapshot?
  2. What build (or initial image to download)? - better to keep the link to the top of the page with the latest STABLE one.
  3. What should be installed on Windows PC in order to load the image to hap ac2?
  4. What should be done - after testing image in RAM, and decided to write to flash?

I have been trying to build a firmware package for the past few days, but unfortunately have not managed to get it right.
I downloaded the linux iso, copied to usb flash drive, ran the installer, but cannot boot from it.
Tried with Rufus usb tool and was able to boot from the linux iso, but received error message about saving, creating a dat file.
Tried the commands in the terminal, saw some messages about pacman and keys...nothing else happened.
I only have a Windows 10 PC, I am not familiar with linux and such commands, is there by any chance an all inclusive step-by-step / how-to / beginners guide?
I also checked the OpenWrt wiki guide using VirtualBox and the Debian iso from, but it did not work.
On a positive note, I did manage to install your firmware build on my router and it is working well so far. I use the default config + SQM and Adblock. I noticed that the LAN IP cannot be changed from
WiFi connection range and speed is better than stock firmware.
Will keep researching and try again when I get a chance, hopefully can get official support soon...

  1. Any errors after ran the installer did you see?
  2. Do you use BIOS or UEFI with Secure Boot?
    Open your BIOS and disable Secure Boot, then is use Legacy mode (not UEFI).
    Run gparted and format partition to ext2 FS for example.
    Use this FS for save changes in /boot/syslinux/porteus.cfg (for example changes=/dev/sdb1).
    If you use non POSIX FS, you are must to create dat file for save changes in /boot/syslinux/porteus.cfg (for example changes=/path-to-your-dat-file.dat).
  3. I am able to change LAN IP
  4. ''Tried the commands in the terminal, saw some messages about pacman and keys...nothing else happened.''
    Did you have access to the Internet at this time (what errors do you have)?


New build

Thanks @robimarko and john-tho on GH, hopefully this will get on upstream soon.

Happy holidays :christmas_tree:

If you're on latest Windows 10, Ubuntu 20.04 on WSL2 works fine for compiling OpenWrt after following this guide and installing the required dependencies :wink:

PD: I dual-boot Arch Linux :penguin: along with Windows 10

Hi Geminis3

I find the file "ipq-wifi-mikrotik_hap-ac2_1_arm_cortex-a7_neon-vfpv4.ipk" in your share drive. Whether I need to install it ?


1 Like

No, on the main folder you have two .bin files

  • kernel.bin it's a temporary firmware that should be booted over PXE in order to be able to flash OpenWrt on your router using the sysupgrade file.

  • sysupgrade.bin this file can also be used to upgrade any previous OpenWrt version.

Edit: attached the official install guide

Edit 2:

The packages folder contains the packages compiled against this very specific OpenWrt snapshot.

When a new snapshot gets released the previous ones are unable to install new packages due to dependency errors, so this is useful if you delete certain package and need to reinstall it otherwise just ignore them.

So for getting 470Mbit/s @5.0GHz you basically installed the irqbalance and enabled it by adding /usr/sbin/irqbalance to /etc/rc.local, correct?

@all What is your maximum wireless throughput you achieve with your different builds on either 2.4GHz or 5.0GHz in your hAP ac2 or cAP ac? (Which patches so you use?)

I have failed to build a new snapshot of fw for hAP ac^2

[porteus openwrt]# git merge z1022/hAP-ac2-cleanup
Auto-merging target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch
Auto-merging target/linux/ipq40xx/image/Makefile
CONFLICT (content): Merge conflict in target/linux/ipq40xx/image/Makefile
Auto-merging target/linux/ipq40xx/base-files/lib/upgrade/
Auto-merging target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
Auto-merging target/linux/ipq40xx/base-files/etc/board.d/02_network
Auto-merging package/firmware/ipq-wifi/Makefile
Automatic merge failed; fix conflicts and then commit the result.
[porteus openwrt]# git status
On branch master
Your branch is up to date with 'origin/master'.

You have unmerged paths.
  (fix conflicts and run "git commit")
  (use "git merge --abort" to abort the merge)

Changes to be committed:
	modified:   package/firmware/ipq-wifi/Makefile
	new file:   package/firmware/ipq-wifi/board-mikrotik_hap-ac2.qca4019
	modified:   target/linux/ipq40xx/Makefile
	modified:   target/linux/ipq40xx/base-files/etc/board.d/02_network
	modified:   target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
	modified:   target/linux/ipq40xx/base-files/lib/upgrade/
	new file:   target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts
	new file:   target/linux/ipq40xx/image/
	new file:   target/linux/ipq40xx/image/
	new file:   target/linux/ipq40xx/mikrotik/config-default
	new file:   target/linux/ipq40xx/mikrotik/
	new file:   target/linux/ipq40xx/patches-5.4/301-arm-compressed-add-appended-DTB-section.patch
	new file:   target/linux/ipq40xx/patches-5.4/302-arm-compressed-set-ipq40xx-watchdog-to-allow-boot.patch
	modified:   target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   target/linux/ipq40xx/image/Makefile

[porteus openwrt]#

BTW a new updated ISO of Nemesis nemesis-xfce-20.12.26-k5.4.50-x86_64.iso - can be used for building OpenWRT firmware like this Support for Mikrotik Hap AC2

[*] updated base to 2020-12-26
[*] updated (Syslinux bootloader)