[OpenWrt-Devel] ramips: add support for the Asus RP-N53 in the "02_network" boot script
diff mbox

Message ID 13273606.H2G5i5k09X@alby
State Superseded
Headers show

Commit Message

Alberto Mattea Oct. 28, 2015, 6:07 p.m. UTC
This patch adds a case for the Asus RP-N53 in the "02_network" boot script. Without this, the lan interface does not get configured on startup, effectively bricking the device.

Signed-off-by:  Alberto Mattea <alberto@mattea.info>
---

Comments

Piotr Dymacz Oct. 28, 2015, 6:46 p.m. UTC | #1
Hello Alberto,

Two comments:
1. Your patch breaks alphabetical order.
2. If you look more deeply into the file, you will easily find there
other boards with exactly the same configuration: asl26555 and re6500.
Please, don't add unnecessary code and use what's already there.

Cheers,
Piotr

2015-10-28 19:07 GMT+01:00 Alberto Mattea <alberto@mattea.info>:
> This patch adds a case for the Asus RP-N53 in the "02_network" boot script. Without this, the lan interface does not get configured on startup, effectively bricking the device.
>
> Signed-off-by:  Alberto Mattea <alberto@mattea.info>
> ---
> diff -uN a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
>
> --- a/target/linux/ramips/base-files/etc/board.d/02_network     2015-10-28 18:45:05.993476654 +0100
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network     2015-10-28 18:47:02.505480181 +0100
> @@ -127,6 +127,11 @@
>                 ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
>                 ucidef_add_switch_vlan "switch0" "2" "0 6t"
>                 ;;
> +       rp-n53)
> +               ucidef_set_interface_lan "eth0.1"
> +               ucidef_add_switch "switch0" "1" "1"
> +               ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
> +               ;;
>         awapn2403)
>                 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
>                 ucidef_add_switch "switch0" "1" "1"
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Alberto Mattea Oct. 28, 2015, 6:56 p.m. UTC | #2
Hey,

thanks for the quick review. To be honest I hadn't noticed they were in 
alphabetical order :) I'll fix and resubmit

Cheers
Alberto

In data mer 28 ottobre 2015 19:46:50, Piotr Dymacz ha scritto:
> Hello Alberto,
> 
> Two comments:
> 1. Your patch breaks alphabetical order.
> 2. If you look more deeply into the file, you will easily find there
> other boards with exactly the same configuration: asl26555 and re6500.
> Please, don't add unnecessary code and use what's already there.
> 
> Cheers,
> Piotr
> 
> 2015-10-28 19:07 GMT+01:00 Alberto Mattea <alberto@mattea.info>:
> > This patch adds a case for the Asus RP-N53 in the "02_network" boot
> > script. Without this, the lan interface does not get configured on
> > startup, effectively bricking the device.
> > 
> > Signed-off-by:  Alberto Mattea <alberto@mattea.info>
> > ---
> > diff -uN a/target/linux/ramips/base-files/etc/board.d/02_network
> > b/target/linux/ramips/base-files/etc/board.d/02_network
> > 
> > --- a/target/linux/ramips/base-files/etc/board.d/02_network     2015-10-28
> > 18:45:05.993476654 +0100 +++
> > b/target/linux/ramips/base-files/etc/board.d/02_network     2015-10-28
> > 18:47:02.505480181 +0100 @@ -127,6 +127,11 @@
> > 
> >                 ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
> >                 ucidef_add_switch_vlan "switch0" "2" "0 6t"
> >                 ;;
> > 
> > +       rp-n53)
> > +               ucidef_set_interface_lan "eth0.1"
> > +               ucidef_add_switch "switch0" "1" "1"
> > +               ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
> > +               ;;
> > 
> >         awapn2403)
> >         
> >                 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
> >                 ucidef_add_switch "switch0" "1" "1"
> > 
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Piotr Dymacz Oct. 28, 2015, 7:15 p.m. UTC | #3
Hey,

Thanks for fast fix!

Cheers,
Piotr

2015-10-28 19:56 GMT+01:00 Alberto Mattea <alberto@mattea.info>:
> Hey,
>
> thanks for the quick review. To be honest I hadn't noticed they were in
> alphabetical order :) I'll fix and resubmit
>
> Cheers
> Alberto
>
> In data mer 28 ottobre 2015 19:46:50, Piotr Dymacz ha scritto:
>> Hello Alberto,
>>
>> Two comments:
>> 1. Your patch breaks alphabetical order.
>> 2. If you look more deeply into the file, you will easily find there
>> other boards with exactly the same configuration: asl26555 and re6500.
>> Please, don't add unnecessary code and use what's already there.
>>
>> Cheers,
>> Piotr
>>
>> 2015-10-28 19:07 GMT+01:00 Alberto Mattea <alberto@mattea.info>:
>> > This patch adds a case for the Asus RP-N53 in the "02_network" boot
>> > script. Without this, the lan interface does not get configured on
>> > startup, effectively bricking the device.
>> >
>> > Signed-off-by:  Alberto Mattea <alberto@mattea.info>
>> > ---
>> > diff -uN a/target/linux/ramips/base-files/etc/board.d/02_network
>> > b/target/linux/ramips/base-files/etc/board.d/02_network
>> >
>> > --- a/target/linux/ramips/base-files/etc/board.d/02_network     2015-10-28
>> > 18:45:05.993476654 +0100 +++
>> > b/target/linux/ramips/base-files/etc/board.d/02_network     2015-10-28
>> > 18:47:02.505480181 +0100 @@ -127,6 +127,11 @@
>> >
>> >                 ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
>> >                 ucidef_add_switch_vlan "switch0" "2" "0 6t"
>> >                 ;;
>> >
>> > +       rp-n53)
>> > +               ucidef_set_interface_lan "eth0.1"
>> > +               ucidef_add_switch "switch0" "1" "1"
>> > +               ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
>> > +               ;;
>> >
>> >         awapn2403)
>> >
>> >                 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
>> >                 ucidef_add_switch "switch0" "1" "1"
>> >
>> > _______________________________________________
>> > openwrt-devel mailing list
>> > openwrt-devel@lists.openwrt.org
>> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>

Patch
diff mbox

diff -uN a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network

--- a/target/linux/ramips/base-files/etc/board.d/02_network	2015-10-28 18:45:05.993476654 +0100
+++ b/target/linux/ramips/base-files/etc/board.d/02_network	2015-10-28 18:47:02.505480181 +0100
@@ -127,6 +127,11 @@ 
 		ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
 		ucidef_add_switch_vlan "switch0" "2" "0 6t"
 		;;
+	rp-n53)
+		ucidef_set_interface_lan "eth0.1"
+		ucidef_add_switch "switch0" "1" "1"
+		ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
+		;;
 	awapn2403)
 		ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
 		ucidef_add_switch "switch0" "1" "1"