项目作者: riteshharjani

项目描述 :
slos block device driver
高级语言: C
项目地址: git://github.com/riteshharjani/slos_bd.git
创建时间: 2015-04-18T19:18:30Z
项目社区:https://github.com/riteshharjani/slos_bd

开源协议:

下载


SLOSBD - Sample Block device driver

Author: Ritesh Harjani ritesh.harjani@gmail.com

About me

Description

This is sample block device driver example compiled and tested
on 3.10 kernel.

This is based out of LWN article: https://lwn.net/Articles/58719/
which was based on 2.6 kernel.

Makefile:

  1. obj-y += slos_bd.o

Commands on Terminal:

  1. ls /dev/block/slos0
  2. ./data/busybox/busybox fdisk /dev/block/slos0

Create partition

  1. Command (m for help): n
  2. Command action
  3. e extended
  4. p primary partition (1-4)
  5. p
  6. Partition number (1-4): 1
  7. First cylinder (1-16, default 1):
  8. Using default value 1
  9. Last cylinder, +cylinders or +size{K,M,G} (1-16, default 16):
  10. Using default value 16
  11. Command (m for help): w
  12. The partition table has been altered!
  13. Calling ioctl() to re-read partition table.
  1. ./data/busybox/busybox mkfs.vfat /dev/block/slos0p1
  2. mount -t vfat /dev/block/slos0p1 /mnt
  3. echo "slos sample block device" > /mnt/file
  4. cat /mnt/file.
  5. umount /mnt

Contribution

Feel free to submit a pull request for any bug fixes/enhancements