-
Notifications
You must be signed in to change notification settings - Fork 43
/
build.cfg
205 lines (170 loc) · 5.11 KB
/
build.cfg
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
# amd64, i386, or mac
ARCH=amd64
# UFS, or ZFS
FILESYSTEM=UFS
RELEASE=14.1-RELEASE
BASEURL="http://download.freebsd.org/ftp"
WORKDIR="${PWD}/work"
# Where the FreeBSD installation resides.
SYSDIR="${WORKDIR}/sys"
EFI_LOADER="${SYSDIR}/boot/loader.efi"
# Size in MiB of the amd64 EFI partition.
AMD64_EFI_SIZE=40
# Size in MiB of the Mac EFI partition.
MAC_EFI_SIZE=200
# Fragment size for UFS
FRAGSIZE=4096
# Minimum required free disk space in MiB on /
ROOTFS_MINFREE_MIB=50
# Min. free storage space in % for base system
UFS_MINFREE=8
# Extra space in MB for base system.
BASEFS_EXTRA=100
# Size in MiB required for the base system without uzip, EFI partition, and
# BASEFS_EXTRA. Adjust as needed.
BASESIZE=1960
# ZFS pool name
ZFS_POOL=nomadbsd_zroot
# Default boot environment
ZFS_BE=default
# Sector size exponent for defining the sector size
ASHIFT=12
# glabels for partitions
ROOTLABEL=nomadroot
DATALABEL=nomaddata
# Cluster size for uzip conpression. Should be a multiple of 512 bytes.
UZIP_CLUSTERSZ=19456
PKGLIST=pkg.list
# Define postion for the boot menu
MENU_POSITION_X=5
MENU_POSITION_Y=12
# Define # of parallel jobs for compressing the uzip image
MKUZIP_JOBS=$(sysctl -n hw.ncpu)
# Extra loader settings for NomadBSD running on UFS
UFS_LOADER_SETTINGS() {
cat << UFS_LOADER_SETTINGS_END
UFS_LOADER_SETTINGS_END
}
# Extra loader settings for NomadBSD running on ZFS
ZFS_LOADER_SETTINGS() {
cat << ZFS_LOADER_SETTINGS_END
zfs_load="YES"
ZFS_LOADER_SETTINGS_END
}
# Extra sysctl settings for NomadBSD running on UFS
UFS_SYSCTL_SETTINGS() {
cat << UFS_SYSCTL_SETTINGS_END
vfs.vmiodirenable=0
vfs.read_max=16
vfs.write_behind=0
# Improve write speed a little bit
vfs.lorunningspace=1048576
vfs.hirunningspace=5242880
UFS_SYSCTL_SETTINGS_END
}
# Extra sysctl settings for NomadBSD running on ZFS
ZFS_SYSCTL_SETTINGS() {
cat << ZFS_SYSCTL_SETTINGS_END
ZFS_SYSCTL_SETTINGS_END
}
# Whether to build a custom kernel
BUILD_KERNEL="YES"
# Don't build the following kernel modules
WITHOUT_KMODS="drm drm2 i915kms mach64 mga r128 radeonkms savage sis tdfx via"
# Options passed to "make"
BUILDKERNEL_OPTS="-j$(sysctl -n hw.ncpu)"
KERNELOPTS() {
COMMON_KERNELOPTS
[ "${ARCH}" = "i386" ] && I386_KERNELOPTS
}
# Lines added to the kernel config file.
COMMON_KERNELOPTS() {
cat << COMMON_KERNELOPTS_END
ident NOMADBSD
options TERMINAL_NORM_ATTR=(FG_LIGHTBLUE|BG_BLACK)
options TERMINAL_KERN_ATTR=(FG_LIGHTCYAN|BG_BLACK)
options BWN_GPL_PHY
nooptions COMPAT_FREEBSD4
nooptions COMPAT_FREEBSD5
nooptions COMPAT_FREEBSD6
nooptions COMPAT_FREEBSD7
nooptions COMPAT_FREEBSD9
nooptions INVARIANTS
nooptions INVARIANT_SUPPORT
nooptions WITNESS
nooptions WITNESS_SKIPSPIN
nooptions BUF_TRACKING
nooptions DEADLKRES
nooptions FULL_BUF_TRACKING
nooptions COVERAGE
nooptions KCOV
nooptions KDB
nooptions KDB_TRACE
nooptions GDB
nooptions DDB_CTF
nooptions DDB
COMMON_KERNELOPTS_END
}
I386_KERNELOPTS() {
cat << I386_KERNELOPTS_END
I386_KERNELOPTS_END
}
# Because of special options, some packages must be installed using the
# ports tree. Add each port as category/portname to PORTSLIST. The port's
# options can be defined by setting portname_OPTS. Dashes (``-´´)
# in port names must be replaced by under scores (``_´´) when defining
# portname_OPTS. The format is "OPT1=<on|off> OPT2=<on|off> ... OPTn=<on|off>"
#
PORTSLIST=$(cat <<PORTSLIST_EOF
devel/gmake
devel/libpciaccess
devel/xdg-utils
graphics/drm-kmod
net/bwi-firmware-kmod
net/bwn-firmware-kmod
security/opendoas
sysutils/fusefs-jmtpfs
x11-drivers/xf86-video-amdgpu
PORTSLIST_EOF
)
# Options to build Openbox from ports.
openbox_OPTS="IMLIB=on SVG=on NOTIFY=on PATCHES=on"
# Options for building the NVIDIA drivers
NVIDIA_BUILD_OPTS="OPTIONS_UNSET=\"LINUX DOCS\""
# List of NVIDIA drivers to build
NVIDIA_DRIVERS="340 390 470 latest"
# Path to the local ports tree. It will be mounted to ${SYSDIR}/usr/ports.
PORTSTREE=/usr/ports
# List of packages to ignore when building a i386 image
PKG_EXCLUDE_i386() {
cat << PKG_EXCLUDE_I386_END
graphics/xsane
print/gimp-gutenprint
emulators/virtualbox-ose-additions
PKG_EXCLUDE_I386_END
}
# Software packages which install from git repos.
GIT_SITE="https://github.com/mrclksr"
GIT_REPOS=$(cat <<GIT_REPOS_EOF
${GIT_SITE}/DSBDriverd.git
${GIT_SITE}/DSBMC.git
${GIT_SITE}/DSBMC-Cli.git
${GIT_SITE}/DSBMD.git
${GIT_SITE}/dsbcfg.git
${GIT_SITE}/libdsbmc.git
${GIT_SITE}/DSBMixer.git
${GIT_SITE}/DSBSu.git
${GIT_SITE}/DSBExec.git
https://github.com/bsdlme/ipfwGUI.git
GIT_REPOS_EOF
)
# Define build commands for each git repo.
DSB_QT_TOOLS_BUILD_CMD="qmake-qt5 && make clean && make && make install"
DSBDriverd_BUILD_CMD="make clean install"
DSBMC_BUILD_CMD="cmake -DUSE_QT6=ON -S . -B build; cmake --build build; cmake --build build -t install"
DSBMC_Cli_BUILD_CMD="make clean install"
DSBMD_BUILD_CMD="make clean install"
DSBMixer_BUILD_CMD="cmake -DUSE_QT6=ON -S . -B build; cmake --build build; cmake --build build -t install"
DSBSu_BUILD_CMD="cmake -S . -B build; cmake --build build; cmake --build build -t install"
DSBExec_BUILD_CMD="cmake -S . -B build; cmake --build build; cmake --build build -t install"
ipfwGUI_BUILD_CMD="make install"