上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 41 下一页
摘要: 先解释一下遇到的问题:由于我住在学校的宿舍里,里面没有网线,没法上网。但是宿舍楼离教室不远,在教室是可以上网的(在教室里一共有三十台左右的电脑,在教室里配了一个有线主路由器A和一个交换机B,使教室里所有电脑都可以上网,主路由的IP:192.168.1.1,子网掩码:255.255.255.0,开启DHCP服务),为了实现在宿舍里上网,需要准备两台无线路由器(当然,一台也可以,但是一台的话,因为路由器放在教室,那么在宿舍接收到的无线信号就很弱,不太好),下面介绍两种方法实现在宿舍上网:我买的两台无线路由器的型号在这里说明一下:无线路由器C:TL-WR842N ,将来放在教室里,负责将教室里的有线 阅读全文
posted @ 2013-12-22 13:17 dolinux 阅读(15738) 评论(10) 推荐(4)
摘要: http://pan.baidu.com/s/1bnxNzfL 阅读全文
posted @ 2013-12-21 19:39 dolinux 阅读(303) 评论(0) 推荐(0)
摘要: 转:http://chuna2.787528.xyz/jianyungsun/archive/2011/03/19/1988855.html这是我的vim配置文件:jeffy-vim-v2.4.tar添加了ctrl+c和ctrl+v,实现与系统剪贴板的交互,添加了F12在paste和nopaste之间切换。Vim作为最好用的文本编辑器之一,使用vim来编文档,写代码实在是很惬意的事情。每当学会了vim的一个新功能,就会很大地提高工作效率。有人使用vim几十年,还没有完全掌握vim的功能,这也说明了vim的强大。而这样何尝不是一件好事呢,只要有的学习,就有的提高。最近使用Vim来写博客,发现在Vim 阅读全文
posted @ 2013-12-21 13:40 dolinux 阅读(23580) 评论(1) 推荐(0)
摘要: 比如当前目录下有几个目录,其中存放了一些库和二进制工具,现在需要查看这些库以及二进制工具依赖那些动态链接库#!/bin/bashfile=depend.txtdir[0]="./bin"dir[1]="./lib"dir[2]="./sbin"z="/*"rm -rf $filetouch $filefor ((i=0;i>$file for j in $file_list do du -sh $j 1>>$file 2>/dev/null arm-hisiv100nptl-linux-ob 阅读全文
posted @ 2013-12-18 19:56 dolinux 阅读(247) 评论(0) 推荐(0)
摘要: 运行sudo apt-mirror却无法启动服务了。而是给出了一行错误提示信息: apt-mirror is already running, exiting at /usr/bin/apt-mirrir lin 187造成这种故障的原因是非正常终止了apt-mirror,或者apt-mirror没 有同步完数据,而客户按下了Ctrl+C强行中断了数据同步,而造成apt-mirror为删除进程锁定文件apt-mirror。故而,运行apt- mirror时会提示说:apt-mirror is already running(apt-mirror正在运行)错误。既然知道了故障原因,那么,解决方案 阅读全文
posted @ 2013-12-17 15:15 dolinux 阅读(1182) 评论(0) 推荐(0)
摘要: 环境介绍主机: XP虚拟机:VirtualBox+Debian6遇到的问题我有一块西部数据的移动硬盘,虚拟机中有一些资料需要拷贝到移动硬盘中,然后我将移动硬盘插上后,执行如下设置,将移动硬盘分配给虚拟机:然后就会将我的移动硬盘自动挂载到Debian中:但是当我在/media/work下想创建一个文件夹时出现如下提示:mkdir: 无法创建目录"debian_source": 只读文件系统解决办法安装工具:sudo apt-get install ntfs-config对linux系统而言,USB接口的移动硬盘是当作SCSI设备对待的。插入移动硬盘之前,应先用fdisk –l 阅读全文
posted @ 2013-12-17 09:59 dolinux 阅读(16517) 评论(0) 推荐(0)
摘要: The format of basic inline assembly is very much straight forward. Its basic form is基本汇编嵌入格式如下:asm("assembly code");Example.asm("movl%ecx%eax");/*movesthecontentsofecxtoeax*/__asm__("movb%bh(%eax)");/*movesthebytefrombhtothememorypointedbyeax*/You might have noticed tha 阅读全文
posted @ 2013-12-16 18:44 dolinux 阅读(771) 评论(0) 推荐(1)
摘要: .fill 语法:.fill repeat, size, value 含义是反复拷贝 size个字节,重复 repeat 次, 其中 size 和 value 是可选的,默认值分别为 1 和 0. 阅读全文
posted @ 2013-12-16 18:36 dolinux 阅读(1771) 评论(0) 推荐(0)
摘要: 转:http://wuyuans.com/2012/05/github-simple-tutorial/ github是一个基于git的代码托管平台,付费用户可以建私人仓库,我们一般的免费用户只能使用公共仓库,也就是代码要公开。对于一般人来说公共仓库就已经足够了,而且我们也没多少代码来管理,O(∩_ 阅读全文
posted @ 2013-12-16 14:37 dolinux 阅读(505) 评论(0) 推荐(0)
摘要: 计算机上有多块网卡(例如笔记本电脑的无线网卡和以太网卡)连接至网络,使用ping命令想指定使用哪块网卡怎么办?ping -I eth0 10.10.10.1ping -I eth1 10.10.10.1 阅读全文
posted @ 2013-12-16 14:33 dolinux 阅读(15300) 评论(0) 推荐(0)
摘要: 转:http://www.linux-mtd.infradead.org/faq/ubifs.htmlUBIFS FAQ and HOWTOTable of contentsHow do I enable UBIFS?How do I mount UBIFS?How do I create an UBIFS image?May an empty UBI volume be mounted?What is the purpose of -c (--max-leb-cnt) mkfs.ubifs option?Why do I have to use ubiformat?What is the t 阅读全文
posted @ 2013-12-15 13:17 dolinux 阅读(2329) 评论(0) 推荐(0)
摘要: 转:http://www.linux-mtd.infradead.org/faq/ubi.htmlUBI FAQ and HOWTOTable of contentsHow do I enable UBI?How do I attach an MTD device?How do I create/delete UBI volumes?How do I run JFFS2 on top of an UBI volume?Can I run ext2 on top of UBI?Do I have to format my empty flash before running UBI on top 阅读全文
posted @ 2013-12-15 13:07 dolinux 阅读(1668) 评论(0) 推荐(0)
摘要: 转:http://www.linux-mtd.infradead.org/faq/general.html#L_mtd_whatNote, you can find Ukranian translation of this page by Alyona Lompar ([email protected])here. We have not assessed the contents, though.Table of contentsIs an MTD device a block device or a char device?I'd like to add/ch 阅读全文
posted @ 2013-12-15 12:24 dolinux 阅读(628) 评论(0) 推荐(0)
摘要: 先介绍一下环境:主机:Win7虚拟机:VirtualBox + Debian7由于软件源的体积比较大,所以我又给虚拟机添加了一块50GB的虚拟硬盘(给虚拟机添加虚拟硬盘的方法参见:http://chuna2.787528.xyz/pengdonglin137/p/3366589.html , 其中介绍了如何在Vmware和VirtualBox中给Linux虚拟机添加虚拟硬盘),然后修改/etc/fstab,使在系统启动的时候将其自动挂载到/home/pengdl/debian_source目录下。下面步入正题:第一步、安装apt-mirror工具执行如下命令:sudo apt-get instal 阅读全文
posted @ 2013-12-14 13:25 dolinux 阅读(8347) 评论(0) 推荐(1)
摘要: 转:http://www.xiumu.org/technology/the-find-the-fastest-in-the-google-ip.shtml体验秒开GOOGLE的感觉!在http://support.google.com/a/bin/answer.py?hl=zh-Hans&answer=60764有得到google服务器IP地址段的帮助命令:即在命令行输入:nslookup -q=TXT _netblocks.google.com 8.8.8.8可以查看google最新的服务器IP地址段,但这里面没有大陆的IP地址段。所以用下面的方法获取谷歌北京公司的IP地址。goog 阅读全文
posted @ 2013-12-13 18:34 dolinux 阅读(1939) 评论(0) 推荐(0)
摘要: 转载:http://chuna2.787528.xyz/hitwtx/archive/2011/11/16/2251254.html命令:scp不同的Linux之间copy文件常用有3种方法:第一种就是ftp,也就是其中一台Linux安装ftp Server,这样可以另外一台使用ftp的client程序来进行文件的copy。第二种方法就是采用samba服务,类似Windows文件copy 的方式来操作,比较简洁方便。第三种就是利用scp命令来进行文件复制。 scp是有Security的文件copy,基于ssh登录。操作起来比较方便,比如要把当前一个文件copy到远程另外一台主机上,可以如下命令。s 阅读全文
posted @ 2013-12-13 17:47 dolinux 阅读(690) 评论(0) 推荐(0)
摘要: 转:http://chuna2.787528.xyz/xmphoenix/archive/2011/03/21/1989944.htmlgcc提供了大量的警告选项,对代码中可能存在的问题提出警 告,通常可以使用-Wall来开启以下警告: -Waddress -Warray-bounds (only with -O2) -Wc++0x-compat -Wchar-subscripts -Wimplicit-int -Wimplicit-function-declaration -Wcomment -Wformat -Wmain (only for C/ObjC and unless -ffreest 阅读全文
posted @ 2013-12-13 11:10 dolinux 阅读(366) 评论(0) 推荐(0)
摘要: 转:http://chuna2.787528.xyz/xmphoenix/archive/2012/02/22/2363335.html指示符“include”、“-include”和“sinclude” 如果指示符“include”指定的文件不是以斜线开始(绝对路径,如/usr/src/Makefile...),而且当前目录下也不存在此文件;make将根据文件名试图在以下几个目录下查找:首先,查找使用命令行选项“-I”或者“--include-dir”指定的目录,如果找到指定的文件,则使用这个文件;否则继续依此搜索以下几个目录(如果其存在):“/usr/gnu/include”、“/usr/lo 阅读全文
posted @ 2013-12-13 10:27 dolinux 阅读(688) 评论(0) 推荐(0)
摘要: 转:http://fanwei51880.blog.163.com/blog/static/3240674020111145285375/总结如下:1)当你在编译生成静态库的时候, 只需要相应的依赖库库的头文件即可. 只有在你想生成so,或可执行文件 时, 才需要lib库. 对于你没有用到的lib, 但是不包含又编译失败, 那么只包含其头文件即可.2)如果你同时使用了多个库,而库之间又相互依赖,那么在链接是,把最底层的依赖库放在最右侧.否则可能会链接失败3)如果我已经把最底层的库放在最后边了,还是链接失败怎么办?请检查是否依赖了同名的其他的库. 自己查看链接库的路径对1)的说明如果你不用该so 阅读全文
posted @ 2013-12-12 19:49 dolinux 阅读(3934) 评论(0) 推荐(0)
摘要: 转:http://hi.baidu.com/proinsight/item/150dd3e6e506d1a9c10d7552生成动态库: 需要的目标文件得用-fPIC选项生成.而静态库所需的目标文件可以不用-fPIC选项.一个应用程序调用动态库, 而这个动态库其中的函数调用某静态库时,如何生成应用程序呢?例://///// static.hvoid static_print();///////static.cpp#include #include "static.h"void static_print() { std::cout#include "shared.h 阅读全文
posted @ 2013-12-12 19:39 dolinux 阅读(933) 评论(0) 推荐(0)
摘要: 关键词:-Wl,--gc-sections -ffunction-sections 链接 elf 库有时我们会遇到这种情况,可执行程序需要链接一些静态库,但是静态库中的函数并没有全部使用,只用了其中的几个,但是系统默认会自动把整个静态库全部链接到可执行程序中,造成可执行程序的大小大大增加,浪费了flash空间和内存空间。gcc为我们提供的解决这个问题的方法。请看下面的例子:fun1.c#include void fun1_0(void){ printf("filename: %s \tfunctionname = %s\n", __FILE__ , __FUNCTION__ 阅读全文
posted @ 2013-12-12 19:12 dolinux 阅读(3570) 评论(0) 推荐(1)
摘要: Flash型号:NandFlash型号:TC58NVG2S3ETA00pagesize: 2KBoobsize : 64Bblocksize : 128K关于ECC可以参考:http://chuna2.787528.xyz/pengdonglin137/p/3438001.html,其中介绍了256B纠错1位的ECC生成算法,而这里的512B跟它的方法类似。这里有一个EXCEL表格,它是对下面将要分析的算法的动态演示,只需要更改其中的16*16的表格中的数字,相应的ECC会自动计算出来。我将结合EXCEL和代码一块解释。#include #include #include #include #in 阅读全文
posted @ 2013-12-11 15:07 dolinux 阅读(2444) 评论(0) 推荐(0)
摘要: 相对于操作NandFlash,操作NorFlash相对简单,因为基本不需要考虑坏块,NorFlash也没有OOB区域,也跟ECC没有一毛钱关系。它的读写擦除相对容易。int dealwithnor(){// glob_t mtdbuf; struct mtd_info_user mtd; struct erase_info_user erase; int blocks = 0; int i = 0; //用于控制擦除的块的个数 int k = 0; int written = 0; //已写入的字节数,只初始化一次 unsigned int ... 阅读全文
posted @ 2013-12-11 13:24 dolinux 阅读(720) 评论(0) 推荐(1)
摘要: 以TC58NVG2S3ETA00为例:下面是它的一些物理参数:图一图二图三图四图五图6-0图6-1说明一下,在图6-1中中间的那个布局表可以看做是实际的NandFlash一页数据的布局,其中Data区域用于存放有效的数据,也就是我们可以通过类似read、write、pread、pwrite可以访问的区域,那每页中的64字节的OOB区域是无法通过前面的几个函数访问的,他们会自动跳过OOB区域,访问OOB区域需要借助特殊的命令。简单说明一下:Data A(512B)对应的ECC校验码存放在ECC for Data A(4 byte)中,OOB A (8byte) 对应的ECC校验码存放在紧接着的下 阅读全文
posted @ 2013-12-11 11:23 dolinux 阅读(6993) 评论(5) 推荐(3)
摘要: 转:http://www.linuxforu.com/2011/06/advanced-awk-for-sysadmins/ByVishal Bhatiaon June 1, 2011 inHow-Tos,Sysadmins,Tools / Apps·0 CommentsIn this article, we will discuss advanced Awk functionality, including string- and time-manipulation functions, associative arrays and user-defined functions. 阅读全文
posted @ 2013-12-10 18:36 dolinux 阅读(345) 评论(0) 推荐(0)
摘要: 转:http://www.linuxforu.com/2012/01/joy-of-programming-understanding-bit-fields-c/ByS.G. Ganeshon January 30, 2012 inCoding,Columns·2 CommentsOne important feature that distinguishes C as a systems programming language is its support for bit-fields. Let us explore this feature in this column.In 阅读全文
posted @ 2013-12-10 18:35 dolinux 阅读(333) 评论(0) 推荐(0)
摘要: 转:http://www.linuxforu.com/2012/05/ilinuxbot-designing-botnets-to-manage-linux-clients/ByNishant Sharmaon May 1, 2012 inCoding,Developers·2 CommentsThis article is to encourage newbies to use a little creativity to solve real-world problems. It shows you how to manage a Linux lab, or a lot of L 阅读全文
posted @ 2013-12-10 18:34 dolinux 阅读(347) 评论(0) 推荐(0)
摘要: 转:http://www.linuxforu.com/2011/12/socket-api-part-5-sctp/ByPankaj Tanwaron December 29, 2011 inCoding,Developers·11 CommentsThis article on socket programming deals with the Stream Control Transmission Protocol (SCTP).Similar to TCP and UDP, SCTP provides some features of both. It is message-o 阅读全文
posted @ 2013-12-10 18:33 dolinux 阅读(561) 评论(0) 推荐(0)
摘要: 转:http://www.linuxforu.com/2011/11/socket-api-part-4-datagrams/ByPankaj Tanwaron November 1, 2011 inCoding,Developers·0 CommentsLet’s try to develop server clients using UDP, the protocol behind some important services like DNS, NFS, etc.UDP, the User Datagram Protocol, is a connectionless prot 阅读全文
posted @ 2013-12-10 18:32 dolinux 阅读(343) 评论(0) 推荐(0)
摘要: 转:http://www.linuxforu.com/2011/10/socket-api-part-3-concurrent-servers/ByPankaj Tanwaron October 1, 2011 inCoding,Developers·2 CommentsIn this part of theseries, we will learn how to deal with multiple clients connected to the server.Welcome to another dose of socket programming! Till now, we’ 阅读全文
posted @ 2013-12-10 18:31 dolinux 阅读(335) 评论(0) 推荐(0)
摘要: 转:http://www.linuxforu.com/2011/09/creating-your-own-server-the-socket-api-part-2/ByPankaj Tanwaron September 1, 2011 inCoding,Developers·0 CommentsEarlier,we created a simple server and client program using the socket API. This time, we’ll first start with a program, and then explain what’s go 阅读全文
posted @ 2013-12-10 18:29 dolinux 阅读(257) 评论(0) 推荐(0)
摘要: 转:http://www.linuxforu.com/2011/08/creating-your-own-server-the-socket-api-part-1/ByPankaj Tanwaron August 1, 2011 inCoding,Developers·2 CommentsIn thisseries of articlesaimed at newbies to network programming (knowledge of C is a prerequisite), we’ll learn how to create network clients and ser 阅读全文
posted @ 2013-12-10 18:28 dolinux 阅读(398) 评论(0) 推荐(0)
摘要: 转:http://www.linuxforu.com/2012/01/working-with-mtd-devices/Working with MTD DevicesByMohan Lal Jangiron January 31, 2012 inCoding,Developers·6 CommentsThis article shows how kernel and application developers (in C) can make use of MTD in Linux.MTD (Memory Technology Devices) are NAND/NOR-based 阅读全文
posted @ 2013-12-10 18:16 dolinux 阅读(786) 评论(0) 推荐(0)
摘要: 转:http://blog.csdn.net/zhouzhuan2008/article/details/11053877目录MTD总概述MTD数据结构MTD相关层实现MTD,Memory Technology Device即内存技术设备字符设备和块设备的区别在于前者只能被顺序读写,后者可以随机访问;同时,两者读写数据的基本单元不同。字符设备,以字节为基本单位,在Linux中,字符设备实现的比较简单,不需要缓冲区即可直接读写,内核例程和用户态API一一对应,用户层的Read函数直接对应了内核中的Read例程,这种映射关系由字符设备的file_operations维护。块设备,则以块为单位接受输 阅读全文
posted @ 2013-12-10 18:10 dolinux 阅读(2811) 评论(0) 推荐(0)
摘要: http://files.cnblogs.com/pengdonglin137/smzy_Compare_dll.rar 阅读全文
posted @ 2013-12-09 15:48 dolinux 阅读(401) 评论(0) 推荐(0)
摘要: 转:http://www.tecmint.com/10-most-dangerous-commands-you-should-never-execute-on-linux/http://www.linuxeden.com/html/news/20131208/146197.htmlLinux命令行佷有用、很高效,也很有趣,但有时候也很危险,尤其是在你不确定你自己在正 在做什么时候。这篇文章并不打算引来你对Linux或linux 命令行的愤怒。我们只是想让你意识到在你运行某些命令时应该三思而后行。(译注:当然,以下命令通常都是在root权限下才能将愚蠢发挥到无可救药;在普 通用户身份下,破坏的只 阅读全文
posted @ 2013-12-08 13:15 dolinux 阅读(329) 评论(0) 推荐(0)
摘要: 问题:kernel/qjpegio.cpp:60:21: error: jpeglib.h: No such file or directory解决 sudo apt-get install libjpeg8 libjpeg8-dev问题 error: linux/videodev.h: No such file or directory解决sudo apt-get install libv4l-dev* $ vi x86-qtopia-2.2.0/qtopia/src/applications/camera/videocaptureview.cpp #include 替换... 阅读全文
posted @ 2013-12-07 11:54 dolinux 阅读(311) 评论(0) 推荐(0)
摘要: 转:http://blog.csdn.net/xuehui869/article/details/8958311运行主机:ubuntu 32位 11.04QT版本:2.2.0开发板:TQ2440源码安装路径(修改相关脚本x86-qtopia-2.2.0_build等,摈弃了解压缩后的文件都放在/opt/EmbedSky/Qte的问题):/opt/newSSD/tq2440/source/QteGCC版本:3.4.4说明:鉴于网上的讨论-------------------ubuntu11.04自带的gcc4.5.2编译Qt2.2.0会出现很多问题,所以把GCC的版本降低,出现的错误大大减少。参 阅读全文
posted @ 2013-12-07 10:49 dolinux 阅读(759) 评论(0) 推荐(0)
摘要: 参考:http://lionbule.iteye.com/blog/717722http://manpages.ubuntu.com/manpages/oneiric/man8/update-alternatives.8.htmlhttp://blog.chinaunix.net/uid-9185047-id-445077.htmlhttp://blog.csdn.net/heyutao007/article/details/5441482======================================================1. alternativesLinux代码al 阅读全文
posted @ 2013-12-07 10:21 dolinux 阅读(13919) 评论(0) 推荐(0)
摘要: 最近在编译qt,之前用的是debian6,gcc版本是gcc-4.4,当使用debian7时,编译遇到了很多跟debian6不一样的问题,debian7的默认gcc使用的是gcc-4.7,可能是编译器版本的问题,所以需要将debian7的gcc版本更换为gcc-4.4,办法如下:(推荐用方法一)方法一:安装gcc4.4和g++4.4sudo apt-get install gcc-4.4sudo apt-get isntall g++-4.4修改默认gcc和g++为4.4的版本sudoupdate-alternatives --remove-all gccsudo update-alterna 阅读全文
posted @ 2013-12-07 10:16 dolinux 阅读(1332) 评论(0) 推荐(0)
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 41 下一页