head	1.2;
access;
symbols
	netbsd-11-0-RC5:1.2
	netbsd-11-0-RC4:1.2
	netbsd-11-0-RC3:1.2
	netbsd-11-0-RC2:1.2
	netbsd-11-0-RC1:1.2
	perseant-exfatfs-base-20250801:1.2
	netbsd-11:1.2.0.54
	netbsd-11-base:1.2
	netbsd-10-1-RELEASE:1.2
	perseant-exfatfs-base-20240630:1.2
	perseant-exfatfs:1.2.0.52
	perseant-exfatfs-base:1.2
	netbsd-8-3-RELEASE:1.2
	netbsd-9-4-RELEASE:1.2
	netbsd-10-0-RELEASE:1.2
	netbsd-10-0-RC6:1.2
	netbsd-10-0-RC5:1.2
	netbsd-10-0-RC4:1.2
	netbsd-10-0-RC3:1.2
	netbsd-10-0-RC2:1.2
	thorpej-ifq:1.2.0.50
	thorpej-ifq-base:1.2
	thorpej-altq-separation:1.2.0.48
	thorpej-altq-separation-base:1.2
	netbsd-10-0-RC1:1.2
	netbsd-10:1.2.0.46
	netbsd-10-base:1.2
	bouyer-sunxi-drm:1.2.0.44
	bouyer-sunxi-drm-base:1.2
	netbsd-9-3-RELEASE:1.2
	thorpej-i2c-spi-conf2:1.2.0.42
	thorpej-i2c-spi-conf2-base:1.2
	thorpej-futex2:1.2.0.40
	thorpej-futex2-base:1.2
	thorpej-cfargs2:1.2.0.38
	thorpej-cfargs2-base:1.2
	cjep_sun2x-base1:1.2
	cjep_sun2x:1.2.0.36
	cjep_sun2x-base:1.2
	cjep_staticlib_x-base1:1.2
	netbsd-9-2-RELEASE:1.2
	cjep_staticlib_x:1.2.0.34
	cjep_staticlib_x-base:1.2
	thorpej-i2c-spi-conf:1.2.0.32
	thorpej-i2c-spi-conf-base:1.2
	thorpej-cfargs:1.2.0.30
	thorpej-cfargs-base:1.2
	thorpej-futex:1.2.0.28
	thorpej-futex-base:1.2
	netbsd-9-1-RELEASE:1.2
	bouyer-xenpvh-base2:1.2
	phil-wifi-20200421:1.2
	bouyer-xenpvh-base1:1.2
	phil-wifi-20200411:1.2
	bouyer-xenpvh:1.2.0.26
	bouyer-xenpvh-base:1.2
	is-mlppp:1.2.0.24
	is-mlppp-base:1.2
	phil-wifi-20200406:1.2
	netbsd-8-2-RELEASE:1.2
	ad-namecache-base3:1.2
	netbsd-9-0-RELEASE:1.2
	netbsd-9-0-RC2:1.2
	ad-namecache-base2:1.2
	ad-namecache-base1:1.2
	ad-namecache:1.2.0.22
	ad-namecache-base:1.2
	netbsd-9-0-RC1:1.2
	phil-wifi-20191119:1.2
	netbsd-9:1.2.0.20
	netbsd-9-base:1.2
	phil-wifi-20190609:1.2
	netbsd-8-1-RELEASE:1.2
	netbsd-8-1-RC1:1.2
	isaki-audio2:1.2.0.18
	isaki-audio2-base:1.2
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	netbsd-7-2-RELEASE:1.1
	pgoyette-compat-0728:1.2
	netbsd-8-0-RELEASE:1.2
	phil-wifi:1.2.0.16
	phil-wifi-base:1.2
	pgoyette-compat-0625:1.2
	netbsd-8-0-RC2:1.2
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	netbsd-8-0-RC1:1.2
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	netbsd-7-1-2-RELEASE:1.1
	pgoyette-compat:1.2.0.14
	pgoyette-compat-base:1.2
	netbsd-7-1-1-RELEASE:1.1
	tls-maxphys-base-20171202:1.2
	matt-nb8-mediatek:1.2.0.12
	matt-nb8-mediatek-base:1.2
	nick-nhusb-base-20170825:1.2
	perseant-stdc-iso10646:1.2.0.10
	perseant-stdc-iso10646-base:1.2
	netbsd-8:1.2.0.8
	netbsd-8-base:1.2
	prg-localcount2-base3:1.2
	prg-localcount2-base2:1.2
	prg-localcount2-base1:1.2
	prg-localcount2:1.2.0.6
	prg-localcount2-base:1.2
	pgoyette-localcount-20170426:1.2
	bouyer-socketcan-base1:1.2
	jdolecek-ncq:1.2.0.4
	jdolecek-ncq-base:1.2
	pgoyette-localcount-20170320:1.2
	netbsd-7-1:1.1.0.26
	netbsd-7-1-RELEASE:1.1
	netbsd-7-1-RC2:1.1
	nick-nhusb-base-20170204:1.2
	netbsd-7-nhusb-base-20170116:1.1
	bouyer-socketcan:1.2.0.2
	bouyer-socketcan-base:1.2
	pgoyette-localcount-20170107:1.1
	netbsd-7-1-RC1:1.1
	nick-nhusb-base-20161204:1.1
	pgoyette-localcount-20161104:1.1
	netbsd-7-0-2-RELEASE:1.1
	nick-nhusb-base-20161004:1.1
	localcount-20160914:1.1
	netbsd-7-nhusb:1.1.0.24
	netbsd-7-nhusb-base:1.1
	pgoyette-localcount-20160806:1.1
	pgoyette-localcount-20160726:1.1
	pgoyette-localcount:1.1.0.22
	pgoyette-localcount-base:1.1
	nick-nhusb-base-20160907:1.1
	nick-nhusb-base-20160529:1.1
	netbsd-7-0-1-RELEASE:1.1
	nick-nhusb-base-20160422:1.1
	nick-nhusb-base-20160319:1.1
	nick-nhusb-base-20151226:1.1
	netbsd-7-0:1.1.0.20
	netbsd-7-0-RELEASE:1.1
	nick-nhusb-base-20150921:1.1
	netbsd-7-0-RC3:1.1
	netbsd-7-0-RC2:1.1
	netbsd-7-0-RC1:1.1
	nick-nhusb-base-20150606:1.1
	nick-nhusb-base-20150406:1.1
	nick-nhusb:1.1.0.18
	nick-nhusb-base:1.1
	netbsd-7:1.1.0.16
	netbsd-7-base:1.1
	yamt-pagecache:1.1.0.14
	yamt-pagecache-base9:1.1
	tls-earlyentropy:1.1.0.12
	tls-earlyentropy-base:1.1
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1
	riastradh-drm2-base3:1.1
	rmind-smpnet-nbase:1.1
	riastradh-drm2-base2:1.1
	riastradh-drm2-base1:1.1
	riastradh-drm2:1.1.0.10
	riastradh-drm2-base:1.1
	rmind-smpnet:1.1.0.8
	rmind-smpnet-base:1.1
	tls-maxphys-base:1.1
	tls-maxphys:1.1.0.6
	khorben-n900:1.1.0.4
	agc-symver:1.1.0.2
	agc-symver-base:1.1;
