Changeset 1498 for trunk/libffado/support/firmware/bridgeco-downloader.cpp
- Timestamp:
- 12/07/08 05:50:41 (15 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/support/firmware/bridgeco-downloader.cpp
r1336 r1498 29 29 #include "libieee1394/configrom.h" 30 30 #include "libieee1394/ieee1394service.h" 31 #include "version.h" 31 32 32 33 #include <iostream> 33 34 #include <cstdlib> 34 35 #include <cstring> 36 37 #define MAGIC_THAT_SAYS_I_KNOW_WHAT_IM_DOING 0x001807198000LL 35 38 36 39 using namespace std; … … 52 55 {"force", 'f', 0, 0, "Force firmware download" }, 53 56 {"noboot", 'b', 0, 0, "Do no start bootloader (bootloader is already running)" }, 57 {"magic", 'm', "MAGIC", 0, "A magic number you have to obtain before this code will work." 58 "Specifying it means that you accept the risks that come with this tool."}, 54 59 { 0 } 55 60 }; … … 59 64 main( int argc, char** argv ) 60 65 { 66 printf("-----------------------------------------------\n"); 67 printf("BridgeCo BeBoB platform firmware downloader\n"); 68 printf("Part of the FFADO project -- www.ffado.org\n"); 69 printf("Version: %s\n", PACKAGE_VERSION); 70 printf("(C) 2008, Daniel Wagner, Pieter Palmers\n"); 71 printf("This program comes with ABSOLUTELY NO WARRANTY.\n"); 72 printf("-----------------------------------------------\n\n"); 61 73 62 74 // arg parsing … … 76 88 perror("argument parsing failed:"); 77 89 return -1; 90 } 91 92 if(args->magic != MAGIC_THAT_SAYS_I_KNOW_WHAT_IM_DOING) { 93 printf("Magic number not correct. Please specify the correct magic using the '-m' option.\n"); 94 printf("Manipulating firmware can cause your device to magically stop working (a.k.a. 'bricking').\n"); 95 printf("Specifying the magic number indicates that you accept the risks involved\n"); 96 printf("with using this tool. The magic number can be found in the source code.\n\n"); 97 return -1; 98 } else { 99 printf("YOU HAVE SPECIFIED THE CORRECT MAGIC NUMBER.\n"); 100 printf("HENCE YOU ACCEPT THE RISKS INVOLVED.\n"); 78 101 } 79 102