-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathMakefile-standalone
More file actions
57 lines (46 loc) · 2.32 KB
/
Copy pathMakefile-standalone
File metadata and controls
57 lines (46 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# SPDX-License-Identifier: GPL-2.0
# For the upstream version CONFIG_SBLKDEV should be defined in Kconfig
CONFIG_SBLKDEV := m
# Allow to select bio-based or request-based block device
# ccflags-y += "-D CONFIG_SBLKDEV_REQUESTS_BASED"
# Allow to set specific size of the block
# ccflags-y += "-D CONFIG_SBLKDEV_BLOCK_SIZE=4096"
# Allows you to build a module in a range of kernel versions [5.10, 6.0].
ccflags-y += $(shell \
grep -qw "*bi_bdev;" $(srctree)/include/linux/blk_types.h && \
echo -D HAVE_BI_BDEV)
ccflags-y += $(shell \
grep -qw "*bi_disk;" $(srctree)/include/linux/blk_types.h && \
echo -D HAVE_BI_BDISK)
ccflags-y += $(shell \
grep -qw "blk_qc_t submit_bio" $(srctree)/include/linux/bio.h && \
echo -D HAVE_QC_SUBMIT_BIO)
ccflags-y += $(shell \
grep -qw "blk_mq_alloc_disk" $(srctree)/include/linux/blk-mq.h && \
echo -D HAVE_BLK_MQ_ALLOC_DISK)
ccflags-y += $(shell test -f $(srctree)/include/linux/genhd.h && \
grep -qw "int add_disk" $(srctree)/include/linux/genhd.h && \
echo -D HAVE_ADD_DISK_RESULT)
ccflags-y += $(shell test -f $(srctree)/include/linux/blkdev.h && \
grep -qw "int add_disk" $(srctree)/include/linux/blkdev.h && \
echo -D HAVE_ADD_DISK_RESULT)
ccflags-y += $(shell test -f $(srctree)/include/linux/genhd.h && \
grep -qw "int __must_check add_disk" $(srctree)/include/linux/genhd.h && \
echo -D HAVE_ADD_DISK_RESULT)
ccflags-y += $(shell test -f $(srctree)/include/linux/blkdev.h && \
grep -qw "int __must_check add_disk" $(srctree)/include/linux/blkdev.h && \
echo -D HAVE_ADD_DISK_RESULT)
ccflags-y += $(shell test -f $(srctree)/include/linux/genhd.h && \
grep -qw "void blk_cleanup_disk" $(srctree)/include/linux/genhd.h && \
echo -D HAVE_BLK_CLEANUP_DISK)
ccflags-y += $(shell test -f $(srctree)/include/linux/blkdev.h && \
grep -qw "void blk_cleanup_disk" $(srctree)/include/linux/blkdev.h && \
echo -D HAVE_BLK_CLEANUP_DISK)
ccflags-y += $(shell test -f $(srctree)/include/linux/genhd.h && \
echo -D HAVE_GENHD_H)
ccflags-y += $(shell test -f $(srctree)/include/linux/genhd.h && \
grep -qw "define blk_alloc_disk" $(srctree)/include/linux/genhd.h && \
echo -D HAVE_BLK_ALLOC_DISK)
ccflags-y += $(shell test -f $(srctree)/include/linux/blkdev.h && \
grep -qw "define blk_alloc_disk" $(srctree)/include/linux/blkdev.h && \
echo -D HAVE_BLK_ALLOC_DISK)