locks; strict;
comment	@# @;


1.2
date	2017.01.12.05.41.25;	author skrll;	state Exp;
branches;
next	1.1;
commitid	KLqljXHicKEDIDBz;

1.1
date	2013.03.08.12.32.31;	author jmcneill;	state Exp;
branches
	1.1.6.1
	1.1.14.1
	1.1.18.1
	1.1.22.1;
next	;

1.1.6.1
date	2013.03.08.12.32.31;	author tls;	state dead;
branches;
next	1.1.6.2;
commitid	eVjr9caYRQbRGHUw;

1.1.6.2
date	2013.06.23.06.20.23;	author tls;	state Exp;
branches;
next	1.1.6.3;
commitid	eVjr9caYRQbRGHUw;

1.1.6.3
date	2017.12.03.11.38.04;	author jdolecek;	state Exp;
branches;
next	;
commitid	XcIYRZTAh1LmerhA;

1.1.14.1
date	2013.03.08.12.32.31;	author yamt;	state dead;
branches;
next	1.1.14.2;
commitid	VUUXuyNWnt3AKwBx;

1.1.14.2
date	2014.05.22.11.40.59;	author yamt;	state Exp;
branches;
next	;
commitid	VUUXuyNWnt3AKwBx;

1.1.18.1
date	2017.02.05.13.40.54;	author skrll;	state Exp;
branches;
next	;
commitid	8hwpk1aHl2UuyLEz;

1.1.22.1
date	2017.03.20.06.57.46;	author pgoyette;	state Exp;
branches;
next	;
commitid	jjw7cAwgyKq7RfKz;


desc
@@


1.2
log
@Sync with latest github/raspberrypi/linux sources

XXX should provide a vchiq2netbsd and cvs import
@
text
@#!/usr/bin/perl -w

