forked from anonabox/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2e5052e
Showing
7,294 changed files
with
1,386,385 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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,7 @@ | ||
# Copyright (C) 2006 OpenWrt.org | ||
# | ||
# This is free software, licensed under the GNU General Public License v2. | ||
# See /LICENSE for more information. | ||
# | ||
world ${.TARGETS}: | ||
@gmake $@ |
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,34 @@ | ||
# Copyright (C) 2006-2013 OpenWrt.org | ||
# | ||
# This is free software, licensed under the GNU General Public License v2. | ||
# See /LICENSE for more information. | ||
# | ||
|
||
mainmenu "OpenWrt Configuration" | ||
|
||
config MODULES | ||
option modules | ||
bool | ||
default y | ||
|
||
config HAVE_DOT_CONFIG | ||
bool | ||
default y | ||
|
||
source "target/Config.in" | ||
|
||
source "config/Config-images.in" | ||
|
||
source "config/Config-build.in" | ||
|
||
source "config/Config-devel.in" | ||
|
||
source "toolchain/Config.in" | ||
|
||
source "target/imagebuilder/Config.in" | ||
|
||
source "target/sdk/Config.in" | ||
|
||
source "target/toolchain/Config.in" | ||
|
||
source "tmp/.config-package.in" |
Large diffs are not rendered by default.
Oops, something went wrong.
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,92 @@ | ||
# Makefile for OpenWrt | ||
# | ||
# Copyright (C) 2007 OpenWrt.org | ||
# | ||
# This is free software, licensed under the GNU General Public License v2. | ||
# See /LICENSE for more information. | ||
# | ||
|
||
TOPDIR:=${CURDIR} | ||
LC_ALL:=C | ||
LANG:=C | ||
TZ:=UTC | ||
export TOPDIR LC_ALL LANG TZ | ||
|
||
empty:= | ||
space:= $(empty) $(empty) | ||
$(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt directory must not include any spaces)) | ||
|
||
world: | ||
|
||
include $(TOPDIR)/include/host.mk | ||
|
||
ifneq ($(OPENWRT_BUILD),1) | ||
_SINGLE=export MAKEFLAGS=$(space); | ||
|
||
override OPENWRT_BUILD=1 | ||
export OPENWRT_BUILD | ||
GREP_OPTIONS= | ||
export GREP_OPTIONS | ||
include $(TOPDIR)/include/debug.mk | ||
include $(TOPDIR)/include/depends.mk | ||
include $(TOPDIR)/include/toplevel.mk | ||
else | ||
include rules.mk | ||
include $(INCLUDE_DIR)/depends.mk | ||
include $(INCLUDE_DIR)/subdir.mk | ||
include target/Makefile | ||
include package/Makefile | ||
include tools/Makefile | ||
include toolchain/Makefile | ||
|
||
$(toolchain/stamp-install): $(tools/stamp-install) | ||
$(target/stamp-compile): $(toolchain/stamp-install) $(tools/stamp-install) $(BUILD_DIR)/.prepared | ||
$(package/stamp-compile): $(target/stamp-compile) $(package/stamp-cleanup) | ||
$(package/stamp-install): $(package/stamp-compile) | ||
$(target/stamp-install): $(package/stamp-compile) $(package/stamp-install) | ||
|
||
printdb: | ||
@true | ||
|
||
prepare: $(target/stamp-compile) | ||
|
||
clean: FORCE | ||
rm -rf $(BUILD_DIR) $(STAGING_DIR) $(BIN_DIR) $(BUILD_LOG_DIR) | ||
|
||
dirclean: clean | ||
rm -rf $(STAGING_DIR_HOST) $(TOOLCHAIN_DIR) $(BUILD_DIR_HOST) $(BUILD_DIR_TOOLCHAIN) | ||
rm -rf $(TMP_DIR) | ||
|
||
ifndef DUMP_TARGET_DB | ||
$(BUILD_DIR)/.prepared: Makefile | ||
@mkdir -p $$(dirname $@) | ||
@touch $@ | ||
|
||
tmp/.prereq_packages: .config | ||
unset ERROR; \ | ||
for package in $(sort $(prereq-y) $(prereq-m)); do \ | ||
$(_SINGLE)$(NO_TRACE_MAKE) -s -r -C package/$$package prereq || ERROR=1; \ | ||
done; \ | ||
if [ -n "$$ERROR" ]; then \ | ||
echo "Package prerequisite check failed."; \ | ||
false; \ | ||
fi | ||
touch $@ | ||
endif | ||
|
||
# check prerequisites before starting to build | ||
prereq: $(target/stamp-prereq) tmp/.prereq_packages | ||
@if [ ! -f "$(INCLUDE_DIR)/site/$(ARCH)" ]; then \ | ||
echo 'ERROR: Missing site config for architecture "$(ARCH)" !'; \ | ||
echo ' The missing file will cause configure scripts to fail during compilation.'; \ | ||
echo ' Please provide a "$(INCLUDE_DIR)/site/$(ARCH)" file and restart the build.'; \ | ||
exit 1; \ | ||
fi | ||
|
||
prepare: .config $(tools/stamp-install) $(toolchain/stamp-install) | ||
world: prepare $(target/stamp-compile) $(package/stamp-compile) $(package/stamp-install) $(target/stamp-install) FORCE | ||
$(_SINGLE)$(SUBMAKE) -r package/index | ||
|
||
.PHONY: clean dirclean prereq prepare world package/symlinks package/symlinks-install package/symlinks-clean | ||
|
||
endif |
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,35 @@ | ||
This is the buildsystem for the OpenWrt Linux distribution. | ||
|
||
Please use "make menuconfig" to configure your appreciated | ||
configuration for the toolchain and firmware. | ||
|
||
You need to have installed gcc, binutils, bzip2, flex, python, perl, make, | ||
find, grep, diff, unzip, gawk, getopt, subversion, libz-dev and libc headers. | ||
|
||
Run "./scripts/feeds update -a" to get all the latest package definitions | ||
defined in feeds.conf / feeds.conf.default respectively | ||
and "./scripts/feeds install -a" to install symlinks of all of them into | ||
package/feeds/. | ||
|
||
Use "make menuconfig" to configure your image. | ||
|
||
Simply running "make" will build your firmware. | ||
It will download all sources, build the cross-compile toolchain, | ||
the kernel and all choosen applications. | ||
|
||
You can use "scripts/flashing/flash.sh" for remotely updating your embedded | ||
system via tftp. | ||
|
||
The OpenWrt system is documented in docs/. You will need a LaTeX distribution | ||
and the tex4ht package to build the documentation. Type "make -C docs/" to build it. | ||
|
||
To build your own firmware you need to have access to a Linux, BSD or MacOSX system | ||
(case-sensitive filesystem required). Cygwin will not be supported because of | ||
the lack of case sensitiveness in the file system. | ||
|
||
|
||
Sunshine! | ||
Your OpenWrt Project | ||
http://openwrt.org | ||
|
||
|
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 @@ | ||
# anonabox-devkit |
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,223 @@ | ||
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh | ||
index 3203273..c8297b2 100755 | ||
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh | ||
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh | ||
@@ -390,6 +390,9 @@ ar71xx_board_detect() { | ||
*"AP143 reference board") | ||
name="ap143" | ||
;; | ||
+ *"ANONABOX_PRO") | ||
+ name="anonabox-pro" | ||
+ ;; | ||
*"AP147-010 reference board") | ||
name="ap147-010" | ||
;; | ||
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-anonabox-pro.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-anonabox-pro.c | ||
new file mode 100644 | ||
index 0000000..d97c92f | ||
--- /dev/null | ||
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-anonabox-pro.c | ||
@@ -0,0 +1,111 @@ | ||
+/* | ||
+ * Atheros ANONABOX_PRO reference board support | ||
+ * | ||
+ * Copyright (c) 2013 The Linux Foundation. All rights reserved. | ||
+ * Copyright (c) 2012 Gabor Juhos <[email protected]> | ||
+ * | ||
+ * Permission to use, copy, modify, and/or distribute this software for any | ||
+ * purpose with or without fee is hereby granted, provided that the above | ||
+ * copyright notice and this permission notice appear in all copies. | ||
+ * | ||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
+ * | ||
+ */ | ||
+ | ||
+#include <linux/platform_device.h> | ||
+#include <linux/ath9k_platform.h> | ||
+#include <linux/ar8216_platform.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-spi.h" | ||
+#include "dev-usb.h" | ||
+#include "dev-wmac.h" | ||
+#include "machtypes.h" | ||
+ | ||
+#define ANONABOX_PRO_GPIO_LED_STATUS 14 | ||
+ | ||
+#define ANONABOX_PRO_GPIO_BTN_RST 17 | ||
+ | ||
+#define ANONABOX_PRO_KEYS_POLL_INTERVAL 20 /* msecs */ | ||
+#define ANONABOX_PRO_KEYS_DEBOUNCE_INTERVAL (3 * ANONABOX_PRO_KEYS_POLL_INTERVAL) | ||
+ | ||
+#define ANONABOX_PRO_MAC0_OFFSET 0 | ||
+#define ANONABOX_PRO_MAC1_OFFSET 6 | ||
+#define ANONABOX_PRO_WMAC_CALDATA_OFFSET 0x1000 | ||
+ | ||
+static struct gpio_led anonabox_pro_leds_gpio[] __initdata = { | ||
+ { | ||
+ .name = "anonabox_pro:green:status", | ||
+ .gpio = ANONABOX_PRO_GPIO_LED_STATUS, | ||
+ .active_low = 1, | ||
+ }, | ||
+}; | ||
+ | ||
+static struct gpio_keys_button anonabox_pro_gpio_keys[] __initdata = { | ||
+ { | ||
+ .desc = "reset button", | ||
+ .type = EV_KEY, | ||
+ .code = KEY_RESTART, | ||
+ .debounce_interval = ANONABOX_PRO_KEYS_DEBOUNCE_INTERVAL, | ||
+ .gpio = ANONABOX_PRO_GPIO_BTN_RST, | ||
+ .active_low = 1, | ||
+ }, | ||
+}; | ||
+ | ||
+static void __init anonabox_pro_gpio_led_setup(void) | ||
+{ | ||
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(anonabox_pro_leds_gpio), | ||
+ anonabox_pro_leds_gpio); | ||
+ ath79_register_gpio_keys_polled(-1, ANONABOX_PRO_KEYS_POLL_INTERVAL, | ||
+ ARRAY_SIZE(anonabox_pro_gpio_keys), | ||
+ anonabox_pro_gpio_keys); | ||
+} | ||
+ | ||
+static void __init anonabox_pro_setup(void) | ||
+{ | ||
+ u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); | ||
+ | ||
+ ath79_register_m25p80(NULL); | ||
+ | ||
+ anonabox_pro_gpio_led_setup(); | ||
+ | ||
+ ath79_register_usb(); | ||
+ | ||
+ ath79_register_wmac(art + ANONABOX_PRO_WMAC_CALDATA_OFFSET, NULL); | ||
+ | ||
+ ath79_register_mdio(0, 0x0); | ||
+ ath79_register_mdio(1, 0x0); | ||
+ | ||
+ ath79_init_mac(ath79_eth0_data.mac_addr, art + ANONABOX_PRO_MAC0_OFFSET, 0); | ||
+ ath79_init_mac(ath79_eth1_data.mac_addr, art + ANONABOX_PRO_MAC1_OFFSET, 0); | ||
+ | ||
+ /* WAN port */ | ||
+ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; | ||
+ ath79_eth0_data.speed = SPEED_100; | ||
+ ath79_eth0_data.duplex = DUPLEX_FULL; | ||
+ ath79_eth0_data.phy_mask = BIT(4); | ||
+ ath79_register_eth(0); | ||
+ | ||
+ /* LAN ports */ | ||
+ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; | ||
+ ath79_eth1_data.speed = SPEED_1000; | ||
+ ath79_eth1_data.duplex = DUPLEX_FULL; | ||
+ ath79_switch_data.phy_poll_mask |= BIT(4); | ||
+ ath79_switch_data.phy4_mii_en = 1; | ||
+ ath79_register_eth(1); | ||
+} | ||
+ | ||
+MIPS_MACHINE(ATH79_MACH_ANONABOX_PRO, "ANONABOX_PRO", "Anonabox Pro board", | ||
+ anonabox_pro_setup); | ||
diff --git a/target/linux/ar71xx/generic/profiles/atheros.mk b/target/linux/ar71xx/generic/profiles/atheros.mk | ||
index 3a312a4..f95fd7a 100644 | ||
--- a/target/linux/ar71xx/generic/profiles/atheros.mk | ||
+++ b/target/linux/ar71xx/generic/profiles/atheros.mk | ||
@@ -182,3 +182,15 @@ define Profile/PB92/Description | ||
endef | ||
|
||
$(eval $(call Profile,PB92)) | ||
+ | ||
+define Profile/ANONABOX_PRO | ||
+ NAME:=Anonabox Pro | ||
+ PACKAGES:=kmod-usb-core kmod-usb2 kmod-usb-storage | ||
+endef | ||
+ | ||
+define Profile/ANONABOX_PRO/Description | ||
+ Package set optimized for the Anonabox Pro. | ||
+endef | ||
+ | ||
+$(eval $(call Profile,ANONABOX_PRO)) | ||
+ | ||
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile | ||
index cb11104..d8ca1c9 100644 | ||
--- a/target/linux/ar71xx/image/Makefile | ||
+++ b/target/linux/ar71xx/image/Makefile | ||
@@ -1549,6 +1549,7 @@ ap135_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs), | ||
ap136_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(mib0),64k(art)ro,7744k@0x50000(firmware) | ||
ap143_mtdlayout_8M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1472k(kernel),64k(art)ro,7744k@0x50000(firmware) | ||
ap143_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware) | ||
+anonabox_pro_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware) | ||
ap147_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art),16000k@0x50000(firmware) | ||
ap152_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware) | ||
bxu2000n2_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),8448k(rootfs),6016k(user),64k(cfg),64k(oem),64k(art)ro | ||
@@ -2369,6 +2370,7 @@ $(eval $(call SingleProfile,AthLzma,64k,AP136_010,ap136-010,AP136-010,ttyS0,1152 | ||
$(eval $(call SingleProfile,AthLzma,64k,AP136_020,ap136-020,AP136-020,ttyS0,115200,$$(ap136_mtdlayout),RKuImage)) | ||
$(eval $(call SingleProfile,AthLzma,64k,AP143_8M,ap143-8M,AP143,ttyS0,115200,$$(ap143_mtdlayout_8M),RKuImage)) | ||
$(eval $(call SingleProfile,AthLzma,64k,AP143_16M,ap143-16M,AP143,ttyS0,115200,$$(ap143_mtdlayout_16M),RKuImage)) | ||
+$(eval $(call SingleProfile,AthLzma,64k,ANONABOX_PRO,anonabox-pro-16M,ANONABOX_PRO,ttyS0,115200,$$(anonabox_pro_mtdlayout_16M),RKuImage)) | ||
$(eval $(call SingleProfile,AthLzma,64k,AP147_010,ap147-010,AP147-010,ttyS0,115200,$$(ap147_mtdlayout),RKuImage)) | ||
$(eval $(call SingleProfile,AthLzma,64k,AP152_16M,ap152-16M,AP152,ttyS0,115200,$$(ap152_mtdlayout_16M),RKuImage)) | ||
$(eval $(call SingleProfile,AthLzma,64k,BXU2000N2,bxu2000n-2-a1,BXU2000n-2-A1,ttyS0,115200,$$(bxu2000n2_mtdlayout),RKuImage)) | ||
diff --git a/target/linux/ar71xx/patches-4.1/911-MIPS-ath79-add-anonabox-pro-support.patch b/target/linux/ar71xx/patches-4.1/911-MIPS-ath79-add-anonabox-pro-support.patch | ||
new file mode 100644 | ||
index 0000000..5a015a2 | ||
--- /dev/null | ||
+++ b/target/linux/ar71xx/patches-4.1/911-MIPS-ath79-add-anonabox-pro-support.patch | ||
@@ -0,0 +1,46 @@ | ||
+Index: linux-4.1.16/arch/mips/ath79/Kconfig | ||
+=================================================================== | ||
+--- linux-4.1.16.orig/arch/mips/ath79/Kconfig | ||
++++ linux-4.1.16/arch/mips/ath79/Kconfig | ||
+@@ -83,6 +83,20 @@ config ATH79_MACH_UBNT_XM | ||
+ Say 'Y' here if you want your kernel to support the | ||
+ Ubiquiti Networks XM (rev 1.0) board. | ||
+ | ||
++config ATH79_MACH_ANONABOX_PRO | ||
++ bool "Anonabox Pro board" | ||
++ select SOC_QCA953X | ||
++ select ATH79_DEV_GPIO_BUTTONS | ||
++ select ATH79_DEV_LEDS_GPIO | ||
++ select ATH79_DEV_SPI | ||
++ select ATH79_DEV_USB | ||
++ select ATH79_DEV_WMAC | ||
++ select ATH79_DEV_ETH | ||
++ select ATH79_DEV_M25P80 | ||
++ help | ||
++ Say 'Y' here if you want your kernel to support the | ||
++ Anonabox Pro board. | ||
++ | ||
+ source "arch/mips/ath79/Kconfig.openwrt" | ||
+ | ||
+ endmenu | ||
+Index: linux-4.1.16/arch/mips/ath79/Makefile | ||
+=================================================================== | ||
+--- linux-4.1.16.orig/arch/mips/ath79/Makefile | ||
++++ linux-4.1.16/arch/mips/ath79/Makefile | ||
+@@ -193,3 +193,4 @@ obj-$(CONFIG_ATH79_MACH_WZR_450HP2) += m | ||
+ obj-$(CONFIG_ATH79_MACH_ZCN_1523H) += mach-zcn-1523h.o | ||
+ obj-$(CONFIG_ATH79_MACH_CARAMBOLA2) += mach-carambola2.o | ||
+ obj-$(CONFIG_ATH79_MACH_NBG6716) += mach-nbg6716.o | ||
++obj-$(CONFIG_ATH79_MACH_ANONABOX_PRO) += mach-anonabox-pro.o | ||
+Index: linux-4.1.16/arch/mips/ath79/machtypes.h | ||
+=================================================================== | ||
+--- linux-4.1.16.orig/arch/mips/ath79/machtypes.h | ||
++++ linux-4.1.16/arch/mips/ath79/machtypes.h | ||
+@@ -246,6 +246,7 @@ enum ath79_mach_type { | ||
+ ATH79_MACH_WZR_450HP2, /* Buffalo WZR-450HP2 */ | ||
+ ATH79_MACH_ZCN_1523H_2, /* Zcomax ZCN-1523H-2-xx */ | ||
+ ATH79_MACH_ZCN_1523H_5, /* Zcomax ZCN-1523H-5-xx */ | ||
++ ATH79_MACH_ANONABOX_PRO, /* Anonabox Pro */ | ||
+ }; | ||
+ | ||
+ #endif /* _ATH79_MACHTYPE_H */ |
Oops, something went wrong.