blob: bd8b392315bc44135dd7188dae42411bb79c399e [file] [log] [blame]
wdenk3b285da2002-10-07 16:54:55 +00001/*
2 * (C) Copyright 2000
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenk3b285da2002-10-07 16:54:55 +00006 */
7
8#include <common.h>
wdenk27b207f2003-07-24 23:38:38 +00009#include <exports.h>
wdenk3b285da2002-10-07 16:54:55 +000010
Wolfgang Denk54841ab2010-06-28 22:00:46 +020011int hello_world (int argc, char * const argv[])
wdenk3b285da2002-10-07 16:54:55 +000012{
13 int i;
14
wdenk27b207f2003-07-24 23:38:38 +000015 /* Print the ABI version */
16 app_startup(argv);
17 printf ("Example expects ABI version %d\n", XF_VERSION);
18 printf ("Actual U-Boot ABI version %d\n", (int)get_version());
wdenk3b285da2002-10-07 16:54:55 +000019
wdenk27b207f2003-07-24 23:38:38 +000020 printf ("Hello World\n");
21
22 printf ("argc = %d\n", argc);
wdenk3b285da2002-10-07 16:54:55 +000023
24 for (i=0; i<=argc; ++i) {
wdenk27b207f2003-07-24 23:38:38 +000025 printf ("argv[%d] = \"%s\"\n",
wdenk3b285da2002-10-07 16:54:55 +000026 i,
27 argv[i] ? argv[i] : "<NULL>");
28 }
29
wdenk27b207f2003-07-24 23:38:38 +000030 printf ("Hit any key to exit ... ");
31 while (!tstc())
wdenk3b285da2002-10-07 16:54:55 +000032 ;
33 /* consume input */
wdenk27b207f2003-07-24 23:38:38 +000034 (void) getc();
wdenk3b285da2002-10-07 16:54:55 +000035
wdenk27b207f2003-07-24 23:38:38 +000036 printf ("\n\n");
wdenk3b285da2002-10-07 16:54:55 +000037 return (0);
38}