Prechádzať zdrojové kódy

resolve build error

zhangbo 5 rokov pred
rodič
commit
62e2f54f0c

+ 1 - 3
.gitignore

@@ -1,4 +1,4 @@
-app/goahead-5.1.0/build
+app/goahead-5.1.0/build/
 *.uImage
 *.o
 *.kernel.STMDISCO
@@ -6,5 +6,3 @@ app/goahead-5.1.0/build
 #ignore switch file
 *~
 *.swp
-local/rc
-

BIN
app/bmc/bmc_app


BIN
app/bmc/bmc_app.gdb


+ 21 - 21
app/bmc/main.c

@@ -75,13 +75,13 @@ void main(void)
         printf("%s: Create ChassisTimerTask thread failed!\n", __FUNCTION__);
     }
 
-    /* Create SensorMonitorTask */
-	gThreadIndex++;
-	if(0 != pthread_create(&gThreadIDs[gThreadIndex],NULL,SensorMonitorTask,NULL))
-    {
-        printf("%s: Create SensorMonitorTask thread failed!\n", __FUNCTION__);
-    }
-
+//    /* Create SensorMonitorTask */
+//	gThreadIndex++;
+//	if(0 != pthread_create(&gThreadIDs[gThreadIndex],NULL,SensorMonitorTask,NULL))
+//    {
+//        printf("%s: Create SensorMonitorTask thread failed!\n", __FUNCTION__);
+//    }
+//
 	/* Create UDS interface */
 	gThreadIndex++;
 	if(0 != pthread_create(&gThreadIDs[gThreadIndex],NULL,UDSIfcTask,NULL))
@@ -95,19 +95,19 @@ void main(void)
     {
         printf("%s: Create LANIfcTask thread failed!\n", __FUNCTION__);
     }
-	/* Create IPMB interface */
-	uint8_t primaryIpmbSelect = 0;	//primary
-	gThreadIndex++;
-	if(0 != pthread_create(&gThreadIDs[gThreadIndex],NULL,IPMBIfcTask,&primaryIpmbSelect))
-    {
-        printf("%s: Create LANIfcTask thread failed!\n", __FUNCTION__);
-    }
-    uint8_t secondaryIpmbSelect = 1;	//secondary
-    gThreadIndex++;
-	if(0 != pthread_create(&gThreadIDs[gThreadIndex],NULL,IPMBIfcTask,&secondaryIpmbSelect))
-    {
-        printf("%s: Create LANIfcTask thread failed!\n", __FUNCTION__);
-    }
+//	/* Create IPMB interface */
+//	uint8_t primaryIpmbSelect = 0;	//primary
+//	gThreadIndex++;
+//	if(0 != pthread_create(&gThreadIDs[gThreadIndex],NULL,IPMBIfcTask,&primaryIpmbSelect))
+//    {
+//        printf("%s: Create LANIfcTask thread failed!\n", __FUNCTION__);
+//    }
+//    uint8_t secondaryIpmbSelect = 1;	//secondary
+//    gThreadIndex++;
+//	if(0 != pthread_create(&gThreadIDs[gThreadIndex],NULL,IPMBIfcTask,&secondaryIpmbSelect))
+//    {
+//        printf("%s: Create LANIfcTask thread failed!\n", __FUNCTION__);
+//    }
 
 	/* Create Update FPGA thread */
 
@@ -123,4 +123,4 @@ void main(void)
 		sleep(100);
 		//printf("Hello...\n");
 	}
-}
+}

BIN
app/goahead-5.1.0/build/linux-arm-static/bin/goahead


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/goahead-test


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/goahead.gdb


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/gopass


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/libgo.a


+ 54 - 47
app/goahead-5.1.0/projects/goahead-linux-static.mk

@@ -140,18 +140,18 @@ clean:
 	rm -f "$(BUILD)/bin/libgo.a"
 	rm -f "$(BUILD)/bin/libgoahead-mbedtls.a"
 	rm -f "$(BUILD)/bin/libmbedtls.a"
-#jimbo	
+
 	rm -f "$(BUILD)/bin/libipmi_session.o"
 	rm -f "$(BUILD)/bin/libipmi_uds_session.o"
 	rm -f "$(BUILD)/bin/libipmi_IPM.o"
-	rm -f "$(BUILD)/bin/dashboard.o
-	rm -f "$(BUILD)/bin/config.o
-	rm -f "$(BUILD)/bin/fan.o
-	rm -f "$(BUILD)/bin/fru.o
-	rm -f "$(BUILD)/bin/fw_update.o
-	rm -f "$(BUILD)/bin/remote_control.o
-	rm -f "$(BUILD)/bin/sel.o
-	rm -f "$(BUILD)/bin/server_health.o
+	rm -f "$(BUILD)/bin/dashboard.o"
+	rm -f "$(BUILD)/bin/config.o"
+	rm -f "$(BUILD)/bin/fan.o"
+	rm -f "$(BUILD)/bin/fru.o"
+	rm -f "$(BUILD)/bin/fw_update.o"
+	rm -f "$(BUILD)/bin/remote_control.o"
+	rm -f "$(BUILD)/bin/sel.o"
+	rm -f "$(BUILD)/bin/server_health.o"
 clobber: clean
 	rm -fr ./$(BUILD)
 
@@ -228,14 +228,6 @@ $(BUILD)/inc/cJSON.h: $(DEPS_USER_H1)
 	mkdir -p "$(BUILD)/inc"
 	cp src/cJSON/cJSON.h $(BUILD)/inc/cJSON.h
 
-DEPS_USER_C1 += $(BUILD)/inc/goahead.h
-DEPS_USER_C1 += $(BUILD)/inc/cJSON.h
-
-$(BUILD)/obj/cJSON.o: \
-    src/cJSON/cJSON.c $(DEPS_USER_C1)
-	@echo '   [Compile] $(BUILD)/obj/cJSON.o'
-	$(CC) -c -o $(BUILD)/obj/cJSON.o $(LDFLAGS) $(CFLAGS) $(DFLAGS) -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -DMBEDTLS_USER_CONFIG_FILE=\"embedtls.h\" -DME_COM_OPENSSL_PATH=$(ME_COM_OPENSSL_PATH) $(IFLAGS) "-I$(ME_COM_OPENSSL_PATH)/include" src/cJSON/cJSON.c
-
 #
 #	libipmi
 #
