Browse Source

fpgautils: Elaborate that bitstream open failures are probably due to missing bitstream package

Luke Dashjr 12 years ago
parent
commit
61c9bce153
1 changed files with 6 additions and 1 deletions
  1. 6 1
      fpgautils.c

+ 6 - 1
fpgautils.c

@@ -914,8 +914,13 @@ FILE *open_xilinx_bitstream(const char *dname, const char *repr, const char *fwf
 
 
 	FILE *f = open_bitstream(dname, fwfile);
 	FILE *f = open_bitstream(dname, fwfile);
 	if (!f)
 	if (!f)
-		bailout(LOG_ERR, "%s: Error opening bitstream file %s",
+	{
+		applog(LOG_ERR, "%s: Error opening bitstream file %s",
 		        repr, fwfile);
 		        repr, fwfile);
+		applog(LOG_ERR, "%s: Did you install the necessary bitstream package?",
+		       repr);
+		return NULL;
+	}
 	if (1 != fread(buf, 2, 1, f))
 	if (1 != fread(buf, 2, 1, f))
 		bailout(LOG_ERR, "%s: Error reading bitstream (magic)",
 		bailout(LOG_ERR, "%s: Error reading bitstream (magic)",
 		        repr);
 		        repr);