forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Netgear R9000 Nighthawk X10 and XR700
Signed-off-by: Alexander Egorenkov <[email protected]>
- Loading branch information
Showing
190 changed files
with
76,276 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2016 LEDE | ||
# | ||
|
||
[ -e /etc/config/ubootenv ] && exit 0 | ||
|
||
touch /etc/config/ubootenv | ||
|
||
. /lib/uboot-envtools.sh | ||
. /lib/functions.sh | ||
|
||
board=$(board_name) | ||
|
||
case "$board" in | ||
netgear,r9000|\ | ||
netgear,xr700) | ||
ubootenv_add_uci_config "/dev/mtd1" "0x00000" "0x4000" "0x20000" | ||
ubootenv_add_uci_config "/dev/mtd1" "0x20000" "0x4000" "0x20000" | ||
;; | ||
esac | ||
|
||
config_load ubootenv | ||
config_foreach ubootenv_add_app_config ubootenv | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright (c) 2013 The Linux Foundation. All rights reserved. | ||
# | ||
include $(TOPDIR)/rules.mk | ||
|
||
ARCH:=arm | ||
BOARD:=alpine | ||
BOARDNAME:=Annapurna Labs Alpine | ||
FEATURES:=squashfs nand fpu ramdisk usb pci pcie | ||
CPU_TYPE:=cortex-a15 | ||
CPU_SUBTYPE:=neon-vfpv4 | ||
SUBTARGETS:=generic | ||
|
||
KERNEL_PATCHVER:=6.6 | ||
|
||
KERNELNAME:=zImage Image dtbs | ||
|
||
include $(INCLUDE_DIR)/target.mk | ||
|
||
DEFAULT_PACKAGES += \ | ||
kmod-leds-gpio kmod-gpio-button-hotplug swconfig \ | ||
kmod-ata-ahci kmod-ata-ahci-platform \ | ||
kmod-usb-ohci kmod-usb-ohci-pci kmod-usb2 kmod-usb2-pci kmod-usb3 kmod-usb-ledtrig-usbport \ | ||
kmod-ath10k-ct ath10k-firmware-qca9984-ct kmod-wil6210 \ | ||
kmod-usb-storage kmod-scsi-core kmod-fs-ext4 kmod-fs-btrfs kmod-fs-vfat kmod-fs-msdos block-mount \ | ||
kmod-al-eth kmod-mdio-al-gpio \ | ||
cfdisk e2fsprogs badblocks partx-utils \ | ||
wpad-openssl uboot-envtools | ||
|
||
$(eval $(call BuildTarget)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# | ||
# Copyright (c) 2015 The Linux Foundation. All rights reserved. | ||
# Copyright (c) 2011-2015 OpenWrt.org | ||
# | ||
|
||
. /lib/functions/uci-defaults.sh | ||
. /lib/functions/system.sh | ||
|
||
board_config_update | ||
|
||
board=$(board_name) | ||
|
||
# | ||
# Switch configuration | ||
# | ||
# There are two switches: master (switch0) and slave (switch1). | ||
# | ||
# Ports P0 and P5 of the master switch are connected to the CPU ports | ||
# ETH1 and ETH2, respectively. ETH1 shall be used for LAN and ETH2 for WAN. | ||
# | ||
# Port P3 of the master switch is the WAN port. VLAN2 is set up | ||
# to isolate P3 and P5 of the master switch from LAN ports of | ||
# both the master and the slave switch. | ||
# | ||
# All ports of the master switch except P3 and P5 are assigned to VLAN1. | ||
# | ||
# All ports of the slave switch are assigned to VLAN1. Port P6 of the slave | ||
# switch is unused and idle. | ||
# | ||
|
||
case "$board" in | ||
netgear,r9000|\ | ||
netgear,xr700) | ||
ucidef_set_interfaces_lan_wan "eth1.1" "eth2.2" | ||
ucidef_add_switch "switch0" \ | ||
"0t@eth1" "1:lan" "2:lan" "4:lan" "6:lan" "3:wan" "5t@eth2" | ||
ucidef_add_switch "switch1" \ | ||
"6t@eth1" "0:lan" "1:lan" "2:lan" "3:lan" "4:lan" "5:lan" | ||
;; | ||
*) | ||
echo "Unsupported hardware. Network interfaces not intialized" | ||
;; | ||
esac | ||
|
||
board_config_flush | ||
|
||
exit 0 |
54 changes: 54 additions & 0 deletions
54
target/linux/alpine/base-files/etc/uci-defaults/xx_customizations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
|
||
wifi_key=$(uci -q get wireless.@wifi-iface[1].key) | ||
if [ -z "$wifi_key" ]; then | ||
uci set wireless.@wifi-iface[1].ssid='home_network' | ||
uci set wireless.@wifi-iface[1].encryption=psk2 | ||
uci set wireless.@wifi-iface[1].key='secret' | ||
|
||
uci set wireless.@wifi-device[1].country=US | ||
uci set wireless.@wifi-device[1].channel=auto | ||
uci set wireless.@wifi-device[1].disabled='0' | ||
|
||
uci commit wireless | ||
fi | ||
|
||
exit 0 | ||
|
||
uci set system.@system[0].hostname='OpenWrt-dev' | ||
uci commit system | ||
|
||
# | ||
# IP address | ||
# | ||
|
||
uci set network.lan.ipaddr=192.168.2.1 | ||
uci commit network | ||
|
||
# | ||
# SSH | ||
# | ||
|
||
if [ $(uci -q get dropbear.@dropbear[0].Port) = "22" ]; then | ||
uci set dropbear.@dropbear[0].Port='2222' | ||
uci commit dropbear | ||
service dropbear restart | ||
|
||
sed -i -e '/ListenAddress/d' /etc/ssh/sshd_config | ||
sed -i -e '/PasswordAuthentication/d' /etc/ssh/sshd_config | ||
sed -i -e '/PermitEmptyPasswords/d' /etc/ssh/sshd_config | ||
sed -i -e '/PermitRootLogin/d' /etc/ssh/sshd_config | ||
sed -i -e '/UsePAM/d' /etc/ssh/sshd_config | ||
|
||
cat >>/etc/ssh/sshd_config <<EOF | ||
ListenAddress 192.168.2.1 | ||
PasswordAuthentication yes | ||
PermitEmptyPasswords yes | ||
PermitRootLogin yes | ||
UsePAM no | ||
EOF | ||
|
||
service sshd enable | ||
service sshd restart | ||
|
||
passwd -d root | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
REQUIRE_IMAGE_METADATA=1 | ||
|
||
RAMFS_COPY_BIN='fw_printenv fw_setenv' | ||
RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock' | ||
|
||
platform_check_image() { | ||
return 0; | ||
} | ||
|
||
platform_do_upgrade() { | ||
case "$(board_name)" in | ||
netgear,r9000|\ | ||
netgear,xr700) | ||
nand_do_upgrade "$1" | ||
;; | ||
*) | ||
default_do_upgrade "$1" | ||
;; | ||
esac | ||
} |
Oops, something went wrong.