@@ -288,28 +280,6 @@ $(BUILD)/inc/com_IPMI_App.h: $(DEPS_USER_H2)
 	cp ../common_include/com_IPMI_App.h $(BUILD)/inc/com_IPMI_App.h
 
 
-DEPS_USER_C2 += $(BUILD)/inc/libipmi_session.h
-DEPS_USER_C2 += $(BUILD)/inc/libipmi.h
-DEPS_USER_C2 += $(BUILD)/inc/libipmi_errorcodes.h
-DEPS_USER_C2 += $(BUILD)/inc/libipmi_struct.h
-DEPS_USER_C2 += $(BUILD)/inc/libipmi_IPM.h
-DEPS_USER_C2 += $(BUILD)/inc/com_IPMI_AppDevice.h
-DEPS_USER_C2 += $(BUILD)/inc/com_IPMIDefs.h
-DEPS_USER_C2 += $(BUILD)/inc/com_IPMI_IPM.h
-DEPS_USER_C2 += $(BUILD)/inc/com_IPMI_App.h
-
-$(BUILD)/obj/libipmi_session.o: \
-    src/libipmi/src/libipmi_session.c $(DEPS_USER_C2)
-	@echo '   [Compile] $(BUILD)/obj/libipmi_session.o'
-	$(CC) -c -o $(BUILD)/obj/libipmi_session.o $(LDFLAGS) $(CFLAGS) $(DFLAGS) -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -DMBEDTLS_USER_CONFIG_FILE=\"embedtls.h\" -DME_COM_OPENSSL_PATH=$(ME_COM_OPENSSL_PATH) $(IFLAGS) "-I$(ME_COM_OPENSSL_PATH)/include" src/libipmi/src/libipmi_session.c
-$(BUILD)/obj/libipmi_uds_session.o: \
-    src/libipmi/src/libipmi_uds_session.c $(DEPS_USER_C2)
-	@echo '   [Compile] $(BUILD)/obj/libipmi_uds_session.o'
-	$(CC) -c -o $(BUILD)/obj/libipmi_uds_session.o $(LDFLAGS) $(CFLAGS) $(DFLAGS) -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -DMBEDTLS_USER_CONFIG_FILE=\"embedtls.h\" -DME_COM_OPENSSL_PATH=$(ME_COM_OPENSSL_PATH) $(IFLAGS) "-I$(ME_COM_OPENSSL_PATH)/include" src/libipmi/src/libipmi_uds_session.c
-$(BUILD)/obj/libipmi_IPM.o: \
-    src/libipmi/src/libipmi_IPM.c $(DEPS_USER_C2)
-	@echo '   [Compile] $(BUILD)/obj/libipmi_IPM.o'
-	$(CC) -c -o $(BUILD)/obj/libipmi_IPM.o $(LDFLAGS) $(CFLAGS) $(DFLAGS) -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -DMBEDTLS_USER_CONFIG_FILE=\"embedtls.h\" -DME_COM_OPENSSL_PATH=$(ME_COM_OPENSSL_PATH) $(IFLAGS) "-I$(ME_COM_OPENSSL_PATH)/include" src/libipmi/src/libipmi_IPM.c
 
 #
 #   LUSA, ResultUtils
@@ -322,14 +292,6 @@ $(BUILD)/inc/ResultUtils.h: $(DEPS_USER_H3)
 	mkdir -p "$(BUILD)/inc"
 	cp src/utils/mine/ResultUtils.h $(BUILD)/inc/ResultUtils.h
 
-DEPS_USER_C3 += $(BUILD)/inc/goahead.h
-DEPS_USER_C3 += $(BUILD)/inc/ResultUtils.h
-
-$(BUILD)/obj/ResultUtils.o: \
-    src/utils/mine/ResultUtils.c $(DEPS_USER_C3)
-	@echo '   [Compile] $(BUILD)/obj/ResultUtils.o'
-	$(CC) -c -o $(BUILD)/obj/ResultUtils.o $(LDFLAGS) $(CFLAGS) $(DFLAGS) -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -DMBEDTLS_USER_CONFIG_FILE=\"embedtls.h\" -DME_COM_OPENSSL_PATH=$(ME_COM_OPENSSL_PATH) $(IFLAGS) "-I$(ME_COM_OPENSSL_PATH)/include" src/utils/mine/ResultUtils.c
-
 
 #
 #   web_interface
@@ -377,6 +339,49 @@ $(BUILD)/inc/server_health.h: $(DEPS_USER_H4)
 	mkdir -p "$(BUILD)/inc"
 	cp src/web_interface/inc/server_health.h $(BUILD)/inc/server_health.h
 
