Add a FreeBSD build role.
This commit is contained in:
6
ansible/roles/build/files/CUSTOM
Normal file
6
ansible/roles/build/files/CUSTOM
Normal file
@@ -0,0 +1,6 @@
|
||||
include GENERIC-NODEBUG
|
||||
|
||||
# Disable Intel SD/MMC controller for reading eMMC
|
||||
nodevice sdhci
|
||||
|
||||
ident CUSTOM
|
||||
20
ansible/roles/build/files/freebsd_update_step1
Normal file
20
ansible/roles/build/files/freebsd_update_step1
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Build and installs whatever is in /usr/src. Run step 1, reboot, then step 2.
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
cores=$(sysctl -n hw.ncpu)
|
||||
|
||||
if sudo etcupdate status | grep -qE '^ C '; then
|
||||
>&2 echo 'Conflicts remain in etcupdate. Run `etcupdate resolve` to fix them first.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd /usr/src
|
||||
|
||||
make -j "$cores" clean
|
||||
make -j "$cores" buildworld buildkernel
|
||||
sudo make installkernel
|
||||
|
||||
echo "FreeBSD update step 1 done. Please reboot."
|
||||
19
ansible/roles/build/files/freebsd_update_step2
Normal file
19
ansible/roles/build/files/freebsd_update_step2
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Build and installs whatever is in /usr/src. Run step 1, reboot, then step 2.
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
sudo etcupdate -p
|
||||
|
||||
cd /usr/src
|
||||
sudo make installworld
|
||||
sudo etcupdate -B
|
||||
|
||||
if sudo etcupdate status | grep -qE '^ C '; then
|
||||
>&2 echo 'Conflicts in etcupdate. Run `etcupdate resolve` to fix them first.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "FreeBSD update step 2 done. Please reboot."
|
||||
3
ansible/roles/build/files/make.conf
Normal file
3
ansible/roles/build/files/make.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
KERNCONF=CUSTOM
|
||||
|
||||
BUILD_STATIC=YES
|
||||
Reference in New Issue
Block a user