##// END OF EJS Templates
set kernel default governor
Unknown -
r455:7f84c1cfdbfd
parent child
Show More
@@ -353,6 +353,9 With this parameter set to true the script expects the existing kernel sources d
353 ##### `RPI_FIRMWARE_DIR`=""
353 ##### `RPI_FIRMWARE_DIR`=""
354 The directory (`firmware`) containing a local copy of the firmware from the [RaspberryPi firmware project](https://github.com/raspberrypi/firmware). Default is to download the latest firmware directly from the project.
354 The directory (`firmware`) containing a local copy of the firmware from the [RaspberryPi firmware project](https://github.com/raspberrypi/firmware). Default is to download the latest firmware directly from the project.
355
355
356 ##### `KERNEL_DEFAULT_GOV`="ONDEMAND"
357 Set the default cpu governor at kernel compilation. Supported values are: PERFORMANCE POWERSAVE USERSPACE ONDEMAND CONSERVATIVE SCHEDUTIL
358
356 ##### `KERNEL_NF`=false
359 ##### `KERNEL_NF`=false
357 Enable Netfilter modules as kernel modules
360 Enable Netfilter modules as kernel modules
358
361
@@ -207,6 +207,36 if [ "$BUILD_KERNEL" = true ] ; then
207 set_kernel_config CONFIG_CGROUP_BPF y
207 set_kernel_config CONFIG_CGROUP_BPF y
208 fi
208 fi
209
209
210 # KERNEL_DEFAULT_GOV was set by user
211 if ! [ "$KERNEL_DEFAULT_GOV" = POWERSAVE ] && [ -n "$KERNEL_DEFAULT_GOV" ]; then
212 # unset default governor
213 unset_kernel_config CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE
214
215 case "$KERNEL_DEFAULT_GOV" in
216 "PERFORMANCE")
217 set_kernel_config CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE y
218 ;;
219 "USERSPACE")
220 set_kernel_config CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE y
221 ;;
222 "ONDEMAND")
223 set_kernel_config CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND y
224 ;;
225 "CONSERVATIVE")
226 set_kernel_config CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE y
227 ;;
228 "CONSERVATIVE")
229 set_kernel_config CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL y
230 ;;
231 *)
232 echo "error: unsupported default cpu governor"
233 exit 1
234 ;;
235 esac
236 fi
237
238
239
210 #Revert to previous directory
240 #Revert to previous directory
211 cd "${WORKDIR}"
241 cd "${WORKDIR}"
212
242
@@ -249,6 +279,7 if [ "$BUILD_KERNEL" = true ] ; then
249 if [ "$KERNEL_MENUCONFIG" = true ] ; then
279 if [ "$KERNEL_MENUCONFIG" = true ] ; then
250 make -C "${KERNEL_DIR}" ARCH="${KERNEL_ARCH}" CROSS_COMPILE="${CROSS_COMPILE}" menuconfig
280 make -C "${KERNEL_DIR}" ARCH="${KERNEL_ARCH}" CROSS_COMPILE="${CROSS_COMPILE}" menuconfig
251 fi
281 fi
282 # end if "$KERNELSRC_CONFIG" = true
252 fi
283 fi
253
284
254 # Use ccache to cross compile the kernel
285 # Use ccache to cross compile the kernel
@@ -265,6 +296,7 if [ "$BUILD_KERNEL" = true ] ; then
265 if grep -q "CONFIG_MODULES=y" "${KERNEL_DIR}/.config" ; then
296 if grep -q "CONFIG_MODULES=y" "${KERNEL_DIR}/.config" ; then
266 make -C "${KERNEL_DIR}" -j"${KERNEL_THREADS}" ARCH="${KERNEL_ARCH}" CROSS_COMPILE="${CROSS_COMPILE}" CC="${cc}" modules
297 make -C "${KERNEL_DIR}" -j"${KERNEL_THREADS}" ARCH="${KERNEL_ARCH}" CROSS_COMPILE="${CROSS_COMPILE}" CC="${cc}" modules
267 fi
298 fi
299 # end if "$KERNELSRC_PREBUILT" = false
268 fi
300 fi
269
301
270 # Check if kernel compilation was successful
302 # Check if kernel compilation was successful
@@ -47,7 +47,7 if [ "$ENABLE_NEXMON" = true ] && [ "$ENABLE_WIRELESS" = true ]; then
47
47
48 # Make ancient isl build
48 # Make ancient isl build
49 cd buildtools/isl-0.10
49 cd buildtools/isl-0.10
50 CC=$CCgcc
50 CC="${CC}"gcc
51 ./configure
51 ./configure
52 make
52 make
53
53
@@ -175,6 +175,7 KERNEL_CCACHE=${KERNEL_CCACHE:=false}
175 KERNEL_ZSWAP=${KERNEL_ZSWAP:=false}
175 KERNEL_ZSWAP=${KERNEL_ZSWAP:=false}
176 KERNEL_VIRT=${KERNEL_VIRT:=false}
176 KERNEL_VIRT=${KERNEL_VIRT:=false}
177 KERNEL_BPF=${KERNEL_BPF:=false}
177 KERNEL_BPF=${KERNEL_BPF:=false}
178 KERNEL_DEFAULT_GOV=${KERNEL_DEFAULT_GOV:=POWERSAVE}
178
179
179 # Kernel compilation from source directory settings
180 # Kernel compilation from source directory settings
180 KERNELSRC_DIR=${KERNELSRC_DIR:=""}
181 KERNELSRC_DIR=${KERNELSRC_DIR:=""}
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant