mat
1
Hi,
I am trying to compile a custom LEDE Image for GL-AR300M (NAND) with “[] Select all basic packages" and "[] Elliptic curve cryptography (ECC)” for dropbear using the new Repo: GitHub - gl-inet/lede-17.01: Cloning from https://git.lede-project.org/?p=source.git;a=summary and adding patches for GL's new devices to lede-17.01.
Also configured:
Subtarget (Generic devices with NAND flash)
Target Profile (GL-AR300M with nand flash)
But i have several issues while/after compiling.
1. Issue: wpad-mini conflicts wpad
Collected errors:
- check_data_file_clashes: Package wpad-mini wants to install file /opt/lede-1701/build_dir/target-mips_24kc_musl-1.1.16/root-ar71xx/usr/sbin/hostapd
But that file is already provided by package * wpad
- check_data_file_clashes: Package wpad-mini wants to install file /opt/lede-1701/build_dir/target-mips_24kc_musl-1.1.16/root-ar71xx/usr/sbin/wpa_supplicant
But that file is already provided by package * wpad
- check_data_file_clashes: Package wpad-mini wants to install file /opt/lede-1701/build_dir/target-mips_24kc_musl-1.1.16/root-ar71xx/usr/sbin/wpad
But that file is already provided by package * wpad
- opkg_install_cmd: Cannot install package wpad-mini.
Per default wpad-mini is selected. I have to uncheck wpad-mini in menuconfig to build successfully. Is this behavior expected?
2. Issue: strange webserver behavior:
After visiting 192.168.1.1 of my build, I get only a file download with the contents:
#!/usr/bin/lua
require “luci.cacheloader”
require “luci.sgi.cgi”
luci.dispatcher.indexcache = “/tmp/luci-indexcache”
luci.sgi.cgi.run()
Do you know which service is faulty or what went wrong? I tried to restart uhttpd, but no luck.
3. bootcount not resetting
after every NAND boot, bootcount is incrementing until it reaches 3. Then of course it will boot to NOR and i have to power cycle to get back to NAND.
Do i have to enable crond or something else to get this working?
Thanks for your help.
alzhao
2
The problem is caused by the menuconfig.
Please select only wpad or wpad-mini
Please deselect lighttpd, which need to configure. If not configured, the behavior will be download the cgi
Just set boot count to zero in /etc/rc.local and it will solve this.
mat
3
Thanks for your prompt reply.
Deselecting lighttpd solved the problem with luci.
I tried to set bootcount manually:
root@LEDE:~# fw_setenv bootcount 0
Can't open /dev/mtd1: Permission denied
Error: can't write fw_env to flash
Do i have to remount mtd1 rw? How is this done in stock? 
mat
4
I think I found I was looking for:
Menuconfig: Kernel Modules –> Other Modules –> <*> kmod-mtd-rw. Write-enabler for MTD partitions
mat
5
So after compiling with kmod-mtd-rw I insert the module with insmod mtd-rw i-want-a-brick=1 and can then run fw_setenv bootcount 0
But it seems to me not the best solution, as every mtd device is now RW.
I would appreciate some tips how to make only mtd1 RW after boot. Thanks
Edit: So after grepping through the repo with the kernel parameter I found some differences between the old repo (domino-team) and the new repo (gl-inet).
domino-team: target/linux/ar71xx/image/legacy.mk
gl-ar300md_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(reserved),64k(art);spi0.1:2048k(kernel),-(ubi)
gl-inet: target/linux/ar71xx/image/legacy.mk
gl-ar300md_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(reserved),64k(art)ro;spi0.1:2048k(kernel),-(ubi)
So removing the read only parameter from u-boot-env will probably solve the issues.
alzhao
6
yes need to remove the ro (readonly) for uboot env.