Only in LX2.62/freebios/util/flash_and_burn/: .arch-ids
diff -u LX2.62/freebios/util/flash_and_burn/flash.h RD1/flash.h
--- LX2.62/freebios/util/flash_and_burn/flash.h	2005-07-05 20:00:12.000000000 +0000
+++ RD1/flash.h	2005-08-04 16:33:40.854347032 +0000
@@ -20,6 +20,7 @@
 
 	int fd_mem;
 	volatile char *virt_addr_2;
+	int fix_it;
 };
 
 #define AMD_ID            0x01
diff -u LX2.62/freebios/util/flash_and_burn/flash_rom.c RD1/flash_rom.c
--- LX2.62/freebios/util/flash_and_burn/flash_rom.c	2005-07-05 20:00:12.000000000 +0000
+++ RD1/flash_rom.c	2005-08-04 21:13:43.795471096 +0000
@@ -148,25 +148,27 @@
 
 int verify_flash(struct flashchip *flash, char *buf, int verbose)
 {
-	int i;
+	int i, nfailed = 0;
 	int total_size = flash->total_size * 1024;
 	volatile char *bios = flash->virt_addr;
 
-	printf("Verifying address: ");
+	printf("Verifying address:\n");
 	for (i = 0; i < total_size; i++) {
+		unsigned int rom, file;
 		if (verbose)
 			printf("0x%08x", i);
-		if (*(bios + i) != *(buf + i)) {
-			printf("FAILED\n");
-			return 0;
+		rom = *(bios + i);
+		file = *(buf + i);
+		if ( rom != file ) {
+			printf("FAILED addr:%x rom:%x file:%x\n", i, rom, file);
+			nfailed++;
 		}
 		if (verbose)
 			printf("\b\b\b\b\b\b\b\b\b\b");
 	}
 	if (verbose)
 		printf("\n");
-	else
-		printf("VERIFIED\n");
+	printf("result: %s\n", (nfailed == 0) ? "VERIFIED" : "FAILED" );
 	return 1;
 }
 
@@ -195,8 +197,8 @@
 	struct flashchip *flash;
 	int opt;
 	int read_it = 0, write_it = 0, erase_it = 0, verify_it = 0,
-		verbose = 0;
-	char *filename = NULL;
+		verbose = 0, fix_it = 0;
+	char *filename = NULL, *flash_name = NULL;
 
 
         unsigned int exclude_start_position=0, exclude_end_position=0; // [x,y)
@@ -212,7 +214,7 @@
 
 	setbuf(stdout, NULL);
 
-	while ((opt = getopt(argc, argv, "rwvVEc:s:e:")) != EOF) {
+	while ((opt = getopt(argc, argv, "rwvVEFc:s:e:t:")) != EOF) {
 		switch (opt) {
 		case 'r':
 			read_it = 1;
@@ -240,6 +242,12 @@
 			tempstr = strdup(optarg);
 			sscanf(tempstr,"%x",&exclude_end_position);
 			break;
+		case 'F':
+			fix_it = 1;
+			break;
+		case 't':
+			flash_name = strdup(optarg);
+			break;
 
 		default:
 			usage(argv[0]);
@@ -269,7 +277,15 @@
 		exit(1);
 	}
 
+	flash->fix_it = fix_it;
+
 	printf("Part is %s\n", flash->name);
+	
+	if(flash_name && (strcmp(flash_name, flash->name) != 0 )) {
+			printf("ERR: flash chip is not you specified.\n");
+			exit(-1);
+	}
+
 	if (!filename && !erase_it) {
 		printf("OK, only ENABLING flash write, but NOT FLASHING\n");
 		return 0;
diff -u LX2.62/freebios/util/flash_and_burn/jedec.c RD1/jedec.c
--- LX2.62/freebios/util/flash_and_burn/jedec.c	2005-07-05 20:00:12.000000000 +0000
+++ RD1/jedec.c	2005-08-04 16:38:05.081178448 +0000
@@ -158,8 +158,8 @@
 {
 	int tried = 0;
 
-	/* If the data is 0xFF, don't program it */
-	if (*src == 0xFF) {
+	/* If the data is same as the one on the rom, don't program it */
+	if (*src == *dst) {
 		return 0;
 	}
 
diff -u LX2.62/freebios/util/flash_and_burn/w49f002u.c RD1/w49f002u.c
--- LX2.62/freebios/util/flash_and_burn/w49f002u.c	2005-07-05 20:00:12.000000000 +0000
+++ RD1/w49f002u.c	2005-08-04 16:36:53.975988080 +0000
@@ -39,10 +39,11 @@
 		flash->page_size;
 	volatile char *bios = flash->virt_addr;
 
-	erase_chip_jedec(flash);
+	if(!flash->fix_it)
+		erase_chip_jedec(flash);
 
 	printf("Programming Page: ");
-	for (i = 0; i < total_size; i++) {
+	for (i = 0; i < total_size / page_size; i++) {
 		/* write to the sector */
 		printf("%04d at address: 0x%08x ", i, i * page_size);
 		write_sector_jedec(bios, buf + i * page_size,
