Only in LX2.62/freebios/util/flash_and_burn/: .arch-ids
diff -c LX2.62/freebios/util/flash_and_burn/flash.h RD1/flash.h
*** LX2.62/freebios/util/flash_and_burn/flash.h	Tue Jul  5 20:00:12 2005
--- RD1/flash.h	Thu Aug  4 16:33:40 2005
***************
*** 20,25 ****
--- 20,26 ----
  
  	int fd_mem;
  	volatile char *virt_addr_2;
+ 	int fix_it;
  };
  
  #define AMD_ID            0x01
diff -c LX2.62/freebios/util/flash_and_burn/flash_rom.c RD1/flash_rom.c
*** LX2.62/freebios/util/flash_and_burn/flash_rom.c	Tue Jul  5 20:00:12 2005
--- RD1/flash_rom.c	Thu Aug  4 21:13:43 2005
***************
*** 148,172 ****
  
  int verify_flash(struct flashchip *flash, char *buf, int verbose)
  {
! 	int i;
  	int total_size = flash->total_size * 1024;
  	volatile char *bios = flash->virt_addr;
  
! 	printf("Verifying address: ");
  	for (i = 0; i < total_size; i++) {
  		if (verbose)
  			printf("0x%08x", i);
! 		if (*(bios + i) != *(buf + i)) {
! 			printf("FAILED\n");
! 			return 0;
  		}
  		if (verbose)
  			printf("\b\b\b\b\b\b\b\b\b\b");
  	}
  	if (verbose)
  		printf("\n");
! 	else
! 		printf("VERIFIED\n");
  	return 1;
  }
  
--- 148,174 ----
  
  int verify_flash(struct flashchip *flash, char *buf, int verbose)
  {
! 	int i, nfailed = 0;
  	int total_size = flash->total_size * 1024;
  	volatile char *bios = flash->virt_addr;
  
! 	printf("Verifying address:\n");
  	for (i = 0; i < total_size; i++) {
+ 		unsigned int rom, file;
  		if (verbose)
  			printf("0x%08x", i);
! 		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");
! 	printf("result: %s\n", (nfailed == 0) ? "VERIFIED" : "FAILED" );
  	return 1;
  }
  
***************
*** 195,202 ****
  	struct flashchip *flash;
  	int opt;
  	int read_it = 0, write_it = 0, erase_it = 0, verify_it = 0,
! 		verbose = 0;
! 	char *filename = NULL;
  
  
          unsigned int exclude_start_position=0, exclude_end_position=0; // [x,y)
--- 197,204 ----
  	struct flashchip *flash;
  	int opt;
  	int read_it = 0, write_it = 0, erase_it = 0, verify_it = 0,
! 		verbose = 0, fix_it = 0;
! 	char *filename = NULL, *flash_name = NULL;
  
  
          unsigned int exclude_start_position=0, exclude_end_position=0; // [x,y)
***************
*** 212,218 ****
  
  	setbuf(stdout, NULL);
  
! 	while ((opt = getopt(argc, argv, "rwvVEc:s:e:")) != EOF) {
  		switch (opt) {
  		case 'r':
  			read_it = 1;
--- 214,220 ----
  
  	setbuf(stdout, NULL);
  
! 	while ((opt = getopt(argc, argv, "rwvVEFc:s:e:t:")) != EOF) {
  		switch (opt) {
  		case 'r':
  			read_it = 1;
***************
*** 240,245 ****
--- 242,253 ----
  			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,275 ****
--- 277,291 ----
  		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 -c LX2.62/freebios/util/flash_and_burn/jedec.c RD1/jedec.c
*** LX2.62/freebios/util/flash_and_burn/jedec.c	Tue Jul  5 20:00:12 2005
--- RD1/jedec.c	Thu Aug  4 16:38:05 2005
***************
*** 158,165 ****
  {
  	int tried = 0;
  
! 	/* If the data is 0xFF, don't program it */
! 	if (*src == 0xFF) {
  		return 0;
  	}
  
--- 158,165 ----
  {
  	int tried = 0;
  
! 	/* If the data is same as the one on the rom, don't program it */
! 	if (*src == *dst) {
  		return 0;
  	}
  
diff -c LX2.62/freebios/util/flash_and_burn/w49f002u.c RD1/w49f002u.c
*** LX2.62/freebios/util/flash_and_burn/w49f002u.c	Tue Jul  5 20:00:12 2005
--- RD1/w49f002u.c	Thu Aug  4 16:36:53 2005
***************
*** 39,48 ****
  		flash->page_size;
  	volatile char *bios = flash->virt_addr;
  
! 	erase_chip_jedec(flash);
  
  	printf("Programming Page: ");
! 	for (i = 0; i < total_size; i++) {
  		/* write to the sector */
  		printf("%04d at address: 0x%08x ", i, i * page_size);
  		write_sector_jedec(bios, buf + i * page_size,
--- 39,49 ----
  		flash->page_size;
  	volatile char *bios = flash->virt_addr;
  
! 	if(!flash->fix_it)
! 		erase_chip_jedec(flash);
  
  	printf("Programming Page: ");
! 	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,
