Re: [concordance-devel] [PATCH] Harmony 700 support
Stephen, You're 700 patch breaks config dumps - at least for the 880, but I would guess for all remotes. I've been trying to track down what broke, but so far have been unsuccessful. The symptom is: [p...@rider libconcord]$ sudo concordance -c /tmp/tout Concordance 0.21+CVS Copyright 2007 Kevin Timmerman and Phil Dibowitz This software is distributed under the GPLv3. Requesting Identity: 100% done terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Dumping config: Aborted Backtrace looks like: (gdb) bt #0 0xb7fe1424 in __kernel_vsyscall () #1 0xb7e813d0 in raise () from /lib/i686/cmov/libc.so.6 #2 0xb7e84a85 in abort () from /lib/i686/cmov/libc.so.6 #3 0xb7e1a9e8 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6 #4 0xb7e188c5 in ?? () from /usr/lib/libstdc++.so.6 #5 0xb7e18902 in std::terminate() () from /usr/lib/libstdc++.so.6 #6 0xb7e18a3a in __cxa_throw () from /usr/lib/libstdc++.so.6 #7 0xb7e19093 in operator new(unsigned int) () from /usr/lib/libstdc++.so.6 #8 0xb7e1917d in operator new[](unsigned int) () from /usr/lib/libstdc++.so.6 #9 0xb7fbdb52 in read_config_from_remote (out=0xbc00, size=0xbbfc, cb=0x804b3a0 cb_print_percent_status, cb_arg=0x1) at libconcord.cpp:796 #10 0x0804b34f in dump_config (options=0xbc30, file_name=0xbe3e /tmp/tout, cb=0x804b3a0 cb_print_percent_status, cb_arg=0x0) at concordance.c:414 #11 0x0804bdfb in main (argc=Cannot access memory at address 0x317d ) at concordance.c:1295 I'm guessing it's got something to do with the fact you changed the layout of the TArchInfo structure and something else doesn't know about that... but I haven't figured out precisely what. -- Phil Dibowitz p...@ipom.com Open Source software and tech docsInsanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seuss signature.asc Description: OpenPGP digital signature -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] [PATCH] Harmony 700 support
On 07/31/2010 08:01 AM, Phil Dibowitz wrote: Stephen, You're 700 patch breaks config dumps - at least for the 880, but I would guess for all remotes. ... #8 0xb7e1917d in operator new[](unsigned int) () from /usr/lib/libstdc++.so.6 #9 0xb7fbdb52 in read_config_from_remote (out=0xbc00, size=0xbbfc, cb=0x804b3a0cb_print_percent_status, cb_arg=0x1) at libconcord.cpp:796 #10 0x0804b34f in dump_config (options=0xbc30, file_name=0xbe3e /tmp/tout, cb=0x804b3a0cb_print_percent_status, cb_arg=0x0) at concordance.c:414 #11 0x0804bdfb in main (argc=Cannot access memory at address 0x317d ) at concordance.c:1295 The failing code in frame 8 is: *size = ri.config_bytes_used; *out = new uint8_t[*size]; but *size == 0xfffe08f7, way too large. This is calculated in CRemote::GetIdentity(). I suspect I botched the remote_info ArchList[] table that's used in those calculations when I reformatted it. I'll double-check all the values and fix this tonight... -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm ___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] [PATCH] Harmony 700 support
On 07/28/2010 03:30 AM, Stephen Warren wrote: Worse and following on from that, the format of the firmware file is much more complex; it's a zip file containing a top-level XML description file and a separate file for each region to be updated, or something like that. The 1000s have this for config updates as well. :( -- Phil Dibowitz p...@ipom.com Open Source software and tech docsInsanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seuss signature.asc Description: OpenPGP digital signature -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] [PATCH] Harmony 700 support
On 07/27/2010 05:54 AM, Stephen Warren wrote: On 07/26/2010 01:04 PM, Phil Dibowitz wrote: On Sat, Jul 24, 2010 at 07:58:27PM -0600, Stephen Warren wrote: OK. I added the prep_config/finish_config to test.pl and validated that this works on the 700. Updated version is attached. Thanks! I did a more thorough look through the code this time. There's only one thing, which I've put below. BTW - Greg accepted the kernel patch, it'll merge into Linus' tree at the next merge window. Index: libconcord/remote.cpp === RCS file: /cvsroot/concordance/concordance/libconcord/remote.cpp,v retrieving revision 1.39 diff -u -p -r1.39 remote.cpp --- libconcord/remote.cpp 11 Feb 2009 20:00:13 - 1.39 +++ libconcord/remote.cpp 25 Jul 2010 01:55:19 - @@ -103,7 +103,7 @@ int CRemote::GetIdentity(TRemoteInfori const unsigned int rx_len = rsp[0] 0x0F; if ((rsp[0] 0xF0) != RESPONSE_VERSION_DATA || - (rx_len != 7 rx_len != 5)) { + (rx_len != 5 rx_len != 7 rx_len != 8)) { debug(Bogus ident response: %02X, rsp[1]); return LC_ERROR_INVALID_DATA_FROM_REMOTE; } @@ -117,7 +117,13 @@ int CRemote::GetIdentity(TRemoteInfori ri.architecture = rx_len 6 ? 2 : rsp[5] 4; ri.fw_type = rx_len 6 ? 0 : rsp[5] 0x0F; ri.skin = rx_len 6 ? 2 : rsp[6]; - ri.protocol = rx_len 7 ? 0 : rsp[7]; + if (rx_len 7) { + ri.protocol = 0; + } else if (rx_len 8) { + ri.protocol = rsp[7]; + } else { + ri.protocol = ri.architecture; + } Wait, this doesn't seem right. protocol is a binary field which either says to use one rxlenmap or another, and also to determine if the max_chunk_len for reading flash is 700 or 1022. So in the case of the 700 your making it 14, which will have the same effect as '1', but isn't quite what we want either. Am I completely missing something here? Yes, this is a little odd. However, IIRC, this matches what the official software prints. Or perhaps it doesn't print the value, but some field in the HTTP responses is the value of ri.protocol at least in libconcord, and the offical software sends 14 here. I don't think the value of ri.protocol is solely 0 or 1 on existing remotes? I had thought it was based on the way it was used, I've never actually bothered to look at the values. I'll see what my 880 has it set to when I get home from work tonight. (Wow, I just noticed after I apply this patch, I need to submit a style cleanup patch for this whole function). -- Phil Dibowitz p...@ipom.com Open Source software and tech docsInsanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seuss signature.asc Description: OpenPGP digital signature -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] [PATCH] Harmony 700 support
On 07/27/2010 10:19 AM, Phil Dibowitz wrote: Yes, this is a little odd. However, IIRC, this matches what the official software prints. Or perhaps it doesn't print the value, but some field in the HTTP responses is the value of ri.protocol at least in libconcord, and the offical software sends 14 here. I don't think the value of ri.protocol is solely 0 or 1 on existing remotes? I had thought it was based on the way it was used, I've never actually bothered to look at the values. I'll see what my 880 has it set to when I get home from work tonight. You are correct, sir. My 880's protocol is '8'. Applying patch now. -- Phil Dibowitz p...@ipom.com Open Source software and tech docsInsanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seuss signature.asc Description: OpenPGP digital signature -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] [PATCH] Harmony 700 support
On 07/27/2010 01:44 PM, Phil Dibowitz wrote: I've also updated the website's supported-models page to list the arch of the 700, link to the bug, and say it's supported in CVS. Out of curiosity, have you looked into firmware support at all? I did a little. From the protocol side, I think there were a few minor differences of similar order of magnitude to the changes required for configuration support; a couple of small extra messages that I think had static content. The hard part is that there are multiple disjoint regions of firmware that must be updated, so the firmware parsing API would have to be updated to represent this. Worse and following on from that, the format of the firmware file is much more complex; it's a zip file containing a top-level XML description file and a separate file for each region to be updated, or something like that. Still, it's probably within possibility to get working, it'll just require API and application changes etc. -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] [PATCH] Harmony 700 support
On 07/26/2010 09:04 PM, Phil Dibowitz wrote: Wait, this doesn't seem right. protocol is a binary field which either says to use one rxlenmap or another, and also to determine if the max_chunk_len for reading flash is 700 or 1022. So in the case of the 700 your making it 14, which will have the same effect as '1', but isn't quite what we want either. This paragraph is confusing. The first 700 is referring to an integer in the code, the second 700 is referring to the model number. Sorry. -- Phil Dibowitz p...@ipom.com Open Source software and tech docsInsanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seuss signature.asc Description: OpenPGP digital signature -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] [PATCH] Harmony 700 support
On 07/26/2010 01:04 PM, Phil Dibowitz wrote: On Sat, Jul 24, 2010 at 07:58:27PM -0600, Stephen Warren wrote: OK. I added the prep_config/finish_config to test.pl and validated that this works on the 700. Updated version is attached. Thanks! I did a more thorough look through the code this time. There's only one thing, which I've put below. BTW - Greg accepted the kernel patch, it'll merge into Linus' tree at the next merge window. Index: libconcord/remote.cpp === RCS file: /cvsroot/concordance/concordance/libconcord/remote.cpp,v retrieving revision 1.39 diff -u -p -r1.39 remote.cpp --- libconcord/remote.cpp11 Feb 2009 20:00:13 - 1.39 +++ libconcord/remote.cpp25 Jul 2010 01:55:19 - @@ -103,7 +103,7 @@ int CRemote::GetIdentity(TRemoteInfori const unsigned int rx_len = rsp[0] 0x0F; if ((rsp[0] 0xF0) != RESPONSE_VERSION_DATA || -(rx_len != 7 rx_len != 5)) { +(rx_len != 5 rx_len != 7 rx_len != 8)) { debug(Bogus ident response: %02X, rsp[1]); return LC_ERROR_INVALID_DATA_FROM_REMOTE; } @@ -117,7 +117,13 @@ int CRemote::GetIdentity(TRemoteInfori ri.architecture = rx_len 6 ? 2 : rsp[5] 4; ri.fw_type = rx_len 6 ? 0 : rsp[5] 0x0F; ri.skin = rx_len 6 ? 2 : rsp[6]; -ri.protocol = rx_len 7 ? 0 : rsp[7]; +if (rx_len 7) { +ri.protocol = 0; +} else if (rx_len 8) { +ri.protocol = rsp[7]; +} else { +ri.protocol = ri.architecture; +} Wait, this doesn't seem right. protocol is a binary field which either says to use one rxlenmap or another, and also to determine if the max_chunk_len for reading flash is 700 or 1022. So in the case of the 700 your making it 14, which will have the same effect as '1', but isn't quite what we want either. Am I completely missing something here? Yes, this is a little odd. However, IIRC, this matches what the official software prints. Or perhaps it doesn't print the value, but some field in the HTTP responses is the value of ri.protocol at least in libconcord, and the offical software sends 14 here. I don't think the value of ri.protocol is solely 0 or 1 on existing remotes? -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] [PATCH] Harmony 700 support
On 07/24/2010 12:50 AM, Phil Dibowitz wrote: On Fri, Jul 23, 2010 at 09:41:14PM -0600, Stephen Warren wrote: On 07/23/2010 12:40 PM, Phil Dibowitz wrote: On Thu, Jul 22, 2010 at 07:18:50PM -0600, Stephen Warren wrote: Oh, and I added the new functions to the Python bindings too, which I forgot before. Cool. Can you either (1) do the same for the perl bindings or (2) create a bug (and assign it to me) to do it? Um, do the Perl bindings work at all? I don't see any implementation of pretty much any libconcord functionality. Perhaps swig automatically parses libconcord.h and auto-generates the functions? If so, I guess it'll just work for the new functions, just like it does for the existing similar functions? It reads libconcord.h to generate every function, and there's a lot of overrides and custom handling in concord.i. However, in this case test.pl needs to be updated for the new firmware changes you did, plus make sure it works for the 700 (it needs to call prep/post update and make sure the swig bindings work correctly and no additional overrides are needed). OK. I added the prep_config/finish_config to test.pl and validated that this works on the 700. Updated version is attached. ? install ? concordance/.deps ? concordance/.libs ? concordance/Makefile ? concordance/Makefile.in ? concordance/aclocal.m4 ? concordance/autom4te.cache ? concordance/concordance ? concordance/config.h ? concordance/config.h.in ? concordance/config.log ? concordance/config.status ? concordance/configure ? concordance/libtool ? concordance/ltmain.sh ? concordance/stamp-h1 ? consnoop/consnoop ? libconcord/.deps ? libconcord/.libconcord.h.swp ? libconcord/.libs ? libconcord/Makefile ? libconcord/Makefile.in ? libconcord/aclocal.m4 ? libconcord/autom4te.cache ? libconcord/binaryfile.lo ? libconcord/config.guess ? libconcord/config.h ? libconcord/config.h.in ? libconcord/config.log ? libconcord/config.status ? libconcord/config.sub ? libconcord/configure ? libconcord/depcomp ? libconcord/install-sh ? libconcord/libconcord.la ? libconcord/libconcord.lo ? libconcord/libtool ? libconcord/libusbhid.lo ? libconcord/ltmain.sh ? libconcord/missing ? libconcord/remote.lo ? libconcord/remote_z.lo ? libconcord/stamp-h1 ? libconcord/usblan.lo ? libconcord/web.lo ? libconcord/bindings/perl/.concord.pm.swp ? libconcord/bindings/perl/.test.pl.swp ? libconcord/bindings/perl/Makefile ? libconcord/bindings/perl/blib ? libconcord/bindings/perl/concord.bs ? libconcord/bindings/perl/concord.pm ? libconcord/bindings/perl/concord_wrap.c ? libconcord/bindings/perl/pm_to_blib ? libconcord/bindings/python/libconcord.pyc Index: concordance/concordance.c === RCS file: /cvsroot/concordance/concordance/concordance/concordance.c,v retrieving revision 1.39 diff -u -p -r1.39 concordance.c --- concordance/concordance.c 5 Jul 2009 13:46:56 - 1.39 +++ concordance/concordance.c 25 Jul 2010 01:55:19 - @@ -467,6 +467,11 @@ int upload_config(uint8_t *data, uint32_ post_preconfig(data, size); } + printf(Preparing Update:); + if ((err = prep_config())) { + return err; + } + printf( done\n); /* * We must invalidate flash before we erase and write so that * nothing will attempt to reference it while we're working. @@ -500,6 +505,12 @@ int upload_config(uint8_t *data, uint32_ } printf( done\n); + printf(Finalizing Update: ); + if ((err = finish_config())) { + return err; + } + printf( done\n); + if ((*options).noreset) { return 0; } Index: libconcord/libconcord.cpp === RCS file: /cvsroot/concordance/concordance/libconcord/libconcord.cpp,v retrieving revision 1.41 diff -u -p -r1.41 libconcord.cpp --- libconcord/libconcord.cpp 20 May 2009 19:46:09 - 1.41 +++ libconcord/libconcord.cpp 25 Jul 2010 01:55:19 - @@ -880,6 +880,28 @@ int verify_remote_config(uint8_t *in, ui return 0; } +int prep_config() +{ + int err = 0; + + if ((err = rmt-PrepConfig(ri))) { + return LC_ERROR; + } + + return 0; +} + +int finish_config() +{ + int err = 0; + + if ((err = rmt-FinishConfig(ri))) { + return LC_ERROR; + } + + return 0; +} + int erase_config(uint32_t size, lc_callback cb, void *cb_arg) { int err = 0; @@ -1023,34 +1045,9 @@ int is_config_safe_after_fw() int prep_firmware() { int err = 0; - uint8_t data[1]; - if (ri.arch-firmware_update_base == ri.arch-firmware_base) { - /* -* The preperation for where the staging area IS the config -* area. -*restart config -*write 1 to flash
Re: [concordance-devel] [PATCH] Harmony 700 support
On Thu, Jul 22, 2010 at 07:18:50PM -0600, Stephen Warren wrote: Oh, and I added the new functions to the Python bindings too, which I forgot before. Cool. Can you either (1) do the same for the perl bindings or (2) create a bug (and assign it to me) to do it? Thanks. -- Phil Dibowitz p...@ipom.com Open Source software and tech docsInsanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seuss signature.asc Description: Digital signature -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] [PATCH] Harmony 700 support
On 07/23/2010 12:40 PM, Phil Dibowitz wrote: On Thu, Jul 22, 2010 at 07:18:50PM -0600, Stephen Warren wrote: Oh, and I added the new functions to the Python bindings too, which I forgot before. Cool. Can you either (1) do the same for the perl bindings or (2) create a bug (and assign it to me) to do it? Um, do the Perl bindings work at all? I don't see any implementation of pretty much any libconcord functionality. Perhaps swig automatically parses libconcord.h and auto-generates the functions? If so, I guess it'll just work for the new functions, just like it does for the existing similar functions? If I'm way off base, I'll happily go file a bug... -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
Re: [concordance-devel] [PATCH] Harmony 700 support
On 07/22/2010 03:38 AM, Stephen Warren wrote: Attached is a patch to support the Harmony 700. Signed-Off-By: Stephen Warren swar...@wwwdotorg.org Note: The new prep_config/finish_config functions are technically required to match the Windows software. However, during my testing, I forgot to update congruity to call those functions, and everything worked as expected. Should I just rip those new functions out? That would significantly reduce the size of the patch, and remove the need to release a new congruity version too. Thanks for all your work Stephen. I've got a lot going on for the next 4 days, but I'll definitely get to this next week. -- Phil Dibowitz p...@ipom.com Open Source software and tech docsInsanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seuss signature.asc Description: OpenPGP digital signature -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ concordance-devel mailing list concordance-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/concordance-devel
[concordance-devel] [PATCH] Harmony 700 support
Attached is a patch to support the Harmony 700. Signed-Off-By: Stephen Warren swar...@wwwdotorg.org Note: The new prep_config/finish_config functions are technically required to match the Windows software. However, during my testing, I forgot to update congruity to call those functions, and everything worked as expected. Should I just rip those new functions out? That would significantly reduce the size of the patch, and remove the need to release a new congruity version too. I've tested the following from congruity using downloads from the website: * Check connectivity * Update configuration * Learn IR ? install ? concordance/.deps ? concordance/.libs ? concordance/Makefile ? concordance/Makefile.in ? concordance/aclocal.m4 ? concordance/autom4te.cache ? concordance/concordance ? concordance/config.h ? concordance/config.h.in ? concordance/config.log ? concordance/config.status ? concordance/configure ? concordance/libtool ? concordance/ltmain.sh ? concordance/stamp-h1 ? consnoop/consnoop ? libconcord/.deps ? libconcord/.libconcord.cpp.swp ? libconcord/.libs ? libconcord/.remote.cpp.swp ? libconcord/.remote.h.swp ? libconcord/.remote_info.h.swp ? libconcord/Makefile ? libconcord/Makefile.in ? libconcord/aclocal.m4 ? libconcord/autom4te.cache ? libconcord/binaryfile.lo ? libconcord/config.guess ? libconcord/config.h ? libconcord/config.h.in ? libconcord/config.log ? libconcord/config.status ? libconcord/config.sub ? libconcord/configure ? libconcord/depcomp ? libconcord/install-sh ? libconcord/libconcord.la ? libconcord/libconcord.lo ? libconcord/libtool ? libconcord/libusbhid.lo ? libconcord/ltmain.sh ? libconcord/missing ? libconcord/remote.lo ? libconcord/remote_z.lo ? libconcord/stamp-h1 ? libconcord/usblan.lo ? libconcord/web.lo ? libconcord/bindings/python/libconcord.pyc Index: concordance/concordance.c === RCS file: /cvsroot/concordance/concordance/concordance/concordance.c,v retrieving revision 1.39 diff -u -p -r1.39 concordance.c --- concordance/concordance.c 5 Jul 2009 13:46:56 - 1.39 +++ concordance/concordance.c 22 Jul 2010 01:26:12 - @@ -467,6 +467,11 @@ int upload_config(uint8_t *data, uint32_ post_preconfig(data, size); } + printf(Preparing Update:); + if ((err = prep_config())) { + return err; + } + printf( done\n); /* * We must invalidate flash before we erase and write so that * nothing will attempt to reference it while we're working. @@ -500,6 +505,12 @@ int upload_config(uint8_t *data, uint32_ } printf( done\n); + printf(Finalizing Update: ); + if ((err = finish_config())) { + return err; + } + printf( done\n); + if ((*options).noreset) { return 0; } Index: libconcord/libconcord.cpp === RCS file: /cvsroot/concordance/concordance/libconcord/libconcord.cpp,v retrieving revision 1.41 diff -u -p -r1.41 libconcord.cpp --- libconcord/libconcord.cpp 20 May 2009 19:46:09 - 1.41 +++ libconcord/libconcord.cpp 22 Jul 2010 01:26:12 - @@ -880,6 +880,36 @@ int verify_remote_config(uint8_t *in, ui return 0; } +int prep_config() +{ + int err = 0; + + if (ri.architecture != 14) { + return 0; + } + + if ((err = rmt-PrepConfig())) { + return LC_ERROR; + } + + return 0; +} + +int finish_config() +{ + int err = 0; + + if (ri.architecture != 14) { + return 0; + } + + if ((err = rmt-FinishConfig())) { + return LC_ERROR; + } + + return 0; +} + int erase_config(uint32_t size, lc_callback cb, void *cb_arg) { int err = 0; Index: libconcord/libconcord.h === RCS file: /cvsroot/concordance/concordance/libconcord/libconcord.h,v retrieving revision 1.21 diff -u -p -r1.21 libconcord.h --- libconcord/libconcord.h 14 Oct 2008 19:35:01 - 1.21 +++ libconcord/libconcord.h 22 Jul 2010 01:26:12 - @@ -275,6 +275,15 @@ int write_config_to_file(uint8_t *in, ui int verify_remote_config(uint8_t *in, uint32_t size, lc_callback cb, void *cb_arg); /* + * Preps the remote for a config upgrade + */ +int prep_config(); +/* + * Tells the remote the config upgrade was successful and that it should + * use the new config upon next reboot. + */ +int finish_config(); +/* * Flash can be changed to 0, but not back to 1, so you must erase the * flash (to 1) in order to write the flash. */ Index: libconcord/remote.cpp === RCS file: /cvsroot/concordance/concordance/libconcord/remote.cpp,v retrieving revision 1.39 diff -u -p -r1.39