blob: f47c944897cdf76ead4ff6820197c4e09505b658 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#!/bin/sh /etc/rc.common
2# NVRAM setup
3#
4# This file handles the NVRAM quirks of various hardware of the bcm53xx target.
5
6START=02
7
8clear_partialboots() {
9 # clear partialboots
10
11 case $(board_name) in
12 linksys,ea9200|\
13 linksys,panamera)
14 COMMIT=1
15 nvram set partialboots=0
16 ;;
17 esac
18}
19
20set_wireless_led_behaviour() {
21 # set Broadcom wireless LED behaviour for both radios
22 # 0:ledbh9 -> Behaviour of 2.4GHz LED
23 # 1:ledbh9 -> Behaviour of 5GHz LED
24 # 0x7 makes the wireless LEDs on, when radios are enabled, and blink when there's activity
25
26 case $(board_name) in
27 asus,rt-ac3100|\
28 asus,rt-ac88u)
29 COMMIT=1
30 nvram set 0:ledbh9=0x7 set 1:ledbh9=0x7
31 ;;
32 esac
33}
34
35boot() {
36 . /lib/functions.sh
37
38 clear_partialboots
39 set_wireless_led_behaviour
40
41 [ "$COMMIT" = "1" ] && nvram commit
42}