Date: Sun, 26 Feb 2017 13:25:48 +0100 From: Milan Obuch <freebsd-hackers@dino.sk> To: freebsd-hackers@freebsd.org Subject: kern.ostype - where gets its value? Message-ID: <20170226132548.69223dcd@zeta.dino.sk>
next in thread | raw e-mail | index | archive | help
Hi, I am building FreeBSD from source all the time, and recently I realised there is something I do not fully understand. I use 'svn update' to fetch current source tree and for various devices I share this tree via nfs. It is at least convenient for smaller devices like Orange Pi or Pine64, svn is run once and used on more devices. This has one effect I do not like - kernel compiled on machine used for 'svn update' gets full version information including svn revision number, as in # uname -v FreeBSD 10.3-STABLE #0 r313019: Wed Feb 1 07:07:02 CET 2017 root@tiny.dino.sk:/usr/obj/usr/src/sys/TINY (line wrapped) versus missing revision as in # uname -v FreeBSD 12.0-CURRENT #0: Thu Feb 2 05:00:09 CET 2017 root@tiny.dino.sk:/usr/obj/usr/src/sys/ALLWINNER_ONE (again, line wrapped by mailer, by these are just an examples). =46rom my experience it looks like this problem is caused by svn not being able to be run on nfs mounted directory, no matter the architecture - today I tried with both server and client running 10.3-STABLE on i386, svn just fails. So I think this is root cause for missing svn revision number, buildkernel process somehow uses svn to fetch svn revision number, fails, and then just omits it. If I undestand it right, this information is put into /sys/kern/kern_mib.c file's kern.version sysctl, maybe via some include or some generated .c file is used for it. Could someone point me to the right direction how is this done? I would like to find at least some workaround for that... Regards, Milan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170226132548.69223dcd>