blob: 27ec3793155def63b0dbee0fe713a3f4940f2054 [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
wdenk874ac262003-07-24 23:38:38 +00007#include <exports.h>
wdenk3b285da2002-10-07 16:54:55 +00008
Simon Glassed38aef2020-05-10 11:40:03 -06009int hello_world(int argc, char *const argv[])
wdenk3b285da2002-10-07 16:54:55 +000010{
11 int i;
12
wdenk874ac262003-07-24 23:38:38 +000013 /* Print the ABI version */
14 app_startup(argv);
15 printf ("Example expects ABI version %d\n", XF_VERSION);
16 printf ("Actual U-Boot ABI version %d\n", (int)get_version());
wdenk3b285da2002-10-07 16:54:55 +000017
wdenk874ac262003-07-24 23:38:38 +000018 printf ("Hello World\n");
19
20 printf ("argc = %d\n", argc);
wdenk3b285da2002-10-07 16:54:55 +000021
22 for (i=0; i<=argc; ++i) {
wdenk874ac262003-07-24 23:38:38 +000023 printf ("argv[%d] = \"%s\"\n",
wdenk3b285da2002-10-07 16:54:55 +000024 i,
25 argv[i] ? argv[i] : "<NULL>");
26 }
27
wdenk874ac262003-07-24 23:38:38 +000028 printf ("Hit any key to exit ... ");
29 while (!tstc())
wdenk3b285da2002-10-07 16:54:55 +000030 ;
31 /* consume input */
wdenk874ac262003-07-24 23:38:38 +000032 (void) getc();
wdenk3b285da2002-10-07 16:54:55 +000033
wdenk874ac262003-07-24 23:38:38 +000034 printf ("\n\n");
wdenk3b285da2002-10-07 16:54:55 +000035 return (0);
36}