On 2015-12-07 17:57, Alexey Brodkin wrote: > Hi Felix, > > On Mon, 2015-12-07 at 17:49 +0100, Felix Fietkau wrote: >> On 2015-12-07 17:45, Alexey Brodkin wrote: >> > ARC SDP board sports only 1 network interface - eth0, >> > so to operate as an access point it requires at least >> > another interface (preferably wireless), >> > so USB Wi-Fi dongle is what we want. >> > >> > And with USB Wi-Fi dongle attached ARC SDP board could be >> > used as a "dumb" wireless access point. >> > >> > Now with modified network setup script it is only required >> > to enable wireless radio on the first boot with >> > -------------->8------------ >> > uci set wireless.radio0.disabled=0 >> > uci commit wireless >> > wifi >> > -------------->8------------ >> > >> > Note if by the time initscripts are executed USB Wi-Fi >> > dongle not yet recognized and set up by Linux kernel >> > its autodetection by "wifi" tool may not happen >> > automatically. In that case before issuing command above >> > one needs to populate /etc/config/wireless config: >> > -------------->8------------ >> > wifi detect > /etc/config/wireless >> > -------------->8------------ >> > >> > Signed-off-by: Alexey Brodkin <abrod...@synopsys.com> >> > Cc: Felix Fietkau <n...@openwrt.org> >> > Cc: Jo-Philipp Wich <j...@openwrt.org> >> > Cc: Jonas Gorski <j...@openwrt.org> >> > --- >> > >> > Changes compared to v1: >> > * Rebased on top of current master >> > >> > target/linux/arc770/base-files/etc/board.d/02_network | 1 + >> > 1 file changed, 1 insertion(+) >> > >> > diff --git a/target/linux/arc770/base-files/etc/board.d/02_network >> > b/target/linux/arc770/base >> > -files/etc/board.d/02_network >> > index cd5ad2d..7c74d2d 100755 >> > --- a/target/linux/arc770/base-files/etc/board.d/02_network >> > +++ b/target/linux/arc770/base-files/etc/board.d/02_network >> > @@ -11,6 +11,7 @@ board_config_update >> > case "$( arc_board_name )" in >> > "arc-sdp"*) >> > ucidef_set_interface_lan "eth0" "dhcp" >> > + uci set network.lan.type='bridge' >> board.d files should not be calling uci, and I don't think this line >> even works. By the way, I don't think such a change is needed anymore, >> did you test the current code as-is? > > Frankly I havent's tested it yet. > From that patch > http://git.openwrt.org/?p=openwrt.git;a=commitdiff;h=d0c35cbea6d55ddf2bff16e909ddf4feb6779aa5 > I was under impression that this is only a matter of where init scripts > were moved. Not quite. The new files use a different implementation of a similar API which doesn't generate any uci calls directly anymore. Instead, an intermediate file - /etc/board.json - is emitted, which gets used to generate the default config in a generic way.
> BTW I should have named that patch v3, because v2 was sitting in patchwork > for about 2 weeks already. And since "real" v2 patch does work, see > http://patchwork.ozlabs.org/patch/548641/ > (which is tested many times as of today) I floated "v3" right after rebase of > my local repo. > > Any thoughts how I may setup a bridge on eth0 in init scripts in board.d? Please test the current code, it should have a bridge automatically without any changes to the existing scripts. - Felix _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel