首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

ntfs-3g 集成

ntfs-3g 集成 1. 下载 http://www.tuxera.com/community/ntfs-3g-download/ ntfs-3g-2010.8.8 2. 建立makefile a. 参考gstreamer/makefile    大概把 gstreamer改成ntfs_3g和ntfs-3g,GSTREAMER改成NTFS_3G,设置版本,源码包等。 b. 定义option_configure_args c. 取消install过程 根据需要确定是否--enable-debug 3. 编译 $make -C src/thirdparty/ntfs-3g/ remove 在Huangpu/makefile下面加入对ntfs-3g的编译目标,然后$make ntfs-3g 4. 运行 a. 把编译的结果mount到机顶盒 pc: #ln -s /home/qianjiang/apollo/sw/ga300/target/output/objs/summit-dualhd-gnu-4.4.0-linux-debug/comps/generic_apps/ ~/nfsroot/apps apollo: # mount -t nfs -o rw,tcp,nolock,nfsvers=3 192.168.2.2:/home/qianjiang/nfsroot/apps mnt/apps/ b. 把目标文件拷贝到/bin和/lib下面 # cp mnt/apps/ntfs-3g/ntfs-3g-2010.8.8/libntfs-3g/.libs/libntfs-3g.so* /lib/ # cp mnt/apps/ntfs-3g/ntfs-3g-2010.8.8/src/.libs/ntfs-3g /bin/ # ntfs-3g --help 注意: 曾经运行src下面的ntfs-3g得到异常的问题: # /mnt/apps/ntfs-3g/ntfs-3g-2010.8.8/src/ntfs-3g -/bin/sh: /mnt/apps/ntfs-3g/ntfs-3g-2010.8.8/src/ntfs-3g: not found 网上说可能是相关库文件找不到,应该拷贝至/lib或者设置LD_LIBRARY_PATH,但是都未奏效。而且pc下运行也没问题,ldd ntfs-3g表明是无动态链接库。所以,很奇怪! 5. 调试 # ntfs-3g /dev/sda4 mnt/sda/ modprobe: module 'fuse' not found ntfs-3g-mount: fuse device is missing, try 'modprobe fuse' as root 注: 曾经可没有这么好的出现提示,而是死机,,,所以。。。 6. 加入fuse 6.1 pc #cd target/src/sd/os/oslinux/comps/kernel/linux-2.6.28.10/ #cp target/output/objs/pnx8473_hirf_moca_mp1_mtd_debug/.config ./ #make menuconfig => 选中fuse文件系统 #make modules #cp fs/fuse/fuse.ko /home/qianjiang/nfsroot/appfs/lib/modules/2.6.28.10/extra/ 注:这里对kernel的编译可能不是Official的方式。 6.2 apollo #insmod fuse.ko 7. 测试 7.1写测试 ==> OK 7.2性能测试 ===> 写hello.sh date cp mnt/sda/GA300_full_src.tar.gz mnt/sda/GA300_full_src.tar.gz1 umount mnt/sda date # sh hello.sh Wed Dec 31 17:06:19 MST 1969 Unmounting /dev/sda4 () Wed Dec 31 17:19:44 MST 1969 (read + write)bs = 1608602770(file size) * 8 / 805(time) = 15.3Mbits/s 8. 集成和check in 8.1 file: pnx8473_hirf_moca_mp1_mtd_debug_defconfig     enable fuse 8.2 Huangpu/makefile     add make target: ntfs-3g

03

busybox配置telnetd

busybox配置telnetd的问题 进入busybox源码文件夹,选择telnet,telnetd.后确保在ramdisk的sbin文件夹下存在inetd和in.telnetd或telned。在ramdisk中的mnt/etc文件夹中,确保存在文件fstab,service,inetd.conf,passwd文件确保fstab文件里存在none /dev/pts devpts mode=0622 0 0这一行确保services文件里存在 telnet 23/tcp 这一行确保inetd.conf中存在 telnet stream tcp nowait root /sbin/in.telnetd in.telnetd 确保passwd文件里存在root::0:0:root:/:/bin/sh,表示没有password的root帐号在kernal的代码中,通过makemenuconfig,在Character devices中选中Unix98 PTY support 在File systems中选中/dev/pts file system for Unix98 PTYs 退出后make zImage就可以在ramdisk的启动文件mnt/etc/init.d/rcS中,在mount –a的后面下一行添�inetd,使系统启动的时候就载入telnetd服新建inetd.conf文件,内容例如以下: # telnetstream tcp nowait root /usr/sbin/telnetd 执行inetd inetd.conf 在网上google了一天,终于能够确定要使用telnetd,内核必须配置下面项: dev/pts file system for Unix98 PTYs Unix98 PTY support (256) Maximum number of Unix98 PTYs in use (0-2048) 可我使用的2.6.14.1的内核,make menuconfig根本找不到这些配置项!那么内核是否支持这些选项呢?cat /proc/filesystems发现已支持devpts文件系统,那么uinx98 pty呢?查看内核的Kconfig和Makefile文件,发现仅仅要CONFIG_UNIX98_PTYS=y就会编译支持devpts文件系统和unix98的功能。而选择了嵌入式CPU内核会默认CONFIG_UNIX98_PTYS=y。所以我的内核已经支持telnet。 fstab文件里也载入了devpts文件系统: devpts /dev/pts devpts defaults 00 inittab文件里也指明了telnet的动作: tty0::askfirst:-/bin/sh 为什么还不行呢?困惑!后来细致想想,应该是设备文件节点的问题。我在开发板上移植2.6内核和驱动时一直没有使用devfs。由于devfs尽管方便,但同一时候也阻止了对设备文件节点的了解,且2.6内核已放弃了devfs。那么使用telnet应该创建那些文件节点呢?devpts会在/dev/pts下自己主动创建节点,还有什么呢?google了一会没有答案。后来忽然想起Kconfig文件里好象些说明,再去看一看,原来是这样: A pseudo terminal (PTY) is a software device consisting of two halves: a master and a slave. The slave device behaves identical to a physical terminal; the master device is used by a process to read data from and write data to the slave, thereby emulating a terminal. Typical programs for the master side are telnet servers and xterms. Linux has traditionally used the BSD-like names /dev/ptyxx for masters and /dev/ttyxx for slaves of pseudo terminals. This scheme has a number of problems. The GNU C library glibc 2.1 and later, however, supports the Unix98 naming standard: in order to acquire a pseudo terminal, a process opens /dev/ptmx; the number of the pseu

03
领券