```
cc1: note: someone does not honour COPTS correctly, passed 0 times
# command-line-arguments
./main.go:104:2: undefined: log
make[2]: *** [Makefile:80: /tmp/openwrt-sdk/openwrt-sdk-23.05.3-mediatek-filogic_gcc-12.3.0_musl.Linux-x86_64/build_dir/target-aarch64_cortex-a53_musl/tollgate-module-relay-go-0.1/.built] Error 1
make[2]: Leaving directory '/tmp/openwrt-sdk/openwrt-sdk-23.05.3-mediatek-filogic_gcc-12.3.0_musl.Linux-x86_64/feeds/custom/tollgate-module-relay-go'
time: package/feeds/custom/tollgate-module-relay-go/compile#0.81#0.47#1.90
ERROR: package/feeds/custom/tollgate-module-relay-go failed to build.
make[1]: *** [package/Makefile:129: package/feeds/custom/tollgate-module-relay-go/compile] Error 1
make[1]: Leaving directory '/tmp/openwrt-sdk/openwrt-sdk-23.05.3-mediatek-filogic_gcc-12.3.0_musl.Linux-x86_64'
make: *** [/tmp/openwrt-sdk/openwrt-sdk-23.05.3-mediatek-filogic_gcc-12.3.0_musl.Linux-x86_64/include/toplevel.mk:225: package/feeds/custom/tollgate-module-relay-go/compile] Error 2
```
PublicNotes
npub1ltng...t4hw
Work in the public so that people who are smarter than you can use search engines to find your mistakes and fix them
### Using the OpenWRT SDK
```
#!/bin/bash
set -e
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# Check and install libncurses5-dev and libncursesw5-dev libraries
install_ncurses_libraries() {
if ! dpkg -s libncurses5-dev libncursesw5-dev >/dev/null 2>&1; then
echo "Installing libncurses5-dev and libncursesw5-dev packages..."
sudo apt-get update
sudo apt-get install -y libncurses5-dev libncursesw5-dev
else
echo "libncurses5-dev and libncursesw5-dev are already installed."
fi
}
install_go() {
# First check if go is in /usr/local/go/bin
if [ -x "/usr/local/go/bin/go" ]; then
# Add to PATH if not already there
if [[ ":$PATH:" != *":/usr/local/go/bin:"* ]]; then
export PATH=$PATH:/usr/local/go/bin
# Add to ~/.bashrc if not already there
if ! grep -q "/usr/local/go/bin" ~/.bashrc; then
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
fi
fi
echo "Go is already installed."
echo "Go version: $(/usr/local/go/bin/go version)"
return 0
fi
# If go is not installed, proceed with installation
echo "Installing Go..."
sudo apt install -y pigz # For multi-core unpack
wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -I pigz -C /usr/local -xf go1.23.4.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
# Add to ~/.bashrc if not already there
if ! grep -q "/usr/local/go/bin" ~/.bashrc; then
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
fi
rm go1.23.4.linux-amd64.tar.gz
# Verify Go installation
if ! /usr/local/go/bin/go version &> /dev/null; then
echo "Failed to install Go. Please install manually."
exit 1
fi
echo "Go version: $(/usr/local/go/bin/go version)"
}
# Add this function to manage Python dependencies
setup_python_environment() {
local sdk_path=$1
if [ ! -f "${sdk_path}/staging_dir/host/bin/opkg-make-index" ]; then
echo "Installing opkg-make-index..."
mkdir -p "${sdk_path}/staging_dir/host/bin"
wget https://raw.githubusercontent.com/shr-project/opkg-utils/master/opkg-make-index -O "${sdk_path}/staging_dir/host/bin/opkg-make-index"
chmod +x "${sdk_path}/staging_dir/host/bin/opkg-make-index"
else
echo "opkg-make-index is already installed."
fi
}
# Add this function to check feeds status
check_feeds() {
local sdk_path=$1
# Check if feeds directory exists and has content
if [ -d "${sdk_path}/feeds" ] && [ "$(ls -A ${sdk_path}/feeds)" ]; then
# Check if package index exists and is recent (less than 1 day old)
if [ -f "${sdk_path}/feeds/packages.index" ]; then
local file_age=$(( $(date +%s) - $(stat -c %Y "${sdk_path}/feeds/packages.index") ))
local day_seconds=86400
if [ ${file_age} -lt ${day_seconds} ]; then
echo "Feeds are up to date, skipping update..."
return 0
fi
fi
fi
return 1
}
# Check if the required argument is provided
if [ $# -ne 1 ]; then
echo "Usage: $0 <model>"
exit 1
fi
MODEL=$1
VERSION=23.05.3
SDKDIR=/tmp/openwrt-sdk
# Set platform variables based on model
case $MODEL in
"gl-mt300n-v2")
PLATFORM="ramips"
SUBTARGET="mt76x8"
;;
"gl-ar300m")
PLATFORM="ath79"
SUBTARGET="generic"
;;
"gl-mt3000"|"gl-mt6000")
PLATFORM="mediatek"
SUBTARGET="filogic"
;;
"gl-e750")
VERSION="snapshot"
PLATFORM="ath79"
SUBTARGET="nand"
;;
"archer_mr200")
PLATFORM="ramips"
SUBTARGET="mt7620"
;;
*)
echo "Unsupported model. Supported models: gl-mt300n-v2, gl-ar300m, gl-mt3000, gl-mt6000, gl-e750, archer_mr200"
exit 1
;;
esac
SDK_ARCHIVE="openwrt-sdk-${VERSION}-${PLATFORM}-${SUBTARGET}_gcc-12.3.0_musl.Linux-x86_64.tar.xz"
DOWNLOAD_URL="https://downloads.openwrt.org/releases/${VERSION}/targets/${PLATFORM}/${SUBTARGET}/${SDK_ARCHIVE}"
SDK_PATH="${SDKDIR}/openwrt-sdk-${VERSION}-${PLATFORM}-${SUBTARGET}_gcc-12.3.0_musl.Linux-x86_64"
# Install dependencies
install_ncurses_libraries
install_go
# Prepare SDK directory
if [ ! -d "${SDKDIR}" ] ; then
mkdir -p "${SDKDIR}"
fi
# Download and extract SDK
if [ ! -f "${SDKDIR}/${SDK_ARCHIVE}" ]; then
echo "Downloading SDK..."
(cd "${SDKDIR}" && curl -O "${DOWNLOAD_URL}")
fi
echo "Extracting SDK..."
tar -I "xz -T0" -xf "${SDKDIR}/${SDK_ARCHIVE}" -C "${SDKDIR}"
# Change to SDK directory
cd "${SDK_PATH}"
# Setup python environment with correct SDK path
setup_python_environment "${SDK_PATH}"
echo "Script dir: $SCRIPT_DIR"
cp "${SCRIPT_DIR}"/feeds.conf "${SDK_PATH}"/feeds.conf
# Update feeds
echo "Updating feeds..."
"${SDK_PATH}"/./scripts/feeds update -a
"${SDK_PATH}"/./scripts/feeds install -a
# Configure and build
echo "Configuring SDK..."
make defconfig
echo "Building golang first..."
make package/feeds/custom/golang/compile V=sc
echo "Building all TollGate modules..."
MODULES=(
"merchant"
"valve"
"whoami"
"crowsnest"
"tollgate-module-relay-go"
)
echo "Building all TollGate modules..."
for module in "${MODULES[@]}"; do
echo "Building ${module}..."
make package/feeds/custom/${module}/compile V=sc
done
# Find all built packages and print their paths
BUILT_PACKAGES_DIR=$(find "${SDK_PATH}/bin/packages" -name "tollgate-module-*.ipk" -exec dirname {} \; | head -n 1)
echo -e "\nUploading packages to blossom and creating nostr event..."
# Run the aggregate info script for all packages
python3 "${SCRIPT_DIR}/aggregate_info.py" "${BUILT_PACKAGES_DIR}" "${SCRIPT_DIR}/feeds.conf"
noscl publish "$(cat note.md)"
# List all built packages
echo "Built packages:"
find "${BUILT_PACKAGES_DIR}" -name "tollgate-module-*.ipk" -exec ls -l {} \;
```
I learnt that there is this thing called the openwrt SDK for compiling just the binaries that we care about without needing to compile the entire operating system. When I take a proper look at the above script, it looks like its building the binaries in the openwrt directory, but it isn't immediately obvious to me that it actually uses the SDK.
Below is some content I found on the internet regarding the SDK. Am I doing it wrong? How can I change my script to use the SDK instead? Please help me to understand the difference and the trade-offs between the different ways of building custom feeds for OpenWRT.
```
# Building applications for an [OpenWrt](https://trac.gateworks.com/wiki/OpenWrt) Target[]( "Link to this section")
There are several ways you can use an [OpenWrt](https://trac.gateworks.com/wiki/OpenWrt) Software Development Kit (SDK) or Toolchain to compile your own applications outside of the [OpenWrt](https://trac.gateworks.com/wiki/OpenWrt) buildroot :
- use prebuilt [OpenWrt](https://trac.gateworks.com/wiki/OpenWrt) toolchain to build applications (ie from [http://dev.gateworks.com/openwrt/latest/](http://dev.gateworks.com/openwrt/latest/))
- use prebuilt [OpenWrt](https://trac.gateworks.com/wiki/OpenWrt) SDK to build an [OpenWrt](https://trac.gateworks.com/wiki/OpenWrt) package (ie from [http://dev.gateworks.com/openwrt/latest/](http://dev.gateworks.com/openwrt/latest/))
- use toolchain in your [OpenWrt](https://trac.gateworks.com/wiki/OpenWrt) buildroot staging_dir tree (what you may need to do if your running your own firmware with a different lib/kernel config than Gateworks pre-built images)
The point of using the [OpenWrt](https://trac.gateworks.com/wiki/OpenWrt) toolchain or SDK is that it can be pre-built and installed on a host that does not have the [OpenWrt](https://trac.gateworks.com/wiki/OpenWrt) buildroot.
Note: Custom programming can be achieved through shell scripts on the Gateworks boards (most examples on the Gateworks wiki are shell commands). C code can be used when desired.
## [OpenWrt](https://trac.gateworks.com/wiki/OpenWrt) Prebuilt Toolchain[]( "Link to this section")
If you are using pre-built firmware from [http://dev.gateworks.com/openwrt](http://dev.gateworks.com/openwrt) then you can use the pre-built toolchain there to build your own code.
The steps involved:
1. Download prebuilt toolchain/SDK, the toolchain contains the compiler and standard libraries only.
2. Uncompress it.
3. Add it to your path (optional)
4. Use the toolchain cross compiler to cross compile your code.
Examples:
- Example, if you wanted to build a hello-world for [OpenWrt](https://trac.gateworks.com/wiki/OpenWrt) 14.08 for the laguna (cns3xxx) platform:
$ wget http://dev.gateworks.com/openwrt/14.08/cns3xxx/OpenWrt-Toolchain-cns3xxx-for-arm_v6k-gcc-4.6-linaro_uClibc-0.9.33.2_eabi.tar.bz2
$ tar xvf OpenWrt-Toolchain-cns3xxx-for-arm_v6k-gcc-4.6-linaro_uClibc-0.9.33.2_eabi.tar.bz2
$ PATH=$PWD/OpenWrt-Toolchain-cns3xxx-for-arm_v6k-gcc-linaro_uClibc-0.9.32_eabi/toolchain-arm_v6k_gcc-linaro_uClibc-0.9.32_eabi/bin:$PATH
$ cat << EOF > hello-world.c
#include <stdio.h>
int main (int argc, char** argv)
{
printf("Hello World\n");
return 0;
}
EOF
$ arm-openwrt-linux-uclibcgnueabi-gcc hello-world.c -o hello-world
$ file hello-world
hello-world: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
- Example [OpenWrt](https://trac.gateworks.com/wiki/OpenWrt) 16.02 for the Ventana (imx6) platform:
# download toolchain
wget http://dev.gateworks.com/openwrt/16.02/imx6/Gateworks-Toolchain-imx6_gcc-5.2.0_musl-1.1.12_eabi.Linux-x86_64.tar.bz2
# extract toolchain
tar xvf Gateworks-Toolchain-imx6_gcc-5.2.0_musl-1.1.12_eabi.Linux-x86_64.tar.bz2
# add toolchain to path
PATH=$PWD/Gateworks-Toolchain-imx6_gcc-5.2.0_musl-1.1.12_eabi.Linux-x86_64/toolchain-arm_cortex-a9+neon_gcc-5.2.0_musl-1.1.12_eabi/bin:$PATH
# create a simple program
cat << EOF > hello-world.c
#include <stdio.h>
int main (int argc, char** argv)
{
printf("Hello World\n");
return 0;
}
EOF
# compile your program
arm-openwrt-linux-gcc hello-world.c -o hello-world
Note: The prebuilt toolchain may have some issue if the script arm-openwrt-linux-uclibcgnueabi-wrapper.sh is used (with regard to paths having whitespace).
### Venice Notes[]( "Link to this section")
Gateworks has not published a Toolchain / SDK and thus it should be built with the [OpenWrt](https://trac.gateworks.com/wiki/OpenWrt) instructions on the [OpenWrt/building](https://trac.gateworks.com/wiki/OpenWrt/building) page.
This results in a toolchain in ./staging_dir and for 24.01 imx8m the toolchain will be toolchain-aarch64_cortex-a53_gcc-12.3.0_musl
Once the toolchain is there, use the following commands to compile a Hello World:
# configure toolchain
export TOOLCHAIN=toolchain-aarch64_cortex-a53_gcc-12.3.0_musl
export STAGING_DIR=$PWD/staging_dir
export ARCH=arm64
export CROSS_COMPILE=aarch64-openwrt-linux-
export PATH=$PATH:$STAGING_DIR/$TOOLCHAIN/bin
cat << EOF > helloworld.c
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
printf("hello world!\n");
return 0;
}
EOF
${CROSS_COMPILE}gcc helloworld.c -o helloworld
This builds a dynamically linked helloworld which you can inspect as:
$ file helloworld
helloworld: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-aarch64.so.1, with
debug_info, not stripped
${CROSS_COMPILE}objdump -x helloworld | grep NEEDED
NEEDED libgcc_s.so.1
NEEDED libc.so
You can then copy this executable and run this on a board with [OpenWrt](https://trac.gateworks.com/wiki/OpenWrt) 24.01 installed
```
### Answer
Your script is essentially using the OpenWrt SDK already—it downloads (or locates) the “openwrt-sdk-…tar.xz” archive, extracts it, places custom feeds configuration, and then calls “make defconfig” plus “make package/…/compile” on individual packages. That’s all consistent with building inside the SDK, rather than the entire OpenWrt buildroot. So you’re not “doing it wrong” per se; it’s more that the SDK can still feel like a full build system because a lot of the core build steps (e.g., compiler, musl, etc.) are prepackaged in it.
## How the SDK Differs from the Full Buildroot
The full buildroot is the complete OpenWrt source tree for building everything (kernel, root filesystem, user packages, etc.) all at once. The SDK is a stripped-down version of that buildroot including:
• Compiler toolchains and libraries (precompiled)
• Scripts and makefiles to handle package configuration and compilation
Since the compiler and most dependencies are already built when you use the SDK, you only compile your custom feeds or packages. By contrast, the full buildroot does everything from scratch, which can be overkill if you only want custom packages.
## How the SDK Differs from a Prebuilt Toolchain
A prebuilt toolchain is basically just the cross-compiler and associated libraries. Using the prebuilt toolchain alone means you manually run something like:
arm-openwrt-linux-gcc helloworld.c -o helloworld
You avoid all the OpenWrt-specific makefiles, feed structures, packaging steps, etc. In other words, you just cross-compile your application. If you want to generate OpenWrt .ipk files or use the normal feeds mechanism, you have to set up more of the environment yourself.
## What Your Script Is Doing
1. Downloads and extracts the SDK to /tmp/openwrt-sdk
2. Installs Python dependencies (opkg-make-index, etc.)
3. Copies feeds.conf into the SDK
4. Runs scripts/feeds update -a and scripts/feeds install -a
5. Calls make defconfig to configure the SDK
6. Compiles golang, then compiles your custom modules
Those are the normal steps when using the SDK approach. You’re effectively letting the SDK handle compilation and packaging of your custom feeds. That targets only your needed packages, without building the entire firmware image.
## Suggested Tweaks for a More Standard “SDK-Only” Flow
You could simplify the script by letting the user manually pick packages or select them via menuconfig. For example:
```bash
#!/bin/bash
set -e
# 1. Download the SDK
SDKDIR=/tmp/openwrt-sdk
mkdir -p "$SDKDIR"
wget -O "$SDKDIR"/sdk.tar.xz "https://example.org/openwrt-sdk.tar.xz"
tar -I "xz -T0" -xf "$SDKDIR"/sdk.tar.xz -C "$SDKDIR"
# 2. Move into the extracted SDK
cd "$SDKDIR"/openwrt-sdk-*
# 3. Copy or create your feeds.conf
cp /path/to/feeds.conf ./feeds.conf
./scripts/feeds update -a
./scripts/feeds install -a
# 4. Configure the SDK (optional menuconfig or defconfig)
make defconfig
# 5. Compile a specific package
make package/feeds/custom/my-package/compile V=s
```
When you’re done, any generated .ipk files appear in bin/packages/<arch>/custom/ (or a similarly named feed directory). Then you can install or share those packages as you like.
## Trade-Offs
1. Full Buildroot
• Pros: Build an entire customized image (kernel, rootfs, packages) in one place.
• Cons: Much larger downloads, more disk space required, longer builds.
2. SDK
• Pros: Lightweight compared to the full buildroot, includes everything needed to build packages (.ipk) in the normal OpenWrt manner.
• Cons: Still has overhead compared to a simple compiler toolchain. Not as small as a bare cross-compiler.
3. Prebuilt Toolchain
• Pros: Easiest way to cross-compile if all you need is raw binaries. Fast and minimal download.
• Cons: You have to handle packaging or any OpenWrt feed integration yourself.
In your case, using the SDK is perfectly suitable for building custom feeds or packages. You get the best of both worlds: you don’t waste time recompiling the entire OS, but still follow all the typical OpenWrt packaging and feeds steps. That is precisely what your script does—you are indeed using the SDK. If you ever want to build a full custom firmware image with kernel changes, you’d switch to the full buildroot. If you only wanted a bare cross-compiler, you’d pick the prebuilt toolchain. But for custom feed packages, you’re in good shape with your current approach.
OpenWrt/SDK – Gateworks
OpenWrt/SDK – Gateworks
OpenWrt/SDK – Gateworks

