diff --git a/README.md b/README.md
index 34a8519..add3878 100644
--- a/README.md
+++ b/README.md
@@ -312,14 +312,25 @@ $ sudo systemctl enable sai-builder
#### Additional steps for freebsd
-Freebsd doesn't present many difference from Linux. Create the sai user via
-`adduser` and set the uid to 883. Create the builder logproxy socket dir
-one time as root
+Freebsd presents a few differences from Linux.
+
+1) `pkg install bash` and other prerequisites like git, cmake etc
+
+2) Create the sai user via `adduser` and set the uid to 883.
+
+3) Create the builder logproxy socket dir one time as root
```
# mkdir -p /var/run/com.warmcat.com.saib.logproxy
# chown sai /var/run/com.warmcat.com.saib.logproxy
```
-There's no systemctl,
+4) For script portability, `ln -sf /usr/local/bin/bash /bin/bash`
+
+5) As root copy `scripts/etc-rc.d-sai_builder-FreeBSD` to `/etc/rc.d`.
+
+6) As root, edit `/etc/rc.conf` and add a line `sai_builder_enable="YES"`, then,
+`sudo /etc/rc.d/sai_builder start`
+
+7) Create and prepare `/etc/sai/builder/conf` as for Linux
diff --git a/READMEs/README-systemd-nspawn.md b/READMEs/README-systemd-nspawn.md
index 1f4b11a..1e54ca6 100644
--- a/READMEs/README-systemd-nspawn.md
+++ b/READMEs/README-systemd-nspawn.md
@@ -118,7 +118,15 @@ We have to enable the "universe" packageset to get normal things.
Container # apt update && apt install vim && apt edit-sources && apt update
```
-add " universe" to the end of the line in the vim session it pops up and save it.
+add " universe" to the end of the line in the vim session it pops up... we also need to enable
+updates so we can maintain the distro image, so add lines similar to this
+
+```
+deb http://archive.ubuntu.com/ubuntu focal-security main universe
+deb http://archive.ubuntu.com/ubuntu focal-updates main universe
+```
+
+and save it.
### Specific to Xenial
diff --git a/scripts/etc-rc.d-sai_builder-FreeBSD b/scripts/etc-rc.d-sai_builder-FreeBSD
new file mode 100644
index 0000000..36868fa
--- /dev/null
+++ b/scripts/etc-rc.d-sai_builder-FreeBSD
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+
+# PROVIDE: sai_builder
+# REQUIRE: FILESYSTEMS NETWORK
+
+. /etc/rc.subr
+
+name="sai_builder"
+desc="Sai CI builder"
+rcvar="sai_builder_enable"
+command="/usr/sbin/daemon"
+pidfile="/var/run/${name}.pid"
+sai_builder_flags="-S /usr/local/bin/sai-builder"
+
+load_rc_config $name
+run_rc_command "$1"
+
diff --git a/src/builder/b-mirror.c b/src/builder/b-mirror.c
index f83deb2..b2ce43e 100644
--- a/src/builder/b-mirror.c
+++ b/src/builder/b-mirror.c
@@ -71,7 +71,7 @@ sai_mirror_local_checkout(struct sai_nspawn *ns)
git_checkout_options co_opts = GIT_CHECKOUT_OPTIONS_INIT;
git_fetch_options opts = GIT_FETCH_OPTIONS_INIT;
git_repository *git_repo_build_specific = NULL;
- char dp[384], spec[96], *paths[] = { spec };
+ char dp[512], spec[256], *paths[] = { spec };
git_strarray rfs = { paths, 1 };
git_object *treeish;
git_remote *remote;
diff --git a/src/builder/b-private.h b/src/builder/b-private.h
index b01cceb..7918199 100644
--- a/src/builder/b-private.h
+++ b/src/builder/b-private.h
@@ -83,8 +83,8 @@ struct sai_nspawn;
struct sai_nspawn {
lws_dll2_owner_t chunk_cache;
- char inp[384];
- char path[256];
+ char inp[512];
+ char path[384];
char pending_mirror_log[128];
/* convenient place to store it */
diff --git a/src/jig/CMakeLists.txt b/src/jig/CMakeLists.txt
index c668c10..0c792cc 100644
--- a/src/jig/CMakeLists.txt
+++ b/src/jig/CMakeLists.txt
@@ -10,14 +10,16 @@ set(requirements 1)
require_lws_config(LWS_WITH_CLIENT 1 requirements)
require_lws_config(LWS_WITH_UNIX_SOCK 1 requirements)
+find_path( GPIOD_INC_PATH NAMES "gpiod.h")
+find_library(GPIOD_LIB_PATH NAMES "gpiod")
+
+if (NOT GPIOD_INC_PATH OR NOT GPIOD_LIB_PATH)
+ message(" Unable to find libgpiod")
+ set(requirements 0)
+endif()
+
if (requirements)
- find_path( GPIOD_INC_PATH NAMES "gpiod.h")
- find_library(GPIOD_LIB_PATH NAMES "gpiod")
-
- if (NOT GPIOD_INC_PATH OR NOT GPIOD_LIB_PATH)
- message(FATAL_ERROR " Unable to find libgpiod")
- endif()
include_directories(BEFORE "${GPIOD_INC_PATH}")
add_executable("sai-jig" ${SRCS})