1 // SPDX-License-Identifier: GPL-2.0
6 int main( int argc
, const char * argv
[] )
13 if(argv
[1] && strcmp(argv
[1],"-i")==0)
22 fprintf(stderr
, "bin2hex: [-i] firmware\n");
27 printf( "/* automatically generated by bin2hex */\n" );
28 printf( "static unsigned char %s [] %s =\n{\n", varname
, id
?"__initdata":"");
30 while ( ( c
= getchar( ) ) != EOF
)
32 if ( i
!= 0 && i
% 10 == 0 )
34 printf( "0x%02lx,", c
& 0xFFl
);
38 printf( "};\nstatic int %sLen = %d;\n", varname
, i
);