Can't match vermagic when building custom firmware for Huasifei WH3000 Pro (OpenWrt 25.12.4)

I'm having trouble getting the correct vermagic when building a custom firmware for my Huasifei WH3000 Pro router. I'm trying to build 25.12.4. Here's what I did:

  1. I went to: https://downloads.openwrt.org/releases/25.12.4/targets/mediatek/filogic/

  2. I noticed the commit hash in version.buildinfo (https://downloads.openwrt.org/releases/25.12.4/targets/mediatek/filogic/version.buildinfo) doesn't match the latest commit for the 25.12.4 tag. There's one more commit after the one listed in version.buildinfo.

  3. I cloned the repository:

    bash

    git clone https://github.com/openwrt/openwrt.git
    git checkout 4ccb782af7194604ee6cc3496e86fdb47f134cec
    
  4. I confirmed I'm on the correct commit:

    bash

    git status
    HEAD detached at 4ccb782af7
    
  5. I downloaded the official .config from https://downloads.openwrt.org/releases/25.12.4/targets/mediatek/filogic/config.buildinfo and saved it as .config in the repository folder.

  6. I added a few feeds I need in feeds.conf.default, then ran:

    bash

    ./scripts/feeds update -a && ./scripts/feeds install -a
    make defconfig
    
  7. I ran make menuconfig but changed absolutely nothing. I didn't even select my device profile (left it on "Multiple Device"). I wanted to make sure I didn't alter anything — this is my third day trying to match the vermagic hash. I also verified that in "Kernel modules", all modules are marked as M (I didn't change anything here either).

  8. Then I ran make download, and as suggested here (https://hamy.io/post/0015/how-to-compile-openwrt-and-still-use-the-official-repository/), I ran:

    bash

    make target/linux/compile
    
  9. Finally, I checked the hash in:
    /home/dmtry/openwrtnew/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/linux-6.12.87/.vermagic

    The hash I got is: e93d239514a51e76cf65f1122cd66833

    This doesn't match the kernel version listed in:
    https://downloads.openwrt.org/releases/25.12.4/targets/mediatek/filogic/openwrt-25.12.4-mediatek-filogic.manifest

    The official manifest shows:
    kernel - 6.12.87~82967b4996cac5f682958cca092c9ab1-r1

As a result, I can't use the official OpenWrt repositories with my custom build.

Could someone please tell me what I'm doing wrong? Why is the hash different when I'm trying to use the official config.buildinfo?

The pragmatic workaround to this problem would be to not even try, but just to build everything you want into your own image.

I built the world using the downloaded config.buildinfo and got the correct vermagic. I think trying to build only the kernel changed your results.

ubuntu@buildroot:~/openwrt$ cat ./build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_filogic/linux-6.12.87/.vermagic
82967b4996cac5f682958cca092c9ab1

Thanks! You're right — the issue was that I hadn't done a full build.

Also, instead of bothering to check out a specific commit hash, I just went with:

git clone --branch v25.12.4 --depth 1 https://git.openwrt.org/openwrt/openwrt.git 25.12.4

Anyway, problem solved — I managed to build the firmware with all the packages I needed and the correct vermagic.

If you only used packages from the official Openwrt repo, there's no need to build from source.

In point #6 in the first post, he adds custom feeds.