From 30f978d9c1bc64b8fc5afe627fc508ca622c236c Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Wed, 7 Sep 2016 17:46:32 -0700 Subject: [PATCH] Cr50: Flag unofficial images in the version string We often find it handy to build test images that are unlocked or have special powers. To avoid confusing these with production images, this adds a "DEV/" to the version string: "make BOARD=cr50" looks like this: > version Chip: g cr50 B2 Board: 0 RO_A: * 0.0.9/0088a3eb RO_B: 0.0.8/710d4375 RW_A: * 0.0.6/cr50_v1.1.5261-4848d7e RW_B: 0.0.6/cr50_v1.1.5261-4848d7e [...] "CR50_DEV=1 make BOARD=cr50" looks like this: > version Chip: g cr50 B2 Board: 0 RO_A: * 0.0.9/0088a3eb RO_B: 0.0.8/710d4375 RW_A: 0.0.6/cr50_v1.1.5261-4848d7e RW_B: * 0.0.6/DEV/cr50_v1.1.5261-4848d7e [...] BUG=chrome-os-partner:55557 BRANCH=none TEST=make buildall; also.. Build both with and without the CR50_DEV=1 environment variable. Observe that the version string differs even if nothing else does. Change-Id: Ifee9fbf922c2bbb40a1a9d0a716d2d11aa0d3ec2 Signed-off-by: Bill Richardson Reviewed-on: https://chromium-review.googlesource.com/382851 Reviewed-by: Vadim Bendebury --- util/getversion.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/getversion.sh b/util/getversion.sh index 83a1903c75..5d385fda1e 100755 --- a/util/getversion.sh +++ b/util/getversion.sh @@ -71,7 +71,7 @@ get_tree_version() { IFS="${dc}" -ver="${BOARD}_" +ver="${CR50_DEV:+DEV/}${BOARD}_" global_dirty= # set if any of the component repos is 'dirty'. dir_list=( . ) # list of component directories, always includes the EC tree