+
+DEPS_USER_C1 += $(BUILD)/inc/goahead.h
+DEPS_USER_C1 += $(BUILD)/inc/cJSON.h
+
+$(BUILD)/obj/cJSON.o: \
+    src/cJSON/cJSON.c $(DEPS_USER_C1)
+	@echo '   [Compile] $(BUILD)/obj/cJSON.o'
+	$(CC) -c -o $(BUILD)/obj/cJSON.o $(LDFLAGS) $(CFLAGS) $(DFLAGS) -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -DMBEDTLS_USER_CONFIG_FILE=\"embedtls.h\" -DME_COM_OPENSSL_PATH=$(ME_COM_OPENSSL_PATH) $(IFLAGS) "-I$(ME_COM_OPENSSL_PATH)/include" src/cJSON/cJSON.c
+
+
+DEPS_USER_C2 += $(BUILD)/inc/libipmi_session.h
+DEPS_USER_C2 += $(BUILD)/inc/libipmi.h
+DEPS_USER_C2 += $(BUILD)/inc/libipmi_errorcodes.h
+DEPS_USER_C2 += $(BUILD)/inc/libipmi_struct.h
+DEPS_USER_C2 += $(BUILD)/inc/libipmi_IPM.h
+DEPS_USER_C2 += $(BUILD)/inc/com_IPMI_AppDevice.h
+DEPS_USER_C2 += $(BUILD)/inc/com_IPMIDefs.h
+DEPS_USER_C2 += $(BUILD)/inc/com_IPMI_IPM.h
+DEPS_USER_C2 += $(BUILD)/inc/com_IPMI_App.h
+
+$(BUILD)/obj/libipmi_session.o: \
+    src/libipmi/src/libipmi_session.c $(DEPS_USER_C2)
+	@echo '   [Compile] $(BUILD)/obj/libipmi_session.o'
+	$(CC) -c -o $(BUILD)/obj/libipmi_session.o $(LDFLAGS) $(CFLAGS) $(DFLAGS) -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -DMBEDTLS_USER_CONFIG_FILE=\"embedtls.h\" -DME_COM_OPENSSL_PATH=$(ME_COM_OPENSSL_PATH) $(IFLAGS) "-I$(ME_COM_OPENSSL_PATH)/include" src/libipmi/src/libipmi_session.c
+$(BUILD)/obj/libipmi_uds_session.o: \
+    src/libipmi/src/libipmi_uds_session.c $(DEPS_USER_C2)
+	@echo '   [Compile] $(BUILD)/obj/libipmi_uds_session.o'
+	$(CC) -c -o $(BUILD)/obj/libipmi_uds_session.o $(LDFLAGS) $(CFLAGS) $(DFLAGS) -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -DMBEDTLS_USER_CONFIG_FILE=\"embedtls.h\" -DME_COM_OPENSSL_PATH=$(ME_COM_OPENSSL_PATH) $(IFLAGS) "-I$(ME_COM_OPENSSL_PATH)/include" src/libipmi/src/libipmi_uds_session.c
+$(BUILD)/obj/libipmi_IPM.o: \
+    src/libipmi/src/libipmi_IPM.c $(DEPS_USER_C2)
+	@echo '   [Compile] $(BUILD)/obj/libipmi_IPM.o'
+	$(CC) -c -o $(BUILD)/obj/libipmi_IPM.o $(LDFLAGS) $(CFLAGS) $(DFLAGS) -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -DMBEDTLS_USER_CONFIG_FILE=\"embedtls.h\" -DME_COM_OPENSSL_PATH=$(ME_COM_OPENSSL_PATH) $(IFLAGS) "-I$(ME_COM_OPENSSL_PATH)/include" src/libipmi/src/libipmi_IPM.c
+
+
+DEPS_USER_C3 += $(BUILD)/inc/goahead.h
+DEPS_USER_C3 += $(BUILD)/inc/ResultUtils.h
+
+$(BUILD)/obj/ResultUtils.o: \
+    src/utils/mine/ResultUtils.c $(DEPS_USER_C3)
+	@echo '   [Compile] $(BUILD)/obj/ResultUtils.o'
+	$(CC) -c -o $(BUILD)/obj/ResultUtils.o $(LDFLAGS) $(CFLAGS) $(DFLAGS) -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64 -DMBEDTLS_USER_CONFIG_FILE=\"embedtls.h\" -DME_COM_OPENSSL_PATH=$(ME_COM_OPENSSL_PATH) $(IFLAGS) "-I$(ME_COM_OPENSSL_PATH)/include" src/utils/mine/ResultUtils.c
+
+
 DEPS_USER_C4 += $(BUILD)/inc/goahead.h
 DEPS_USER_C4 += $(BUILD)/inc/config.h
 DEPS_USER_C4 += $(BUILD)/inc/dashboard.h
@@ -386,6 +391,7 @@ DEPS_USER_C4 += $(BUILD)/inc/fw_update.h
 DEPS_USER_C4 += $(BUILD)/inc/remote_control.h
 DEPS_USER_C4 += $(BUILD)/inc/sel.h
 DEPS_USER_C4 += $(BUILD)/inc/server_health.h
+DEPS_USER_C4 += $(DEPS_USER_C2)
 
 $(BUILD)/obj/config.o: \
     src/web_interface/src/config.c $(DEPS_USER_C4)
@@ -538,6 +544,7 @@ $(BUILD)/obj/fs.o: \
 #   goahead-mbedtls.o
 #
 DEPS_15 += $(BUILD)/inc/goahead.h
+DEPS_15 += $(DEPS_USER_C2)
 
 $(BUILD)/obj/goahead-mbedtls.o: \
     src/goahead-mbedtls/goahead-mbedtls.c $(DEPS_15)

+ 438 - 440
app/goahead-5.1.0/src/goahead.c

@@ -1,440 +1,438 @@
-/*
-    goahead.c -- Main program for GoAhead
-
-    Usage: goahead [options] [documents] [IP][:port] ...
-        Options:
-        --auth authFile        # User and role configuration
-        --background           # Run as a Linux daemon
-        --home directory       # Change to directory to run
-        --log logFile:level    # Log to file file at verbosity level
-        --route routeFile      # Route configuration file
-        --verbose              # Same as --log stdout:2
-        --version              # Output version information
-
-    Copyright (c) All Rights Reserved. See details at the end of the file.
- */
-
-/********************************* Includes ***********************************/
-
-#include    "goahead.h"
-#include    "libipmi_struct.h"
-#include    "com_IPMI_App.h"
-#include    "libipmi_IPM.h"
-#include    "com_IPMIDefs.h"
-
-/********************************* Defines ************************************/
-
-static int finished = 0;
-
-/********************************* Forwards ***********************************/
-
-static void initPlatform(void);
-static void logHeader(void);
-static void usage(void);
-
-#if WINDOWS
-static void windowsClose();
-static int windowsInit();
-static LRESULT CALLBACK websWindProc(HWND hwnd, UINT msg, UINT wp, LPARAM lp);
-#endif
-
-#if ME_UNIX_LIKE
-static void sigHandler(int signo);
-#endif
-
-// static void buy(Webs *wp);
-// static void actionTest(Webs *wp);
-// static void personInfoAction(Webs *wp);
-
-
-// static void buy(Webs *wp)
-// {
-//     char    *name, *age;
-//     name = websGetVar(wp, "name", NULL);
-//     age = websGetVar(wp, "age", NULL);
-//      logmsg(2, "---------------------------------------------");
-//     logmsg(2, "name value is : %s", name );
-//      logmsg(2, "age value is : %s", age );
-//     websSetStatus(wp, 200);
-//     websWriteHeaders(wp, 0, 0);
-//     websWriteEndHeaders(wp);
-//     printf("aa");
-//     websWrite(wp, "Name %s", name); 
-//     websWrite(wp,  "Age %s", age);
-//     websFlush(wp, 0);
-//     websDone(wp);
-// }
-
-
-
-// /*
-//     Implement /action/actionTest. Parse the form variables: name, address and echo back.
-//  */
-// static void actionTest(Webs *wp)
-// {
-//     cchar   *name, *address;
-
-//     name = websGetVar(wp, "name", NULL);
-//     address = websGetVar(wp, "address", NULL);
-//     websSetStatus(wp, 200);
-//     websWriteHeaders(wp, -1, 0);
-//     websWriteEndHeaders(wp);
-//     websWrite(wp, "<html><body><h2>name: %s, address: %s</h2></body></html>\n", name, address);
-//     websFlush(wp, 0);
-//     websDone(wp);
-// }
-
-
-
-
-/*********************************** Code *************************************/
-
-MAIN(goahead, int argc, char **argv, char **envp)
-{
-   
-    char    *argp, *home, *documents, *endpoints, *endpoint, *route, *auth, *tok, *lspec;
-    int     argind;
-	logmsg(2, "---> log1\n");
-	error("---> log1\n");
-#if WINDOWS
-    if (windowsInit() < 0) {
-        return 0;
-    }
-#endif
-    route = "route.txt";
-    auth = "auth.txt";
-
-
-/********************* jimbo test code **************************/
-    Webs wp;
-
-    getDeviceInfo(&wp);
-    
-
-/********************* jimbo test end **************************/    
-
-	error("---> main enter, argc = %d\n", argc);
-    for (argind = 1; argind < argc; argind++) {
-        argp = argv[argind];
-		error("---> argp = %s\n", argp);
-        if (*argp != '-') {
-            break;
-
-        } else if (smatch(argp, "--auth") || smatch(argp, "-a")) {
-            if (argind >= argc) usage();
-            auth = argv[++argind];
-
-#if ME_UNIX_LIKE && !MACOSX
-        } else if (smatch(argp, "--background") || smatch(argp, "-b")) {
-            websSetBackground(1);
-#endif
-
-        } else if (smatch(argp, "--debugger") || smatch(argp, "-d") || smatch(argp, "-D")) {
-            websSetDebug(1);
-
-        } else if (smatch(argp, "--home")) {
-            if (argind >= argc) usage();
-            home = argv[++argind];
-            if (chdir(home) < 0) {
-                error("Cannot change directory to %s", home);
-                exit(-1);
-            }
-			error("---> get home\n");
-        } else if (smatch(argp, "--log") || smatch(argp, "-l")) {
-            if (argind >= argc) usage();
-            logSetPath(argv[++argind]);
-
-        } else if (smatch(argp, "--verbose") || smatch(argp, "-v")) {
-            logSetPath("stdout:2");
-			error( "---> get -v\n");
-        } else if (smatch(argp, "--route") || smatch(argp, "-r")) {
-            route = argv[++argind];
-
-        } else if (smatch(argp, "--version") || smatch(argp, "-V")) {
-            printf("%s\n", ME_VERSION);
-            exit(0);
-
-        } else if (*argp == '-' && isdigit((uchar) argp[1])) {
-            lspec = sfmt("stdout:%s", &argp[1]);
-            logSetPath(lspec);
-            wfree(lspec);
-
-        } else {
-            usage();
-        }
-    }
-    documents = ME_GOAHEAD_DOCUMENTS;
-    if (argc > argind) {
-        documents = argv[argind++];
-    }
-	error("---> initPlatform\n");
-    initPlatform();
-    if (websOpen(documents, route) < 0) {
-        error("Cannot initialize server. Exiting.");
-        return -1;
-    }
-#if ME_GOAHEAD_AUTH
-	error("---> ME_GOAHEAD_AUTH: %d\n", ME_GOAHEAD_AUTH);
-    if (websLoad(auth) < 0) {
-        error("Cannot load %s", auth);
-        return -1;
-    }
-#endif
-    logHeader();
-	error("---> argind = %d, argc = %d\n", argind, argc);
-    if (argind < argc) {
-        while (argind < argc) {
-            endpoint = argv[argind++];
-            if (websListen(endpoint) < 0) {
-                return -1;
-            }
-        }
-    } else {
-        endpoints = sclone(ME_GOAHEAD_LISTEN);
-        for (endpoint = stok(endpoints, ", \t", &tok); endpoint; endpoint = stok(NULL, ", \t,", &tok)) {
-#if !ME_COM_SSL
-			error("ME_COM_SSL %d\n", ME_COM_SSL);
-            if (strstr(endpoint, "https")) continue;
-#endif
-            if (websListen(endpoint) < 0) {
-                wfree(endpoints);
-                return -1;
-            }
-        }
-        wfree(endpoints);
-    }
-#if ME_ROM && KEEP
-    /*
-        If not using a route/auth config files, then manually create the routes like this:
-        If custom matching is required, use websSetRouteMatch. If authentication is required, use websSetRouteAuth.
-     */
-    websAddRoute("/", "file", 0);
-#endif
-
-//add by lusa start 
-        // websDefineAction("buy", buy);
-        // websDefineAction("test", actionTest);
-        websDefineAction("person", personInfoAction);
-
-
-        
-// add by lusa end 
-#ifdef GOAHEAD_INIT
-    /*
-        Define your init function in main.me goahead.init, or
-        configure with DFLAGS=GOAHEAD_INIT=myInitFunction
-     */
-    {
-        extern int GOAHEAD_INIT();
-
-        if (GOAHEAD_INIT() < 0) {
-            exit(1);
-        }
-    }
-#endif
-#if ME_UNIX_LIKE && !MACOSX
-    /*
-        Service events till terminated
-     */
-    if (websGetBackground()) {
-        if (daemon(0, 0) < 0) {
-            error("Cannot run as daemon");
-            return -1;
-        }
-    }
-#endif
-	error( "---> websServiceEvents\n");
-    websServiceEvents(&finished);
-    logmsg(1, "Instructed to exit");
-    websClose();
-#if WINDOWS
-    windowsClose();
-#endif
-    return 0;
-}
-
-
-static void logHeader(void)
-{
-    char    home[ME_GOAHEAD_LIMIT_STRING];
-
-    getcwd(home, sizeof(home));
-    logmsg(2, "Configuration for %s", ME_TITLE);
-    logmsg(2, "---------------------------------------------");
-    logmsg(2, "Version:            %s", ME_VERSION);
-    logmsg(2, "BuildType:          %s", ME_DEBUG ? "Debug" : "Release");
-    logmsg(2, "CPU:                %s", ME_CPU);
-    logmsg(2, "OS:                 %s", ME_OS);
-    logmsg(2, "Host:               %s", websGetServer());
-    logmsg(2, "Directory:          %s", home);
-    logmsg(2, "Documents:          %s", websGetDocuments());
-    logmsg(2, "Configure:          %s", ME_CONFIG_CMD);
-    logmsg(2, "---------------------------------------------");
-}
-
-static void usage(void) {
-    fprintf(stderr, "\n%s Usage:\n\n"
-        "  %s [options] [documents] [[IPaddress][:port] ...]\n\n"
-        "  Options:\n"
-#if ME_GOAHEAD_AUTH
-        "    --auth authFile        # User and role configuration\n"
-#endif
-#if ME_UNIX_LIKE && !MACOSX
-        "    --background           # Run as a Unix daemon\n"
-#endif
-        "    --debugger             # Run in debug mode\n"
-        "    --home directory       # Change to directory to run\n"
-        "    --log logFile:level    # Log to file file at verbosity level\n"
-        "    --route routeFile      # Route configuration file\n"
-        "    --verbose              # Same as --log stdout:2\n"
-        "    --version              # Output version information\n\n",
-        ME_TITLE, ME_NAME);
-    exit(-1);
-}
-
-
-static void initPlatform(void)
-{
-#if ME_UNIX_LIKE
-	error("---> initPlatform, ME_OS: %s\n", ME_OS);
-    signal(SIGTERM, sigHandler);
-    #ifdef SIGPIPE
-		error("---> define SIGPIPE\n");
-        signal(SIGPIPE, SIG_IGN);
-    #endif
-#elif ME_WIN_LIKE
-    _fmode=_O_BINARY;
-    printf("%s\n", "fff");
-#endif
-}
-
-
-#if ME_UNIX_LIKE
-static void sigHandler(int signo)
-{
-    finished = 1;
-}
-#endif
-
-
-//#if WINDOWS
-///*
-//    Create a taskbar entry. Register the window class and create a window
-// */
-//static int windowsInit()
-//{
-//    HINSTANCE   inst;
-//    WNDCLASS    wc;                     /* Window class */
-//    HMENU       hSysMenu;
-//    HWND        hwnd;
-//
-//    inst = websGetInst();
-//    wc.style         = CS_HREDRAW | CS_VREDRAW;
-//    wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
-//    wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
-//    wc.cbClsExtra    = 0;
-//    wc.cbWndExtra    = 0;
-//    wc.hInstance     = inst;
-//    wc.hIcon         = NULL;
-//    wc.lpfnWndProc   = (WNDPROC) websWindProc;
-//    wc.lpszMenuName  = wc.lpszClassName = ME_NAME;
-//    if (! RegisterClass(&wc)) {
-//        return -1;
-//    }
-//    /*
-//        Create a window just so we can have a taskbar to close this web server
-//     */
-//    hwnd = CreateWindow(ME_NAME, ME_TITLE, WS_MINIMIZE | WS_POPUPWINDOW, CW_USEDEFAULT,
-//        0, 0, 0, NULL, NULL, inst, NULL);
-//    if (hwnd == NULL) {
-//        return -1;
-//    }
-//
-//    /*
-//        Add the about box menu item to the system menu
-//     */
-//    hSysMenu = GetSystemMenu(hwnd, FALSE);
-//    if (hSysMenu != NULL) {
-//        AppendMenu(hSysMenu, MF_SEPARATOR, 0, NULL);
-//    }
-//    ShowWindow(hwnd, SW_SHOWNORMAL);
-//    UpdateWindow(hwnd);
-//    return 0;
-//}
-//
-//
-//static void windowsClose()
-//{
-//    HINSTANCE   inst;
-//
-//    inst = websGetInst();
-//    UnregisterClass(ME_NAME, inst);
-//}
-//
-//
-///*
-//    Main menu window message handler.
-// */
-//static LRESULT CALLBACK websWindProc(HWND hwnd, UINT msg, UINT wp, LPARAM lp)
-//{
-//    switch (msg) {
-//        case WM_DESTROY:
-//            PostQuitMessage(0);
-//            finished++;
-//            return 0;
-//
-//        case WM_SYSCOMMAND:
-//            break;
-//    }
-//    return DefWindowProc(hwnd, msg, wp, lp);
-//}
-//
-//
-///*
-//    Check for Windows Messages
-// */
-//WPARAM checkWindowsMsgLoop()
-//{
-//    MSG     msg;
-//
-//    if (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) {
-//        if (!GetMessage(&msg, NULL, 0, 0) || msg.message == WM_QUIT) {
-//            return msg.wParam;
-//        }
-//        TranslateMessage(&msg);
-//        DispatchMessage(&msg);
-//    }
-//    return 0;
-//}
-//
-//
-///*
-//    Windows message handler
-// */
-//static LRESULT CALLBACK websAboutProc(HWND hwndDlg, uint msg, uint wp, long lp)
-//{
-//    LRESULT    lResult;
-//
-//    lResult = DefWindowProc(hwndDlg, msg, wp, lp);
-//
-//    switch (msg) {
-//        case WM_CREATE:
-//            break;
-//        case WM_DESTROY:
-//            break;
-//        case WM_COMMAND:
-//            break;
-//    }
-//    return lResult;
-//}
-//
-//#endif
-
-/*
-    Copyright (c) Embedthis Software. All Rights Reserved.
-    This software is distributed under commercial and open source licenses.
-    You may use the Embedthis GoAhead open source license or you may acquire
-    a commercial license from Embedthis Software. You agree to be fully bound
-    by the terms of either license. Consult the LICENSE.md distributed with
-    this software for full details and other copyrights.
- */
+/*
+    goahead.c -- Main program for GoAhead
+
+    Usage: goahead [options] [documents] [IP][:port] ...
+        Options:
+        --auth authFile        # User and role configuration
+        --background           # Run as a Linux daemon
+        --home directory       # Change to directory to run
+        --log logFile:level    # Log to file file at verbosity level
+        --route routeFile      # Route configuration file
+        --verbose              # Same as --log stdout:2
+        --version              # Output version information
+
+    Copyright (c) All Rights Reserved. See details at the end of the file.
+ */
+
+/********************************* Includes ***********************************/
+
+#include    "goahead.h"
+#include    "dashboard.h"
+ 
+/********************************* Defines ************************************/
+
+static int finished = 0;
+
+/********************************* Forwards ***********************************/
+
+static void initPlatform(void);
+static void logHeader(void);
+static void usage(void);
+
+#if WINDOWS
+static void windowsClose();
+static int windowsInit();
+static LRESULT CALLBACK websWindProc(HWND hwnd, UINT msg, UINT wp, LPARAM lp);
+#endif
+
+#if ME_UNIX_LIKE
+static void sigHandler(int signo);
+#endif
+
+// static void buy(Webs *wp);
+// static void actionTest(Webs *wp);
+// static void personInfoAction(Webs *wp);
+
+
+// static void buy(Webs *wp)
+// {
+//     char    *name, *age;
+//     name = websGetVar(wp, "name", NULL);
+//     age = websGetVar(wp, "age", NULL);
+//      logmsg(2, "---------------------------------------------");
+//     logmsg(2, "name value is : %s", name );
+//      logmsg(2, "age value is : %s", age );
+//     websSetStatus(wp, 200);
+//     websWriteHeaders(wp, 0, 0);
+//     websWriteEndHeaders(wp);
+//     printf("aa");
+//     websWrite(wp, "Name %s", name); 
+//     websWrite(wp,  "Age %s", age);
+//     websFlush(wp, 0);
+//     websDone(wp);
+// }
+
+
+
+// /*
+//     Implement /action/actionTest. Parse the form variables: name, address and echo back.
+//  */
+// static void actionTest(Webs *wp)
+// {
+//     cchar   *name, *address;
+
+//     name = websGetVar(wp, "name", NULL);
+//     address = websGetVar(wp, "address", NULL);
+//     websSetStatus(wp, 200);
+//     websWriteHeaders(wp, -1, 0);
+//     websWriteEndHeaders(wp);
+//     websWrite(wp, "<html><body><h2>name: %s, address: %s</h2></body></html>\n", name, address);
+//     websFlush(wp, 0);
+//     websDone(wp);
+// }
+
+
+
+
+/*********************************** Code *************************************/
+
+MAIN(goahead, int argc, char **argv, char **envp)
+{
+   
+    char    *argp, *home, *documents, *endpoints, *endpoint, *route, *auth, *tok, *lspec;
+    int     argind;
+	logmsg(2, "---> log1\n");
+	error("---> log1\n");
+#if WINDOWS
+    if (windowsInit() < 0) {
+        return 0;
+    }
+#endif
+    route = "route.txt";
+    auth = "auth.txt";
+
+
+/********************* jimbo test code **************************/
+    // Webs wp;
+
+    // getDeviceInfo(&wp);
+    
+
+/********************* jimbo test end **************************/    
+
+	error("---> main enter, argc = %d\n", argc);
+    for (argind = 1; argind < argc; argind++) {
+        argp = argv[argind];
+		error("---> argp = %s\n", argp);
+        if (*argp != '-') {
+            break;
+
+        } else if (smatch(argp, "--auth") || smatch(argp, "-a")) {
+            if (argind >= argc) usage();
+            auth = argv[++argind];
+
+#if ME_UNIX_LIKE && !MACOSX
+        } else if (smatch(argp, "--background") || smatch(argp, "-b")) {
+            websSetBackground(1);
+#endif
+
+        } else if (smatch(argp, "--debugger") || smatch(argp, "-d") || smatch(argp, "-D")) {
+            websSetDebug(1);
+
+        } else if (smatch(argp, "--home")) {
+            if (argind >= argc) usage();
+            home = argv[++argind];
+            if (chdir(home) < 0) {
+                error("Cannot change directory to %s", home);
+                exit(-1);
+            }
+			error("---> get home\n");
+        } else if (smatch(argp, "--log") || smatch(argp, "-l")) {
+            if (argind >= argc) usage();
+            logSetPath(argv[++argind]);
+
+        } else if (smatch(argp, "--verbose") || smatch(argp, "-v")) {
+            logSetPath("stdout:2");
+			error( "---> get -v\n");
+        } else if (smatch(argp, "--route") || smatch(argp, "-r")) {
+            route = argv[++argind];
+
+        } else if (smatch(argp, "--version") || smatch(argp, "-V")) {
+            printf("%s\n", ME_VERSION);
+            exit(0);
+
+        } else if (*argp == '-' && isdigit((uchar) argp[1])) {
+            lspec = sfmt("stdout:%s", &argp[1]);
+            logSetPath(lspec);
+            wfree(lspec);
+
+        } else {
+            usage();
+        }
+    }
+    documents = ME_GOAHEAD_DOCUMENTS;
+    if (argc > argind) {
+        documents = argv[argind++];
+    }
+	error("---> initPlatform\n");
+    initPlatform();
+    if (websOpen(documents, route) < 0) {
+        error("Cannot initialize server. Exiting.");
+        return -1;
+    }
+#if ME_GOAHEAD_AUTH
+	error("---> ME_GOAHEAD_AUTH: %d\n", ME_GOAHEAD_AUTH);
+    if (websLoad(auth) < 0) {
+        error("Cannot load %s", auth);
+        return -1;
+    }
+#endif
+    logHeader();
+	error("---> argind = %d, argc = %d\n", argind, argc);
+    if (argind < argc) {
+        while (argind < argc) {
+            endpoint = argv[argind++];
+            if (websListen(endpoint) < 0) {
+                return -1;
+            }
+        }
+    } else {
+        endpoints = sclone(ME_GOAHEAD_LISTEN);
+        for (endpoint = stok(endpoints, ", \t", &tok); endpoint; endpoint = stok(NULL, ", \t,", &tok)) {
+#if !ME_COM_SSL
+			error("ME_COM_SSL %d\n", ME_COM_SSL);
+            if (strstr(endpoint, "https")) continue;
+#endif
+            if (websListen(endpoint) < 0) {
+                wfree(endpoints);
+                return -1;
+            }
+        }
+        wfree(endpoints);
+    }
+#if ME_ROM && KEEP
+    /*
+        If not using a route/auth config files, then manually create the routes like this:
+        If custom matching is required, use websSetRouteMatch. If authentication is required, use websSetRouteAuth.
+     */
+    websAddRoute("/", "file", 0);
+#endif
+
+//add by lusa start 
+        // websDefineAction("buy", buy);
+        websDefineAction("getDeviceInfo", getDeviceInfo);
+        websDefineAction("person", personInfoAction);
+
+
+        
+// add by lusa end 
+#ifdef GOAHEAD_INIT
+    /*
+        Define your init function in main.me goahead.init, or
+        configure with DFLAGS=GOAHEAD_INIT=myInitFunction
+     */
+    {
+        extern int GOAHEAD_INIT();
+
+        if (GOAHEAD_INIT() < 0) {
+            exit(1);
+        }
+    }
+#endif
+#if ME_UNIX_LIKE && !MACOSX
+    /*
+        Service events till terminated
+     */
+    if (websGetBackground()) {
+        if (daemon(0, 0) < 0) {
+            error("Cannot run as daemon");
+            return -1;
+        }
+    }
+#endif
+	error( "---> websServiceEvents\n");
+    websServiceEvents(&finished);
+    logmsg(1, "Instructed to exit");
+    websClose();
+#if WINDOWS
+    windowsClose();
+#endif
+    return 0;
+}
+
+
+static void logHeader(void)
+{
+    char    home[ME_GOAHEAD_LIMIT_STRING];
+
+    getcwd(home, sizeof(home));
+    logmsg(2, "Configuration for %s", ME_TITLE);
+    logmsg(2, "---------------------------------------------");
+    logmsg(2, "Version:            %s", ME_VERSION);
+    logmsg(2, "BuildType:          %s", ME_DEBUG ? "Debug" : "Release");
+    logmsg(2, "CPU:                %s", ME_CPU);
+    logmsg(2, "OS:                 %s", ME_OS);
+    logmsg(2, "Host:               %s", websGetServer());
+    logmsg(2, "Directory:          %s", home);
+    logmsg(2, "Documents:          %s", websGetDocuments());
+    logmsg(2, "Configure:          %s", ME_CONFIG_CMD);
+    logmsg(2, "---------------------------------------------");
+}
+
+static void usage(void) {
+    fprintf(stderr, "\n%s Usage:\n\n"
+        "  %s [options] [documents] [[IPaddress][:port] ...]\n\n"
+        "  Options:\n"
+#if ME_GOAHEAD_AUTH
+        "    --auth authFile        # User and role configuration\n"
+#endif
+#if ME_UNIX_LIKE && !MACOSX
+        "    --background           # Run as a Unix daemon\n"
+#endif
+        "    --debugger             # Run in debug mode\n"
+        "    --home directory       # Change to directory to run\n"
+        "    --log logFile:level    # Log to file file at verbosity level\n"
+        "    --route routeFile      # Route configuration file\n"
+        "    --verbose              # Same as --log stdout:2\n"
+        "    --version              # Output version information\n\n",
+        ME_TITLE, ME_NAME);
+    exit(-1);
+}
+
+
+static void initPlatform(void)
+{
+#if ME_UNIX_LIKE
+	error("---> initPlatform, ME_OS: %s\n", ME_OS);
+    signal(SIGTERM, sigHandler);
+    #ifdef SIGPIPE
+		error("---> define SIGPIPE\n");
+        signal(SIGPIPE, SIG_IGN);
+    #endif
+#elif ME_WIN_LIKE
+    _fmode=_O_BINARY;
+    printf("%s\n", "fff");
+#endif
+}
+
+
+#if ME_UNIX_LIKE
+static void sigHandler(int signo)
+{
+    finished = 1;
+}
+#endif
+
+
+//#if WINDOWS
+///*
+//    Create a taskbar entry. Register the window class and create a window
+// */
+//static int windowsInit()
+//{
+//    HINSTANCE   inst;
+//    WNDCLASS    wc;                     /* Window class */
+//    HMENU       hSysMenu;
+//    HWND        hwnd;
+//
+//    inst = websGetInst();
+//    wc.style         = CS_HREDRAW | CS_VREDRAW;
+//    wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
+//    wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
+//    wc.cbClsExtra    = 0;
+//    wc.cbWndExtra    = 0;
+//    wc.hInstance     = inst;
+//    wc.hIcon         = NULL;
+//    wc.lpfnWndProc   = (WNDPROC) websWindProc;
+//    wc.lpszMenuName  = wc.lpszClassName = ME_NAME;
+//    if (! RegisterClass(&wc)) {
+//        return -1;
+//    }
+//    /*
+//        Create a window just so we can have a taskbar to close this web server
+//     */
+//    hwnd = CreateWindow(ME_NAME, ME_TITLE, WS_MINIMIZE | WS_POPUPWINDOW, CW_USEDEFAULT,
+//        0, 0, 0, NULL, NULL, inst, NULL);
+//    if (hwnd == NULL) {
+//        return -1;
+//    }
+//
+//    /*
+//        Add the about box menu item to the system menu
+//     */
+//    hSysMenu = GetSystemMenu(hwnd, FALSE);
+//    if (hSysMenu != NULL) {
+//        AppendMenu(hSysMenu, MF_SEPARATOR, 0, NULL);
+//    }
+//    ShowWindow(hwnd, SW_SHOWNORMAL);
+//    UpdateWindow(hwnd);
+//    return 0;
+//}
+//
+//
+//static void windowsClose()
+//{
+//    HINSTANCE   inst;
+//
+//    inst = websGetInst();
+//    UnregisterClass(ME_NAME, inst);
+//}
+//
+//
+///*
+//    Main menu window message handler.
+// */
+//static LRESULT CALLBACK websWindProc(HWND hwnd, UINT msg, UINT wp, LPARAM lp)
+//{
+//    switch (msg) {
+//        case WM_DESTROY:
+//            PostQuitMessage(0);
+//            finished++;
+//            return 0;
+//
+//        case WM_SYSCOMMAND:
+//            break;
+//    }
+//    return DefWindowProc(hwnd, msg, wp, lp);
+//}
+//
+//
+///*
+//    Check for Windows Messages
+// */
+//WPARAM checkWindowsMsgLoop()
+//{
+//    MSG     msg;
+//
+//    if (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) {
+//        if (!GetMessage(&msg, NULL, 0, 0) || msg.message == WM_QUIT) {
+//            return msg.wParam;
+//        }
+//        TranslateMessage(&msg);
+//        DispatchMessage(&msg);
+//    }
+//    return 0;
+//}
+//
+//
+///*
+//    Windows message handler
+// */
+//static LRESULT CALLBACK websAboutProc(HWND hwndDlg, uint msg, uint wp, long lp)
+//{
+//    LRESULT    lResult;
+//
+//    lResult = DefWindowProc(hwndDlg, msg, wp, lp);
+//
+//    switch (msg) {
+//        case WM_CREATE:
+//            break;
+//        case WM_DESTROY:
+//            break;
+//        case WM_COMMAND:
+//            break;
+//    }
+//    return lResult;
+//}
+//
+//#endif
+
+/*
+    Copyright (c) Embedthis Software. All Rights Reserved.
+    This software is distributed under commercial and open source licenses.
+    You may use the Embedthis GoAhead open source license or you may acquire
+    a commercial license from Embedthis Software. You agree to be fully bound
+    by the terms of either license. Consult the LICENSE.md distributed with
+    this software for full details and other copyrights.
+ */
+

