# HG changeset patch # User Michael Spacefalcon # Date 1367379702 0 # Node ID e2e80a09338e4e3a032ab9fa04a3abb298780e8b # Parent fea204bc7674844b711a519be2a953f0d9f85ca5 fc-sertool actually works; output from loadagent is visible! diff -r fea204bc7674 -r e2e80a09338e loadtools/romload.c --- a/loadtools/romload.c Wed May 01 02:43:17 2013 +0000 +++ b/loadtools/romload.c Wed May 01 03:41:42 2013 +0000 @@ -120,7 +120,7 @@ sum = iramimage.datalen + 5; llen = iramimage.datalen + 4; for (i = 0; i < llen; i++) - sum = iramimage.record[i+1]; + sum += iramimage.record[i+1]; return sum; } @@ -160,7 +160,7 @@ tcflush(target_fd, TCIFLUSH); image_cksum = 0; - for (rec_count = 0; ; rec_count++) { + for (rec_count = 0; ; ) { if (read_s_record(&iramimage) < 0) exit(1); switch (iramimage.record_type) { @@ -200,7 +200,7 @@ write(target_fd, write_cmd, sizeof write_cmd); write(target_fd, iramimage.record + 5, iramimage.datalen); /* update our checksum accumulator */ - image_cksum += ~(compute_block_cksum() & 0xFF); + image_cksum += ~compute_block_cksum() & 0xFF; /* collect response */ resp = expect_response(INTERMEDIATE_TIMEOUT); if (resp != 'w') { @@ -217,7 +217,9 @@ resp); exit(1); } - /* on to the next record! */ + putchar('.'); + fflush(stdout); + rec_count++; } /* got S7 */ fclose(iramimage.openfile); @@ -230,7 +232,7 @@ /* send