Skip to content

Commit 01cc2ae

Browse files
committed
[DM/FEATURE] Support simple block layer
1. Disk and blk device management. 2. Support partitions probe auto. 3. Support DFS and user mode fops, ioctl. 4. Add a cmd for blk info. Signed-off-by: GuEe-GUI <[email protected]>
1 parent fed7c9a commit 01cc2ae

File tree

17 files changed

+2470
-0
lines changed

17 files changed

+2470
-0
lines changed

components/drivers/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ rsource "touch/Kconfig"
2121
rsource "graphic/Kconfig"
2222
rsource "hwcrypto/Kconfig"
2323
rsource "wlan/Kconfig"
24+
rsource "block/Kconfig"
2425
rsource "virtio/Kconfig"
2526
rsource "ofw/Kconfig"
2627
rsource "pci/Kconfig"

components/drivers/block/Kconfig

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
menuconfig RT_USING_BLK
2+
bool "Using Block device drivers"
3+
default n
4+
5+
if RT_USING_BLK
6+
rsource "partitions/Kconfig"
7+
endif

components/drivers/block/SConscript

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from building import *
2+
3+
group = []
4+
objs = []
5+
6+
if not GetDepend(['RT_USING_BLK']):
7+
Return('group')
8+
9+
cwd = GetCurrentDir()
10+
list = os.listdir(cwd)
11+
CPPPATH = [cwd + '/../include']
12+
13+
src = ['blk.c', 'blk_dev.c', 'blk_dfs.c', 'blk_partition.c']
14+
15+
group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
16+
17+
for d in list:
18+
path = os.path.join(cwd, d)
19+
if os.path.isfile(os.path.join(path, 'SConscript')):
20+
objs = objs + SConscript(os.path.join(d, 'SConscript'))
21+
objs = objs + group
22+
23+
Return('objs')

0 commit comments

Comments
 (0)