On 2015-10-30 15:03, Toke Høiland-Jørgensen wrote: > Felix Fietkau <[email protected]> writes: > >> As far as I know, the build-id is build host specific, so I don't think >> it will really help you with tracking versions of other people's >> builds. > > Yup. But you can pass it explicitly to the linker: > > LDFLAGS_MODULE=--build-id=0x$(PKG_SOURCE_VERSION) > > where PKG_SOURCE_VERSION is the git hash. > >> I think for what you're trying to do, it might be better to use >> something else. You could just embed a custom section in your module >> containing a git hash of the source tree, or something like that. > > Well the nice thing about this is that it requires very little change in > other places: The facility to export it in sysfs is already in the > kernel, and it's a one-line change to the build invocation (as above) to > get it included. > > If you're opposed to adding this change, I guess that adding a custom > note section to the module might be an alternative way to go about it; > if I can figure out how to do that... How about this: add it per-package, but add it in a way that you can set PKG_BUILD_ID:=$(PKG_SOURCE_VERSION) and this will add the linker command and disable the build-id stripping.
- Felix _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
