blob: 1f61bb477720dd13394b31b18aa928ca428c4a51 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
wdenk3b285da2002-10-07 16:54:55 +00002/*
3 * (C) Copyright 2000
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
wdenk3b285da2002-10-07 16:54:55 +00005 */
6
7#include <common.h>
wdenk874ac262003-07-24 23:38:38 +00008#include <exports.h>
wdenk3b285da2002-10-07 16:54:55 +00009
Wolfgang Denk6262d0212010-06-28 22:00:46 +020010int hello_world (int argc, char * const argv[])
wdenk3b285da2002-10-07 16:54:55 +000011{
12 int i;
13
wdenk874ac262003-07-24 23:38:38 +000014 /* Print the ABI version */
15 app_startup(argv);
16 printf ("Example expects ABI version %d\n", XF_VERSION);
17 printf ("Actual U-Boot ABI version %d\n", (int)get_version());
wdenk3b285da2002-10-07 16:54:55 +000018
wdenk874ac262003-07-24 23:38:38 +000019 printf ("Hello World\n");
20
21 printf ("argc = %d\n", argc);
wdenk3b285da2002-10-07 16:54:55 +000022
23 for (i=0; i<=argc; ++i) {
wdenk874ac262003-07-24 23:38:38 +000024 printf ("argv[%d] = \"%s\"\n",
wdenk3b285da2002-10-07 16:54:55 +000025 i,
26 argv[i] ? argv[i] : "<NULL>");
27 }
28
wdenk874ac262003-07-24 23:38:38 +000029 printf ("Hit any key to exit ... ");
30 while (!tstc())
wdenk3b285da2002-10-07 16:54:55 +000031 ;
32 /* consume input */
wdenk874ac262003-07-24 23:38:38 +000033 (void) getc();
wdenk3b285da2002-10-07 16:54:55 +000034
wdenk874ac262003-07-24 23:38:38 +000035 printf ("\n\n");
wdenk3b285da2002-10-07 16:54:55 +000036 return (0);
37}