[LEDE-DEV] ImageBuilder generated image does not create LED entries in /etc/config/system on first boot, why?

Laurent GUERBY laurent at guerby.net
Tue May 31 07:50:08 PDT 2016


On Tue, 2016-05-31 at 00:39 +0200, Laurent GUERBY wrote:
> Hi,
> 
> On a 841N v11 on current LEDE git with patch from (1) I'm trying to
> solve a puzzle:
> - when doing "make" the generated image in 
> bin/targets/ar71xx/generic/lede-ar71xx-generic-tl-wr841-v11-squashfs-sysupgrade.bin
> does create on first boot /etc/config/system 'led' entries and so
> the LED work as expected
> - whe using a script (2) based on the imagebuilder generated by the same
> "make" build (menuconfig activated)
> bin/targets/ar71xx/generic/LEDE-ImageBuilder-ar71xx-generic.Linux-x86_64.tar.bz2
> the image works but /etc/config/system is not populated with 'led'
> entries on first boot (or second boot I tried) so the LAN/WAN LED stay
> off (only power LED is on). If I populate manually /etc/config/system
> all works.
> 
> I couldn't find what script running on the router which generates
> the /etc/config/system led entries on first boot (where to look to debug
> this issue), I assume something is missing flag or package or kernel
> module in my imagebuilder (or make menuconfig) setup but I'm not able to
> find it. I did not have this issue with older versions of OpenWRT
> imagebuilder.
> 
> Any help appreciated,
> 
> Sincerely,
> 
> Laurent
> 
> (1) https://github.com/lede-project/source/pull/64
> (2)
> https://chiliproject.tetaneutral.net/projects/git-tetaneutral-net/repository/openwrt-tools/revisions/master/entry/quick_841n_ttn_lede.sh

Hi again,

Thanks to jow on IRC for pointing out /bin/board_detect which
has a test on /etc/config/network to decide wether or not to call
config_generate which creates the /etc/config/system
LED (amongst other things).

Since we use imagebuilder with FILES="..." to
generate /etc/config/network (and other things) for our WISP setup the
led configuration wasn't generated on first boot.

I assume a solution will be proposed soon.

Sincerely,

Laurent

root at lede:~# cat /bin/board_detect 
#!/bin/sh

[ -d "/etc/board.d/" -a ! -f "/etc/board.json" ] && {
	for a in `ls /etc/board.d/*`; do
		[ -x $a ] || continue;
		$(. $a)
	done
}

[ -f "/etc/board.json" ] || return 1
[ -f "/etc/config/network" ] || {
	touch /etc/config/network
	/bin/config_generate
}





More information about the Lede-dev mailing list