+ 1 - 1
app/goahead-5.1.0/src/route.txt

@@ -41,7 +41,7 @@ route uri=/login.html
 route uri=/action/login methods=POST handler=action redirect=200@/index.html redirect=401@/login.html
 route uri=/action/logout methods=GET|POST handler=action redirect=200@/login.html
 route uri=/auth/form/ auth=form handler=continue abilities=manage redirect=401@/login.html
-
+route uri=/auth/getDeviceInfo auth=digest handler=continue methods=GET|POST abilities=manage
 route uri=/auth/person auth=digest handler=continue methods=GET|POST abilities=manage redirect=401@/login.html
 
 #route uri=/action/person methods=GET|POST handler=action 

+ 0 - 29
app/goahead-5.1.0/src/web_interface/dashboard.c

@@ -1,29 +0,0 @@
-#include    "goahead.h"
-#include    "libipmi_IPM.h"
-#include    "com_IPMIDefs.h"
-
-
-
-/*获取设备信息*/
-void getDeviceInfo(Webs *wp){
-    uint16_t    wRet = LIBIPMI_E_SUCCESS;
-    GetDevIDRes_T   DeviceID;
-    char BuildTime[30] = {0};
-    char FwVersion[10] = {0};
-
-    //Create session
-    LIBIPMI_CreateSession(&wp->ipmi_session, 10);
-
-    sprintf(BuildTime, "%s %s", __DATE__, __TIME__);
-    wRet = IPMICMD_GetDeviceID( &wp->ipmi_session, &DeviceID, DEFAULT_TIMEOUT);
-    if (wRet == LIBIPMI_E_SUCCESS)
-    {
-        sprintf(FwVersion, "%d.%d", DeviceID.FirmwareRevision1, DeviceID.FirmwareRevision2);
-    }
-
-    printf("BuildTime: %s\n", BuildTime);
-    printf("FwVersion: %s\n", FwVersion);
-
-    //Close session
-    LIBIPMI_CloseSession(&wp->ipmi_session );
-}

