blob: 263cd9ca079da8d4a16542eda8d3952507b32335 [file] [log] [blame]
Tom Rini83d290c2018-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>
wdenk27b207f2003-07-24 23:38:38 +00008#include <exports.h>
wdenk3b285da2002-10-07 16:54:55 +00009
Simon Glass09140112020-05-10 11:40:03 -060010int hello_world(int argc, char *const argv[])
wdenk3b285da2002-10-07 16:54:55 +000011{
12 int i;
13
wdenk27b207f2003-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
wdenk27b207f2003-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) {
wdenk27b207f2003-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
wdenk27b207f2003-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 */
wdenk27b207f2003-07-24 23:38:38 +000033 (void) getc();
wdenk3b285da2002-10-07 16:54:55 +000034
wdenk27b207f2003-07-24 23:38:38 +000035 printf ("\n\n");
wdenk3b285da2002-10-07 16:54:55 +000036 return (0);
37}