Prepare new maemo release
[maemo-rb.git] / rbutil / mkmpioboot / main.c
blob9861cba261e885b2f686cfa133f66ad0800f1d0a
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id:$
10 * Copyright (C) 2010 by Marcin Bukat
12 * code taken mostly from mkboot.c
13 * Copyright (C) 2005 by Linus Nielsen Feltzing
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
23 ****************************************************************************/
25 #include <stdio.h>
26 #include <stdlib.h>
27 #include "mkmpioboot.h"
29 static void usage(void)
31 printf("usage: mkmpioboot <firmware file> <boot file> <output file>\n");
32 exit(1);
35 int main(int argc, char *argv[])
37 char *infile, *bootfile, *outfile;
38 int origin = 0xe0000; /* MPIO HD200 bootloader address */
40 fprintf(stderr,
41 "mkmpioboot Version " VERSION "\n"
42 "This is free software; see the source for copying conditions. There is NO\n"
43 "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
44 "\n");
46 if(argc < 3) {
47 usage();
50 infile = argv[1];
51 bootfile = argv[2];
52 outfile = argv[3];
54 return mkmpioboot(infile, bootfile, outfile, origin);