[Berlin-wireless] WRTJTAG
Sven-Ola Tuecke
mail2news
Fr Apr 28 09:35:16 CEST 2006
Andreas,
das ja doll - na klar interessiert das und zwar genau dann wenn ich mal
meinen eigenen GS1.0 verflashen sollte.
Grusz, Sven-Ola
"Andreas Seidler" <tetzlav at web.de> schrieb im Newsbeitrag
news:44514EF2.7060308 at web.de...
...also falls es wen interessiert; ich habs hinbekommen! :)
Dieser GSv1.0 hatte einen sog. "StrataFlash J3" (TE28F640-J3C120 ->
http://forum.openwrt.org/viewtopic.php?id=5254)
Dieser braucht für das JTAG-Tool
(http://downloads.openwrt.org/utils/HairyDairyMaid_WRT54G_Debrick_Utility_v45.zip)
einen Patch
(http://wiki.openwrt.org/JTAG_Cables?action=AttachFile&do=get&target=debrick-wiggler.patch.gz).
Da wird ein bischen am Timing optimiert.
Diesen Patch darf man aber nicht einfach anwenden, sondern muß noch die
beiden ersten Abschnitte bzgl. Wigger- & Xilinx-Kabel rausschmeisen.
(debrick-StrataFlash.patch angehängt) Sonst funktioniert das flashen
auch wieder nicht... :o/
Dann ein 'make' und schon konnte ich einen neuen CFE.BIN aufspielen.
Jetzt funkt der GSv1.0 wieder fröhlich vor sich hin! :D
Gruß aus Leipzig
tetzlav
Andreas Seidler schrieb:
> Hallo,
>
> Ich hab hier einen WRT54GSv1.0 bei welchem vermutlich der Bootloader hin
> ist. In der Seriellen Konsole sieht man zwar wie der Bootloader läd und
> ich bekomme mit ^C ne Konsole aber immer wieder "Bootprogramm Checksum
> Invalid" (oder so ähnlich)
> Das Flashen via JTAG ansich scheint auch zu funktionieren, nur bootet
> jetzt nichmal mehr der Bootloader. Ich hab auch das Backup des cfe
> wieder geflasht, aber das mag auch nicht mehr. :( Ich hab die
> verschiedensten Versionen (v2.1-v4.5) von wrt54g mit den
> unterschiedlichsten Optionen (dma,nodma,...) getestet, den ganzen FLASH
> gelöscht, ... - ohne Erfolg.
--
"Der Mensch kann wohl tun was er will - aber er kann nicht wollen was er
will!" ©Arthur Schopenhauer
--------------------------------------------------------------------------------
> diff -burN wrt54g_orig.c wrt54g.c
> --- wrt54g_orig.c 2006-04-01 16:35:21.801523064 -0500
> +++ wrt54g.c 2006-04-01 16:29:05.000000000 -0500
> @@ -420,6 +420,16 @@
> // ---------------------------------------
>
>
> +void tdelay(int secs, int nsecs)
> +{
> + struct timespec delay;
> +
> + delay.tv_sec = secs;
> + delay.tv_nsec = nsecs;
> + nanosleep(&delay, NULL);
> +}
> +
> +
> void test_reset(void)
> {
> clockin(1, 0); // Run through a handful of clock cycles with TMS high
> to make sure
> @@ -1295,10 +1305,12 @@
> //Unlock Block
> ejtag_write_h(addr, 0x00600060); // Unlock Flash Block Command
> ejtag_write_h(addr, 0x00D000D0); // Confirm Command
> + tdelay(2, 0); // Wait for unlock command
> to complete
>
> //Erase Block
> ejtag_write_h(addr, 0x00200020); // Block Erase Command
> ejtag_write_h(addr, 0x00D000D0); // Confirm Command
> + tdelay(5, 0); // Wait for erase command to
> complete
>
> while (ejtag_read_h(FLASH_MEMORY_START) != 0x0080) {}
>
> @@ -1392,11 +1404,13 @@
> // Handle Half Of Word
> ejtag_write_h(addr, 0x00400040); // Write Command
> ejtag_write_h(addr, data_lo); // Send HalfWord Data
> + tdelay(0, 700); // Wait for write
> command to complete
> while (ejtag_read_h(addr) != 0x0080) {} // Wait for completion
> of write
>
> // Now Handle Other Half Of Word
> ejtag_write_h(addr+2, 0x00400040); // Write Command
> ejtag_write_h(addr+2, data_hi); // Send HalfWord Data
> + tdelay(0, 700); // Wait for write
> command to complete
> while (ejtag_read_h(addr) != 0x0080) {} // Wait for completion
> of write
> }
> }
>
--------------------------------------------------------------------------------
_______________________________________________
Berlin mailing list
Berlin at olsrexperiment.de
https://www.olsrexperiment.de/cgi-bin/mailman/listinfo/berlin
_______________________________________________
Berlin mailing list
Berlin at olsrexperiment.de
https://www.olsrexperiment.de/cgi-bin/mailman/listinfo/berlin
Mehr Informationen über die Mailingliste Berlin