Modifications for 1.1.6:
======================================================================
+* Patch by Wolfgang Grandegger, 15 May 2002:
+ Add "filesize" support for "loadb" and "loads" commands
+
+* Some cleanup
+
* Patch by Stefan Roese, 15 May 2002:
- Support for esd CPCI-405 Version 2 added.
int binlen; /* no. of data bytes in S-Rec. */
int type; /* return code for record type */
ulong addr; /* load address from S-Record */
+ ulong size; /* number of bytes transferred */
+ char buf[32];
ulong store_addr;
ulong start_addr = ~0;
ulong end_addr = 0;
case SREC_END3:
case SREC_END4:
udelay (10000);
+ size = end_addr - start_addr + 1;
printf ("\n"
- "## First Load Addr = 0x%08lx\n"
- "## Last Load Addr = 0x%08lx\n"
- "## Total Size = 0x%08lx = %ld Bytes\n",
- start_addr, end_addr,
- end_addr - start_addr + 1,
- end_addr - start_addr + 1
+ "## First Load Addr = 0x%08lX\n"
+ "## Last Load Addr = 0x%08lX\n"
+ "## Total Size = 0x%08lX = %ld Bytes\n",
+ start_addr, end_addr, size, size
);
- flush_cache (addr, end_addr - start_addr + 1);
+ flush_cache (addr, size);
+ sprintf(buf, "%lX", size);
+ setenv("filesize", buf);
return (addr);
case SREC_START:
break;
static ulong load_serial_bin (ulong offset)
{
int size;
+ char buf[32];
set_kerm_bin_mode ((ulong *) offset);
size = k_recv ();
flush_cache (offset, size);
+
+ printf("## Total Size = 0x%08x = %d Bytes\n", size, size);
+ sprintf(buf, "%X", size);
+ setenv("filesize", buf);
+
return offset;
}