From 0b18bd2ae2db1e6fd15e859b00b23bb39886f528 Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Wed, 19 Nov 2014 12:15:07 +1100 Subject: Implement skiboot versioning We grab a version from git tags (or SKIBOOT_VERSION environment variable), optionally tack on EXTRA_VERSION (if from git) as well as add things to the git version number if we're ahead of the most recent tag or the tree is dirty. Also fix-up makefiles so that we don't have to rebuild version.c every time you run make. fsp attn area needed updating as we can have >40 character version strings. We also export the version string via device tree rather than just the gitid. For buildroot builds, setting SKIBOOT_VERSION environment variable to the tag you grab will do the correct thing. Signed-off-by: Stewart Smith --- include/fsp-attn.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/fsp-attn.h') diff --git a/include/fsp-attn.h b/include/fsp-attn.h index 947c49f..1eaa5bb 100644 --- a/include/fsp-attn.h +++ b/include/fsp-attn.h @@ -59,14 +59,14 @@ struct sp_attn_area { #define TI_MSG_LEN 940 /* Maximum sapphire version length (approx) */ -#define GITID_LEN 40 +#define VERSION_LEN 80 /* Upto 10 frames each of length 40 bytes + header = 430 bytes */ #define BT_FRAME_LEN 430 /* File info length : Use the rest of the memory for file details */ -#define FILE_INFO_LEN (TI_MSG_LEN - GITID_LEN - BT_FRAME_LEN) +#define FILE_INFO_LEN (TI_MSG_LEN - VERSION_LEN - BT_FRAME_LEN) struct user_data { - char gitid[GITID_LEN]; + char version[VERSION_LEN]; char bt_buf[BT_FRAME_LEN]; char file_info[FILE_INFO_LEN]; } __packed; -- cgit v1.1