+ 0 - 0
app/goahead-5.1.0/src/web_interface/dashboard.h


+ 7 - 0
app/goahead-5.1.0/src/web_interface/inc/config.h

@@ -0,0 +1,7 @@
+#ifndef __CONFIG_H__
+#define __CONFIG_H__
+
+#include "goahead.h"
+
+
+#endif /* __CONFIG_H__ */

+ 3 - 1
app/goahead-5.1.0/src/web_interface/inc/dashboard.h

@@ -1,7 +1,9 @@
 #ifndef __DASHBOARD_H__
 #define __DASHBOARD_H__
 
-void getDeviceInfo(Webs *wp);
+#include "goahead.h"
+
+void getDeviceInfo(Webs *wp);
 
 
 

+ 5 - 0
app/goahead-5.1.0/src/web_interface/inc/fan.h

@@ -0,0 +1,5 @@
+#ifndef __FAN_H__
+#define __FAN_H__
+#include "goahead.h"
+
+#endif /* __FAN_H__ */

+ 6 - 0
app/goahead-5.1.0/src/web_interface/inc/fru.h

@@ -0,0 +1,6 @@
+#ifndef __FRU_H__
+#define __FRU_H__
+
+#include "goahead.h"
+
+#endif /* __FRU_H__ */

+ 6 - 0
app/goahead-5.1.0/src/web_interface/inc/fw_update.h