#
# Copyright (C) 2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
ifneq ($(__golang_mk_inc),1)
__golang_mk_inc=1
ifeq ($(DUMP),)
GO_VERSION_MAJOR_MINOR:=$(shell go version | sed -E 's/.*go([0-9]+[.][0-9]+).*/\1/')
endif
GO_ARM:=$(if $(CONFIG_arm),$(if $(CONFIG_HAS_FPU),7,$(if $(CONFIG_GOARM_5),5,$(if $(CONFIG_GOARM_6),6,7))))
GO_MIPS:=$(if $(CONFIG_mips),$(if $(CONFIG_MIPS_FP_32),hardfloat,softfloat),)
GO_MIPS64:=$(if $(CONFIG_mips64),$(if $(CONFIG_MIPS_FP_64),hardfloat,softfloat),)
GO_386:=$(if $(CONFIG_i386),$(if $(CONFIG_CPU_TYPE_PENTIUM4),387,sse2),)
GO_TARGET_ARCH:=$(subst aarch64,arm64,$(subst x86_64,amd64,$(subst i386,386,$(ARCH))))
GO_TARGET_OS:=linux
GO_HOST_ARCH:=$(shell go env GOHOSTARCH)
GO_HOST_OS:=$(shell go env GOHOSTOS)
GO_HOST_TARGET_SAME:=$(if $(and $(findstring $(GO_TARGET_ARCH),$(GO_HOST_ARCH)),$(findstring $(GO_TARGET_OS),$(GO_HOST_OS))),1)
GO_HOST_TARGET_DIFFERENT:=$(if $(GO_HOST_TARGET_SAME),,1)
GO_STRIP_ARGS:=--strip-unneeded --remove-section=.comment --remove-section=.note
GO_PKG_GCFLAGS:=
GO_PKG_LDFLAGS:=-s -w
GO_PKG_BUILD_PKG?=$(GO_PKG)/...
GO_PKG_WORK_DIR_NAME:=.go_work
GO_PKG_WORK_DIR:=$(PKG_BUILD_DIR)/$(GO_PKG_WORK_DIR_NAME)
GO_PKG_BUILD_DIR:=$(GO_PKG_WORK_DIR)/build
GO_PKG_CACHE_DIR:=$(GO_PKG_WORK_DIR)/cache
GO_PKG_TMP_DIR:=$(GO_PKG_WORK_DIR)/tmp
GO_PKG_BUILD_BIN_DIR:=$(GO_PKG_BUILD_DIR)/bin$(if $(GO_HOST_TARGET_DIFFERENT),/$(GO_TARGET_OS)_$(GO_TARGET_ARCH))
GO_BUILD_DIR_PATH:=$(firstword $(subst :, ,$(GOPATH)))
GO_BUILD_PATH:=$(if $(GO_PKG),$(GO_BUILD_DIR_PATH)/src/$(GO_PKG))
endif # __golang_mk_inc
## Question
```
root@GL-AR300M:/tmp# sysupgrade -n 6051c63e-6c7c-41fa-9ae6-509e216dbcfa\?X-Amz-Algorithm=AWS4-HMAC-SHA256
Mon Jan 27 20:06:50 UTC 2025 upgrade: Device glinet,gl-ar300m-nor not supported by this image
Mon Jan 27 20:06:50 UTC 2025 upgrade: Supported devices: glinet,gl-ar300m16 gl-ar300m
Image check failed.
```
I'm using the following script to build for the `glar300m`, but I seem to have multiple similar devices as you can see in the error message above.
```
-15-Gen6:~/TollGate/tollgate-image-builder$ cat build-firmware
#!/bin/bash
set -e
set -x
# Install packages if needed
# sudo apt install -y gawk
# sudo apt-get install -y coreutils
# Build openwrt image
MODEL=$1
VERSION=23.05.3
BUILDDIR=/tmp/openwrt-build
BASE_PACKAGES=" \
base-files \
busybox \
ca-bundle \
dnsmasq \
dropbear \
firewall4 \
fstools \
kmod-gpio-button-hotplug \
kmod-leds-gpio \
kmod-nft-offload \
libc \
libgcc \
libustream-mbedtls \
logd \
mtd \
netifd \
nftables \
odhcp6c \
opkg \
ppp \
ppp-mod-pppoe \
procd \
procd-seccomp \
procd-ujail \
swconfig \
uci \
uclient-fetch \
urandom-seed \
urngd \
openssh-sftp-server \
opennds \
travelmate \
luci-app-travelmate \
curl \
jshn \
jsonfilter \
rpcd \
rpcd-mod-rpcsys \
"
# opennds: our captive portal dependency (for ndsctl)
# travelmate: lets upstream captive portals through the firewall for user to click ok
# For the gl-ar300m case, modify the EXTRA_PACKAGES:
case $MODEL in
"gl-mt300n-v2")
PLATFORM=ramips
TYPE=mt76x8
TARGET_DEVICE=ramips-mt76x8
PROFILE=glinet_gl-mt300n-v2
EXTRA_PACKAGES="\
uboot-envtools \
watchcat \
luci \
luci-ssl \
" # opennds \
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
"
;;
"gl-ar300m")
PLATFORM=ath79
TYPE=generic
TARGET_DEVICE=ath79-generic
PROFILE=glinet_gl-ar300m16
EXTRA_PACKAGES="\
uboot-envtools \
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
"gl-mt3000")
PLATFORM=mediatek
TYPE=filogic
TARGET_DEVICE=mediatek-filogic
PROFILE=glinet_gl-mt3000
EXTRA_PACKAGES="\
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
"gl-mt6000")
PLATFORM=mediatek
TYPE=filogic
TARGET_DEVICE=mediatek-filogic
PROFILE=glinet_gl-mt6000
EXTRA_PACKAGES="\
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
"gl-e750")
VERSION="snapshot"
PLATFORM=ath79
TYPE=nand
TARGET_DEVICE=ath79-nand
PROFILE=glinet_gl-e750
EXTRA_PACKAGES="\
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
uboot-envtools \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
"
;;
"archer_mr200")
PLATFORM=ramips
TYPE=mt7620
TARGET_DEVICE=ramips-mt7620
PROFILE=tplink_archer-mr200 # Update to the correct profile name
EXTRA_PACKAGES="\
kmod-usb2 \
kmod-usb-core \
luci \
luci-ssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
"
;;
*)
echo "specify build target (gl-mt300n-v2, gl-ar300m, gl-mt3000, gl-mt6000, gl-e750, or archer_mr200)"
exit 1
;;
esac
if [ ! -d ${BUILDDIR} ] ; then
mkdir ${BUILDDIR}
fi
# the need for $TYPE and $TARGET_DEVICE seems dumb but it helps get aroudn the problem of downloads ↓↓↓↓↓↓↓
# http://downloads.openwrt.org/releases/18.06.1/targets/ath79/generic/openwrt-imagebuilder-18.06.1-ath79-generic.Linux-x86_64.tar.xz
#http://downloads.openwrt.org/releases/18.06.1/targets/ipq40xx/generic/openwrt-imagebuilder-18.06.1-ipq40xx.Linux-x86_64.tar.xz
if [ "$VERSION" = "snapshot" ]; then
IMAGEBUILDER_NAME="openwrt-imagebuilder-${PLATFORM}-${TYPE}.Linux-x86_64"
DOWNLOAD_URL="https://downloads.openwrt.org/snapshots/targets/${PLATFORM}/${TYPE}/${IMAGEBUILDER_NAME}.tar.zst"
ARCHIVE_EXT="tar.zst"
else
IMAGEBUILDER_NAME="openwrt-imagebuilder-${VERSION}-${TARGET_DEVICE}.Linux-x86_64"
DOWNLOAD_URL="https://downloads.openwrt.org/releases/${VERSION}/targets/${PLATFORM}/${TYPE}/${IMAGEBUILDER_NAME}.tar.xz"
ARCHIVE_EXT="tar.xz"
fi
if [ ! -d ${BUILDDIR}/${IMAGEBUILDER_NAME} ] ; then
if [ ! -f ${BUILDDIR}/${IMAGEBUILDER_NAME}.${ARCHIVE_EXT} ]; then
(cd ${BUILDDIR} && curl -C - -O ${DOWNLOAD_URL})
fi
if [ "$VERSION" = "snapshot" ]; then
tar --zstd -xf ${BUILDDIR}/${IMAGEBUILDER_NAME}.${ARCHIVE_EXT} -C ${BUILDDIR}/
else
tar xfJ ${BUILDDIR}/${IMAGEBUILDER_NAME}.${ARCHIVE_EXT} -C ${BUILDDIR}/
fi
fi
COMBINED_PACKAGE_LIST="`echo ${REMOVED_PACKAGES}` `echo ${BASE_PACKAGES}` `echo ${EXTRA_PACKAGES}`"
echo "Combined package list ${COMBINED_PACKAGE_LIST}"
CORES=$(nproc)
# Add these lines just before the final make command
echo "Copying custom files..."
cp -r $(pwd)/files ${BUILDDIR}/${IMAGEBUILDER_NAME}/
# Determine architecture based on platform/type
case "${PLATFORM}-${TYPE}" in
"ath79-generic")
BLOSSOM_ARCH="mips_24kc"
;;
"mediatek-filogic")
BLOSSOM_ARCH="aarch64_cortex-a53"
;;
*)
echo "Unsupported platform-type combination for blossom downloads: ${PLATFORM}-${TYPE}"
exit 1
;;
esac
# Create packages directory in image builder
PACKAGES_DIR="${BUILDDIR}/${IMAGEBUILDER_NAME}/packages/local"
mkdir -p "${PACKAGES_DIR}"
# Download IPK files using blossom_download.py
echo "Downloading IPK files for architecture ${BLOSSOM_ARCH}..."
python3 $(pwd)/blossom_download.py "${PACKAGES_DIR}" "${BLOSSOM_ARCH}"
# Generate package index
echo "Generating package index..."
(cd ${BUILDDIR}/${IMAGEBUILDER_NAME} && \
sudo bash -c 'mkhash() { if [ "$1" = "sha256" ]; then sha256sum "$2" | cut -d" " -f1; else sha256sum "$1" | cut -d" " -f1; fi; }; \
export -f mkhash; \
export MKHASH=mkhash; \
./scripts/ipkg-make-index.sh packages/local > packages/local/Packages && \
gzip -9c packages/local/Packages > packages/local/Packages.gz')
# Add tollgate packages to the package list
TOLLGATE_PACKAGES="\
"
# tollgate-module-whoami-go \
# Update the combined package list to include tollgate packages
COMBINED_PACKAGE_LIST="${COMBINED_PACKAGE_LIST} ${TOLLGATE_PACKAGES}"
# Replace the build command and error checking with:
echo "Building ${VERSION} using ${CORES} cores..."
BUILD_OUTPUT=$(cd ${BUILDDIR}/${IMAGEBUILDER_NAME} && \
sudo make -j${CORES} image PROFILE="$PROFILE" \
PACKAGES="$COMBINED_PACKAGE_LIST" \
FILES="${BUILDDIR}/${IMAGEBUILDER_NAME}/files" 2>&1 | tee >(cat))
echo "${BUILD_OUTPUT}"
# Check for common error patterns
if echo "$BUILD_OUTPUT" | grep -q "Failed to open firmware file"; then
echo "Error: Build failed - firmware file creation error"
exit 1
fi
if echo "$BUILD_OUTPUT" | grep -q "No such file or directory"; then
echo "Error: Build failed - missing files"
exit 1
fi
# Extract the filesystem size from the output
FILESYSTEM_SIZE=$(echo "$BUILD_OUTPUT" | grep "Filesystem size" | grep -o '[0-9.]\+ Kbytes' | awk '{print $1/1024}')
# After the build command, add:
OUTPUT_FILE="${BUILDDIR}/${IMAGEBUILDER_NAME}/bin/targets/${PLATFORM}/${TYPE}/openwrt-${VERSION}-${TARGET_DEVICE}-${PROFILE}-squashfs-sysupgrade.bin"
if [ ! -f "$OUTPUT_FILE" ]; then
echo "Error: Build failed - output file not created"
exit 1
fi
echo "Build successful! Firmware image created at:"
echo "Image size (${FILESYSTEM_SIZE}MB)"
echo "${OUTPUT_FILE}"
echo
echo "To deploy, use:"
echo "scp -O ${BUILDDIR}/${IMAGEBUILDER_NAME}/bin/targets/${PLATFORM}/${TYPE}/openwrt-${VERSION}-${TARGET_DEVICE}-${PROFILE}-squashfs-sysupgrade.bin root@<dest>:/tmp"
```
Please add a section for `glinet,gl-ar300m-nor` to the above script without removing whats already there, since that might be useful for one of the other routers that I have..
--------
## Answer
I'll add a new case for the `glinet,gl-ar300m-nor` device. You'll need to add this within the case statement, alongside the other device configurations:
```bash
"gl-ar300m-nor")
PLATFORM=ath79
TYPE=generic
TARGET_DEVICE=ath79-generic
PROFILE=glinet_gl-ar300m-nor
EXTRA_PACKAGES="\
uboot-envtools \
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
```
Also, you'll need to update the usage message in the default case (*) to include the new option. Change this line:
```bash
*)
echo "specify build target (gl-mt300n-v2, gl-ar300m, gl-mt3000, gl-mt6000, gl-e750, archer_mr200, gl-ar300m-nor)"
exit 1
;;
```
The configuration for `gl-ar300m-nor` is similar to the regular `gl-ar300m` since they share the same basic hardware, but they differ in their flash memory configuration. The "nor" variant uses NOR flash memory instead of NAND flash memory. You can now build for this specific variant by running:
```bash
./build-firmware gl-ar300m-nor
```
## Followup
```
make: *** [Makefile:260: image] Error 2
make: *** [Makefile:260: image] Error 2'
+ grep -q 'No such file or directory'
++ echo 'Profile "glinet_gl-ar300m-nor" does not exist!
Profile "glinet_gl-ar300m-nor" does not exist!
Use "make info" to get a list of available profile names.
Use "make info" to get a list of available profile names.
```
As you can see above, my build script still seems to be wrong. Here is some related information from the openwrt page about this router:
```
### Info[](
|Brand|Model|Version|Device Type|Availability|Supported Since Commit|Supported Since Rel|Supported Current Rel|Unsupported Functions|Bootloader|Target|CPU MHz|Flash MB|RAM MB|Switch|Ethernet 100M ports|Ethernet 1Gbit ports|Comments network ports|Modem|VLAN|WLAN 2.4GHz|WLAN 5.0GHz|WLAN Hardware|WLAN Comments|Detachable Antennas|USB ports|SATA ports|Comments USB SATA ports|Serial|JTAG|LED count|Button count|Power Supply||OWrt Forum Topic URL|WikiDevi URL|OEM Device Homepage URL|Firmware OEM Stock URL|Firmware OpenWrt Install URL|Firmware OpenWrt Upgrade URL|Comments|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|GL.iNet|GL-AR300M|v1.4.0|WiFi Router|Available 2020|`[d963ddf0424a](https://git.lede-project.org/?p=source.git;a=commit;h=d963ddf0424a551e5fadd561c934bfdb5d198764)`|[17.01.0](https://openwrt.org/releases/17.01.0 "releases:17.01.0")|[23.05.5]( "releases:23.05.5")|NAND flash not supported until after 19.07.x, must be forced into booting from NOR flash|U-Boot|[ar71xx-ath79]( "docs:techref:targets:ar71xx-ath79")|650|16, 128NAND|128|Qualcomm Atheros QCA9531|2|-||-|Yes|b/g/n|-|Qualcomm Atheros QCA9531|"-EXT" suffix has 2 detachable Antennas (RP-SMA)|-|1x 2.0|-||Yes|No|3|2|5 VDC, 2.0 A (µUSB)|[Edit]( "toh:hwdata:gl.inet:gl.inet_gl-ar300m")|[Discourse: gl-ar300m-sysupgrade-problem](https://forum.openwrt.org/t/gl-ar300m-sysupgrade-problem/1812), [Discourse: howto-upgrade-the-preinstalled-openwrt-lede-17-01-firmware-in-the-gl-ar300m-router](https://forum.openwrt.org/t/howto-upgrade-the-preinstalled-openwrt-lede-17-01-firmware-in-the-gl-ar300m-router/21129)|[WikiDevi: GL.iNet_GL-AR300M](https://wikidevi.wi-cat.ru/GL.iNet_GL-AR300M)|[gl-inet.com](https://www.gl-inet.com/products/gl-ar300m/)|[OEM Firmware]( image](https://downloads.openwrt.org/releases/23.05.5/targets/ath79/nand/)|[Sysupgrade image](https://downloads.openwrt.org/releases/23.05.5/targets/ath79/nand/)|Flashing to the 128MB NAND flash is supported in Snapshot ath79 at time of writing, removable external antennas on "ext" variant|
|GL.iNet|GL-AR300M16||WiFi Router|Available 2024|`[b591cabd3989](https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=b591cabd3989b44cfaf15248af9e55a0300a9c0a)`|[21.02.0](https://openwrt.org/releases/21.02.0 "releases:21.02.0")|[23.05.5]( "releases:23.05.5")||U-Boot|[ath79]( "docs:techref:targets:ath79")|650|16|128|Qualcomm QCA9531|2|-||-|Yes|b/g/n|-|Qualcomm QCA9531|GL-AR300M16-Ext variant has 2 detachable antennas (RP-SMA)|-|1x 2.0|-||Yes|No|3|2|5V/1A, microUSB|[Edit]( "toh:hwdata:gl.inet:gl.inet_gl-ar300m16")||[WikiDevi: GL.iNet_GL-AR300M](https://wikidevi.wi-cat.ru/GL.iNet_GL-AR300M)|[gl-inet.com](https://www.gl-inet.com/products/gl-ar300m/)|[OEM Firmware]( image](https://downloads.openwrt.org/releases/23.05.5/targets/ath79/generic/openwrt-23.05.5-ath79-generic-glinet_gl-ar300m16-initramfs-kernel.bin)|[Sysupgrade image](https://downloads.openwrt.org/releases/23.05.5/targets/ath79/generic/openwrt-23.05.5-ath79-generic-glinet_gl-ar300m16-squashfs-sysupgrade.bin)||
```
Does this information help to identify what needs to go in the build script?
## Answer
It looks like OpenWrt does not actually define a “glinet_gl-ar300m-nor” profile name. Instead, the NOR version of the GL-AR300M is referred to as “glinet_gl-ar300m16.” So, if you want to build for the device’s NOR flash, you will need a case matching that existing OpenWrt profile.
Below is an example of how you can add a “gl-ar300m-nor” option to your script (so that you can pass “gl-ar300m-nor” on the command line), while internally using the “glinet_gl-ar300m16” profile. Note that you are not removing anything you already have; you’re simply adding a new case for the sake of building the NOR variant:
```bash
"gl-ar300m-nor")
PLATFORM=ath79
TYPE=generic
TARGET_DEVICE=ath79-generic
PROFILE=glinet_gl-ar300m16
EXTRA_PACKAGES="\
uboot-envtools \
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
```
Also modify your default usage message to include “gl-ar300m-nor” as an option:
```bash
*)
echo "specify build target (gl-mt300n-v2, gl-ar300m, gl-ar300m-nor, gl-mt3000, gl-mt6000, gl-e750, or archer_mr200)"
exit 1
;;
```
If you invoke your script as:
» ./build-firmware gl-ar300m-nor
it will now use the “glinet_gl-ar300m16” profile (which is the correct NOR-only OpenWrt image for AR300M devices).
## Followup
Ok, now I think I have duplicates. The nor and nand versions both end in `m16`. How can I fix this?
```
"gl-ar300m")
PLATFORM=ath79
TYPE=generic
TARGET_DEVICE=ath79-generic
PROFILE=glinet_gl-ar300m16
EXTRA_PACKAGES="\
uboot-envtools \
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
"gl-ar300m-nor")
PLATFORM=ath79
TYPE=generic
TARGET_DEVICE=ath79-generic
PROFILE=glinet_gl-ar300m16
EXTRA_PACKAGES="\
uboot-envtools \
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
```
## Answer
Looking at the OpenWrt device info you shared, the NAND version should use the `ath79/nand` target while the NOR version uses `ath79/generic`. Here's how to correctly differentiate between the two versions:
```bash
"gl-ar300m") # NAND version
PLATFORM=ath79
TYPE=nand
TARGET_DEVICE=ath79-nand
PROFILE=glinet_gl-ar300m
EXTRA_PACKAGES="\
uboot-envtools \
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
"gl-ar300m-nor") # NOR version (16MB flash)
PLATFORM=ath79
TYPE=generic
TARGET_DEVICE=ath79-generic
PROFILE=glinet_gl-ar300m16
EXTRA_PACKAGES="\
uboot-envtools \
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
```
The key differences are:
1. NAND version uses `TYPE=nand` and `TARGET_DEVICE=ath79-nand`
2. NAND version uses `PROFILE=glinet_gl-ar300m`
3. NOR version uses `TYPE=generic` and `TARGET_DEVICE=ath79-generic`
4. NOR version uses `PROFILE=glinet_gl-ar300m16`
This should now correctly build for both variants of the router.
Testing to determine if you are a bot!
Testing to determine if you are a bot!
Testing to determine if you are a bot!
Testing to determine if you are a bot!
GL.iNet download center
Testing to determine if you are a bot!
Testing to determine if you are a bot!
Testing to determine if you are a bot!
GL.iNet download center
- [ ] **First: Ensure that changes made to code in the feeds actually reflect in the sysupgrade image.**
- [ ] Golang.mk checklist
- [ ] Pay attention to the order in which golang files are compiled by the SDK - golang.mk
- [ ] How does it relate to [this](
golang-package.mk?
- [ ] Reliability checklist
- [ ] Include commit hashes of the individual modules in feeds
- [ ] Versioning of services in nostr events
- [ ] Confirm that changes to gocode reflect in sysupgrade image
- [ ] auto restart services because relay needs to run before the other services
- [ ] Think about onboarding and UX
GitHub
tollgate-module-relay-go/Makefile at d6f82ef490c445308a69e79cbd152ae0dda910aa · OpenTollGate/tollgate-module-relay-go
A minimalistic Nostr relay intended to run on a tollgate router - OpenTollGate/tollgate-module-relay-go
- [ ] **First: Ensure that changes made to code in the feeds actually reflect in the sysupgrade image.**
- [ ] Golang.mk checklist
- [ ] Pay attention to the order in which golang files are compiled by the SDK - golang.mk
- [ ] How does it relate to [this](
golang-package.mk?
- [ ] Reliability checklist
- [ ] Include commit hashes of the individual modules in feeds
- [ ] Versioning of services in nostr events
- [ ] Confirm that changes to gocode reflect in sysupgrade image
- [ ] auto restart services because relay needs to run before the other services
- [ ] Part of crows nest
- [ ] Showing up as TollGate: crows nest is doing that now
- [ ] Vendor elements: crows nest
- [ ] travelmate
- [ ] configure using luci UI
- [ ] might be missing dependencies of dependencies
GitHub
tollgate-module-relay-go/Makefile at d6f82ef490c445308a69e79cbd152ae0dda910aa · OpenTollGate/tollgate-module-relay-go
A minimalistic Nostr relay intended to run on a tollgate router - OpenTollGate/tollgate-module-relay-go
#### Open tasks
- [ ] investigate [support for other devices](https://github.com/OpenTollGate/tollgate-sdk/commit/1a9718556dbe8b6cecc36714d7982986862d27ef) - [testing required](
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](
- [x] Fixed `GOOS` and `GOARCH`
- [x] ready to add [our other go packages](https://njump.me/nevent1qqsfr7cv90sr7u00k4967yfucce576zc4892dt9qu5j6rpamwjw4xjgppemhxue69uhkummn9ekx7mp0qgswmfau3q22zvunk4etqh97aznddp60rwuq3ghcfnlrn9xnm7vy6xgrqsqqqqqp9vk9a5)
- [x] build all packages from custom feed
- [x] no longer require that the user specifies which package to build as a CLI argument to `build-firmeware`
- [x] Automate [upload to blossom](https://njump.me/nevent1qqsramr2agk02gm7zvefvs4myl9yjlx88mh8f7t69g554xsztad4znspzpmhxue69uhkummnw3ezumt0d5hsyg86u6zkjdqrlppxyrar37y79l0urmqtjh8ue24pnx7gl7ktwtfwsspsgqqqqqqs8vu68v) server
- [x] Facing [issues](https://njump.me/nevent1qqsf8xf4r7td2halxe7kgkppc66jw06tjlmjq8h34uxlxmlp3rlw35spz4mhxue69uhkummnw3ezummcw3ezuer9wchs4f943e) with `sattelite.earth`
- [x] uploads to other public blossom servers fine
- [x] created [events](https://njump.me/nevent1qqs90s57k22ktsf8vcmdks2x030xrxn64h9cctjfh9lpl77n9kqnuqgpzpmhxue69uhkummnw3ezumt0d5hsyg8d577gs99pxwfm2u4stjlw3fkksa83hwqg5tuyel3ejnfalxzdrypsgqqqqqqsn6lf7c) that map commit hashes and binary checksums to blossom servers that store the binaries
- [x] [include all binaries](https://github.com/OpenTollGate/tollgate-image-builder/pull/4) in image
- [x] the binaries are included, but the image seems to be too large sometimes
- [x] figuring out [what the problem is](https://njump.me/nevent1qqsz24ahpxt47c7xv9ehy7kga3qmfed3cjkqljvgslamwnuenmutmmcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcdwre6e) and fixing the user output
- [x] test sysupgrade image on `GL-MT3000`
- [x] Updated `init.d`, waiting for OS upgrade to complete so that I can resolve [this error](https://njump.me/nevent1qqstv0dsr0tvezmuurydelwnzj7n2emjyecg9a0lp8gcuhwft32fnqcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcrae7kt)
- [ ] Test `ipks` on GL-AR300m
- [ ] Perhaps there is an issue with the arch?
`GOOS=linux GOARCH=mips CGO_ENABLED=0 go build -ldflags="-s -w"`
**Confirmed:**
```
root@GL-AR300M:/tmp# opkg install whoami.ipk
Unknown package 'tollgate-module-whoami-go'.
Collected errors:
* pkg_hash_check_unresolved: cannot find dependency golang for tollgate-module-whoami-go
* pkg_hash_fetch_best_installation_candidate: Packages for tollgate-module-whoami-go found, but incompatible with the architectures configured
* opkg_install_cmd: Cannot install package tollgate-module-whoami-go.
```
- [ ] Perhaps [this](View quoted note →) is progress
- [ ] Generate an image successfully without any of the go stuff
- [ ] Maybe I should have been testing on the router with the external antennas. Maybe these routers [are different](View quoted note →)..
- [ ] Confirmed the distinction between [nand and nor ](View quoted note →)seems to be part of the problem.
- [ ] Left off on [these branches](https://njump.me/nevent1qqsf3rsax464heme366h478krauacwtcgy309yeajhyjhu9gu2kqpwgpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcq3jxq2)
- [ ] Ensure that the blossom downloader can distinguish between them correctly based on the hashtags
- [ ] Ensure that sysupgrade binaries can be generated for both nor and nand
- [ ] Try installing the ipk files on the router after flashing it with a binary that doesn't contain any go programs yet
- [ ] Install the `whoami` module manually using the ipk - also test with the `relay` module since the changes to `golang.mk` affect both packages, but the changes to the `relay`'s make file only affect the relay
- [ ] Cry and go back to messing with the Makefile in the SDK if that doesn't work. Note that each package has its own Makefile, and
- [ ] Test `ipks` on GL-MT3000
- [ ] test sysupgrade image on `GL-AR300M`
- [ ] Compare with code that worked on previous commit of main
- [ ] Upload OpenWRT image to blossom as well
- [ ] **make captive portal front-end work again & improve new image -- Working on this one**
- [ ] test the install step of makefiles and use that to configure programs
- [ ] would like to switch to [local golang](
for better reproducibility across build environment, branch: `with_golang_feed`
- [ ] would like to start using actions so that we can use this [runner](View article →)
- [ ] Make installer for `ipk` and `sysupgrade` files from blossom
noStrudel
A simple nostr web client focused on exploring nostr
GitHub
fix_golang_mk (#3) · OpenTollGate/custom-nostr-feed-decomissioned@278cf41
- [x] Fixed `GOOS` and `GOARCH`
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](https://github.com/OpenTollGate/custom-nostr-fee...
GitHub
custom-nostr-feed-decomissioned/tollgate-module-relay-go/Makefile at 9cd211abcfc964f26a900c2bdacefa931be4d051 · OpenTollGate/custom-nostr-feed-decomissioned
A custom openwrt feed for tollgate related packages - OpenTollGate/custom-nostr-feed-decomissioned
```
Branches:
commit 3197f918d2850799887a91a19e1ee9f240717dad (HEAD -> fix_glar300m_go_architecture, origin/fix_glar300m_go_architecture)
fix_glar300m
```
#### Open tasks
- [ ] investigate [support for other devices](https://github.com/OpenTollGate/tollgate-sdk/commit/1a9718556dbe8b6cecc36714d7982986862d27ef) - [testing required](
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](
- [x] Fixed `GOOS` and `GOARCH`
- [x] ready to add [our other go packages](https://njump.me/nevent1qqsfr7cv90sr7u00k4967yfucce576zc4892dt9qu5j6rpamwjw4xjgppemhxue69uhkummn9ekx7mp0qgswmfau3q22zvunk4etqh97aznddp60rwuq3ghcfnlrn9xnm7vy6xgrqsqqqqqp9vk9a5)
- [x] build all packages from custom feed
- [x] no longer require that the user specifies which package to build as a CLI argument to `build-firmeware`
- [x] Automate [upload to blossom](https://njump.me/nevent1qqsramr2agk02gm7zvefvs4myl9yjlx88mh8f7t69g554xsztad4znspzpmhxue69uhkummnw3ezumt0d5hsyg86u6zkjdqrlppxyrar37y79l0urmqtjh8ue24pnx7gl7ktwtfwsspsgqqqqqqs8vu68v) server
- [x] Facing [issues](https://njump.me/nevent1qqsf8xf4r7td2halxe7kgkppc66jw06tjlmjq8h34uxlxmlp3rlw35spz4mhxue69uhkummnw3ezummcw3ezuer9wchs4f943e) with `sattelite.earth`
- [x] uploads to other public blossom servers fine
- [x] created [events](https://njump.me/nevent1qqs90s57k22ktsf8vcmdks2x030xrxn64h9cctjfh9lpl77n9kqnuqgpzpmhxue69uhkummnw3ezumt0d5hsyg8d577gs99pxwfm2u4stjlw3fkksa83hwqg5tuyel3ejnfalxzdrypsgqqqqqqsn6lf7c) that map commit hashes and binary checksums to blossom servers that store the binaries
- [x] [include all binaries](https://github.com/OpenTollGate/tollgate-image-builder/pull/4) in image
- [x] the binaries are included, but the image seems to be too large sometimes
- [x] figuring out [what the problem is](https://njump.me/nevent1qqsz24ahpxt47c7xv9ehy7kga3qmfed3cjkqljvgslamwnuenmutmmcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcdwre6e) and fixing the user output
- [x] test sysupgrade image on `GL-MT3000`
- [x] Updated `init.d`, waiting for OS upgrade to complete so that I can resolve [this error](https://njump.me/nevent1qqstv0dsr0tvezmuurydelwnzj7n2emjyecg9a0lp8gcuhwft32fnqcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcrae7kt)
- [ ] Test `ipks` on GL-AR300m
- [ ] Perhaps there is an issue with the arch?
`GOOS=linux GOARCH=mips CGO_ENABLED=0 go build -ldflags="-s -w"`
**Confirmed:**
```
root@GL-AR300M:/tmp# opkg install whoami.ipk
Unknown package 'tollgate-module-whoami-go'.
Collected errors:
* pkg_hash_check_unresolved: cannot find dependency golang for tollgate-module-whoami-go
* pkg_hash_fetch_best_installation_candidate: Packages for tollgate-module-whoami-go found, but incompatible with the architectures configured
* opkg_install_cmd: Cannot install package tollgate-module-whoami-go.
```
- [ ] Perhaps [this](View quoted note →) is progress
- [ ] Generate an image successfully without any of the go stuff
- [ ] Maybe I should have been testing on the router with the external antennas. Maybe these routers [are different](View quoted note →)..
- [ ] Confirmed the distinction between [nand and nor ](View quoted note →)seems to be part of the problem.
- [ ] Ensure that the blossom downloader can distinguish between them correctly based on the hashtags
- [ ] Ensure that sysupgrade binaries can be generated for both nor and nand
- [ ] Try installing the ipk files on the router after flashing it with a binary that doesn't contain any go programs yet
- [ ] Install the `whoami` module manually using the ipk - also test with the `relay` module since the changes to `golang.mk` affect both packages, but the changes to the `relay`'s make file only affect the relay
- [ ] Cry and go back to messing with the Makefile in the SDK if that doesn't work. Note that each package has its own Makefile, and
- [ ] Test `ipks` on GL-MT3000
- [ ] test sysupgrade image on `GL-AR300M`
- [ ] Compare with code that worked on previous commit of main
- [ ] Upload OpenWRT image to blossom as well
- [ ] **make captive portal front-end work again & improve new image -- Working on this one**
- [ ] test the install step of makefiles and use that to configure programs
- [ ] would like to switch to [local golang](
for better reproducibility across build environment, branch: `with_golang_feed`
- [ ] would like to start using actions so that we can use this [runner](View article →)
- [ ] Make installer for `ipk` and `sysupgrade` files from blossom
noStrudel
A simple nostr web client focused on exploring nostr
GitHub
fix_golang_mk (#3) · OpenTollGate/custom-nostr-feed-decomissioned@278cf41
- [x] Fixed `GOOS` and `GOARCH`
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](https://github.com/OpenTollGate/custom-nostr-fee...
GitHub
custom-nostr-feed-decomissioned/tollgate-module-relay-go/Makefile at 9cd211abcfc964f26a900c2bdacefa931be4d051 · OpenTollGate/custom-nostr-feed-decomissioned
A custom openwrt feed for tollgate related packages - OpenTollGate/custom-nostr-feed-decomissioned
## Question
```
root@GL-AR300M:/tmp# sysupgrade -n 6051c63e-6c7c-41fa-9ae6-509e216dbcfa\?X-Amz-Algorithm=AWS4-HMAC-SHA256
Mon Jan 27 20:06:50 UTC 2025 upgrade: Device glinet,gl-ar300m-nor not supported by this image
Mon Jan 27 20:06:50 UTC 2025 upgrade: Supported devices: glinet,gl-ar300m16 gl-ar300m
Image check failed.
```
I'm using the following script to build for the `glar300m`, but I seem to have multiple similar devices as you can see in the error message above.
```
-15-Gen6:~/TollGate/tollgate-image-builder$ cat build-firmware
#!/bin/bash
set -e
set -x
# Install packages if needed
# sudo apt install -y gawk
# sudo apt-get install -y coreutils
# Build openwrt image
MODEL=$1
VERSION=23.05.3
BUILDDIR=/tmp/openwrt-build
BASE_PACKAGES=" \
base-files \
busybox \
ca-bundle \
dnsmasq \
dropbear \
firewall4 \
fstools \
kmod-gpio-button-hotplug \
kmod-leds-gpio \
kmod-nft-offload \
libc \
libgcc \
libustream-mbedtls \
logd \
mtd \
netifd \
nftables \
odhcp6c \
opkg \
ppp \
ppp-mod-pppoe \
procd \
procd-seccomp \
procd-ujail \
swconfig \
uci \
uclient-fetch \
urandom-seed \
urngd \
openssh-sftp-server \
opennds \
travelmate \
luci-app-travelmate \
curl \
jshn \
jsonfilter \
rpcd \
rpcd-mod-rpcsys \
"
# opennds: our captive portal dependency (for ndsctl)
# travelmate: lets upstream captive portals through the firewall for user to click ok
# For the gl-ar300m case, modify the EXTRA_PACKAGES:
case $MODEL in
"gl-mt300n-v2")
PLATFORM=ramips
TYPE=mt76x8
TARGET_DEVICE=ramips-mt76x8
PROFILE=glinet_gl-mt300n-v2
EXTRA_PACKAGES="\
uboot-envtools \
watchcat \
luci \
luci-ssl \
" # opennds \
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
"
;;
"gl-ar300m")
PLATFORM=ath79
TYPE=generic
TARGET_DEVICE=ath79-generic
PROFILE=glinet_gl-ar300m16
EXTRA_PACKAGES="\
uboot-envtools \
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
"gl-mt3000")
PLATFORM=mediatek
TYPE=filogic
TARGET_DEVICE=mediatek-filogic
PROFILE=glinet_gl-mt3000
EXTRA_PACKAGES="\
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
"gl-mt6000")
PLATFORM=mediatek
TYPE=filogic
TARGET_DEVICE=mediatek-filogic
PROFILE=glinet_gl-mt6000
EXTRA_PACKAGES="\
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
"gl-e750")
VERSION="snapshot"
PLATFORM=ath79
TYPE=nand
TARGET_DEVICE=ath79-nand
PROFILE=glinet_gl-e750
EXTRA_PACKAGES="\
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
uboot-envtools \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
"
;;
"archer_mr200")
PLATFORM=ramips
TYPE=mt7620
TARGET_DEVICE=ramips-mt7620
PROFILE=tplink_archer-mr200 # Update to the correct profile name
EXTRA_PACKAGES="\
kmod-usb2 \
kmod-usb-core \
luci \
luci-ssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
"
;;
*)
echo "specify build target (gl-mt300n-v2, gl-ar300m, gl-mt3000, gl-mt6000, gl-e750, or archer_mr200)"
exit 1
;;
esac
if [ ! -d ${BUILDDIR} ] ; then
mkdir ${BUILDDIR}
fi
# the need for $TYPE and $TARGET_DEVICE seems dumb but it helps get aroudn the problem of downloads ↓↓↓↓↓↓↓
# http://downloads.openwrt.org/releases/18.06.1/targets/ath79/generic/openwrt-imagebuilder-18.06.1-ath79-generic.Linux-x86_64.tar.xz
#http://downloads.openwrt.org/releases/18.06.1/targets/ipq40xx/generic/openwrt-imagebuilder-18.06.1-ipq40xx.Linux-x86_64.tar.xz
if [ "$VERSION" = "snapshot" ]; then
IMAGEBUILDER_NAME="openwrt-imagebuilder-${PLATFORM}-${TYPE}.Linux-x86_64"
DOWNLOAD_URL="https://downloads.openwrt.org/snapshots/targets/${PLATFORM}/${TYPE}/${IMAGEBUILDER_NAME}.tar.zst"
ARCHIVE_EXT="tar.zst"
else
IMAGEBUILDER_NAME="openwrt-imagebuilder-${VERSION}-${TARGET_DEVICE}.Linux-x86_64"
DOWNLOAD_URL="https://downloads.openwrt.org/releases/${VERSION}/targets/${PLATFORM}/${TYPE}/${IMAGEBUILDER_NAME}.tar.xz"
ARCHIVE_EXT="tar.xz"
fi
if [ ! -d ${BUILDDIR}/${IMAGEBUILDER_NAME} ] ; then
if [ ! -f ${BUILDDIR}/${IMAGEBUILDER_NAME}.${ARCHIVE_EXT} ]; then
(cd ${BUILDDIR} && curl -C - -O ${DOWNLOAD_URL})
fi
if [ "$VERSION" = "snapshot" ]; then
tar --zstd -xf ${BUILDDIR}/${IMAGEBUILDER_NAME}.${ARCHIVE_EXT} -C ${BUILDDIR}/
else
tar xfJ ${BUILDDIR}/${IMAGEBUILDER_NAME}.${ARCHIVE_EXT} -C ${BUILDDIR}/
fi
fi
COMBINED_PACKAGE_LIST="`echo ${REMOVED_PACKAGES}` `echo ${BASE_PACKAGES}` `echo ${EXTRA_PACKAGES}`"
echo "Combined package list ${COMBINED_PACKAGE_LIST}"
CORES=$(nproc)
# Add these lines just before the final make command
echo "Copying custom files..."
cp -r $(pwd)/files ${BUILDDIR}/${IMAGEBUILDER_NAME}/
# Determine architecture based on platform/type
case "${PLATFORM}-${TYPE}" in
"ath79-generic")
BLOSSOM_ARCH="mips_24kc"
;;
"mediatek-filogic")
BLOSSOM_ARCH="aarch64_cortex-a53"
;;
*)
echo "Unsupported platform-type combination for blossom downloads: ${PLATFORM}-${TYPE}"
exit 1
;;
esac
# Create packages directory in image builder
PACKAGES_DIR="${BUILDDIR}/${IMAGEBUILDER_NAME}/packages/local"
mkdir -p "${PACKAGES_DIR}"
# Download IPK files using blossom_download.py
echo "Downloading IPK files for architecture ${BLOSSOM_ARCH}..."
python3 $(pwd)/blossom_download.py "${PACKAGES_DIR}" "${BLOSSOM_ARCH}"
# Generate package index
echo "Generating package index..."
(cd ${BUILDDIR}/${IMAGEBUILDER_NAME} && \
sudo bash -c 'mkhash() { if [ "$1" = "sha256" ]; then sha256sum "$2" | cut -d" " -f1; else sha256sum "$1" | cut -d" " -f1; fi; }; \
export -f mkhash; \
export MKHASH=mkhash; \
./scripts/ipkg-make-index.sh packages/local > packages/local/Packages && \
gzip -9c packages/local/Packages > packages/local/Packages.gz')
# Add tollgate packages to the package list
TOLLGATE_PACKAGES="\
"
# tollgate-module-whoami-go \
# Update the combined package list to include tollgate packages
COMBINED_PACKAGE_LIST="${COMBINED_PACKAGE_LIST} ${TOLLGATE_PACKAGES}"
# Replace the build command and error checking with:
echo "Building ${VERSION} using ${CORES} cores..."
BUILD_OUTPUT=$(cd ${BUILDDIR}/${IMAGEBUILDER_NAME} && \
sudo make -j${CORES} image PROFILE="$PROFILE" \
PACKAGES="$COMBINED_PACKAGE_LIST" \
FILES="${BUILDDIR}/${IMAGEBUILDER_NAME}/files" 2>&1 | tee >(cat))
echo "${BUILD_OUTPUT}"
# Check for common error patterns
if echo "$BUILD_OUTPUT" | grep -q "Failed to open firmware file"; then
echo "Error: Build failed - firmware file creation error"
exit 1
fi
if echo "$BUILD_OUTPUT" | grep -q "No such file or directory"; then
echo "Error: Build failed - missing files"
exit 1
fi
# Extract the filesystem size from the output
FILESYSTEM_SIZE=$(echo "$BUILD_OUTPUT" | grep "Filesystem size" | grep -o '[0-9.]\+ Kbytes' | awk '{print $1/1024}')
# After the build command, add:
OUTPUT_FILE="${BUILDDIR}/${IMAGEBUILDER_NAME}/bin/targets/${PLATFORM}/${TYPE}/openwrt-${VERSION}-${TARGET_DEVICE}-${PROFILE}-squashfs-sysupgrade.bin"
if [ ! -f "$OUTPUT_FILE" ]; then
echo "Error: Build failed - output file not created"
exit 1
fi
echo "Build successful! Firmware image created at:"
echo "Image size (${FILESYSTEM_SIZE}MB)"
echo "${OUTPUT_FILE}"
echo
echo "To deploy, use:"
echo "scp -O ${BUILDDIR}/${IMAGEBUILDER_NAME}/bin/targets/${PLATFORM}/${TYPE}/openwrt-${VERSION}-${TARGET_DEVICE}-${PROFILE}-squashfs-sysupgrade.bin root@<dest>:/tmp"
```
Please add a section for `glinet,gl-ar300m-nor` to the above script without removing whats already there, since that might be useful for one of the other routers that I have..
--------
## Answer
I'll add a new case for the `glinet,gl-ar300m-nor` device. You'll need to add this within the case statement, alongside the other device configurations:
```bash
"gl-ar300m-nor")
PLATFORM=ath79
TYPE=generic
TARGET_DEVICE=ath79-generic
PROFILE=glinet_gl-ar300m-nor
EXTRA_PACKAGES="\
uboot-envtools \
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
```
Also, you'll need to update the usage message in the default case (*) to include the new option. Change this line:
```bash
*)
echo "specify build target (gl-mt300n-v2, gl-ar300m, gl-mt3000, gl-mt6000, gl-e750, archer_mr200, gl-ar300m-nor)"
exit 1
;;
```
The configuration for `gl-ar300m-nor` is similar to the regular `gl-ar300m` since they share the same basic hardware, but they differ in their flash memory configuration. The "nor" variant uses NOR flash memory instead of NAND flash memory. You can now build for this specific variant by running:
```bash
./build-firmware gl-ar300m-nor
```
## Followup
```
make: *** [Makefile:260: image] Error 2
make: *** [Makefile:260: image] Error 2'
+ grep -q 'No such file or directory'
++ echo 'Profile "glinet_gl-ar300m-nor" does not exist!
Profile "glinet_gl-ar300m-nor" does not exist!
Use "make info" to get a list of available profile names.
Use "make info" to get a list of available profile names.
```
As you can see above, my build script still seems to be wrong. Here is some related information from the openwrt page about this router:
```
### Info[](
|Brand|Model|Version|Device Type|Availability|Supported Since Commit|Supported Since Rel|Supported Current Rel|Unsupported Functions|Bootloader|Target|CPU MHz|Flash MB|RAM MB|Switch|Ethernet 100M ports|Ethernet 1Gbit ports|Comments network ports|Modem|VLAN|WLAN 2.4GHz|WLAN 5.0GHz|WLAN Hardware|WLAN Comments|Detachable Antennas|USB ports|SATA ports|Comments USB SATA ports|Serial|JTAG|LED count|Button count|Power Supply||OWrt Forum Topic URL|WikiDevi URL|OEM Device Homepage URL|Firmware OEM Stock URL|Firmware OpenWrt Install URL|Firmware OpenWrt Upgrade URL|Comments|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|GL.iNet|GL-AR300M|v1.4.0|WiFi Router|Available 2020|`[d963ddf0424a](https://git.lede-project.org/?p=source.git;a=commit;h=d963ddf0424a551e5fadd561c934bfdb5d198764)`|[17.01.0](https://openwrt.org/releases/17.01.0 "releases:17.01.0")|[23.05.5]( "releases:23.05.5")|NAND flash not supported until after 19.07.x, must be forced into booting from NOR flash|U-Boot|[ar71xx-ath79]( "docs:techref:targets:ar71xx-ath79")|650|16, 128NAND|128|Qualcomm Atheros QCA9531|2|-||-|Yes|b/g/n|-|Qualcomm Atheros QCA9531|"-EXT" suffix has 2 detachable Antennas (RP-SMA)|-|1x 2.0|-||Yes|No|3|2|5 VDC, 2.0 A (µUSB)|[Edit]( "toh:hwdata:gl.inet:gl.inet_gl-ar300m")|[Discourse: gl-ar300m-sysupgrade-problem](https://forum.openwrt.org/t/gl-ar300m-sysupgrade-problem/1812), [Discourse: howto-upgrade-the-preinstalled-openwrt-lede-17-01-firmware-in-the-gl-ar300m-router](https://forum.openwrt.org/t/howto-upgrade-the-preinstalled-openwrt-lede-17-01-firmware-in-the-gl-ar300m-router/21129)|[WikiDevi: GL.iNet_GL-AR300M](https://wikidevi.wi-cat.ru/GL.iNet_GL-AR300M)|[gl-inet.com](https://www.gl-inet.com/products/gl-ar300m/)|[OEM Firmware]( image](https://downloads.openwrt.org/releases/23.05.5/targets/ath79/nand/)|[Sysupgrade image](https://downloads.openwrt.org/releases/23.05.5/targets/ath79/nand/)|Flashing to the 128MB NAND flash is supported in Snapshot ath79 at time of writing, removable external antennas on "ext" variant|
|GL.iNet|GL-AR300M16||WiFi Router|Available 2024|`[b591cabd3989](https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=b591cabd3989b44cfaf15248af9e55a0300a9c0a)`|[21.02.0](https://openwrt.org/releases/21.02.0 "releases:21.02.0")|[23.05.5]( "releases:23.05.5")||U-Boot|[ath79]( "docs:techref:targets:ath79")|650|16|128|Qualcomm QCA9531|2|-||-|Yes|b/g/n|-|Qualcomm QCA9531|GL-AR300M16-Ext variant has 2 detachable antennas (RP-SMA)|-|1x 2.0|-||Yes|No|3|2|5V/1A, microUSB|[Edit]( "toh:hwdata:gl.inet:gl.inet_gl-ar300m16")||[WikiDevi: GL.iNet_GL-AR300M](https://wikidevi.wi-cat.ru/GL.iNet_GL-AR300M)|[gl-inet.com](https://www.gl-inet.com/products/gl-ar300m/)|[OEM Firmware]( image](https://downloads.openwrt.org/releases/23.05.5/targets/ath79/generic/openwrt-23.05.5-ath79-generic-glinet_gl-ar300m16-initramfs-kernel.bin)|[Sysupgrade image](https://downloads.openwrt.org/releases/23.05.5/targets/ath79/generic/openwrt-23.05.5-ath79-generic-glinet_gl-ar300m16-squashfs-sysupgrade.bin)||
```
Does this information help to identify what needs to go in the build script?
## Answer
It looks like OpenWrt does not actually define a “glinet_gl-ar300m-nor” profile name. Instead, the NOR version of the GL-AR300M is referred to as “glinet_gl-ar300m16.” So, if you want to build for the device’s NOR flash, you will need a case matching that existing OpenWrt profile.
Below is an example of how you can add a “gl-ar300m-nor” option to your script (so that you can pass “gl-ar300m-nor” on the command line), while internally using the “glinet_gl-ar300m16” profile. Note that you are not removing anything you already have; you’re simply adding a new case for the sake of building the NOR variant:
```bash
"gl-ar300m-nor")
PLATFORM=ath79
TYPE=generic
TARGET_DEVICE=ath79-generic
PROFILE=glinet_gl-ar300m16
EXTRA_PACKAGES="\
uboot-envtools \
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
```
Also modify your default usage message to include “gl-ar300m-nor” as an option:
```bash
*)
echo "specify build target (gl-mt300n-v2, gl-ar300m, gl-ar300m-nor, gl-mt3000, gl-mt6000, gl-e750, or archer_mr200)"
exit 1
;;
```
If you invoke your script as:
» ./build-firmware gl-ar300m-nor
it will now use the “glinet_gl-ar300m16” profile (which is the correct NOR-only OpenWrt image for AR300M devices).
## Followup
Ok, now I think I have duplicates. The nor and nand versions both end in `m16`. How can I fix this?
```
"gl-ar300m")
PLATFORM=ath79
TYPE=generic
TARGET_DEVICE=ath79-generic
PROFILE=glinet_gl-ar300m16
EXTRA_PACKAGES="\
uboot-envtools \
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
"gl-ar300m-nor")
PLATFORM=ath79
TYPE=generic
TARGET_DEVICE=ath79-generic
PROFILE=glinet_gl-ar300m16
EXTRA_PACKAGES="\
uboot-envtools \
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
```
## Answer
Looking at the OpenWrt device info you shared, the NAND version should use the `ath79/nand` target while the NOR version uses `ath79/generic`. Here's how to correctly differentiate between the two versions:
```bash
"gl-ar300m") # NAND version
PLATFORM=ath79
TYPE=nand
TARGET_DEVICE=ath79-nand
PROFILE=glinet_gl-ar300m
EXTRA_PACKAGES="\
uboot-envtools \
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
"gl-ar300m-nor") # NOR version (16MB flash)
PLATFORM=ath79
TYPE=generic
TARGET_DEVICE=ath79-generic
PROFILE=glinet_gl-ar300m16
EXTRA_PACKAGES="\
uboot-envtools \
kmod-usb2 \
kmod-usb-core \
kmod-usb-storage \
luci \
luci-ssl \
iwinfo \
wpad-wolfssl \
"
REMOVED_PACKAGES="\
-odhcpd \
-odhcpd-ipv6only \
-wpad-basic-wolfssl \
-wpad-basic-mbedtls \
-wpad-mini \
"
;;
```
The key differences are:
1. NAND version uses `TYPE=nand` and `TARGET_DEVICE=ath79-nand`
2. NAND version uses `PROFILE=glinet_gl-ar300m`
3. NOR version uses `TYPE=generic` and `TARGET_DEVICE=ath79-generic`
4. NOR version uses `PROFILE=glinet_gl-ar300m16`
This should now correctly build for both variants of the router.
Testing to determine if you are a bot!
Testing to determine if you are a bot!
Testing to determine if you are a bot!
Testing to determine if you are a bot!
GL.iNet download center
Testing to determine if you are a bot!
Testing to determine if you are a bot!
Testing to determine if you are a bot!
GL.iNet download center
#### Open tasks
- [ ] investigate [support for other devices](https://github.com/OpenTollGate/tollgate-sdk/commit/1a9718556dbe8b6cecc36714d7982986862d27ef) - [testing required](
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](
- [x] Fixed `GOOS` and `GOARCH`
- [x] ready to add [our other go packages](https://njump.me/nevent1qqsfr7cv90sr7u00k4967yfucce576zc4892dt9qu5j6rpamwjw4xjgppemhxue69uhkummn9ekx7mp0qgswmfau3q22zvunk4etqh97aznddp60rwuq3ghcfnlrn9xnm7vy6xgrqsqqqqqp9vk9a5)
- [x] build all packages from custom feed
- [x] no longer require that the user specifies which package to build as a CLI argument to `build-firmeware`
- [x] Automate [upload to blossom](https://njump.me/nevent1qqsramr2agk02gm7zvefvs4myl9yjlx88mh8f7t69g554xsztad4znspzpmhxue69uhkummnw3ezumt0d5hsyg86u6zkjdqrlppxyrar37y79l0urmqtjh8ue24pnx7gl7ktwtfwsspsgqqqqqqs8vu68v) server
- [x] Facing [issues](https://njump.me/nevent1qqsf8xf4r7td2halxe7kgkppc66jw06tjlmjq8h34uxlxmlp3rlw35spz4mhxue69uhkummnw3ezummcw3ezuer9wchs4f943e) with `sattelite.earth`
- [x] uploads to other public blossom servers fine
- [x] created [events](https://njump.me/nevent1qqs90s57k22ktsf8vcmdks2x030xrxn64h9cctjfh9lpl77n9kqnuqgpzpmhxue69uhkummnw3ezumt0d5hsyg8d577gs99pxwfm2u4stjlw3fkksa83hwqg5tuyel3ejnfalxzdrypsgqqqqqqsn6lf7c) that map commit hashes and binary checksums to blossom servers that store the binaries
- [x] [include all binaries](https://github.com/OpenTollGate/tollgate-image-builder/pull/4) in image
- [x] the binaries are included, but the image seems to be too large sometimes
- [x] figuring out [what the problem is](https://njump.me/nevent1qqsz24ahpxt47c7xv9ehy7kga3qmfed3cjkqljvgslamwnuenmutmmcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcdwre6e) and fixing the user output
- [x] test sysupgrade image on `GL-MT3000`
- [x] Updated `init.d`, waiting for OS upgrade to complete so that I can resolve [this error](https://njump.me/nevent1qqstv0dsr0tvezmuurydelwnzj7n2emjyecg9a0lp8gcuhwft32fnqcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcrae7kt)
- [ ] Test `ipks` on GL-AR300m
- [ ] Perhaps there is an issue with the arch?
`GOOS=linux GOARCH=mips CGO_ENABLED=0 go build -ldflags="-s -w"`
**Confirmed:**
```
root@GL-AR300M:/tmp# opkg install whoami.ipk
Unknown package 'tollgate-module-whoami-go'.
Collected errors:
* pkg_hash_check_unresolved: cannot find dependency golang for tollgate-module-whoami-go
* pkg_hash_fetch_best_installation_candidate: Packages for tollgate-module-whoami-go found, but incompatible with the architectures configured
* opkg_install_cmd: Cannot install package tollgate-module-whoami-go. ```
- [ ] Perhaps [this](View quoted note →) is progress
- [ ] Generate an image successfully without any of the go stuff
- [ ] Maybe I should have been testing on the router with the external antennas. Maybe these routers [are different](View quoted note →)..
- [ ] Install the `whoami` module manually using the ipk - also test with the `relay` module since the changes to `golang.mk` affect both packages, but the changes to the `relay`'s make file only affect the relay
- [ ] Cry and go back to messing with the Makefile in the SDK if that doesn't work. Note that each package has its own Makefile, and
- [ ] Test `ipks` on GL-MT3000
- [ ] test sysupgrade image on `GL-AR300M`
- [ ] Compare with code that worked on previous commit of main
- [ ] Upload OpenWRT image to blossom as well
- [ ] **make captive portal front-end work again & improve new image -- Working on this one**
- [ ] test the install step of makefiles and use that to configure programs
- [ ] would like to switch to [local golang](
for better reproducibility across build environment, branch: `with_golang_feed`
- [ ] would like to start using actions so that we can use this [runner](View article →)
- [ ] Make installer for `ipk` and `sysupgrade` files from blossom
noStrudel
A simple nostr web client focused on exploring nostr
GitHub
fix_golang_mk (#3) · OpenTollGate/custom-nostr-feed-decomissioned@278cf41
- [x] Fixed `GOOS` and `GOARCH`
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](https://github.com/OpenTollGate/custom-nostr-fee...
GitHub
custom-nostr-feed-decomissioned/tollgate-module-relay-go/Makefile at 9cd211abcfc964f26a900c2bdacefa931be4d051 · OpenTollGate/custom-nostr-feed-decomissioned
A custom openwrt feed for tollgate related packages - OpenTollGate/custom-nostr-feed-decomissioned
```
Writing to '6051c63e-6c7c-41fa-9ae6-509e216dbcfa?X-Amz-Algorithm=AWS4-HMAC-SHA256'
6051c63e-6c7c-41fa-9 100% |*******************************| 7040k 0:00:00 ETA
Download completed (7209781 bytes)
root@GL-AR300M:/tmp# sysupgrade -n 6051c63e-6c7c-41fa-9ae6-509e216dbcfa\?X-Amz-Algorithm=A
WS4-HMAC-SHA256
Mon Jan 27 19:54:18 UTC 2025 upgrade: Device glinet,gl-ar300m-nor not supported by this image
Mon Jan 27 19:54:18 UTC 2025 upgrade: Supported devices: glinet,gl-ar300m16 gl-ar300m
Image check failed.
```
#### Open tasks -- aaargh
- [ ] investigate [support for other devices](https://github.com/OpenTollGate/tollgate-sdk/commit/1a9718556dbe8b6cecc36714d7982986862d27ef) - [testing required](
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](
- [x] Fixed `GOOS` and `GOARCH`
- [x] ready to add [our other go packages](https://njump.me/nevent1qqsfr7cv90sr7u00k4967yfucce576zc4892dt9qu5j6rpamwjw4xjgppemhxue69uhkummn9ekx7mp0qgswmfau3q22zvunk4etqh97aznddp60rwuq3ghcfnlrn9xnm7vy6xgrqsqqqqqp9vk9a5)
- [x] build all packages from custom feed
- [x] no longer require that the user specifies which package to build as a CLI argument to `build-firmeware`
- [x] Automate [upload to blossom](https://njump.me/nevent1qqsramr2agk02gm7zvefvs4myl9yjlx88mh8f7t69g554xsztad4znspzpmhxue69uhkummnw3ezumt0d5hsyg86u6zkjdqrlppxyrar37y79l0urmqtjh8ue24pnx7gl7ktwtfwsspsgqqqqqqs8vu68v) server
- [x] Facing [issues](https://njump.me/nevent1qqsf8xf4r7td2halxe7kgkppc66jw06tjlmjq8h34uxlxmlp3rlw35spz4mhxue69uhkummnw3ezummcw3ezuer9wchs4f943e) with `sattelite.earth`
- [x] uploads to other public blossom servers fine
- [x] created [events](https://njump.me/nevent1qqs90s57k22ktsf8vcmdks2x030xrxn64h9cctjfh9lpl77n9kqnuqgpzpmhxue69uhkummnw3ezumt0d5hsyg8d577gs99pxwfm2u4stjlw3fkksa83hwqg5tuyel3ejnfalxzdrypsgqqqqqqsn6lf7c) that map commit hashes and binary checksums to blossom servers that store the binaries
- [x] [include all binaries](https://github.com/OpenTollGate/tollgate-image-builder/pull/4) in image
- [x] the binaries are included, but the image seems to be too large sometimes
- [x] figuring out [what the problem is](https://njump.me/nevent1qqsz24ahpxt47c7xv9ehy7kga3qmfed3cjkqljvgslamwnuenmutmmcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcdwre6e) and fixing the user output
- [x] test sysupgrade image on `GL-MT3000`
- [x] Updated `init.d`, waiting for OS upgrade to complete so that I can resolve [this error](https://njump.me/nevent1qqstv0dsr0tvezmuurydelwnzj7n2emjyecg9a0lp8gcuhwft32fnqcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcrae7kt)
- [ ] Test `ipks` on GL-AR300m
- [ ] Perhaps there is an issue with the arch?
`GOOS=linux GOARCH=mips CGO_ENABLED=0 go build -ldflags="-s -w"`
**Confirmed:**
```
root@GL-AR300M:/tmp# opkg install whoami.ipk
Unknown package 'tollgate-module-whoami-go'.
Collected errors:
* pkg_hash_check_unresolved: cannot find dependency golang for tollgate-module-whoami-go
* pkg_hash_fetch_best_installation_candidate: Packages for tollgate-module-whoami-go found, but incompatible with the architectures configured
* opkg_install_cmd: Cannot install package tollgate-module-whoami-go.
```
- [ ] Perhaps [this](View quoted note →) is progress
- [ ] Generate an image successfully without any of the go stuff
- [ ] Install the `whoami` module manually using the ipk - also test with the `relay` module since the changes to `golang.mk` affect both packages, but the changes to the `relay`'s make file only affect the relay
- [ ] Cry and go back to messing with the Makefile in the SDK if that doesn't work. Note that each package has its own Makefile, and
- [ ] Test `ipks` on GL-MT3000
- [ ] test sysupgrade image on `GL-AR300M`
- [ ] Compare with code that worked on previous commit of main
- [ ] Upload OpenWRT image to blossom as well
- [ ] **make captive portal front-end work again & improve new image -- Working on this one**
- [ ] test the install step of makefiles and use that to configure programs
- [ ] would like to switch to [local golang](
for better reproducibility across build environment, branch: `with_golang_feed`
- [ ] would like to start using actions so that we can use this [runner](View article →)
- [ ] Make installer for `ipk` and `sysupgrade` files from blossom
noStrudel
A simple nostr web client focused on exploring nostr
GitHub
fix_golang_mk (#3) · OpenTollGate/custom-nostr-feed-decomissioned@278cf41
- [x] Fixed `GOOS` and `GOARCH`
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](https://github.com/OpenTollGate/custom-nostr-fee...
GitHub
custom-nostr-feed-decomissioned/tollgate-module-relay-go/Makefile at 9cd211abcfc964f26a900c2bdacefa931be4d051 · OpenTollGate/custom-nostr-feed-decomissioned
A custom openwrt feed for tollgate related packages - OpenTollGate/custom-nostr-feed-decomissioned
It looks like the build is now failing because the Go module setup is missing in the build directory. In your diff, you removed the “Build/Prepare” step that created a go.mod and ran go mod init, go mod tidy, etc. Without that, the build system no longer sees a valid Go module in the directory, causing the error “go.mod file not found in current directory or any parent directory.”
Below is how you can fix it:
--------------------------------------------------------------------------------
1. Restore or Update Your “Build/Prepare” Step
--------------------------------------------------------------------------------
If your remote repository does not already contain a go.mod file at its root, you must recreate the step that initializes and configures the module. For example:
define Build/Prepare
$(call Build/Prepare/Default)
# Copy the actual Go code into PKG_BUILD_DIR
mkdir -p $(PKG_BUILD_DIR)/src
$(CP) $(PKG_BUILD_DIR)/src/* $(PKG_BUILD_DIR)/
# Initialize go.mod in PKG_BUILD_DIR, then tidy
cd $(PKG_BUILD_DIR) && \
rm -f go.mod go.sum && \
go mod init tollgate-module-relay-go && \
go mod tidy && \
go get github.com/fiatjaf/khatru && \
go get github.com/nbd-wtf/go-nostr
endef
The above snippet:
• Copies your source code into PKG_BUILD_DIR.
• Creates a local go.mod and run go mod tidy so the build recognizes the module.
Then, the Build/Compile step can work in the same directory:
define Build/Compile
cd $(PKG_BUILD_DIR) && \
$(GO_COMPILE_FLAGS) \
go build \
-trimpath \
-ldflags="$(GO_PKG_LDFLAGS)" \
-o $(PKG_BUILD_DIR)/tollgate-relay main.go
endef
--------------------------------------------------------------------------------
2. If Your Repository Already Has a go.mod
--------------------------------------------------------------------------------
If you have a go.mod in your remote repo at its top level, you can do two things:
• Remove the manual go mod init / go mod tidy from Build/Prepare entirely.
• Adjust the Build/Compile step to ensure main.go is built from the repository root. In other words, make sure PKG_BUILD_DIR actually contains the repository structure (including the go.mod).
--------------------------------------------------------------------------------
3. Double-Check File Locations
--------------------------------------------------------------------------------
Make sure that:
• Your main.go file is at the top of PKG_BUILD_DIR (or you adjust go build path accordingly).
• If go.mod is part of the repo, it is also at the same level, or you cd into the correct folder for the build.
--------------------------------------------------------------------------------
4. Keep Both MIPS And ARM64 Support
--------------------------------------------------------------------------------
These Prepare steps do not affect the multi-architecture support in golang.mk. You can still compile for both routers as before. Just ensure that each architecture either sees a valid go.mod or has the Build/Prepare logic to create one.
Putting it all together:
• Either restore the module-initializing Build/Prepare snippet if your repo doesn’t contain a go.mod.
• Or place your code such that go.mod is recognized at PKG_BUILD_DIR so the “go build” command doesn’t complain about “go.mod file not found.”
With these changes, you can keep the new multi-architecture logic in golang.mk and still compile successfully for both GL-AR300M and GL-MT3000.
#### Open tasks
- [ ] investigate [support for other devices](https://github.com/OpenTollGate/tollgate-sdk/commit/1a9718556dbe8b6cecc36714d7982986862d27ef) - [testing required](
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](
- [x] Fixed `GOOS` and `GOARCH`
- [x] ready to add [our other go packages](https://njump.me/nevent1qqsfr7cv90sr7u00k4967yfucce576zc4892dt9qu5j6rpamwjw4xjgppemhxue69uhkummn9ekx7mp0qgswmfau3q22zvunk4etqh97aznddp60rwuq3ghcfnlrn9xnm7vy6xgrqsqqqqqp9vk9a5)
- [x] build all packages from custom feed
- [x] no longer require that the user specifies which package to build as a CLI argument to `build-firmeware`
- [x] Automate [upload to blossom](https://njump.me/nevent1qqsramr2agk02gm7zvefvs4myl9yjlx88mh8f7t69g554xsztad4znspzpmhxue69uhkummnw3ezumt0d5hsyg86u6zkjdqrlppxyrar37y79l0urmqtjh8ue24pnx7gl7ktwtfwsspsgqqqqqqs8vu68v) server
- [x] Facing [issues](https://njump.me/nevent1qqsf8xf4r7td2halxe7kgkppc66jw06tjlmjq8h34uxlxmlp3rlw35spz4mhxue69uhkummnw3ezummcw3ezuer9wchs4f943e) with `sattelite.earth`
- [x] uploads to other public blossom servers fine
- [x] created [events](https://njump.me/nevent1qqs90s57k22ktsf8vcmdks2x030xrxn64h9cctjfh9lpl77n9kqnuqgpzpmhxue69uhkummnw3ezumt0d5hsyg8d577gs99pxwfm2u4stjlw3fkksa83hwqg5tuyel3ejnfalxzdrypsgqqqqqqsn6lf7c) that map commit hashes and binary checksums to blossom servers that store the binaries
- [x] [include all binaries](https://github.com/OpenTollGate/tollgate-image-builder/pull/4) in image
- [x] the binaries are included, but the image seems to be too large sometimes
- [x] figuring out [what the problem is](https://njump.me/nevent1qqsz24ahpxt47c7xv9ehy7kga3qmfed3cjkqljvgslamwnuenmutmmcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcdwre6e) and fixing the user output
- [x] test sysupgrade image on `GL-MT3000`
- [x] Updated `init.d`, waiting for OS upgrade to complete so that I can resolve [this error](https://njump.me/nevent1qqstv0dsr0tvezmuurydelwnzj7n2emjyecg9a0lp8gcuhwft32fnqcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcrae7kt)
- [ ] Test `ipks` on GL-AR300m
- [ ] Perhaps there is an issue with the arch?
`GOOS=linux GOARCH=mips CGO_ENABLED=0 go build -ldflags="-s -w"`
- [ ] Test `ipks` on GL-MT3000
- [ ] test sysupgrade image on `GL-AR300M`
- [ ] Compare with code that worked on previous commit of main
- [ ] Upload OpenWRT image to blossom as well
- [ ] **make captive portal front-end work again & improve new image -- Working on this one**
- [ ] test the install step of makefiles and use that to configure programs
- [ ] would like to switch to [local golang](
for better reproducibility across build environment, branch: `with_golang_feed`
- [ ] would like to start using actions so that we can use this [runner](View article →)
- [ ] Make installer for `ipk` and `sysupgrade` files from blossom
noStrudel
A simple nostr web client focused on exploring nostr
GitHub
fix_golang_mk (#3) · OpenTollGate/custom-nostr-feed-decomissioned@278cf41
- [x] Fixed `GOOS` and `GOARCH`
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](https://github.com/OpenTollGate/custom-nostr-fee...
GitHub
custom-nostr-feed-decomissioned/tollgate-module-relay-go/Makefile at 9cd211abcfc964f26a900c2bdacefa931be4d051 · OpenTollGate/custom-nostr-feed-decomissioned
A custom openwrt feed for tollgate related packages - OpenTollGate/custom-nostr-feed-decomissioned
#### Open tasks
- [ ] investigate [support for other devices](https://github.com/OpenTollGate/tollgate-sdk/commit/1a9718556dbe8b6cecc36714d7982986862d27ef) - [testing required](
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](
- [x] Fixed `GOOS` and `GOARCH`
- [x] ready to add [our other go packages](https://njump.me/nevent1qqsfr7cv90sr7u00k4967yfucce576zc4892dt9qu5j6rpamwjw4xjgppemhxue69uhkummn9ekx7mp0qgswmfau3q22zvunk4etqh97aznddp60rwuq3ghcfnlrn9xnm7vy6xgrqsqqqqqp9vk9a5)
- [x] build all packages from custom feed
- [x] no longer require that the user specifies which package to build as a CLI argument to `build-firmeware`
- [x] Automate [upload to blossom](https://njump.me/nevent1qqsramr2agk02gm7zvefvs4myl9yjlx88mh8f7t69g554xsztad4znspzpmhxue69uhkummnw3ezumt0d5hsyg86u6zkjdqrlppxyrar37y79l0urmqtjh8ue24pnx7gl7ktwtfwsspsgqqqqqqs8vu68v) server
- [x] Facing [issues](https://njump.me/nevent1qqsf8xf4r7td2halxe7kgkppc66jw06tjlmjq8h34uxlxmlp3rlw35spz4mhxue69uhkummnw3ezummcw3ezuer9wchs4f943e) with `sattelite.earth`
- [x] uploads to other public blossom servers fine
- [x] created [events](https://njump.me/nevent1qqs90s57k22ktsf8vcmdks2x030xrxn64h9cctjfh9lpl77n9kqnuqgpzpmhxue69uhkummnw3ezumt0d5hsyg8d577gs99pxwfm2u4stjlw3fkksa83hwqg5tuyel3ejnfalxzdrypsgqqqqqqsn6lf7c) that map commit hashes and binary checksums to blossom servers that store the binaries
- [ ] **[include all binaries](https://github.com/OpenTollGate/tollgate-image-builder/pull/4) in image - working on this**
- [x] the binaries are included, but the image seems to be too large sometimes
- [x] figuring out [what the problem is](https://njump.me/nevent1qqsz24ahpxt47c7xv9ehy7kga3qmfed3cjkqljvgslamwnuenmutmmcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcdwre6e) and fixing the user output
- [x] test sysupgrade image on `GL-MT3000`
- [x] Updated `init.d`, waiting for OS upgrade to complete so that I can resolve [this error](https://njump.me/nevent1qqstv0dsr0tvezmuurydelwnzj7n2emjyecg9a0lp8gcuhwft32fnqcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcrae7kt)
- [ ] Test `ipks` on GL-AR300m
- [ ] Test `ipks` on GL-MT3000
- [ ] test sysupgrade image on `GL-AR300M`
- [ ] Compare with code that worked on previous commit of main
- [ ] **make captive portal front-end work again & improve new image -- Working on this one**
- [ ] test the install step of makefiles and use that to configure programs
- [ ] would like to switch to [local golang](
for better reproducibility across build environment, branch: `with_golang_feed`
- [ ] would like to start using actions so that we can use Arjen's runner
noStrudel
A simple nostr web client focused on exploring nostr
GitHub
fix_golang_mk (#3) · OpenTollGate/custom-nostr-feed-decomissioned@278cf41
- [x] Fixed `GOOS` and `GOARCH`
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](https://github.com/OpenTollGate/custom-nostr-fee...
GitHub
custom-nostr-feed-decomissioned/tollgate-module-relay-go/Makefile at 9cd211abcfc964f26a900c2bdacefa931be4d051 · OpenTollGate/custom-nostr-feed-decomissioned
A custom openwrt feed for tollgate related packages - OpenTollGate/custom-nostr-feed-decomissioned
#### Open tasks
- [ ] investigate [support for other devices](https://github.com/OpenTollGate/tollgate-sdk/commit/1a9718556dbe8b6cecc36714d7982986862d27ef) - [testing required](
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](
- [x] Fixed `GOOS` and `GOARCH`
- [x] ready to add [our other go packages](https://njump.me/nevent1qqsfr7cv90sr7u00k4967yfucce576zc4892dt9qu5j6rpamwjw4xjgppemhxue69uhkummn9ekx7mp0qgswmfau3q22zvunk4etqh97aznddp60rwuq3ghcfnlrn9xnm7vy6xgrqsqqqqqp9vk9a5)
- [x] build all packages from custom feed
- [x] no longer require that the user specifies which package to build as a CLI argument to `build-firmeware`
- [x] Automate [upload to blossom](https://njump.me/nevent1qqsramr2agk02gm7zvefvs4myl9yjlx88mh8f7t69g554xsztad4znspzpmhxue69uhkummnw3ezumt0d5hsyg86u6zkjdqrlppxyrar37y79l0urmqtjh8ue24pnx7gl7ktwtfwsspsgqqqqqqs8vu68v) server
- [x] Facing [issues](https://njump.me/nevent1qqsf8xf4r7td2halxe7kgkppc66jw06tjlmjq8h34uxlxmlp3rlw35spz4mhxue69uhkummnw3ezummcw3ezuer9wchs4f943e) with `sattelite.earth`
- [x] uploads to other public blossom servers fine
- [x] created [events](https://njump.me/nevent1qqs90s57k22ktsf8vcmdks2x030xrxn64h9cctjfh9lpl77n9kqnuqgpzpmhxue69uhkummnw3ezumt0d5hsyg8d577gs99pxwfm2u4stjlw3fkksa83hwqg5tuyel3ejnfalxzdrypsgqqqqqqsn6lf7c) that map commit hashes and binary checksums to blossom servers that store the binaries
- [ ] **[include all binaries](https://github.com/OpenTollGate/tollgate-image-builder/pull/4) in image - working on this**
- [x] the binaries are included, but the image seems to be too large sometimes
- [x] figuring out [what the problem is](https://njump.me/nevent1qqsz24ahpxt47c7xv9ehy7kga3qmfed3cjkqljvgslamwnuenmutmmcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcdwre6e) and fixing the user output
- [x] test sysupgrade image on `GL-MT3000`
- [x] Updated `init.d`, waiting for OS upgrade to complete so that I can resolve [this error](https://njump.me/nevent1qqstv0dsr0tvezmuurydelwnzj7n2emjyecg9a0lp8gcuhwft32fnqcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcrae7kt)
- [ ] Test `ipks` on GL-AR300m
- [ ] Test `ipks` on GL-MT3000
- [ ] test sysupgrade image on `GL-AR300M`
- [ ] Perhaps the problem is connected with this section?
- [ ] **make captive portal front-end work again & improve new image -- Working on this one**
- [ ] test the install step of makefiles and use that to configure programs
- [ ] would like to switch to [local golang](
for better reproducibility across build environment, branch: `with_golang_feed`
- [ ] would like to start using actions so that we can use Arjen's runner
noStrudel
A simple nostr web client focused on exploring nostr
GitHub
fix_golang_mk (#3) · OpenTollGate/custom-nostr-feed-decomissioned@278cf41
- [x] Fixed `GOOS` and `GOARCH`
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](https://github.com/OpenTollGate/custom-nostr-fee...
GitHub
custom-nostr-feed-decomissioned/tollgate-module-relay-go/Makefile at 9cd211abcfc964f26a900c2bdacefa931be4d051 · OpenTollGate/custom-nostr-feed-decomissioned
A custom openwrt feed for tollgate related packages - OpenTollGate/custom-nostr-feed-decomissioned
#### Open tasks
- [ ] investigate [support for other devices](https://github.com/OpenTollGate/tollgate-sdk/commit/1a9718556dbe8b6cecc36714d7982986862d27ef) - [testing required](
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](
- [x] Fixed `GOOS` and `GOARCH`
- [x] ready to add [our other go packages](https://njump.me/nevent1qqsfr7cv90sr7u00k4967yfucce576zc4892dt9qu5j6rpamwjw4xjgppemhxue69uhkummn9ekx7mp0qgswmfau3q22zvunk4etqh97aznddp60rwuq3ghcfnlrn9xnm7vy6xgrqsqqqqqp9vk9a5)
- [x] build all packages from custom feed
- [x] no longer require that the user specifies which package to build as a CLI argument to `build-firmeware`
- [x] Automate [upload to blossom](https://njump.me/nevent1qqsramr2agk02gm7zvefvs4myl9yjlx88mh8f7t69g554xsztad4znspzpmhxue69uhkummnw3ezumt0d5hsyg86u6zkjdqrlppxyrar37y79l0urmqtjh8ue24pnx7gl7ktwtfwsspsgqqqqqqs8vu68v) server
- [x] Facing [issues](https://njump.me/nevent1qqsf8xf4r7td2halxe7kgkppc66jw06tjlmjq8h34uxlxmlp3rlw35spz4mhxue69uhkummnw3ezummcw3ezuer9wchs4f943e) with `sattelite.earth`
- [x] uploads to other public blossom servers fine
- [x] created [events](https://njump.me/nevent1qqs90s57k22ktsf8vcmdks2x030xrxn64h9cctjfh9lpl77n9kqnuqgpzpmhxue69uhkummnw3ezumt0d5hsyg8d577gs99pxwfm2u4stjlw3fkksa83hwqg5tuyel3ejnfalxzdrypsgqqqqqqsn6lf7c) that map commit hashes and binary checksums to blossom servers that store the binaries
- [ ] Test `ipks` on GL-AR300m
- [ ] Test `ipks` on GL-MT3000
- [ ] **include all binaries in image - working on this**
- [x] the binaries are included, but the image seems to be too large sometimes
- [ ] figuring out [what the problem is](https://njump.me/nevent1qqsz24ahpxt47c7xv9ehy7kga3qmfed3cjkqljvgslamwnuenmutmmcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcdwre6e) and fixing the user output
- [ ] test sysupgrade image on `GL-MT3000`
- [ ] Updated `init.d`, waiting for OS upgrade to complete so that I can resolve [this error](https://njump.me/nevent1qqstv0dsr0tvezmuurydelwnzj7n2emjyecg9a0lp8gcuhwft32fnqcpzpmhxue69uhkummnw3ezumt0d5hsz9thwden5te0dehhxarj9ehhsarj9ejx2a30qyt8wumn8ghj7mmjv9hxwetn09hxxtn5v43kstcrae7kt)
- [ ] test sysupgrade image on `GL-AR300M`
- [ ] test the install step of makefiles and use that to configure programs
- [ ] would like to switch to [local golang](
for better reproducibility across build environment, branch: `with_golang_feed`
- [ ] would like to start using actions so that we can use Arjen's runner
- [ ] **make captive portal front-end work again & improve new image -- Working on this one**
noStrudel
A simple nostr web client focused on exploring nostr
GitHub
fix_golang_mk (#3) · OpenTollGate/custom-nostr-feed-decomissioned@278cf41
- [x] Fixed `GOOS` and `GOARCH`
- [x] Builds for both GL-AR300m and GL-MT3000 with [this change](https://github.com/OpenTollGate/custom-nostr-fee...
GitHub
custom-nostr-feed-decomissioned/tollgate-module-relay-go/Makefile at 9cd211abcfc964f26a900c2bdacefa931be4d051 · OpenTollGate/custom-nostr-feed-decomissioned
A custom openwrt feed for tollgate related packages - OpenTollGate/custom-nostr-feed-decomissioned
Can't resolve this error while the operating system is being upgraded..
```
~/TollGate/tollgate-image-builder$ ./build-firmware gl-mt3000
Combined package list -odhcpd -odhcpd-ipv6only -wpad-basic-wolfssl -wpad-basic-mbedtls -wpad-mini base-files busybox ca-bundle dnsmasq dropbear firewall4 fstools kmod-gpio-button-hotplug kmod-leds-gpio kmod-nft-offload libc libgcc libustream-mbedtls logd mtd netifd nftables odhcp6c opkg ppp ppp-mod-pppoe procd procd-seccomp procd-ujail swconfig uci uclient-fetch urandom-seed urngd openssh-sftp-server opennds travelmate luci-app-travelmate curl jshn jsonfilter rpcd rpcd-mod-rpcsys kmod-usb2 kmod-usb-core kmod-usb-storage luci luci-ssl iwinfo wpad-wolfssl
Copying custom files...
Downloading IPK files for architecture aarch64_cortex-a53...
Traceback (most recent call last):
File "~/TollGate/tollgate-image-builder/blossom_download.py", line 12, in <module>
from nostr.filter import Filter, Filters
ModuleNotFoundError: No module named 'nostr'
```