summaryrefslogtreecommitdiff
path: root/utils/mkmpioboot/main.c
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2021-12-15 21:04:28 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2021-12-24 18:05:53 +0100
commitc876d3bbefe0dc00c27ca0c12d29da5874946962 (patch)
tree69f468a185a369b01998314bc3ecc19b70f4fcaa /utils/mkmpioboot/main.c
parent6c6f0757d7a902feb293be165d1490c42bc8e7ad (diff)
downloadrockbox-c876d3bbefe0dc00c27ca0c12d29da5874946962.tar.gz
rockbox-c876d3bbefe0dc00c27ca0c12d29da5874946962.zip
rbutil: Merge rbutil with utils folder.
rbutil uses several components from the utils folder, and can be considered part of utils too. Having it in a separate folder is an arbitrary split that doesn't help anymore these days, so merge them. This also allows other utils to easily use libtools.make without the need to navigate to a different folder. Change-Id: I3fc2f4de19e3e776553efb5dea5f779dfec0dc21
Diffstat (limited to 'utils/mkmpioboot/main.c')
-rw-r--r--utils/mkmpioboot/main.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/utils/mkmpioboot/main.c b/utils/mkmpioboot/main.c
new file mode 100644
index 0000000000..9861cba261
--- /dev/null
+++ b/utils/mkmpioboot/main.c
@@ -0,0 +1,55 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id:$
9 *
10 * Copyright (C) 2010 by Marcin Bukat
11 *
12 * code taken mostly from mkboot.c
13 * Copyright (C) 2005 by Linus Nielsen Feltzing
14 *
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.
19 *
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
22 *
23 ****************************************************************************/
24
25#include <stdio.h>
26#include <stdlib.h>
27#include "mkmpioboot.h"
28
29static void usage(void)
30{
31 printf("usage: mkmpioboot <firmware file> <boot file> <output file>\n");
32 exit(1);
33}
34
35int main(int argc, char *argv[])
36{
37 char *infile, *bootfile, *outfile;
38 int origin = 0xe0000; /* MPIO HD200 bootloader address */
39
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");
45
46 if(argc < 3) {
47 usage();
48 }
49
50 infile = argv[1];
51 bootfile = argv[2];
52 outfile = argv[3];
53
54 return mkmpioboot(infile, bootfile, outfile, origin);
55}