@@ -0,0 +1,6 @@
+#ifndef __FW_UPDATE_H__
+#define __FW_UPDATE_H__
+
+#include "goahead.h"
+
+#endif /* __FW_UPDATE_H__ */

+ 6 - 0
app/goahead-5.1.0/src/web_interface/inc/remote_control.h

@@ -0,0 +1,6 @@
+#ifndef __REMOTE_CONTROL_H__
+#define __REMOTE_CONTROL_H__
+
+#include "goahead.h"
+
+#endif /* __REMOTE_CONTROL_H__ */

+ 6 - 0
app/goahead-5.1.0/src/web_interface/inc/sel.h

@@ -0,0 +1,6 @@
+#ifndef __SEL_H__
+#define __SEL_H__
+
+#include "goahead.h"
+
+#endif /* __SEL_H__ */

+ 7 - 0
app/goahead-5.1.0/src/web_interface/inc/server_health.h

@@ -0,0 +1,7 @@
+#ifndef __SERVER_HEALTH_H__
+#define __SERVER_HEALTH_H__
+
+#include "goahead.h"
+
+
+#endif /* __SERVER_HEALTH_H__ */

BIN
gd32450i-eval.uImage


+ 8 - 8
local/rc

@@ -11,25 +11,25 @@ ifconfig lo 127.0.0.1
 ################### install module #####################
 #insmod /usr/bin/test_module.ko
 insmod /usr/bin/gpio.ko 
-insmod /usr/bin/i2c.ko
+#insmod /usr/bin/i2c.ko
 #insmod /usr/bin/fmc.ko
 insmod /usr/bin/platform_STM32F429.ko
-insmod /usr/bin/adc.ko
-insmod /usr/bin/spi.ko
+#insmod /usr/bin/adc.ko
+#insmod /usr/bin/spi.ko
 
 #################### create node ########################
 #mknod /dev/test_module c 99 0
 mknod /dev/platform c 100 0
-mknod /dev/i2c1 c 101 0
-mknod /dev/i2c2 c 101 1
-mknod /dev/i2c3 c 101 2
+#mknod /dev/i2c1 c 101 0
+#mknod /dev/i2c2 c 101 1
+#mknod /dev/i2c3 c 101 2
 #mknod /dev/fmc_cpld c 102 0
 mknod /dev/gpio c 103 0 
 mknod /dev/adc1 c 105 0
 #mknod /dev/adc2 c 105 1
 #mknod /dev/adc3 c 105 2
-mknod /dev/spi2 c 104 1
-mknod /dev/spi5 c 104 4
+#mknod /dev/spi2 c 104 1
+#mknod /dev/spi5 c 104 4
 
 ################### run app ####################
 /bin/telnetd