summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/intel/xe7501devkit/cmos.layout3
-rw-r--r--util/options/build_opt_tbl.c14
2 files changed, 13 insertions, 4 deletions
diff --git a/src/mainboard/intel/xe7501devkit/cmos.layout b/src/mainboard/intel/xe7501devkit/cmos.layout
index 57139c1cd5..39cfc31784 100644
--- a/src/mainboard/intel/xe7501devkit/cmos.layout
+++ b/src/mainboard/intel/xe7501devkit/cmos.layout
@@ -52,4 +52,5 @@ enumerations
checksums
# Checksum FROM bit-location TO bit-location STORE AT bit-location
-#checksum 1024 1047 1048
+checksum 1024 1047 1048
+
diff --git a/util/options/build_opt_tbl.c b/util/options/build_opt_tbl.c
index 910c49cce2..b4e4151dc1 100644
--- a/util/options/build_opt_tbl.c
+++ b/util/options/build_opt_tbl.c
@@ -608,9 +608,17 @@ int main(int argc, char **argv)
fprintf(fp, "#define CMOS_VLEN_%s %d\n",
ce->name, ce->length);
}
- fprintf(fp, "\n#define LB_CKS_RANGE_START %d\n", cs->range_start / 8);
- fprintf(fp, "#define LB_CKS_RANGE_END %d\n", cs->range_end / 8);
- fprintf(fp, "#define LB_CKS_LOC %d\n", cs->location / 8);
+
+ if (cs != NULL) {
+ fprintf(fp, "\n#define LB_CKS_RANGE_START %d\n", cs->range_start / 8);
+ fprintf(fp, "#define LB_CKS_RANGE_END %d\n", cs->range_end / 8);
+ fprintf(fp, "#define LB_CKS_LOC %d\n", cs->location / 8);
+ } else {
+ fprintf(stderr, "Error - No checksums defined.\n");
+ fclose(fp);
+ unlink(tempfilename);
+ exit(1);
+ }
fclose(fp);
UNLINK_IF_NECESSARY(header);