-
Notifications
You must be signed in to change notification settings - Fork 8
/
Target.minios.arm32.mk
103 lines (89 loc) · 2.9 KB
/
Target.minios.arm32.mk
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
XEN_TARGET_ARCH = $(ARCH)
XEN_COMPILE_ARCH = $(ARCH)
XEN_ROOT ?= $(realpath ../xen)
TOOLCHAIN_ROOT ?= $(realpath ../toolchain)
MINIOS_ROOT ?= $(realpath ../mini-os)
NEWLIB_ROOT ?= $(TOOLCHAIN_ROOT)/$(ARCH)-root/arm-none-eabi
LWIP_ROOT ?= $(TOOLCHAIN_ROOT)/$(ARCH)-root/arm-none-eabi
GCC_VERSION ?= 4.7.2
# arm32 cross compiler
CCTOOL = arm-linux-gnueabihf
CC = $(CCTOOL)-gcc-$(shell echo ${GCC_VERSION} | cut -d. -f1,2)
AR = $(CCTOOL)-ar
AS = $(CCTOOL)-as
LD = $(CCTOOL)-ld
RANLIB = $(CCTOOL)-ranlib
READELF = $(CCTOOL)-readelf
STRIP = $(CCTOOL)-strip
NM = $(CCTOOL)-nm
OBJCOPY = $(CCTOOL)-objcopy
verbose ?=
######################################
## General
######################################
CONFIG_BLKFRONT_PERSISTENT_GRANTS ?= y
CONFIG_SHUTDOWN = y
CONFIG_CONSFRONT_SYNC = n
CONFIG_SELECT_POLL ?= y
CFLAGS += -Wunused \
-Wparentheses \
-Wsequence-point \
-Wswitch-default \
-Wpointer-arith \
-Wbad-function-cast \
-Wwrite-strings \
-Wold-style-definition \
-Wredundant-decls \
-Wno-address \
-Wtype-limits \
-Itarget/minios/include
######################################
## Networking
######################################
## vif
CONFIG_NETFRONT = y
CONFIG_NETFRONT_PERSISTENT_GRANTS ?= y
CONFIG_NETFRONT_GSO ?= y
CONFIG_NETFRONT_POLL = n
CONFIG_NETFRONT_POLLTIMEOUT = 1
CONFIG_NETFRONT_WAITFORTX ?= y
CONFIG_NETFRONT_LWIP_ONLY ?= y
## lwip
CONFIG_LWIP = y
CONFIG_LWIP_MINIMAL = y
CONFIG_LWIP_NOTHREADS = y
CONFIG_LWIP_HEAP_ONLY ?= n
CONFIG_LWIP_POOLS_ONLY = n
CONFIG_LWIP_GSO ?= n
CONFIG_LWIP_PARTIAL_CHECKSUM ?= $(CONFIG_NETFRONT_GSO)
CONFIG_START_NETWORK = n
CONFIG_LWIP_BATCHTX ?= n
CONFIG_LWIP_WND_SCALE ?= y
ifeq ($(CONFIG_LWIP_NUM_TCPCON),)
CONFIG_LWIP_NUM_TCPCON=128
endif
CFLAGS += -DCONFIG_LWIP_NUM_TCPCON=$(CONFIG_LWIP_NUM_TCPCON)
######################################
## Debugging
######################################
debug ?= n
CONFIG_DEBUG_LWIP ?= n
CONFIG_DEBUG_LWIP_MALLOC ?= n
#CFLAGS += -DLWIP_STATS_DISPLAY=1
#CFLAGS += -DLWIP_IF_DEBUG
#CFLAGS += -DLWIP_TCP_DEBUG
######################################
## Stub Domain
######################################
CONFIG_SHFS_CACHE_READAHEAD ?= 4
CONFIG_SHFS_CACHE_POOL_NB_BUFFERS ?= 64
CONFIG_SHFS_CACHE_GROW ?= y
include Minicache.mk
stubdom = y
STUBDOM_NAME = minicache
STUBDOM_ROOT = $(realpath .)
STUB_APP_OBJS0 = $(MCOBJS) target/$(TARGET)/blkdev.o
STUB_APP_OBJS = $(addprefix $(STUB_APP_OBJ_DIR)/,$(STUB_APP_OBJS0))
STUB_BUILD_DIRS += $(STUB_APP_OBJ_DIR)/target/$(TARGET)
CFLAGS += $(MCCFLAGS)
include $(MINIOS_ROOT)/stub.mk