Installing OpenWRT on GL-750s


#1

I just did an openwrt build for my new AR750s, and tried to install it. The file I got from the build is this: openwrt-ar71xx-generic-gl-ar750s-squashfs-sysupgrade.bin

When I try to install this, I get an error from the router—it complains that the verification failed.

What is the correct way to build my own OpenWRT image to install?


#2

It is nand firmware for AR750S by default. If you build from OpenWRT official repo, it might be nor firmware, so you should upgrade it on u-boot web. Please refer to this tutorial https://docs.gl-inet.com/en/3/troubleshooting/debrick/.

If you want to build a nand firmware, you have to use our repo. https://github.com/gl-inet/openwrt


#3

Does this mean that it can’t access the NAND flash? Will you be upstreaming this functionality later?


#4

If you use buildroot from openwrt, it can’t build nand firmware, because we only push nor firmware patch to openwrt, while nand firmware includes proprietory driver, openwrt won’t accept the patch.


#5

OK. Is there a way to apply the patch to an OpenWRT build tree?


#6

openwrt snapshot does have and firmware

https://downloads.openwrt.org/snapshots/targets/ath79/nand/

But I never tried this.


#7

That’s actually only for the AR300. Does it use the same NAND device?


#8

My mistake, this is only for AR300M, not AR750s

AR750s only have Nor firmware from openwrt. Checking how to add to ath79.


#9

Let me know if you want a hand – just got my AR750S here and am getting a build tree up with the GL.iNet source to confirm I can build and flash before moving back to ath79 on master.


#10

If you can share it with us, it will be better.


#11

I’m doing this is well. Wher do we flash nand from, uboot as well?


#12

In case anyone is still watching this thread, a few things:

  1. I have successfully gotten a NAND image of Vanilla OpenWRT 18.06 working on my 750S. Given that 18.06 and GLi’s builds both use the same 4.9 kernel it was not overly difficult to do, just checkout 18.06 sources from OpenWRT repo and apply all of the changes commited on the GLI site from May 17/May 18 2018:
    https://github.com/gl-inet/openwrt/commits?author=luochongjun

  2. Doing the same thing on Trunk was far less successful since OpenWRT has since moved the targets along to 4.14 kernel instead of 4.9 and things do not apply cleanly. Additionally to do it properly we should be working on ath79 target instead of old ar71xx target… which means dealing with DTS etc. Good news is that somebody much smarter than me has already done most of the conversion to get NOR support in this target for this device… so in theory its just a question of making sure the patches for the SPI-NAND driver get updated properly, and then adjusting the rest of the build system to fit like #1) above did.
    Not sure if I have the time/skill/motivation to do that myself given 18.06 is working right now, but it looks to be reasonably possible at least?..


#13

Working on NAND DTS for the AR750S right now for the ath79 target. (The NOR target builds and runs from master, last tested on 2019-01-20)


#14

Awesome, did you have any luck getting the kernel SPI-NAND driver to work in 4.14? I tried it on the ar71xx target of trunk (figured make it work there then worry about getting stuff moved to new target) but the underlying MTD stuff has changed since 4.9 and even with some tweaking I couldn’t get it to detect the flash chip on the 750s. Or I just totally got it wrong lol

I assume adding NAND into the DTS is just a matter of adding the second SPI definition, like was done previously in the mach-gl-ar750s.c file? (just a guess)


#15

Hehe - working from OpenWRT master is kinda like playing with RedHat’s rawhide - eats babies for breakfast…

Hopefully support for NAND on this target is forthcoming - the 750S is a different SoC than the current dev ath79 target


#16

Huh? I agree that playing with trunk is like juggling twenty people working on the same thing at the same time, but in regards to your second comment @jeffsf (I assume… or somebody else started and he took over) already has working AR750S support in the ath79 target. The only thing missing is literally SPI-NAND driver and definition for NAND flash chip.


#17

No, I have AR300M-Lite, which is a NOR-only device, and the AR750S only for the NOR firmware running locally on the ath79 target on my changes based on OpenWrt master.

There are some challenges I’m seeing with the AR750S and NAND memory that I need to work through, some of which may involve work at the boot-loader level. I’ve got to dig into U-Boot and the stock AR750S boot-time parameters a little more deeply before forging ahead.


#18

Sorry Jeff my bad, I did a check out of openwrt master on Monday and saw the DTS file for the ar750s with the NOR definitions in there so assumed the changes you were talking about had been merged back in already. Have been using that build machine to focus on another project but if there’s anything I can do to help out feel free to shoot me a PM. (I have a fresh master trunk and a 750s with serial console hooked up and ready for playing/testing).


#19

A couple of updates that may be useful for anyone else working on this:

Serial, AR750S is "Deaf"

Two of the eBay-sourced “FTDI” adapters that I have used in the past with a variety of devices seem unable to drive the RX pin of the AR750S sufficiently or properly to send data to the device over serial. The serial pins appear to be 2.5 V logic. Using an Adafruit FTDI Friend resolved the issue.

Uploading Combined UBI Image Through U-Boot

The factory U-Boot doesn’t like post of *-factory.ubi, failing with

## Error: input file format error!
## Error: couldn't find start of data in next packet!

Creating a symlink to, for example, factory.bin allows use of

curl -v -F 'gl_firmware=@factory.bin' http://192.168.1.1/index.html

to upload NAND-based firmware (with the current GL.iNet U-Boot image).


No, it’s not booting completely yet and am working through challenges in getting the NAND driver to load. Edit: This may be due to there not being a NAND driver for the ath79 architecture. Looking into that now.

[    0.299727] ath79-spi 1f000000.spi: cs1 >= max 1
[    0.304503] spi_master spi0: spi_device register error /ahb/spi@1f000000/flash@1
[    0.312184] spi_master spi0: Failed to create SPI device for /ahb/spi@1f000000/flash@1

2019-01-28:

There are no NAND drivers for ath79 that are acceptable for upstream Linux or OpenWrt and it is exceptionally unlikely that there will be prior to Kernel 4.19 being adopted for ath79.

See, for example https://github.com/openwrt/openwrt/pull/1428


To be clear, OpenWrt NOR-based targets should be functional, when they are available.