use strict;

#
# Generate a version from available information
#

my $prefix = shift @@ARGV;
my $root = shift @@ARGV;


if ( not defined $root ) {
	die "usage: $0 prefix root-dir\n";
}

if ( ! -d $root ) {
	die "root directory $root not found\n";
}

my $version = "unknown";
my $tainted = "";

if ( -d "$root/.git" ) {
	# attempt to work out git version. only do so
	# on a linux build host, as cygwin builds are
	# already slow enough

	if ( -f "/usr/bin/git" || -f "/usr/local/bin/git" ) {
		if (not open(F, "git --git-dir $root/.git rev-parse --verify HEAD|")) {
			$version = "no git version";
		}
		else {
			$version = <F>;
			$version =~ s/[ \r\n]*$//;     # chomp may not be enough (cygwin).
			$version =~ s/^[ \r\n]*//;     # chomp may not be enough (cygwin).
		}

		if (open(G, "git --git-dir $root/.git status --porcelain|")) {
			$tainted = <G>;
			$tainted =~ s/[ \r\n]*$//;     # chomp may not be enough (cygwin).
			$tainted =~ s/^[ \r\n]*//;     # chomp may not be enough (cygwin).
			if (length $tainted) {
			$version = join ' ', $version, "(tainted)";
		}
		else {
			$version = join ' ', $version, "(clean)";
         }
		}
	}
}

my $hostname = `hostname`;
$hostname =~ s/[ \r\n]*$//;     # chomp may not be enough (cygwin).
$hostname =~ s/^[ \r\n]*//;     # chomp may not be enough (cygwin).


print STDERR "Version $version\n";
print <<EOF;
#include "${prefix}_build_info.h"
#include <linux/broadcom/vc_debug_sym.h>

VC_DEBUG_DECLARE_STRING_VAR( ${prefix}_build_hostname, "$hostname" );
VC_DEBUG_DECLARE_STRING_VAR( ${prefix}_build_version, "$version" );
VC_DEBUG_DECLARE_STRING_VAR( ${prefix}_build_time,    __TIME__ );
VC_DEBUG_DECLARE_STRING_VAR( ${prefix}_build_date,    __DATE__ );

const char *vchiq_get_build_hostname( void )
{
   return vchiq_build_hostname;
}

const char *vchiq_get_build_version( void )
{
   return vchiq_build_version;
}

const char *vchiq_get_build_date( void )
{
   return vchiq_build_date;
}

const char *vchiq_get_build_time( void )
{
   return vchiq_build_time;
}
EOF
@


1.1
log
@BCM2835 VCHIQ device driver
@
text
@d44 5
a48 5
   			$version = join ' ', $version, "(tainted)";
   		}
   		else {
   			$version = join ' ', $version, "(clean)";
         }   		
a87 2


@


1.1.22.1
log
@Sync with HEAD
@
text
@d44 5
a48 5
			$version = join ' ', $version, "(tainted)";
		}
		else {
			$version = join ' ', $version, "(clean)";
         }
d88 2
@


1.1.18.1
log
@Sync with HEAD
@
text
@d44 5
a48 5
			$version = join ' ', $version, "(tainted)";
		}
		else {
			$version = join ' ', $version, "(clean)";
         }
d88 2
@


1.1.14.1
log
@file vchiq_genversion was added on branch yamt-pagecache on 2014-05-22 11:40:59 +0000
@
text
@d1 89
@


1.1.14.2
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@a0 89
#!/usr/bin/perl -w

use strict;

#
# Generate a version from available information
#

my $prefix = shift @@ARGV;
my $root = shift @@ARGV;


if ( not defined $root ) {
	die "usage: $0 prefix root-dir\n";
}

if ( ! -d $root ) {
	die "root directory $root not found\n";
}

my $version = "unknown";
my $tainted = "";

if ( -d "$root/.git" ) {
	# attempt to work out git version. only do so
	# on a linux build host, as cygwin builds are
	# already slow enough

	if ( -f "/usr/bin/git" || -f "/usr/local/bin/git" ) {
		if (not open(F, "git --git-dir $root/.git rev-parse --verify HEAD|")) {
			$version = "no git version";
		}
		else {
			$version = <F>;
			$version =~ s/[ \r\n]*$//;     # chomp may not be enough (cygwin).
			$version =~ s/^[ \r\n]*//;     # chomp may not be enough (cygwin).
		}

		if (open(G, "git --git-dir $root/.git status --porcelain|")) {
			$tainted = <G>;
			$tainted =~ s/[ \r\n]*$//;     # chomp may not be enough (cygwin).
			$tainted =~ s/^[ \r\n]*//;     # chomp may not be enough (cygwin).
			if (length $tainted) {
   			$version = join ' ', $version, "(tainted)";
   		}
   		else {
   			$version = join ' ', $version, "(clean)";
         }   		
		}
	}
}

