How to change build/compile host and name

# cat /proc/version
Linux version 6.1.74 (eugeny@eugeny-VirtualBox) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 12.3.0 r24924-0fd3a6c6c6) 12.3.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Sat Apr 12 21:00:18 2025

On the older version I just edited some source files (do not recall which ones!), and voila. Here I am spending enormous time on finding where it sources host and name, tried to change and export variables in the script calling make

export KBUILD_BUILD_USER
export KBUILD_BUILD_HOST
export LINUX_COMPILE_BY
export LINUX_COMPILE_HOST

as well as instruct make directly

make LINUX_COMPILE_BY=`echo name` KBUILD_BUILD_USER=`echo name` LINUX_COMPILE_HOST=`echo domain` KBUILD_BUILD_HOST=`echo domain`

with no luck. Any idea? Thanks!

Did you check the default config.buildinfo for your target, e.g. https://downloads.openwrt.org/releases/24.10.1/targets/armsr/armv8/config.buildinfo?

1 Like

I added the following entries

CONFIG_KERNEL_BUILD_DOMAIN="buildhost"
CONFIG_KERNEL_BUILD_USER="builder"

into ./bin/targets/sunxi/cortexa7/config.buildinfo but after compilation they disappeared - the file seems to be automatically created basing on some other settings. File modification timestamp confirms this suspicion.

It's guarded by CONFIG_BUILDBOT.

Good, but how to change that? Where's the real source? I recall I spent enormous time on looking for kernel option supporting boot order/boot devices (finally found that). I am sure there's some main place to edit setting username and domain.

git grep KERNEL_BUILD_USER

WTF. It was easier than I thought!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.