Foreword
Please be aware that any modification to your gateway, in particular a modification of U-Boot, may permanently brick
your device and is not covered by warranty.
Compiling the Software
Obtaining the Source Code
The source code of this project is maintained with git.
git clone --recurse-submodules <repository>
cd smart-garden-gateway-public
Optionally, specific versions can be checked out (7.8.1 in this case):
git checkout release/linux-system-7.8.1Older versions of the build system can be found in the history. However, only for the most recent master we intend to
ensure that the build works.
Source code packages for all distributed versions can be found here.
Prerequisites
- The Yocto build host packages need to be installed
Build Instructions
Article Number 19005 (MediaTek MT7688)
scripts/bbwrapper.sh mt7688 gardena-image-foss-bnw linux-yocto-tinyArticle Number 19000 (Atmel AT91SAM)
scripts/bbwrapper.sh at91sam gardena-image-foss-bnw linux-yocto-tinyRepository Layout
/Top level project./yocto/bitbake– the Bitbake build tool/yocto/openembedded-core– OpenEmbedded core layer/yocto/meta-mediatek– the MediaTek Board Support Package (BSP), used only for Art. No. 19005/yocto/meta-distribution– our own distribution (specifies packages to install)/yocto/meta-gardena– our own code (testing, WiFi provisioning, etc.)/yocto/meta-openembedded– Collection of layers for the OE-core universe/yocto/meta-readonly-rootfs-overlay– Writable rootfs overlay on top of a read-only rootfs/yocto/meta-swupdate– Update mechanism software/yocto/meta-atmel– our Atmel Board Support Package (BSP), used only for Art. No. 19000
Getting access
On both versions of the gateway, the UART port can be found on J7. Settings are 115200 8N1, the level is 3.3V.
Once connected, simply follow the instructions printed during startup.
Alternatively, right after powering up a gateway, pressing the 'X' key will grant access to the U-Boot shell.
Art. No. 19005
Art. No. 19000
Flashing
The easiest way to install a self-built kernel and rootfs is to fetch the images over the network from within U-Boot,
using TFTP.
Ideally, the TFTP server (e.g. tftp-hpa) and the DHCP server
(e.g. dnsmasq) run on the same machine, allowing the following steps to
work.
Article Number 19005 (MediaTek MT7688)
- Attach UBI device:
ubi part nand - Fetch kernel and rootfs via TFTP, store it in the active UBI partitions:
dhcp fitImage-gardena-sg-mt7688.bin && ubi write ${fileaddr} kernel${bootslot} ${filesize}dhcp gardena-image-foss-bnw-gardena-sg-mt7688.squashfs-xz && ubi write ${fileaddr} rootfs${bootslot} ${filesize}
- Prevent "updates" to proprietary image:
env set update_url updates-disabled && saveenv
(runenv set update_url && saveenvto re-enable updates) - Restart gateway:
reset
Article Number 19000 (Atmel AT91SAM)
- Attach UBI device:
ubi part ubi - Fetch kernel and rootfs via TFTP, store it in the active UBI partitions:
dhcp fitImage-gardena-sg-at91sam.bin && ubi write ${fileaddr} kernel${bootslot} ${filesize}dhcp gardena-image-foss-bnw-gardena-sg-at91sam.squashfs-xz && ubi write ${fileaddr} rootfs${bootslot} ${filesize}
- Prevent "updates" to proprietary image:
env set update_url updates-disabled && saveenv
(runenv set update_url && saveenvto re-enable updates) - Restart gateway:
reset
Proprietary Bits
It is possible to install the proprietary packages via OPKG by doing the following on the Linux shell:
- Update the OPKG feeds:
opkg update - Install the packages:
opkg install \ accessory-server \ cloudadapter \ fwrolloutd \ gateway-config-backend \ gateway-config-frontend \ lemonbeatd \ lwm2mserver - Reboot gateway:
reboot
Note:
The read-write filesystem is (currently) not large enough to contain all the above packages. It is possible to resize
the UBI volumes. However, that must be done with great care.

