summaryrefslogtreecommitdiff
path: root/recipes/cetools/files/sean-hsieh.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/cetools/files/sean-hsieh.patch
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/cetools/files/sean-hsieh.patch')
-rw-r--r--recipes/cetools/files/sean-hsieh.patch97
1 files changed, 97 insertions, 0 deletions
diff --git a/recipes/cetools/files/sean-hsieh.patch b/recipes/cetools/files/sean-hsieh.patch
new file mode 100644
index 0000000000..ce1b4965af
--- /dev/null
+++ b/recipes/cetools/files/sean-hsieh.patch
@@ -0,0 +1,97 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- cetools-0.3/bin2rom.c~sean-hsieh
++++ cetools-0.3/bin2rom.c
+@@ -14,6 +14,12 @@
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ History:
++ 07/14/2000 Sean Hsieh
++ Clear padding bytes of the input buffer when
++ "blockSize < BLOCKSIZE" to avoid the checksum
++ error
+ */
+ #include <stdio.h>
+ #include <sys/stat.h>
+@@ -28,7 +34,7 @@
+
+ #define min(a, b) (a<b)?(a):(b)
+
+-int bin2rom( char * inputName, char * outputName, long start, long boot )
++int bin2rom( char * inputName, char * outputName, long start, long boot, long record )
+ {
+ int input;
+ int output;
+@@ -48,7 +54,7 @@
+
+ int reste;
+
+- printf("bin2rom : input filename = %s, output filename = %s, start = 0x%lx, boot=0x%lx\n", inputName, outputName, start, boot );
++ printf("bin2rom : input filename = %s, output filename = %s, start = 0x%08lx, boot=0x%08lx, record=0x%08lx\n", inputName, outputName, start, boot, record );
+
+ input = open( inputName, O_RDONLY );
+ if( input == -1 )
+@@ -247,7 +253,14 @@
+ while( reste > 0 )
+ {
+ blockSize = min( BLOCKSIZE, reste );
+-
++ /**********************************************************************/
++ /* Modified by Sean Hsieh */
++ /* Clear the padding bytes to zero, this can avoid the checksum error */
++ /**********************************************************************/
++ if ( blockSize != BLOCKSIZE ) {
++ memset( inStart, 0, BLOCKSIZE );
++ //printf( "adding padding bytes\n" );
++ }
+ read( input, inStart, blockSize );
+
+ #ifdef MAP_OUTPUT
+@@ -285,7 +298,8 @@
+
+ write( output, &boot, 4);
+
+- write( output, &nullData, 4);
++ //write( output, &nullData, 4);
++ write( output, &record, 4);
+
+ #endif
+
+@@ -339,17 +353,26 @@
+ {
+ long start;
+ long boot;
++ long record;
+
+- if( argc < 5 )
++ if ( argc < 5 )
+ {
+- printf("bin2rom: <input file> <output file> <start address> <boot address>\n");
+- exit( -1 );
++ printf("bin2rom: <input file> <output file> <start address> <boot address> [<record address>] [-s] [-c]\n");
++ exit( -1 );
+ }
+
+ sscanf( argv[3], "%lx", &start );
+ sscanf( argv[4], "%lx", &boot );
+-
+- bin2rom( argv[1], argv[2], start, boot );
++ if ( argc >= 6 )
++ {
++ sscanf( argv[5], "%lx", &record );
++ }
++ else
++ {
++ record = 0xffffffff;
++ }
++
++ bin2rom( argv[1], argv[2], start, boot, record );
+
+ return 0;
+ }
+\ No newline at end of file