forked from StidOfficial/neufbox
-
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
StidOfficial
committed
Nov 13, 2018
1 parent
6dfb038
commit 44941ab
Showing
5,796 changed files
with
1,026,474 additions
and
326,416 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 |
---|---|---|
@@ -1,224 +1,31 @@ | ||
|
||
define Usage | ||
|
||
-- | ||
|
||
usage: | ||
|
||
|
||
<firmware>-kernel-menuconfig - Kenrel configure <firmware> | ||
<firmware>-menuconfig - Configure <firmware> | ||
<firmware> - Build <firmware> | ||
<firmware>-<package>-compile - Build <firmware> <package> | ||
<firmware>-<package>-clean - Clean <firmware> <package> | ||
world-clean - Clean everything ! | ||
|
||
Options: | ||
V=99: Output to stdout build in single thread | ||
V=2: Output to openwrt/logs/* | ||
|
||
build-blame: | ||
print last built packages | ||
|
||
firmware: nb4-main, nb4-rescue, cibox-main | ||
(experimental firmware: nb4-mainipv6) | ||
|
||
-- | ||
|
||
endef | ||
|
||
|
||
ifneq ($(words $(MAKECMDGOALS)),1) | ||
$(error $(call Usage)) | ||
endif | ||
|
||
help: | ||
$(error $(call Usage)) | ||
|
||
|
||
# | ||
# Helpers | ||
# | ||
define Str/Upper | ||
$(shell echo $(1) | tr "[:lower:]" "[:upper:]") | ||
endef | ||
|
||
define Str/Str | ||
$(if $(findstring $(2),$(1)),$(2)) | ||
endef | ||
|
||
BLACK := \\033[30m | ||
RED := \\033[31m | ||
GREEN := \\033[32m | ||
BROWN := \\033[33m | ||
BLUE := \\033[34m | ||
PURPLE := \\033[35m | ||
CYAN := \\033[36m | ||
GREY := \\033[37m | ||
COLOR ?= $(GREEN) | ||
DEFAULT := \\033[0m | ||
define Trace | ||
@printf "$(COLOR) %s $(DEFAULT)\n" $(1) | ||
endef | ||
|
||
define Exec | ||
$(call Trace,"$(1)") | ||
@$(1) | ||
endef | ||
|
||
LANG :=C | ||
export LANG | ||
PWD := $(shell pwd) | ||
CP := cp -fpR | ||
SED := sed -i -e | ||
RM := rm -rf | ||
|
||
PWD := $(shell pwd) | ||
CONFIG_DIR := $(PWD)/config | ||
TOOLS_DIR := $(PWD)/tools | ||
TFTPBOOT_DIR ?= /tftpboot | ||
|
||
|
||
|
||
# | ||
# main/rescue firmware | ||
# | ||
SVN_RELEASE := 14414 | ||
RELEASE := 2.1.5-R$(SVN_RELEASE) | ||
|
||
include include/firmware.mk | ||
|
||
|
||
CONFIG_VERSION = CONFIG-R52.0 | ||
MAIN_VERSION := $(RELEASE) | ||
RESCUE_VERSION := $(RELEASE) | ||
ALL_VERSION := $(RELEASE) | ||
|
||
CIBOX_CONFIG_VERSION = $(CONFIG_VERSION) | ||
CIBOX_MAIN_VERSION := $(RELEASE) | ||
|
||
NB4_BOOTLOADER_VERSION := NB4-05-CFE | ||
NB4_CONFIG_VERSION = NB4-$(CONFIG_VERSION) | ||
NB4_MAIN_VERSION := $(MAIN_VERSION) | ||
NB4_RESCUE_VERSION := $(RESCUE_VERSION) | ||
NB4_ADSLDRIVER_VERSION := NB4-A2pB025f1 | ||
NB4_ALL_VERSION := $(ALL_VERSION) | ||
export NB4_CONFIG_VERSION | ||
|
||
NB5_BOOTLOADER_VERSION := 1.0.0 | ||
NB5_CONFIG_VERSION = NB5-$(CONFIG_VERSION) | ||
NB5_MAIN_VERSION := $(MAIN_VERSION) | ||
NB5_RESCUE_VERSION := 1.0.10 | ||
NB5_ALL_VERSION := $(ALL_VERSION) | ||
export NB5_CONFIG_VERSION | ||
|
||
|
||
|
||
PROFILE_CONFIG := $(if $(PROFILE),$(CONFIG_DIR)/$(BOX)/$(PROFILE).config) | ||
KERNEL_CONFIG := $(if $(PROFILE),$(CONFIG_DIR)/$(BOX)/$(PROFILE)-kernel.config) | ||
|
||
ifneq ($(PROFILE),) | ||
ifneq ($(shell grep "^CONFIG_LINUX_2_6_21=y" $(PROFILE_CONFIG)),) | ||
LINUX_VERSION := 2.6.21 | ||
LINUX_VERSION_RELEASE := $(LINUX_VERSION).7 | ||
endif | ||
ifneq ($(shell grep "^CONFIG_LINUX_2_6_27=y" $(PROFILE_CONFIG)),) | ||
LINUX_VERSION := 2.6.27 | ||
LINUX_VERSION_RELEASE := $(LINUX_VERSION).22 | ||
endif | ||
ifneq ($(shell grep "^CONFIG_LINUX_2_6_29=y" $(PROFILE_CONFIG)),) | ||
LINUX_VERSION := 2.6.29 | ||
LINUX_VERSION_RELEASE := $(LINUX_VERSION).2 | ||
endif | ||
|
||
# Board defines | ||
-include include/$(BOARD).mk | ||
|
||
MAKE_VARS += \ | ||
BOX=$(BOX) UBOX=$(UBOX) \ | ||
SVN_RELEASE=$(SVN_RELEASE) FIRMWARE_RELEASE=$(FIRMWARE_RELEASE) \ | ||
$(if $(shell grep "^CONFIG_NATIVE_TOOLCHAIN=y" $(PROFILE_CONFIG)),$(TOOLCHAIN_VARS)) | ||
endif | ||
|
||
NCPUS=$(shell echo $$((`cut -d '-' -f 2 /sys/devices/system/cpu/present`+2))) | ||
|
||
ifeq ($(V),) | ||
MAKE_FLAGS += -j$(NCPUS) | ||
MAKE_VARS += BUILD_LOG=1 | ||
endif | ||
|
||
empty = | ||
space = $(empty) $(empty) | ||
split = $(subst -,$(space),$(1)) | ||
split2 = $(subst /,$(space),$(1)) | ||
qstrip = $(strip $(subst ",,$(1))) | ||
#")) | ||
|
||
boxes_list := $(sort $(shell ls config/)) | ||
firmwares_list := $(shell find config/ -type f -name "*\.config" | sed -e 's|config/\(.*\)/\(.*\)\.config|\1-\2|g') | ||
|
||
#--------------------------------------------------------- | ||
help usage: | ||
cat README | ||
@echo " boxes: $(boxes_list)" | ||
@echo " firmwares: $(firmwares_list)" | ||
|
||
#--------------------------------------------------------- | ||
ifeq ($(words $(MAKECMDGOALS)),1) | ||
include include/vt102.mk | ||
Exec = $(call trace,"$(1)"); $(1) | ||
include include/openwrt.mk | ||
|
||
define Efixo/Release/Install | ||
$(call Exec,$(CP) $(TFTPBOOT_DIR)/$(1) $(TFTPBOOT_DIR)/$(BOX)/release-$(RELEASE)/$(2)) | ||
$(call Exec,cd $(TFTPBOOT_DIR)/$(BOX)/release-$(RELEASE)/ && sha256sum $(2) >> $(BOX)-$(RELEASE).sha256sum) | ||
endef | ||
|
||
nb4-bootloader: | ||
$(MAKE) -C cfe/ | ||
$(MAKE_VARS) $(MAKE) -C tools/make-bootloader | ||
$(OPENWRT_DIR)/staging_dir/host/bin/make-bootloader-$(BOX) \ | ||
$(PWD)/cfe/images/cfe6358.bin \ | ||
$(PWD)/cfe/images/$(NB4_BOOTLOADER_VERSION) \ | ||
$(NB4_BOOTLOADER_VERSION) | ||
|
||
$(CP) $(PWD)/cfe/images/$(NB4_BOOTLOADER_VERSION) \ | ||
$(TFTPBOOT_DIR)/openwrt-$(BOX)-bootloader | ||
|
||
nb4-main-adslphy: | ||
# Build adsl firmware | ||
$(MAKE_VARS) $(MAKE) -C tools/make-adsl-firmware | ||
$(OPENWRT_DIR)/staging_dir/host/bin/make-adsl-firmware \ | ||
$(LINUX_DIR)/broadcom-adsl/driver/adsl_phy.bin \ | ||
$(TFTPBOOT_DIR)/openwrt-$(BOX)-adslphy \ | ||
$(NB4_ADSLDRIVER_VERSION) | ||
|
||
|
||
nb4-release: | ||
# fill with ones | ||
cat /dev/zero | tr '\000' '\377' | dd bs=64k of=$(TFTPBOOT_DIR)/openwrt-$(BOX)-all count=128 seek=0 | ||
# bootloader | ||
dd bs=64k of=$(TFTPBOOT_DIR)/openwrt-$(BOX)-all if=$(TFTPBOOT_DIR)/openwrt-$(BOX)-bootloader seek=0 | ||
# main firmware | ||
dd bs=64k of=$(TFTPBOOT_DIR)/openwrt-$(BOX)-all if=$(TFTPBOOT_DIR)/openwrt-$(BOX)-main seek=1 | ||
# config | ||
# cat /dev/zero | tr '\000' '\377' | dd bs=64k of=$(TFTPBOOT_DIR)/openwrt-$(BOX)-all count=10 seek=86 | ||
# rescue firmware | ||
dd bs=64k of=$(TFTPBOOT_DIR)/openwrt-$(BOX)-all if=$(TFTPBOOT_DIR)/openwrt-$(BOX)-rescue seek=96 | ||
# adsl phy | ||
dd bs=64k of=$(TFTPBOOT_DIR)/openwrt-$(BOX)-all if=$(TFTPBOOT_DIR)/openwrt-$(BOX)-adslphy seek=120 | ||
# bootcounter | ||
dd if=/dev/zero bs=64k of=$(TFTPBOOT_DIR)/openwrt-$(BOX)-all count=1 seek=127 | ||
# install release | ||
|
||
nb4-full: | ||
# should build bootloader | ||
$(MAKE) -C $(PWD) $(BOX)-bootloader | ||
$(MAKE) -C $(PWD) $(BOX)-main | ||
$(MAKE) -C $(PWD) $(BOX)-rescue | ||
$(MAKE) -C $(PWD) $(BOX)-release | ||
|
||
|
||
|
||
world-clean: | ||
$(MAKE) -C $(OPENWRT_DIR)/ config-clean | ||
@$(RM) $(TARGET_DIR)/config-$(LINUX_VERSION) | ||
@$(RM) $(OPENWRT_DIR)/build_dir/ \ | ||
$(OPENWRT_DIR)/staging_dir/ \ | ||
$(OPENWRT_DIR)/logs/ \ | ||
$(OPENWRT_DIR)/tmp/ \ | ||
$(OPENWRT_DIR)/bin \ | ||
$(OPENWRT_DIR)/feeds/*.tmp \ | ||
$(OPENWRT_DIR)/feeds/*.index | ||
@$(RM) $(OPENWRT_DIR)/.config* | ||
@$(RM) include/packages.mk | ||
@-$(RM) $(OPENWRT_DIR)/: | ||
|
||
build-blame: | ||
@find openwrt/logs/ -type f | xargs ls -ult | head | ||
|
||
# | ||
# Packages rules | ||
# | ||
|
||
include/packages.mk: | ||
./tools/scripts/cowabunga-subtarget.py | ||
|
||
-include include/packages.mk | ||
include include/version.mk | ||
include include/efixo.mk | ||
endif | ||
include include/targets.mk |
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 |
---|---|---|
@@ -1,5 +1,61 @@ | ||
Build nb4-firmware: | ||
|
||
www: http://dev.efixo.net | ||
Firmware base on OpenWRT (Backfire 10.03.1-rc4 r24148): http://openwrt.org | ||
|
||
== Hacking == | ||
http://wiki.openwrt.org/doc/devel/start | ||
|
||
-- | ||
usage: | ||
|
||
<firmware>-menuconfig - Configure <firmware> | ||
<firmware>-kernel_menuconfig - Kernel configure <firmware> | ||
<firmware> - Build <firmware> | ||
<firmware>-<package>-clean - Clean <firmware> <package> | ||
<firmware>-<package>-compile - Build <firmware> <package> | ||
<firmware>-<package>-refresh - Refresh <firmware> <package> | ||
<firmware>-<package>-install - Install <firmware> <package> | ||
<box>-release - Release firmwares | ||
distclean - Clean everything | ||
logs - Print last builded packages | ||
|
||
Options: | ||
V=99: Output to stdout build in single thread | ||
|
||
* Build nb4-firmware: | ||
~$ cd svn.efixo.net/trunk | ||
~$ make nb4-main | ||
|
||
* Build nb5-firmware: | ||
~$ cd svn.efixo.net/trunk | ||
~$ wget http://downloads.efixo.net/toolchain-cavium-octeon-gcc-4.1.2.tar.bz2 | ||
~$ tar xf toolchain-cavium-octeon-gcc-4.1.2.tar.bz2 | ||
~$ make nb5-main | ||
|
||
-- | ||
Environment Variables | ||
|
||
VALID= | ||
- Disable root passwd | ||
PROFILING= | ||
- Profile CPU usage, output /tmp/make.profiling | ||
MAKE_JOBS= | ||
- Specifies the number of jobs (commands) to run simultaneously | ||
- [default value = cpu count + 1] | ||
TFTPBOOT_DIR= | ||
- Specifies the output directory | ||
- [default value = /tftpboot] | ||
HOST= | ||
- Specifies Host IP address | ||
- [default value = "HOST"] | ||
COLOR= | ||
- Specifies the output messages color | ||
- [default value = $(GREEN)] | ||
${BOX}_IPADDR= | ||
- Define BOX ipaddr | ||
NO_REV= | ||
- Prevent from firmware svn release copy | ||
NFS=1 | ||
- Add NFS support | ||
I_DO_NOT_WANT_REBUILD= | ||
- Build Image without rebuild firmware |
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,45 @@ | ||
# | ||
# Copyright (C) 2006-2008 OpenWrt.org | ||
# | ||
# This is free software, licensed under the GNU General Public License v2. | ||
# See /LICENSE for more information. | ||
# | ||
# $Id: Makefile 11868 2008-07-18 22:57:30Z nbd $ | ||
|
||
include $(TOPDIR)/rules.mk | ||
|
||
PKG_NAME:=atheros-int6k | ||
PKG_RELEASE:=1 | ||
|
||
PKG_TARFILE:=int6000-utils-1.2.0.tar.gz | ||
|
||
include $(INCLUDE_DIR)/package-bin-ipkg.mk | ||
|
||
define Package/atheros-int6k | ||
SECTION:=atheros | ||
CATEGORY:=Atheros HomePlug AV | ||
TITLE:=Atheros HomePlug AV diag int6k tools | ||
MAINTAINER:=Miguel GAIO | ||
endef | ||
|
||
define Build/Prepare | ||
tar xzf $(PKG_TARFILE) -C $(PKG_BUILD_DIR) | ||
$(call Build/Prepare/Default) | ||
endef | ||
|
||
MAKE_PATH := int6000-utils-1.2.0 | ||
MAKE_VARS += \ | ||
LFLAGS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" | ||
MAKE_FLAGS += \ | ||
FOLDERS="amp int6k int6k2 efsu tools mme ram nvm pib crypt nodes" | ||
|
||
define Package/atheros-int6k/install | ||
$(INSTALL_DIR) $(1)/usr/bin | ||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(MAKE_PATH)/int6k/int6k $(1)/usr/bin | ||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(MAKE_PATH)/int6k/int6keth $(1)/usr/bin | ||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(MAKE_PATH)/int6k/int6krate $(1)/usr/bin | ||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(MAKE_PATH)/int6k/int6ktone $(1)/usr/bin | ||
endef | ||
|
||
$(eval $(call BuildPackage,atheros-int6k)) | ||
|
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,28 @@ | ||
# MadWifi configuration | ||
|
||
config ATHEROS_VERSION | ||
string "Atheros Driver Version" | ||
default '1.3.1.54' | ||
depends on PACKAGE_kmod-atheros-wireless | ||
help | ||
Use the testing version of MadWiFi, which is newer, but also less tested | ||
May contain unexpected bugs :) | ||
|
||
config ATHEROS_REMOVE_5G_SUPPORT | ||
bool "Delete support for 5Ghz" | ||
depends on PACKAGE_kmod-atheros-wireless | ||
help | ||
|
||
choice | ||
prompt "Rate control algorithm selection" | ||
depends on PACKAGE_kmod-atheros-wireless | ||
default ATHEROS_RCA | ||
help | ||
This option controls how MadWifi chooses its bitrate. | ||
|
||
config ATHEROS_RCA | ||
bool "Use Atheros Ratecontrol 11N" | ||
help | ||
Proprietary ATheros RCA module control | ||
|
||
endchoice |
Oops, something went wrong.