I am using buildroot to generate an OS and would like to append a dynamically-generated version string to the linux kernel version to be reported with uname -r. I see that I can set a fixed string with the linux's LOCALVERSION configuration option, but I don't have a way to populate that dynamically at build time.
I also see you can add a file to the linux src tree name "localversion*" that will append to the version string, but I can't find a hook or way to generate that file pre-build. Buildroot has a great post-build script, but I need the file generated pre-build. My current thought is to create a patch that can add the version file, but I still can't find a way within the buildroot process to generate that patch file with my desired string.
Does buildroot have a pre-build hook or the like that I can generate that patch file, and apply it after the linux src is downloaded, but before it is compiled?