mirror of https://github.com/hak5/openwrt-owl.git
ar71xx: add support for the Hak5 Owl
This patch adds support for the Hak5 Owl. Specifications: * SoC: Atheros AR9331 (400MHz) * RAM: 64MB (DDR2) * Storage: 16MB * Wireless: AR9331 (built-in) * Ports: USB 2.0 Host * Other: Status LED, reset button, USB 2.0 passthrough port Flash instructions: Original firmware is based on OpenWrt. Use sysupgrade via SSH to flash. Signed-off-by: Sebastian Kinne <seb@hak5.org>hak5owl
parent
a734450d6f
commit
bc114ffb96
|
@ -589,6 +589,9 @@ omy-x1)
|
|||
ucidef_set_led_default "power" "POWER" "omy:green:power" "1"
|
||||
ucidef_set_led_default "wan" "WAN" "omy:green:wan" "eth0"
|
||||
;;
|
||||
owl)
|
||||
ucidef_set_led_netdev "wlan0" "WLAN" "$board:red:system" "wlan0"
|
||||
;;
|
||||
pqi-air-pen)
|
||||
ucidef_set_led_wlan "wlan" "WLAN" "pqi-air-pen:blue:wlan" "phy0tpt"
|
||||
ucidef_set_led_default "wps" "WPS" "pqi-air-pen:blue:wps" "0"
|
||||
|
|
|
@ -207,7 +207,8 @@ get_status_led() {
|
|||
status_led="$board:green:sig4"
|
||||
;;
|
||||
dragino2|\
|
||||
oolite-v1)
|
||||
oolite-v1|\
|
||||
owl)
|
||||
status_led="$board:red:system"
|
||||
;;
|
||||
dw33d|\
|
||||
|
|
|
@ -947,6 +947,9 @@ ar71xx_board_detect() {
|
|||
*"Oolite V1.0")
|
||||
name="oolite-v1"
|
||||
;;
|
||||
*"Owl")
|
||||
name="owl"
|
||||
;;
|
||||
*"Packet Squirrel")
|
||||
name="packet-squirrel"
|
||||
;;
|
||||
|
|
|
@ -284,6 +284,7 @@ platform_check_image() {
|
|||
nanostation-m|\
|
||||
nanostation-m-xw|\
|
||||
nbg460n_550n_550nh|\
|
||||
owl|\
|
||||
pqi-air-pen|\
|
||||
r36a|\
|
||||
r602n|\
|
||||
|
|
|
@ -164,6 +164,7 @@ CONFIG_ATH79=y
|
|||
# CONFIG_ATH79_MACH_OMY_G1 is not set
|
||||
# CONFIG_ATH79_MACH_OMY_X1 is not set
|
||||
# CONFIG_ATH79_MACH_ONION_OMEGA is not set
|
||||
# CONFIG_ATH79_MACH_OWL is not set
|
||||
# CONFIG_ATH79_MACH_PB42 is not set
|
||||
# CONFIG_ATH79_MACH_PB44 is not set
|
||||
# CONFIG_ATH79_MACH_PQI_AIR_PEN is not set
|
||||
|
|
|
@ -1366,6 +1366,16 @@ config ATH79_MACH_ONION_OMEGA
|
|||
select ATH79_DEV_USB
|
||||
select ATH79_DEV_WMAC
|
||||
|
||||
config ATH79_MACH_OWL
|
||||
bool "Hak5 Owl board support"
|
||||
select SOC_AR933X
|
||||
select ATH79_DEV_ETH
|
||||
select ATH79_DEV_GPIO_BUTTONS
|
||||
select ATH79_DEV_LEDS_GPIO
|
||||
select ATH79_DEV_M25P80
|
||||
select ATH79_DEV_USB
|
||||
select ATH79_DEV_WMAC
|
||||
|
||||
config ATH79_MACH_MR12
|
||||
bool "Meraki MR12 board support"
|
||||
select SOC_AR724X
|
||||
|
|
|
@ -175,6 +175,7 @@ obj-$(CONFIG_ATH79_MACH_OM5P_ACv2) += mach-om5pacv2.o
|
|||
obj-$(CONFIG_ATH79_MACH_OMY_G1) += mach-omy-g1.o
|
||||
obj-$(CONFIG_ATH79_MACH_OMY_X1) += mach-omy-x1.o
|
||||
obj-$(CONFIG_ATH79_MACH_ONION_OMEGA) += mach-onion-omega.o
|
||||
obj-$(CONFIG_ATH79_MACH_OWL) += mach-owl.o
|
||||
obj-$(CONFIG_ATH79_MACH_PB42) += mach-pb42.o
|
||||
obj-$(CONFIG_ATH79_MACH_PB44) += mach-pb44.o
|
||||
obj-$(CONFIG_ATH79_MACH_PQI_AIR_PEN) += mach-pqi-air-pen.o
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* Hak5 Owl board support
|
||||
*
|
||||
* Copyright (C) 2018 Sebastian Kinne <seb@hak5.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 as published
|
||||
* by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <asm/mach-ath79/ath79.h>
|
||||
#include <asm/mach-ath79/ar71xx_regs.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "dev-eth.h"
|
||||
#include "dev-gpio-buttons.h"
|
||||
#include "dev-leds-gpio.h"
|
||||
#include "dev-m25p80.h"
|
||||
#include "dev-usb.h"
|
||||
#include "dev-wmac.h"
|
||||
#include "machtypes.h"
|
||||
|
||||
#define OWL_GPIO_LED_SYSTEM 27
|
||||
|
||||
#define OWL_GPIO_BTN_RESET 12
|
||||
|
||||
#define OWL_KEYS_POLL_INTERVAL 20 /* msecs */
|
||||
#define OWL_KEYS_DEBOUNCE_INTERVAL (3 * OWL_KEYS_POLL_INTERVAL)
|
||||
|
||||
#define OWL_CALDATA_OFFSET 0x1000
|
||||
|
||||
static struct gpio_led owl_leds_gpio[] __initdata = {
|
||||
{
|
||||
.name = "owl:red:system",
|
||||
.gpio = OWL_GPIO_LED_SYSTEM,
|
||||
.active_low = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_keys_button owl_gpio_keys[] __initdata = {
|
||||
{
|
||||
.desc = "Reset Button",
|
||||
.type = EV_KEY,
|
||||
.code = KEY_RESTART,
|
||||
.debounce_interval = OWL_KEYS_DEBOUNCE_INTERVAL,
|
||||
.gpio = OWL_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
}
|
||||
};
|
||||
|
||||
static void __init owl_setup(void)
|
||||
{
|
||||
u8 *art = (u8 *) KSEG1ADDR(0x1f040000);
|
||||
|
||||
ath79_register_m25p80(NULL);
|
||||
|
||||
ath79_register_mdio(0, 0x0);
|
||||
|
||||
ath79_register_leds_gpio(-1, ARRAY_SIZE(owl_leds_gpio),
|
||||
owl_leds_gpio);
|
||||
ath79_register_gpio_keys_polled(-1, OWL_KEYS_POLL_INTERVAL,
|
||||
ARRAY_SIZE(owl_gpio_keys),
|
||||
owl_gpio_keys);
|
||||
|
||||
ath79_register_wmac(art + OWL_CALDATA_OFFSET, NULL);
|
||||
|
||||
ath79_register_usb();
|
||||
}
|
||||
|
||||
MIPS_MACHINE(ATH79_MACH_OWL, "OWL", "Owl",
|
||||
owl_setup);
|
|
@ -186,6 +186,7 @@ enum ath79_mach_type {
|
|||
ATH79_MACH_OMY_G1, /* OMYlink OMY-G1 */
|
||||
ATH79_MACH_OMY_X1, /* OMYlink OMY-X1 */
|
||||
ATH79_MACH_ONION_OMEGA, /* ONION OMEGA */
|
||||
ATH79_MACH_OWL, /* Hak5 Owl */
|
||||
ATH79_MACH_PACKET_SQUIRREL, /* Hak5 Packet Squirrel */
|
||||
ATH79_MACH_PB42, /* Atheros PB42 */
|
||||
ATH79_MACH_PB44, /* Atheros PB44 reference board */
|
||||
|
|
|
@ -130,6 +130,7 @@ CONFIG_ATH79_MACH_OM5P_ACv2=y
|
|||
CONFIG_ATH79_MACH_OMY_G1=y
|
||||
CONFIG_ATH79_MACH_OMY_X1=y
|
||||
CONFIG_ATH79_MACH_ONION_OMEGA=y
|
||||
CONFIG_ATH79_MACH_OWL=y
|
||||
CONFIG_ATH79_MACH_PB42=y
|
||||
CONFIG_ATH79_MACH_PB44=y
|
||||
CONFIG_ATH79_MACH_PQI_AIR_PEN=y
|
||||
|
|
|
@ -963,6 +963,19 @@ define Device/onion-omega
|
|||
endef
|
||||
TARGET_DEVICES += onion-omega
|
||||
|
||||
define Device/owl
|
||||
DEVICE_TITLE := Hak5 Owl
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage kmod-ath9k-htc -swconfig
|
||||
BOARDNAME := OWL
|
||||
IMAGE_SIZE := 16064k
|
||||
CONSOLE := ttyATH0,115200
|
||||
MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)
|
||||
SUPPORTED_DEVICES := owl
|
||||
IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \
|
||||
append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
|
||||
endef
|
||||
TARGET_DEVICES += owl
|
||||
|
||||
define Device/sc1750
|
||||
DEVICE_TITLE := Abicom SC1750
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
|
||||
|
|
Loading…
Reference in New Issue