my $hostname = `hostname`;
$hostname =~ s/[ \r\n]*$//;     # chomp may not be enough (cygwin).
$hostname =~ s/^[ \r\n]*//;     # chomp may not be enough (cygwin).


print STDERR "Version $version\n";
print <<EOF;
#include "${prefix}_build_info.h"
#include <linux/broadcom/vc_debug_sym.h>

VC_DEBUG_DECLARE_STRING_VAR( ${prefix}_build_hostname, "$hostname" );
VC_DEBUG_DECLARE_STRING_VAR( ${prefix}_build_version, "$version" );
VC_DEBUG_DECLARE_STRING_VAR( ${prefix}_build_time,    __TIME__ );
VC_DEBUG_DECLARE_STRING_VAR( ${prefix}_build_date,    __DATE__ );

const char *vchiq_get_build_hostname( void )
{
   return vchiq_build_hostname;
}

const char *vchiq_get_build_version( void )
{
   return vchiq_build_version;
}

const char *vchiq_get_build_date( void )
{
   return vchiq_build_date;
}

const char *vchiq_get_build_time( void )
{
   return vchiq_build_time;
}
EOF


@


1.1.6.1
log
@file vchiq_genversion was added on branch tls-maxphys on 2013-06-23 06:20:23 +0000
@
text
@d1 89
@


1.1.6.2
log
@resync from head
@
text
@a0 89
#!/usr/bin/perl -w

use strict;

#
# Generate a version from available information
#

my $prefix = shift @@ARGV;
my $root = shift @@ARGV;


if ( not defined $root ) {
	die "usage: $0 prefix root-dir\n";
}

if ( ! -d $root ) {
	die "root directory $root not found\n";
}

my $version = "unknown";
my $tainted = "";

if ( -d "$root/.git" ) {
	# attempt to work out git version. only do so
	# on a linux build host, as cygwin builds are
	# already slow enough

	if ( -f "/usr/bin/git" || -f "/usr/local/bin/git" ) {
		if (not open(F, "git --git-dir $root/.git rev-parse --verify HEAD|")) {
			$version = "no git version";
		}
		else {
			$version = <F>;
			$version =~ s/[ \r\n]*$//;     # chomp may not be enough (cygwin).
			$version =~ s/^[ \r\n]*//;     # chomp may not be enough (cygwin).
		}

		if (open(G, "git --git-dir $root/.git status --porcelain|")) {
			$tainted = <G>;
			$tainted =~ s/[ \r\n]*$//;     # chomp may not be enough (cygwin).
			$tainted =~ s/^[ \r\n]*//;     # chomp may not be enough (cygwin).
			if (length $tainted) {
   			$version = join ' ', $version, "(tainted)";
   		}
   		else {
   			$version = join ' ', $version, "(clean)";
         }   		
		}
	}
}

my $hostname = `hostname`;
$hostname =~ s/[ \r\n]*$//;     # chomp may not be enough (cygwin).
$hostname =~ s/^[ \r\n]*//;     # chomp may not be enough (cygwin).


print STDERR "Version $version\n";
print <<EOF;
#include "${prefix}_build_info.h"
#include <linux/broadcom/vc_debug_sym.h>

VC_DEBUG_DECLARE_STRING_VAR( ${prefix}_build_hostname, "$hostname" );
VC_DEBUG_DECLARE_STRING_VAR( ${prefix}_build_version, "$version" );
VC_DEBUG_DECLARE_STRING_VAR( ${prefix}_build_time,    __TIME__ );
VC_DEBUG_DECLARE_STRING_VAR( ${prefix}_build_date,    __DATE__ );

const char *vchiq_get_build_hostname( void )
{
   return vchiq_build_hostname;
}

const char *vchiq_get_build_version( void )
{
   return vchiq_build_version;
}

const char *vchiq_get_build_date( void )
{
   return vchiq_build_date;
}

const char *vchiq_get_build_time( void )
{
   return vchiq_build_time;
}
EOF


@


1.1.6.3
log
@update from HEAD
@
text
@d44 5
a48 5
			$version = join ' ', $version, "(tainted)";
		}
		else {
			$version = join ' ', $version, "(clean)";
         }
d88 2
@


