最近在openwrt上安装python时,老出现/overlay空间不足的错误,如下图所示:
不过用命令查看时,其空间确实挺小的:
看了这篇文章之后,想到了用闪存卡来扩容。由于我的系统内部已经有了相关usb驱动模块,所以一插上闪存卡就能识别了
基本想法很简单,先格式化,再挂载,再配置opkg.conf使软件安装到其上。
import httplib import urllib import time import random url_platform = '11.4.31.195:9071' path = '/WIFPa/ResourceData.xml/000100003f0cfd4a?ResourceID=1' path_uploadservicedata = '/WIFPd/UploadServiceData/000100003f0cfd4a' FORMAT = '%Y-%m-%dT%X' params_xml1 = '<ServiceData><mwid>000100003f0cfd4a</mwid><datatime>' +time.strftime(FORMAT,time.localtime()) + '</datatime><Datapoints><value>' params_xml2 = '</value><num>1</num></Datapoints></ServiceData>' header = {'Content-type':'text/xml'} # conn.request(method='GET',url=path) # while True: conn = httplib.HTTPConnection(url_platform) val = str(random.randint(1,100)) print 'value',val params_xml = params_xml1 + val + params_xml2 conn.request('POST',path_uploadservicedata,params_xml,header) resp = conn.getresponse() print resp.status,resp.reason # htmldata = resp.read() # print htmldata # time.sleep(5)
参考链接
http://wiki.openwrt.org/doc/techref/filesystems?s[]=filesystem
http://blog.csdn.net/jk110333/article/details/11920163
http://wiki.openwrt.org/doc/techref/flash.layout
原文地址:http://blog.csdn.net/baiwfg2/article/details/41518459