From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arne Fitzenreiter To: development@lists.ipfire.org Subject: [PATCH 3/3] initskripts: add OrangePi R1 Plus LTS Date: Fri, 28 Apr 2023 19:36:23 +0000 Message-ID: <20230428193623.2307228-3-arne_f@ipfire.org> In-Reply-To: <20230428193623.2307228-1-arne_f@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7323616041896844745==" List-Id: --===============7323616041896844745== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Signed-off-by: Arne Fitzenreiter --- src/initscripts/system/leds | 11 +++++++++++ src/initscripts/system/partresize | 10 +++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/initscripts/system/leds b/src/initscripts/system/leds index 7522ce94d..464a71043 100644 --- a/src/initscripts/system/leds +++ b/src/initscripts/system/leds @@ -144,6 +144,11 @@ case "${1}" in setup_netdev_trigger nanopi-r4s:green:wan ${RED_DEV} tx rx setup_netdev_trigger nanopi-r4s:green:lan ${GREEN_DEV} tx rx =20 + # OrangePi R1 Plus + setup_heartbeat_trigger red:status + setup_netdev_trigger green:wan ${RED_DEV} tx rx + setup_netdev_trigger green:lan ${GREEN_DEV} tx rx + exit 0 ;; =20 @@ -190,6 +195,12 @@ case "${1}" in disable_led_trigger nanopi-r4s:green:wan disable_led_trigger nanopi-r4s:green:lan =20 + # OrangePi R1 Plus stop + disable_led_trigger red:status + enable_led red:status + disable_led_trigger green:wan + disable_led_trigger green:lan + exit 0 ;; =20 diff --git a/src/initscripts/system/partresize b/src/initscripts/system/partr= esize index 147405e1e..272fbe482 100644 --- a/src/initscripts/system/partresize +++ b/src/initscripts/system/partresize @@ -2,7 +2,7 @@ ############################################################################= ### # = # # IPFire.org - A linux based firewall = # -# Copyright (C) 2007-2022 IPFire Team = # +# Copyright (C) 2007-2023 IPFire Team = # # = # # This program is free software: you can redistribute it and/or modify = # # it under the terms of the GNU General Public License as published by = # @@ -71,6 +71,14 @@ case "${1}" in echo ethaddr=3D$SWMAC:00 >> /boot/uEnv.txt echo eth1addr=3D$SWMAC:01 >> /boot/uEnv.txt ;; + Xunlong\ Orange\ Pi\ R1\ Plus* ) + # Generate MAC address at first boot + # This board should have mac addresses in rom but uboot + # doesnt set it for fist nic + SWMAC=3D`printf "%1x2:%02x:%02x:%02x:%02x" $[RANDOM%16] $[RANDOM%256] $= [RANDOM%256] $[RANDOM%256] $[RANDOM%256]` + echo ethaddr=3D$SWMAC:00 >> /boot/uEnv.txt + echo eth1addr=3D$SWMAC:01 >> /boot/uEnv.txt + ;; esac 2>/dev/null =20 if [ -e /boot/grub/grub.cfg ]; then --=20 2.34.1 --===============7323616041896844745==--