openwrt luci on mini2440

問題未能解決,請看我下篇博客連接:html

http://www.cnblogs.com/jetli-/p/5435232.htmllinux

./scripts/feeds update –agit

 ./scripts/feeds install –agithub

Ignoring feed 'luci' - index missingjson

解決方法:參照https://github.com/openwrt/luciui

修改feeds.conf.default,添加以下語句this

src-git luci https://github.com/openwrt/luci.gitspa

將對應的語句進行屏蔽。code

To install all its package definitions, run:htm

./scripts/feeds update luci
./scripts/feeds install -a -p luci

menuconfig 配置界面就會出現luci 選項

運行make V=99

出現以下錯誤

 

implicit declaration of function 'json_tokener_get_error'

implicit declaration of function 'json_tokener_error_desc'

 error: 'JSON_C_TO_STRING_SPACED' undeclared (first use in this function)

 error: 'JSON_C_TO_STRING_PRETTY' undeclared (first use in this function)

warning: implicit declaration of function 'json_object_to_json_string_ext'

修改以下:

json_object.h

#define  JSON_C_TO_STRING_SPACED   (1<<0)
#define  JSON_C_TO_STRING_PRETTY   (1<<1) 

json_tokener.c

const char *json_tokener_error_desc(enum json_tokener_error jerr)
{
         int jerr_int = (int)jerr;
          if (jerr_int < 0 || jerr_int > (int)sizeof(json_tokener_errors))
                  return "Unknown error, invalid json_tokener_error value passed to json_tokener_error_desc()";
         return json_tokener_errors[jerr];
}

enum json_tokener_error json_tokener_get_error(json_tokener *tok)
{
     return tok->err;
}

 

json_object.c

const char* json_object_to_json_string_ext(struct json_object *jso, int flags)
 {
         if (!jso)
                 return "null";
 
         if ((!jso->_pb) && !(jso->_pb = printbuf_new()))
                 return NULL;
 
         printbuf_reset(jso->_pb);
 
         if(jso->_to_json_string(jso, jso->_pb, 0, flags) < 0)
                return NULL;
 
         return jso->_pb->buf;
 }

arm-openwrt-linux-gnueabi/bin/ld: cannot find -ljson-c
collect2: ld returned 1 exit status

/home/jetli/openwrt-dreambox/staging_dir/target-arm_v4t_eglibc-2.8_eabi/usr/include

目錄下有json目錄,

 打開/home/jetli/openwrt-dreambox/build_dir/target-arm_v4t_eglibc-2.8_eabi/luci-lib-jsonc/src/Makefile

將文件中全部 json-c,改成json 

相關文章
相關標籤/搜索