I’d like to create a new openwrt build for the S1300 the same as I do with the B1300. When I try to configure the build using make menuconfig and the Target System (Qualcomm Atheros IPQ40XX), in the Target Profile I see GL.iNet B1300 but not GL.iNet S1300.
What do I need to do to product a new S1300 openwrt build?
I don’t have one of the ipq40xx-based, GL.iNet routers in my “stable”, unfortunately. sysupgrade -vmight provide more insight. Also, as sysupgrade is a shell script, so sh -x /sbin/sysupgrade ... is another tool (check the path, that’s from memory).
In my experience, errors like that are often from missing metadata in the image’s configuration, either in whole or, for example, SUPPORTED_DEVICES.
It is also possible that you have QSDK-based firmware running. Though based on an old version of OpenWrt, it has many differences that QCA have included, most of which are proprietary and source is not publicly available. I haven’t looked into the original GL.iNet firmware for the S1300. If the banner (or other files in /etc/) indicates “Barrier Breaker” or “Chaos Calmer”, you are likely running a QSDK-based build. There is nothing “wrong” with QSDK; in many cases it can outperform open-source firmware.
U-Boot is another option for flashing, perhaps a bit safer than blindly trying to “force” sysupgrade.
Not to sure how often the github mirror syncs up to the openwrt git repos… best to work off the git.openwrt.org directly if you’re keeping up with things.
I’ve been working off master for another target, and have a B1300 in-house, but running the QSDK build from gl-inet. QSDK is older, but as @jeffsf mentions, you get a lot in return, like working Wave2 wifi drivers, mesh, and wan/lan offload.
ipq40xx is a fairly complex chip compared to the ar9531/9331
S1300 is quite a bit different than B1300 - RAM/NOR sizes are different, have to account for the eMMC, and the BLE/Zigbee module, and this needs to be accounted for in uboot and device tree.
S1300 factory firmware is a QSDK build which is based on Chaos Calmer.
Currently sysupgrade is not working for flashing openwrt firmware.
Install S1300 openwrt via uboot web:
NB: need to flash transition image firstly, or it will be brick.
The transition image is s1300-factory-to-openwrt.img when you install openwrt. So first time installation you need to access uboot web twice. Afterwards, openwrt sysupgrade can be used.
Steps:
Push reset button and plug in power, wifi led will blink, release button when middle led light on
Set ip to 192.168.1.0/24 and use web browser to access http://192.168.1.1
Choose file s1300-factory-to-openwrt.img and click “Update Firmware” (Steps 3 will consume about 30 seconds, then):
Poweroff router
Repeat step 1, 2, and when step 3 choose your compiled openwrt firmware file and update firmware (When update finished, router will reboot automatically)
Why need transition image
The kernel and rootfs of factory firmware is on eMMC, and openwrt firmware is on NOR flash. The transition image includes U-boot and partition table, which decides where to load kernel and rootfs. After you install openwrt image, you can switch between factory and openwrt firmware by flashing transition image. Go back to factory firmware use transition image s1300-openwrt-to-factory.img
root@OpenWrt:/# opkg update
Downloading http://downloads.openwrt.org/snapshots/targets/ipq40xx/generic/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading http://downloads.openwrt.org/snapshots/targets/ipq40xx/generic/packages/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/base/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/freifunk/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_freifunk
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/freifunk/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/luci/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/packages/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/routing/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading http://downloads.openwrt.org/snapshots/packages/arm_cortex-a7_neon-vfpv4/telephony/Packages.sig
Signature check passed.
root@OpenWrt:/# opkg install bletool
Unknown package 'bletool'.
Collected errors:
* opkg_install_cmd: Cannot install package bletool.
root@OpenWrt:/#
Remember, i’ve compiled from openwrt instead from glinet.
I want to test BLE and Zigbee, i’ve 6 GL-S1300 with BLE & Zigbee modules
@hansome, you say in your pull request that has tested UART1 for BLE, SPI for zigbee. Is there a standard way to test? instructions here [OpenWrt Wiki] USB Bluetooth support does not works, hciconfig is empty
Compiling bletool for openwrt will report dependency error on gl-util package, that dependency could be removed later. I compile bletool and gl-util for openwrt, please check attachment. openwrt-bletool-ipk.zip (64.0 KB)
Please note, the first time installing gl-bletool you need reboot. For the following reason:
Before installing gl-bletool, you can check /etc/inittab, which sets /dev/ttyMSM1 as a debug console.
As procd will not release /dev/ttyMSM1 util next boot cycle. So it’s a conflict as /dev/ttyMSM1 is the UART interface talking to BLE module.
hciconfig doesn’t work, as bletool/README.md at master · gl-inet/bletool · GitHub tell,
"Different from BlueZ which includes the full Bluetooth protocol stack in the host system, bletool is a light weight tool to operate hostless BLE modules which has fully built-in protocol stack. "