-
Notifications
You must be signed in to change notification settings - Fork 31
/
Config.uk
205 lines (182 loc) · 5.95 KB
/
Config.uk
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
### Invisible option for dependencies
config APPELFLOADER_DEPENDENCIES
bool
default y
select LIBNOLIBC if !HAVE_LIBC
select LIBELF
select LIBUKSCHED
select LIBSYSCALL_SHIM
select LIBSYSCALL_SHIM_HANDLER
select LIBSYSCALL_SHIM_HANDLER_ULTLS
select LIBPOSIX_TIME
imply LIBPOSIX_PROCESS
imply LIBPOSIX_PROCESS_PIDS
imply PAGING
imply LIBUKVMEM
imply LIBPOSIX_MMAP
imply LIBVFSCORE
imply LIBPOSIX_POLL
imply LIBPOSIX_POLL_YIELD
imply LIBPOSIX_SYSINFO
imply LIBPOSIX_USER
imply LIBUKRANDOM
imply LIBPOSIX_ENVIRON
### App configuration
choice
prompt "Load ELF from"
default APPELFLOADER_VFSEXEC
config APPELFLOADER_VFSEXEC
bool "VFS"
select LIBVFSCORE
help
Loads an ELF executable from the virtual filesystem.
elfloader will automatically side-load a dynamic loader
if it is announced via the PT_INTERP program header.
This option is intended for most use cases.
config APPELFLOADER_INITRDEXEC
bool "Initramdisk (ELF)"
help
Loads an ELF executable that is given as init ramdisk.
Please note that this option expects the ramdisk to be
the ELF binary image (no filesystem). This option is
intended for creating elfloader unikernels without VFS
support.
Only statically-linked PIE executables are supported.
endchoice
config APPELFLOADER_CUSTOMAPPNAME
bool "Application name/path via command line"
default y if APPELFLOADER_VFSEXEC
default n
help
Without this option, any command line argument passed to an
elfloader unikernel is forwarded to the ELF application as
application argument. If this option is set, the first argument
from the kernel command line is used as program name (argv[0]).
In case the application is loaded from VFS (see
APPELFLOADER_VFSEXEC), this first argument is also the path
that is used for looking up the ELF image on the VFS.
if APPELFLOADER_VFSEXEC
config APPELFLOADER_VFSEXEC_PATH
string "Path to executable"
default "/init"
depends on !APPELFLOADER_CUSTOMAPPNAME
help
Compiled-in path to executable on the VFS.
config APPELFLOADER_VFSEXEC_ENVPATH
bool "Locate executable with PATH"
default y
depends on APPELFLOADER_CUSTOMAPPNAME
depends on LIBPOSIX_ENVIRON
imply APPELFLOADER_VFSEXEC_EXECBIT
select LIBUKSTREAMBUF
select LIBUKARGPARSE
help
Searches for the executable in a set of directories specified
with the PATH environment variable.
config APPELFLOADER_VFSEXEC_ENVPWD
bool "Set working directory to PWD"
default y
depends on LIBPOSIX_ENVIRON
help
If the environment variable PWD is set, the working
directory is changed to the given path.
config APPELFLOADER_VFSEXEC_EXECBIT
bool "Ensure executable bit"
default y
help
Only execute application if executable bit is set.
endif
menu "System call implementations"
config APPELFLOADER_BRK
bool "brk, sbrk"
default y
select LIBUKALLOC
config APPELFLOADER_BRK_NBPAGES
int "Reserved heap size for application (number of pages)"
default 512
depends on APPELFLOADER_BRK
help
<n> * 4K; 256 = 1MB, 512 = 2MB, 1024 = 4MB, ...
config APPELFLOADER_ARCH_PRCTL
bool "arch_prctl"
depends on ARCH_X86_64
default y
endmenu
config APPELFLOADER_STACK_NBPAGES
int "Application stack size (number of pages)"
default 32
help
<n> * 4K; 2 = 8KB, 16 = 64KB, 256 = 1MB ...
config APPELFLOADER_DEBUG
bool "Enable debug messages"
default n
config APPELFLOADER_VDSO
bool "Provide VDSO"
default n
help
Provides a VDSO image to ELF applications. The VDSO
works like a shared libary for the application but in the case
of Unikraft it provides function addresses for directly calling
(some) system call handlers.
menuconfig APPELFLOADER_AUTOGEN
bool "Auto-generate configuration files (HFS)"
depends on LIBVFSCORE
default y
help
Automatically generate configuration files according to the
Filesystem Hierarchy Standard (HFS) during initialization.
if APPELFLOADER_AUTOGEN
menu "/etc: Host-specific configuration files"
config APPELFLOADER_AUTOGEN_ETCRESOLVCONF
bool "./resolv.conf: DNS resolver settings"
depends on LIBUKNETDEV
imply LIBUKNETDEV_EINFO
default y
help
Generates "/etc/resolv.conf" based on available uknetdev einfo
fields: DNS server and DNS domain. Please note that these are
statically assigned network configuration options (for instance
via kernel parameter). If DHCP should be taken into account,
the selected network stack should generate this file instead.
config APPELFLOADER_AUTOGEN_ETCHOSTS
bool "./hosts: Static hostname resolution"
depends on LIBUKNETDEV
imply LIBUKNETDEV_EINFO
default y
help
Generates "/etc/hosts" based on available uknetdev einfo fields:
hostname, domain suffix, and IPv4 address. Please note that these
are statically assigned network configuration options (for instance
via kernel parameter). If DHCP should be taken into account, the
selected network stack should generate this file instead.
config APPELFLOADER_AUTOGEN_ETCHOSTS_LOCALHOST4
bool "Resolution entry for localhost (127.0.0.1)"
depends on APPELFLOADER_AUTOGEN_ETCHOSTS
default y if !LIBLWIP || LWIP_LOOPIF
config APPELFLOADER_AUTOGEN_ETCHOSTNAME
bool "./hostname: System hostname"
depends on LIBUKNETDEV
imply LIBUKNETDEV_EINFO
help
Generates "/etc/hostname" based on the first found statically
assigned hostname (einfo) that can be set by a uknetdev device.
Please note if DHCP should be taken into account, the selected
network stack should generate this file instead.
endmenu
choice
prompt "Creation mode"
default APPELFLOADER_AUTOGEN_SKIPEXIST
config APPELFLOADER_AUTOGEN_SKIPEXIST
bool "Skip files that already exists"
help
Only emits a message if a file already exists in the filesystem.
config APPELFLOADER_AUTOGEN_ERROREXIST
bool "Stop with an error message if a file already exists"
help
Emits an error if a file already exists in the filesystem.
config APPELFLOADER_AUTOGEN_REPLACEEXIST
bool "Overwrite existing files"
help
If a configuration file was already found in the filesystem
endchoice
endif