## CW4 Review
Last week I worked mostly on getting how we build go binaries for OpenWRT targets in TollGate. In the past we used to modify the feeds and filesystem of OpenWRT and build the entire operating system from scratch to get an image - which took ages - each time we wanted to try something.
### Building golang with the SDK
#### Why the SDK?
It turns out that there is an SDK that allows us to just build code from our custom feed for an OpenWRT target without needing to build everything else every time as well.
#### Why golang?
We started using go recently, because Arjen (nprofile…7u3d) had already shown that we can run the [khatru](https://github.com/fiatjaf/khatru) relay on the `GL-AR300m` in November last year. Having the ability to simply run nostr tooling on routers is huge, because it unlocks this whole [new architecture](nostr:nevent1qqs0lk2dtqmt2ll977z9cuqxt4jk9z0ddx9jcn8k7uny46dgxelwthspzemhxue69uhk7unpdenk2umede3juar9vd5z7q3qzzt0d0s2f4lsanpd7nkjep5r79p7ljq7aw37eek64hf0ef6v0mxqxpqqqqqqzg2qwm3).
#### Whats new in CW4?
##### Building our modules for multiple targets
Fortunately, I was able to build all of the `crowsnest`, `relay`, `whoami`, `merchant` and `valve` using a custom feed in the SDK. In future this should enable us to use steps from the module's makefiles to configure the routers as a module is installed. A nice pirk is that we can easily specify which router to build the binaries for, so we no longer need to force our users to use the `GL-AR300m` or the `GL-MT3000`. Please do bring some know-how and patience if you choose to deviate from the well trodden path though..
### Building OpenWRT images with the image-builder
Last year imaginator (nprofile…tg02) contributed some code that made it really easy to generate OpenWRT images for multiple different routers within minutes using the OpenWRT image-builder. This makes it easy for us to pre-install packages in the OpenWRT image and to generate images for multiple different routers without needing to compile all the dependencies ourselves.
#### Whats new in CW4?
Runners that build TollGate modules using the SDK now upload the binaries to blossom and they publish an event listing the blossom servers that host each of these binaries. The image-builder downloads the right `ipk` files from blossom and installs them in the OpenWRT image.
### Outlook
TollGates that want to update their modules just need a module that scrapes for these announcement events, downloads the `ipk` files and performs the updates. This client still needs to be made, but first I hope to create GitHub actions for what we have here, so that it can run in the [runner](nostr:naddr1qqfk67fdwajk26edxvkkjm3dwfjhv6t9wuqsuamnwvaz7tmwdaejumr0dshsyg9mkhw6pc24v7te7p2rgpaacgpn6mcthvc0wfgj4xqulke0p838gupsgqqqw4rsetaqht) that Arjen (nprofile…7u3d) and au9913 (nprofile…t4yq) built.