changes for nios similar to bfin

This commit is contained in:
2021-09-14 14:41:49 +02:00
parent 0f8869153e
commit 78d8086e71
9 changed files with 174 additions and 77 deletions

View File

@@ -143,7 +143,6 @@ int copyToFlash(ssize_t fsize, char *clientChecksum, char *mess) {
FAIL) {
return FAIL;
}
LOG(logINFO, ("Checksum in Flash verified\n"));
if (waitForFPGAtoTouchFlash(mess) == FAIL) {
return FAIL;
@@ -157,6 +156,7 @@ int getDrive(char *mess) {
strcpy(flashDriveName, "/tmp/SLS_mtd3");
return OK;
#endif
LOG(logDEBUG1, ("Finding flash drive...\n"));
// getting the drive
// root:/> cat /proc/mtd
// dev: size erasesize name
@@ -183,6 +183,7 @@ int getDrive(char *mess) {
return FAIL;
}
memset(flashDriveName, 0, sizeof(flashDriveName));
strcpy(flashDriveName, "/dev/");
strcat(flashDriveName, pch);
LOG(logINFO, ("\tFlash drive found: %s\n", flashDriveName));