# TSGRain yocto os This is the yocto-based linux distribution that runs the TSGRain irrigation controller. ## Build image ```sh # Use docker build environment docker run -it --rm --privileged --user $(id -u):$(id -g) -v $(pwd):$(pwd) thetadev256/yoctobuild . ./oe-init-build-env bitbake tsgrain-image ``` ## Provision package repository Build the package index and run a webserver in the package directory ```sh bitbake package-index cd {BUILD_DIR}/tmp-glibc/deploy/ipk sudo python -m http.server 80 ``` On the Pi, add the server to the opkg package sources ```sh # Add to /etc/opkg/opkg.conf src/gz all http://{hostname}.local/all src/gz cortexa53 http://{hostname}.local/cortexa53 src/gz raspberrypi3_64 http://{hostname}.local/raspberrypi3_64 opkg update ``` ## Generate recipes for Python packages ```sh pipoe --python python3 -p packagename ```