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

    构建Linux根文件系统

    类似于Windows下的C、D、E等各个盘,Linux系统也可以将磁盘、Flash等存储设备划分为若干个分区,在不同分区存放不同类别的文件。与Windows的C盘类似,Linux一样要在一个分区上存放系统启动所必需的文件,比如内核映象文件(在嵌入式系统中,内核一般单独存放在一个分区中)、内核启动后运行的第一个程序(init)、给用户提供操作界面的shell程序、应用程序所依赖的库等。这些必需的、基本的文件,合称为根文件系统,它们存放在一个分区中。Linux系统启动后首先挂接这个分区──称为挂接(mount)根文件系统。其他分区上所有目录、文件的集合,也称为文件系统,比如我们常说:“挂接硬盘第二个分区”、“挂接硬盘第二个分区上的文件系统”。

    03

    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

    fio基础11

    rdma The RDMA I/O engine supports both RDMA memory semantics (RDMA_WRITE/RDMA_READ) and channel semantics (Send/Recv) for the InfiniBand, RoCE and iWARP protocols. falloc IO engine that does regular fallocate to simulate data transfer as fio ioengine. DDIR_READ does fallocate(,mode = keep_size,) DDIR_WRITE does fallocate(,mode = 0) DDIR_TRIM does fallocate(,mode = punch_hole) e4defrag IO engine that does regular EXT4_IOC_MOVE_EXT ioctls to simulate defragment activity in request to DDIR_WRITE event rbd IO engine supporting direct access to Ceph Rados Block Devices (RBD) via librbd without the need to use the kernel rbd driver. This ioengine defines engine specific options. gfapi Using Glusterfs libgfapi sync interface to direct access to Glusterfs volumes without options. gfapi_async Using Glusterfs libgfapi async interface to direct access to Glusterfs volumes without having to go through FUSE. This ioengine defines engine specific options. libhdfs Read and write through Hadoop (HDFS). The 'filename' option is used to specify host, port of the hdfs name-node to connect. This engine interprets offsets a little differently. In HDFS, files once created cannot be modified. So random writes are not possible. To imitate this, libhdfs engine expects bunch of small files to be created over HDFS, and engine will randomly pick a file out of those files based on the offset generated by fio backend. (see the example job file to create such files, use rw=write option). Please note, you might want to set necessary environment variables to work with hdfs/libhdfs properly. mtd Read, write and erase an MTD character device (e.g., /dev/mtd0). Discards are treated as erases. Depending on the underlying device type, the I/O may have to go in a certain pattern, e.g., on NAND, writing sequentially to erase blocks and discarding before overwriting. The w

    04
    领券