Initial commit
This commit is contained in:
181
target/linux/ramips/image/Makefile
Normal file
181
target/linux/ramips/image/Makefile
Normal file
@@ -0,0 +1,181 @@
|
||||
#
|
||||
# Copyright (C) 2008-2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
DEVICE_VARS += DTS IMAGE_SIZE NETGEAR_BOARD_ID NETGEAR_HW_ID
|
||||
DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR
|
||||
DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK
|
||||
DEVICE_VARS += SERCOMM_HWID SERCOMM_HWVER SERCOMM_SWVER
|
||||
DEVICE_VARS += JCG_MAXSIZE
|
||||
|
||||
loadaddr-y := 0x80000000
|
||||
loadaddr-$(CONFIG_TARGET_ramips_rt288x) := 0x88000000
|
||||
loadaddr-$(CONFIG_TARGET_ramips_mt7621) := 0x80001000
|
||||
|
||||
KERNEL_LOADADDR := $(loadaddr-y)
|
||||
|
||||
KERNEL_DTB = kernel-bin | append-dtb | lzma
|
||||
define Device/Default
|
||||
PROFILES = Default
|
||||
KERNEL := $(KERNEL_DTB) | uImage lzma
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
DEVICE_DTS = $$(DTS)
|
||||
IMAGES := sysupgrade.bin
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_8M)
|
||||
SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
|
||||
sysupgrade_bin := append-kernel | append-rootfs | pad-rootfs
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
|
||||
endef
|
||||
|
||||
define Device/seama
|
||||
SEAMA_MTDBLOCK := 2
|
||||
IMAGES += factory.bin
|
||||
|
||||
# 64 bytes offset:
|
||||
# - 28 bytes seama_header
|
||||
# - 36 bytes of META data (4-bytes aligned)
|
||||
IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
|
||||
IMAGE/sysupgrade.bin := \
|
||||
$$(IMAGE/default) | seama | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
|
||||
IMAGE/factory.bin := \
|
||||
$$(IMAGE/default) | pad-rootfs -x 64 | seama | seama-seal | check-size $$$$(IMAGE_SIZE)
|
||||
SEAMA_SIGNATURE :=
|
||||
endef
|
||||
|
||||
define Build/jcg-header
|
||||
$(STAGING_DIR_HOST)/bin/jcgimage -v $(1) \
|
||||
$(if $(JCG_MAXSIZE), -m $$(($(subst k, * 1024,$(JCG_MAXSIZE)))),) \
|
||||
-u $@ -o $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/trx
|
||||
$(STAGING_DIR_HOST)/bin/trx $(1) \
|
||||
-o $@ \
|
||||
-m $(IMAGE_SIZE) \
|
||||
-f $(IMAGE_KERNEL) \
|
||||
-a 4 -f $(IMAGE_ROOTFS)
|
||||
endef
|
||||
|
||||
define Build/loader-common
|
||||
rm -rf $@.src
|
||||
$(MAKE) -C lzma-loader \
|
||||
PKG_BUILD_DIR="$@.src" \
|
||||
TARGET_DIR="$(dir $@)" LOADER_NAME="$(notdir $@)" \
|
||||
BOARD="$(BOARDNAME)" PLATFORM="$(PLATFORM)" \
|
||||
LZMA_TEXT_START=0x82000000 LOADADDR=$(KERNEL_LOADADDR) \
|
||||
$(1) compile loader.$(LOADER_TYPE)
|
||||
mv "$@.$(LOADER_TYPE)" "$@"
|
||||
rm -rf $@.src
|
||||
endef
|
||||
|
||||
define Build/loader-kernel
|
||||
$(call Build/loader-common,LOADER_DATA="$@")
|
||||
endef
|
||||
|
||||
define Build/relocate-kernel
|
||||
rm -rf $@.relocate
|
||||
$(CP) ../../generic/image/relocate $@.relocate
|
||||
$(MAKE) -C $@.relocate KERNEL_ADDR=$(KERNEL_LOADADDR) CROSS_COMPILE=$(TARGET_CROSS)
|
||||
( \
|
||||
dd if=$@.relocate/loader.bin bs=32 conv=sync && \
|
||||
perl -e '@s = stat("$@"); print pack("V", @s[7])' && \
|
||||
cat $@ \
|
||||
) > $@.new
|
||||
mv $@.new $@
|
||||
rm -rf $@.relocate
|
||||
endef
|
||||
|
||||
define Build/umedia-header
|
||||
fix-u-media-header -T 0x46 -B $(1) -i $@ -o $@.new && mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/edimax-header
|
||||
$(STAGING_DIR_HOST)/bin/mkedimaximg -i $@ -o $@.new $(1)
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/poray-header
|
||||
$(STAGING_DIR_HOST)/bin/mkporayfw $(1) -f $@ -o $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/wrg-header
|
||||
mkwrgimg -i $@ -d "/dev/mtdblock/2" -s $(1) -o $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
# combine kernel and rootfs into one image
|
||||
# mkdlinkfw <type> <optional extra arguments to mkdlinkfw binary>
|
||||
|
||||
define Build/mkdlinkfw
|
||||
-$(STAGING_DIR_HOST)/bin/mkdlinkfw \
|
||||
-k $(IMAGE_KERNEL) \
|
||||
-r $(IMAGE_ROOTFS) \
|
||||
-o $@ \
|
||||
$(if $(DLINK_IMAGE_OFFSET), -O $(DLINK_IMAGE_OFFSET)) \
|
||||
-s $(DLINK_FIRMWARE_SIZE)
|
||||
endef
|
||||
|
||||
define Build/mkdlinkfw-factory
|
||||
-$(STAGING_DIR_HOST)/bin/mkdlinkfw \
|
||||
-m $(DLINK_ROM_ID) -f $(DLINK_FAMILY_MEMBER) \
|
||||
-F $@ \
|
||||
-o $@.new \
|
||||
$(if $(DLINK_IMAGE_OFFSET), -O $(DLINK_IMAGE_OFFSET)) \
|
||||
-s $(DLINK_FIRMWARE_SIZE)
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/zyimage
|
||||
$(STAGING_DIR_HOST)/bin/zyimage $(1) $@
|
||||
endef
|
||||
|
||||
define Build/sercom-seal
|
||||
$(STAGING_DIR_HOST)/bin/mksercommfw \
|
||||
-i $@ \
|
||||
-b $(SERCOMM_HWID) \
|
||||
-r $(SERCOMM_HWVER) \
|
||||
-v $(SERCOMM_SWVER) \
|
||||
$(1)
|
||||
endef
|
||||
|
||||
define Build/sercom-footer
|
||||
$(call Build/sercom-seal,-f)
|
||||
endef
|
||||
|
||||
ralink_default_fw_size_4M=3866624
|
||||
ralink_default_fw_size_8M=8060928
|
||||
ralink_default_fw_size_16M=16121856
|
||||
ralink_default_fw_size_32M=33226752
|
||||
|
||||
ifeq ($(SUBTARGET),rt288x)
|
||||
include rt288x.mk
|
||||
endif
|
||||
|
||||
ifeq ($(SUBTARGET),rt305x)
|
||||
include rt305x.mk
|
||||
endif
|
||||
|
||||
ifeq ($(SUBTARGET),rt3883)
|
||||
include rt3883.mk
|
||||
endif
|
||||
|
||||
ifeq ($(SUBTARGET),mt7620)
|
||||
include mt7620.mk
|
||||
endif
|
||||
|
||||
ifeq ($(SUBTARGET),mt7621)
|
||||
include mt7621.mk
|
||||
endif
|
||||
|
||||
ifeq ($(SUBTARGET),mt76x8)
|
||||
include mt76x8.mk
|
||||
endif
|
||||
|
||||
$(eval $(call BuildImage))
|
||||
66
target/linux/ramips/image/lzma-loader/Makefile
Normal file
66
target/linux/ramips/image/lzma-loader/Makefile
Normal file
@@ -0,0 +1,66 @@
|
||||
#
|
||||
# Copyright (C) 2011 OpenWrt.org
|
||||
# Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LZMA_TEXT_START := 0x80a00000
|
||||
LOADER := loader.bin
|
||||
LOADER_NAME := $(basename $(notdir $(LOADER)))
|
||||
LOADER_DATA :=
|
||||
TARGET_DIR :=
|
||||
FLASH_OFFS :=
|
||||
FLASH_MAX :=
|
||||
BOARD :=
|
||||
PLATFORM :=
|
||||
|
||||
ifeq ($(TARGET_DIR),)
|
||||
TARGET_DIR := $(KDIR)
|
||||
endif
|
||||
|
||||
LOADER_BIN := $(TARGET_DIR)/$(LOADER_NAME).bin
|
||||
LOADER_GZ := $(TARGET_DIR)/$(LOADER_NAME).gz
|
||||
LOADER_ELF := $(TARGET_DIR)/$(LOADER_NAME).elf
|
||||
|
||||
PKG_NAME := lzma-loader
|
||||
PKG_BUILD_DIR := $(KDIR)/$(PKG_NAME)
|
||||
|
||||
.PHONY : loader-compile loader.bin loader.elf loader.gz
|
||||
|
||||
$(PKG_BUILD_DIR)/.prepared:
|
||||
mkdir $(PKG_BUILD_DIR)
|
||||
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
||||
touch $@
|
||||
|
||||
loader-compile: $(PKG_BUILD_DIR)/.prepared
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
LZMA_TEXT_START=$(LZMA_TEXT_START) \
|
||||
LOADER_DATA=$(LOADER_DATA) \
|
||||
FLASH_OFFS=$(FLASH_OFFS) \
|
||||
FLASH_MAX=$(FLASH_MAX) \
|
||||
BOARD="$(BOARD)" \
|
||||
PLATFORM="$(PLATFORM)" \
|
||||
clean all
|
||||
|
||||
loader.gz: $(PKG_BUILD_DIR)/loader.bin
|
||||
gzip -nc9 $< > $(LOADER_GZ)
|
||||
|
||||
loader.elf: $(PKG_BUILD_DIR)/loader.elf
|
||||
$(CP) $< $(LOADER_ELF)
|
||||
|
||||
loader.bin: $(PKG_BUILD_DIR)/loader.bin
|
||||
$(CP) $< $(LOADER_BIN)
|
||||
|
||||
download:
|
||||
prepare: $(PKG_BUILD_DIR)/.prepared
|
||||
compile: loader-compile
|
||||
|
||||
install:
|
||||
|
||||
clean:
|
||||
rm -rf $(PKG_BUILD_DIR)
|
||||
|
||||
584
target/linux/ramips/image/lzma-loader/src/LzmaDecode.c
Normal file
584
target/linux/ramips/image/lzma-loader/src/LzmaDecode.c
Normal file
@@ -0,0 +1,584 @@
|
||||
/*
|
||||
LzmaDecode.c
|
||||
LZMA Decoder (optimized for Speed version)
|
||||
|
||||
LZMA SDK 4.40 Copyright (c) 1999-2006 Igor Pavlov (2006-05-01)
|
||||
http://www.7-zip.org/
|
||||
|
||||
LZMA SDK is licensed under two licenses:
|
||||
1) GNU Lesser General Public License (GNU LGPL)
|
||||
2) Common Public License (CPL)
|
||||
It means that you can select one of these two licenses and
|
||||
follow rules of that license.
|
||||
|
||||
SPECIAL EXCEPTION:
|
||||
Igor Pavlov, as the author of this Code, expressly permits you to
|
||||
statically or dynamically link your Code (or bind by name) to the
|
||||
interfaces of this file without subjecting your linked Code to the
|
||||
terms of the CPL or GNU LGPL. Any modifications or additions
|
||||
to this file, however, are subject to the LGPL or CPL terms.
|
||||
*/
|
||||
|
||||
#include "LzmaDecode.h"
|
||||
|
||||
#define kNumTopBits 24
|
||||
#define kTopValue ((UInt32)1 << kNumTopBits)
|
||||
|
||||
#define kNumBitModelTotalBits 11
|
||||
#define kBitModelTotal (1 << kNumBitModelTotalBits)
|
||||
#define kNumMoveBits 5
|
||||
|
||||
#define RC_READ_BYTE (*Buffer++)
|
||||
|
||||
#define RC_INIT2 Code = 0; Range = 0xFFFFFFFF; \
|
||||
{ int i; for(i = 0; i < 5; i++) { RC_TEST; Code = (Code << 8) | RC_READ_BYTE; }}
|
||||
|
||||
#ifdef _LZMA_IN_CB
|
||||
|
||||
#define RC_TEST { if (Buffer == BufferLim) \
|
||||
{ SizeT size; int result = InCallback->Read(InCallback, &Buffer, &size); if (result != LZMA_RESULT_OK) return result; \
|
||||
BufferLim = Buffer + size; if (size == 0) return LZMA_RESULT_DATA_ERROR; }}
|
||||
|
||||
#define RC_INIT Buffer = BufferLim = 0; RC_INIT2
|
||||
|
||||
#else
|
||||
|
||||
#define RC_TEST { if (Buffer == BufferLim) return LZMA_RESULT_DATA_ERROR; }
|
||||
|
||||
#define RC_INIT(buffer, bufferSize) Buffer = buffer; BufferLim = buffer + bufferSize; RC_INIT2
|
||||
|
||||
#endif
|
||||
|
||||
#define RC_NORMALIZE if (Range < kTopValue) { RC_TEST; Range <<= 8; Code = (Code << 8) | RC_READ_BYTE; }
|
||||
|
||||
#define IfBit0(p) RC_NORMALIZE; bound = (Range >> kNumBitModelTotalBits) * *(p); if (Code < bound)
|
||||
#define UpdateBit0(p) Range = bound; *(p) += (kBitModelTotal - *(p)) >> kNumMoveBits;
|
||||
#define UpdateBit1(p) Range -= bound; Code -= bound; *(p) -= (*(p)) >> kNumMoveBits;
|
||||
|
||||
#define RC_GET_BIT2(p, mi, A0, A1) IfBit0(p) \
|
||||
{ UpdateBit0(p); mi <<= 1; A0; } else \
|
||||
{ UpdateBit1(p); mi = (mi + mi) + 1; A1; }
|
||||
|
||||
#define RC_GET_BIT(p, mi) RC_GET_BIT2(p, mi, ; , ;)
|
||||
|
||||
#define RangeDecoderBitTreeDecode(probs, numLevels, res) \
|
||||
{ int i = numLevels; res = 1; \
|
||||
do { CProb *p = probs + res; RC_GET_BIT(p, res) } while(--i != 0); \
|
||||
res -= (1 << numLevels); }
|
||||
|
||||
|
||||
#define kNumPosBitsMax 4
|
||||
#define kNumPosStatesMax (1 << kNumPosBitsMax)
|
||||
|
||||
#define kLenNumLowBits 3
|
||||
#define kLenNumLowSymbols (1 << kLenNumLowBits)
|
||||
#define kLenNumMidBits 3
|
||||
#define kLenNumMidSymbols (1 << kLenNumMidBits)
|
||||
#define kLenNumHighBits 8
|
||||
#define kLenNumHighSymbols (1 << kLenNumHighBits)
|
||||
|
||||
#define LenChoice 0
|
||||
#define LenChoice2 (LenChoice + 1)
|
||||
#define LenLow (LenChoice2 + 1)
|
||||
#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
|
||||
#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
|
||||
#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
|
||||
|
||||
|
||||
#define kNumStates 12
|
||||
#define kNumLitStates 7
|
||||
|
||||
#define kStartPosModelIndex 4
|
||||
#define kEndPosModelIndex 14
|
||||
#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
|
||||
|
||||
#define kNumPosSlotBits 6
|
||||
#define kNumLenToPosStates 4
|
||||
|
||||
#define kNumAlignBits 4
|
||||
#define kAlignTableSize (1 << kNumAlignBits)
|
||||
|
||||
#define kMatchMinLen 2
|
||||
|
||||
#define IsMatch 0
|
||||
#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
|
||||
#define IsRepG0 (IsRep + kNumStates)
|
||||
#define IsRepG1 (IsRepG0 + kNumStates)
|
||||
#define IsRepG2 (IsRepG1 + kNumStates)
|
||||
#define IsRep0Long (IsRepG2 + kNumStates)
|
||||
#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
|
||||
#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
|
||||
#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
|
||||
#define LenCoder (Align + kAlignTableSize)
|
||||
#define RepLenCoder (LenCoder + kNumLenProbs)
|
||||
#define Literal (RepLenCoder + kNumLenProbs)
|
||||
|
||||
#if Literal != LZMA_BASE_SIZE
|
||||
StopCompilingDueBUG
|
||||
#endif
|
||||
|
||||
int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, int size)
|
||||
{
|
||||
unsigned char prop0;
|
||||
if (size < LZMA_PROPERTIES_SIZE)
|
||||
return LZMA_RESULT_DATA_ERROR;
|
||||
prop0 = propsData[0];
|
||||
if (prop0 >= (9 * 5 * 5))
|
||||
return LZMA_RESULT_DATA_ERROR;
|
||||
{
|
||||
for (propsRes->pb = 0; prop0 >= (9 * 5); propsRes->pb++, prop0 -= (9 * 5));
|
||||
for (propsRes->lp = 0; prop0 >= 9; propsRes->lp++, prop0 -= 9);
|
||||
propsRes->lc = prop0;
|
||||
/*
|
||||
unsigned char remainder = (unsigned char)(prop0 / 9);
|
||||
propsRes->lc = prop0 % 9;
|
||||
propsRes->pb = remainder / 5;
|
||||
propsRes->lp = remainder % 5;
|
||||
*/
|
||||
}
|
||||
|
||||
#ifdef _LZMA_OUT_READ
|
||||
{
|
||||
int i;
|
||||
propsRes->DictionarySize = 0;
|
||||
for (i = 0; i < 4; i++)
|
||||
propsRes->DictionarySize += (UInt32)(propsData[1 + i]) << (i * 8);
|
||||
if (propsRes->DictionarySize == 0)
|
||||
propsRes->DictionarySize = 1;
|
||||
}
|
||||
#endif
|
||||
return LZMA_RESULT_OK;
|
||||
}
|
||||
|
||||
#define kLzmaStreamWasFinishedId (-1)
|
||||
|
||||
int LzmaDecode(CLzmaDecoderState *vs,
|
||||
#ifdef _LZMA_IN_CB
|
||||
ILzmaInCallback *InCallback,
|
||||
#else
|
||||
const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,
|
||||
#endif
|
||||
unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed)
|
||||
{
|
||||
CProb *p = vs->Probs;
|
||||
SizeT nowPos = 0;
|
||||
Byte previousByte = 0;
|
||||
UInt32 posStateMask = (1 << (vs->Properties.pb)) - 1;
|
||||
UInt32 literalPosMask = (1 << (vs->Properties.lp)) - 1;
|
||||
int lc = vs->Properties.lc;
|
||||
|
||||
#ifdef _LZMA_OUT_READ
|
||||
|
||||
UInt32 Range = vs->Range;
|
||||
UInt32 Code = vs->Code;
|
||||
#ifdef _LZMA_IN_CB
|
||||
const Byte *Buffer = vs->Buffer;
|
||||
const Byte *BufferLim = vs->BufferLim;
|
||||
#else
|
||||
const Byte *Buffer = inStream;
|
||||
const Byte *BufferLim = inStream + inSize;
|
||||
#endif
|
||||
int state = vs->State;
|
||||
UInt32 rep0 = vs->Reps[0], rep1 = vs->Reps[1], rep2 = vs->Reps[2], rep3 = vs->Reps[3];
|
||||
int len = vs->RemainLen;
|
||||
UInt32 globalPos = vs->GlobalPos;
|
||||
UInt32 distanceLimit = vs->DistanceLimit;
|
||||
|
||||
Byte *dictionary = vs->Dictionary;
|
||||
UInt32 dictionarySize = vs->Properties.DictionarySize;
|
||||
UInt32 dictionaryPos = vs->DictionaryPos;
|
||||
|
||||
Byte tempDictionary[4];
|
||||
|
||||
#ifndef _LZMA_IN_CB
|
||||
*inSizeProcessed = 0;
|
||||
#endif
|
||||
*outSizeProcessed = 0;
|
||||
if (len == kLzmaStreamWasFinishedId)
|
||||
return LZMA_RESULT_OK;
|
||||
|
||||
if (dictionarySize == 0)
|
||||
{
|
||||
dictionary = tempDictionary;
|
||||
dictionarySize = 1;
|
||||
tempDictionary[0] = vs->TempDictionary[0];
|
||||
}
|
||||
|
||||
if (len == kLzmaNeedInitId)
|
||||
{
|
||||
{
|
||||
UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + vs->Properties.lp));
|
||||
UInt32 i;
|
||||
for (i = 0; i < numProbs; i++)
|
||||
p[i] = kBitModelTotal >> 1;
|
||||
rep0 = rep1 = rep2 = rep3 = 1;
|
||||
state = 0;
|
||||
globalPos = 0;
|
||||
distanceLimit = 0;
|
||||
dictionaryPos = 0;
|
||||
dictionary[dictionarySize - 1] = 0;
|
||||
#ifdef _LZMA_IN_CB
|
||||
RC_INIT;
|
||||
#else
|
||||
RC_INIT(inStream, inSize);
|
||||
#endif
|
||||
}
|
||||
len = 0;
|
||||
}
|
||||
while(len != 0 && nowPos < outSize)
|
||||
{
|
||||
UInt32 pos = dictionaryPos - rep0;
|
||||
if (pos >= dictionarySize)
|
||||
pos += dictionarySize;
|
||||
outStream[nowPos++] = dictionary[dictionaryPos] = dictionary[pos];
|
||||
if (++dictionaryPos == dictionarySize)
|
||||
dictionaryPos = 0;
|
||||
len--;
|
||||
}
|
||||
if (dictionaryPos == 0)
|
||||
previousByte = dictionary[dictionarySize - 1];
|
||||
else
|
||||
previousByte = dictionary[dictionaryPos - 1];
|
||||
|
||||
#else /* if !_LZMA_OUT_READ */
|
||||
|
||||
int state = 0;
|
||||
UInt32 rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1;
|
||||
int len = 0;
|
||||
const Byte *Buffer;
|
||||
const Byte *BufferLim;
|
||||
UInt32 Range;
|
||||
UInt32 Code;
|
||||
|
||||
#ifndef _LZMA_IN_CB
|
||||
*inSizeProcessed = 0;
|
||||
#endif
|
||||
*outSizeProcessed = 0;
|
||||
|
||||
{
|
||||
UInt32 i;
|
||||
UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + vs->Properties.lp));
|
||||
for (i = 0; i < numProbs; i++)
|
||||
p[i] = kBitModelTotal >> 1;
|
||||
}
|
||||
|
||||
#ifdef _LZMA_IN_CB
|
||||
RC_INIT;
|
||||
#else
|
||||
RC_INIT(inStream, inSize);
|
||||
#endif
|
||||
|
||||
#endif /* _LZMA_OUT_READ */
|
||||
|
||||
while(nowPos < outSize)
|
||||
{
|
||||
CProb *prob;
|
||||
UInt32 bound;
|
||||
int posState = (int)(
|
||||
(nowPos
|
||||
#ifdef _LZMA_OUT_READ
|
||||
+ globalPos
|
||||
#endif
|
||||
)
|
||||
& posStateMask);
|
||||
|
||||
prob = p + IsMatch + (state << kNumPosBitsMax) + posState;
|
||||
IfBit0(prob)
|
||||
{
|
||||
int symbol = 1;
|
||||
UpdateBit0(prob)
|
||||
prob = p + Literal + (LZMA_LIT_SIZE *
|
||||
(((
|
||||
(nowPos
|
||||
#ifdef _LZMA_OUT_READ
|
||||
+ globalPos
|
||||
#endif
|
||||
)
|
||||
& literalPosMask) << lc) + (previousByte >> (8 - lc))));
|
||||
|
||||
if (state >= kNumLitStates)
|
||||
{
|
||||
int matchByte;
|
||||
#ifdef _LZMA_OUT_READ
|
||||
UInt32 pos = dictionaryPos - rep0;
|
||||
if (pos >= dictionarySize)
|
||||
pos += dictionarySize;
|
||||
matchByte = dictionary[pos];
|
||||
#else
|
||||
matchByte = outStream[nowPos - rep0];
|
||||
#endif
|
||||
do
|
||||
{
|
||||
int bit;
|
||||
CProb *probLit;
|
||||
matchByte <<= 1;
|
||||
bit = (matchByte & 0x100);
|
||||
probLit = prob + 0x100 + bit + symbol;
|
||||
RC_GET_BIT2(probLit, symbol, if (bit != 0) break, if (bit == 0) break)
|
||||
}
|
||||
while (symbol < 0x100);
|
||||
}
|
||||
while (symbol < 0x100)
|
||||
{
|
||||
CProb *probLit = prob + symbol;
|
||||
RC_GET_BIT(probLit, symbol)
|
||||
}
|
||||
previousByte = (Byte)symbol;
|
||||
|
||||
outStream[nowPos++] = previousByte;
|
||||
#ifdef _LZMA_OUT_READ
|
||||
if (distanceLimit < dictionarySize)
|
||||
distanceLimit++;
|
||||
|
||||
dictionary[dictionaryPos] = previousByte;
|
||||
if (++dictionaryPos == dictionarySize)
|
||||
dictionaryPos = 0;
|
||||
#endif
|
||||
if (state < 4) state = 0;
|
||||
else if (state < 10) state -= 3;
|
||||
else state -= 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateBit1(prob);
|
||||
prob = p + IsRep + state;
|
||||
IfBit0(prob)
|
||||
{
|
||||
UpdateBit0(prob);
|
||||
rep3 = rep2;
|
||||
rep2 = rep1;
|
||||
rep1 = rep0;
|
||||
state = state < kNumLitStates ? 0 : 3;
|
||||
prob = p + LenCoder;
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateBit1(prob);
|
||||
prob = p + IsRepG0 + state;
|
||||
IfBit0(prob)
|
||||
{
|
||||
UpdateBit0(prob);
|
||||
prob = p + IsRep0Long + (state << kNumPosBitsMax) + posState;
|
||||
IfBit0(prob)
|
||||
{
|
||||
#ifdef _LZMA_OUT_READ
|
||||
UInt32 pos;
|
||||
#endif
|
||||
UpdateBit0(prob);
|
||||
|
||||
#ifdef _LZMA_OUT_READ
|
||||
if (distanceLimit == 0)
|
||||
#else
|
||||
if (nowPos == 0)
|
||||
#endif
|
||||
return LZMA_RESULT_DATA_ERROR;
|
||||
|
||||
state = state < kNumLitStates ? 9 : 11;
|
||||
#ifdef _LZMA_OUT_READ
|
||||
pos = dictionaryPos - rep0;
|
||||
if (pos >= dictionarySize)
|
||||
pos += dictionarySize;
|
||||
previousByte = dictionary[pos];
|
||||
dictionary[dictionaryPos] = previousByte;
|
||||
if (++dictionaryPos == dictionarySize)
|
||||
dictionaryPos = 0;
|
||||
#else
|
||||
previousByte = outStream[nowPos - rep0];
|
||||
#endif
|
||||
outStream[nowPos++] = previousByte;
|
||||
#ifdef _LZMA_OUT_READ
|
||||
if (distanceLimit < dictionarySize)
|
||||
distanceLimit++;
|
||||
#endif
|
||||
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateBit1(prob);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UInt32 distance;
|
||||
UpdateBit1(prob);
|
||||
prob = p + IsRepG1 + state;
|
||||
IfBit0(prob)
|
||||
{
|
||||
UpdateBit0(prob);
|
||||
distance = rep1;
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateBit1(prob);
|
||||
prob = p + IsRepG2 + state;
|
||||
IfBit0(prob)
|
||||
{
|
||||
UpdateBit0(prob);
|
||||
distance = rep2;
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateBit1(prob);
|
||||
distance = rep3;
|
||||
rep3 = rep2;
|
||||
}
|
||||
rep2 = rep1;
|
||||
}
|
||||
rep1 = rep0;
|
||||
rep0 = distance;
|
||||
}
|
||||
state = state < kNumLitStates ? 8 : 11;
|
||||
prob = p + RepLenCoder;
|
||||
}
|
||||
{
|
||||
int numBits, offset;
|
||||
CProb *probLen = prob + LenChoice;
|
||||
IfBit0(probLen)
|
||||
{
|
||||
UpdateBit0(probLen);
|
||||
probLen = prob + LenLow + (posState << kLenNumLowBits);
|
||||
offset = 0;
|
||||
numBits = kLenNumLowBits;
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateBit1(probLen);
|
||||
probLen = prob + LenChoice2;
|
||||
IfBit0(probLen)
|
||||
{
|
||||
UpdateBit0(probLen);
|
||||
probLen = prob + LenMid + (posState << kLenNumMidBits);
|
||||
offset = kLenNumLowSymbols;
|
||||
numBits = kLenNumMidBits;
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateBit1(probLen);
|
||||
probLen = prob + LenHigh;
|
||||
offset = kLenNumLowSymbols + kLenNumMidSymbols;
|
||||
numBits = kLenNumHighBits;
|
||||
}
|
||||
}
|
||||
RangeDecoderBitTreeDecode(probLen, numBits, len);
|
||||
len += offset;
|
||||
}
|
||||
|
||||
if (state < 4)
|
||||
{
|
||||
int posSlot;
|
||||
state += kNumLitStates;
|
||||
prob = p + PosSlot +
|
||||
((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
|
||||
kNumPosSlotBits);
|
||||
RangeDecoderBitTreeDecode(prob, kNumPosSlotBits, posSlot);
|
||||
if (posSlot >= kStartPosModelIndex)
|
||||
{
|
||||
int numDirectBits = ((posSlot >> 1) - 1);
|
||||
rep0 = (2 | ((UInt32)posSlot & 1));
|
||||
if (posSlot < kEndPosModelIndex)
|
||||
{
|
||||
rep0 <<= numDirectBits;
|
||||
prob = p + SpecPos + rep0 - posSlot - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
numDirectBits -= kNumAlignBits;
|
||||
do
|
||||
{
|
||||
RC_NORMALIZE
|
||||
Range >>= 1;
|
||||
rep0 <<= 1;
|
||||
if (Code >= Range)
|
||||
{
|
||||
Code -= Range;
|
||||
rep0 |= 1;
|
||||
}
|
||||
}
|
||||
while (--numDirectBits != 0);
|
||||
prob = p + Align;
|
||||
rep0 <<= kNumAlignBits;
|
||||
numDirectBits = kNumAlignBits;
|
||||
}
|
||||
{
|
||||
int i = 1;
|
||||
int mi = 1;
|
||||
do
|
||||
{
|
||||
CProb *prob3 = prob + mi;
|
||||
RC_GET_BIT2(prob3, mi, ; , rep0 |= i);
|
||||
i <<= 1;
|
||||
}
|
||||
while(--numDirectBits != 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
rep0 = posSlot;
|
||||
if (++rep0 == (UInt32)(0))
|
||||
{
|
||||
/* it's for stream version */
|
||||
len = kLzmaStreamWasFinishedId;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
len += kMatchMinLen;
|
||||
#ifdef _LZMA_OUT_READ
|
||||
if (rep0 > distanceLimit)
|
||||
#else
|
||||
if (rep0 > nowPos)
|
||||
#endif
|
||||
return LZMA_RESULT_DATA_ERROR;
|
||||
|
||||
#ifdef _LZMA_OUT_READ
|
||||
if (dictionarySize - distanceLimit > (UInt32)len)
|
||||
distanceLimit += len;
|
||||
else
|
||||
distanceLimit = dictionarySize;
|
||||
#endif
|
||||
|
||||
do
|
||||
{
|
||||
#ifdef _LZMA_OUT_READ
|
||||
UInt32 pos = dictionaryPos - rep0;
|
||||
if (pos >= dictionarySize)
|
||||
pos += dictionarySize;
|
||||
previousByte = dictionary[pos];
|
||||
dictionary[dictionaryPos] = previousByte;
|
||||
if (++dictionaryPos == dictionarySize)
|
||||
dictionaryPos = 0;
|
||||
#else
|
||||
previousByte = outStream[nowPos - rep0];
|
||||
#endif
|
||||
len--;
|
||||
outStream[nowPos++] = previousByte;
|
||||
}
|
||||
while(len != 0 && nowPos < outSize);
|
||||
}
|
||||
}
|
||||
RC_NORMALIZE;
|
||||
|
||||
#ifdef _LZMA_OUT_READ
|
||||
vs->Range = Range;
|
||||
vs->Code = Code;
|
||||
vs->DictionaryPos = dictionaryPos;
|
||||
vs->GlobalPos = globalPos + (UInt32)nowPos;
|
||||
vs->DistanceLimit = distanceLimit;
|
||||
vs->Reps[0] = rep0;
|
||||
vs->Reps[1] = rep1;
|
||||
vs->Reps[2] = rep2;
|
||||
vs->Reps[3] = rep3;
|
||||
vs->State = state;
|
||||
vs->RemainLen = len;
|
||||
vs->TempDictionary[0] = tempDictionary[0];
|
||||
#endif
|
||||
|
||||
#ifdef _LZMA_IN_CB
|
||||
vs->Buffer = Buffer;
|
||||
vs->BufferLim = BufferLim;
|
||||
#else
|
||||
*inSizeProcessed = (SizeT)(Buffer - inStream);
|
||||
#endif
|
||||
*outSizeProcessed = nowPos;
|
||||
return LZMA_RESULT_OK;
|
||||
}
|
||||
113
target/linux/ramips/image/lzma-loader/src/LzmaDecode.h
Normal file
113
target/linux/ramips/image/lzma-loader/src/LzmaDecode.h
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
LzmaDecode.h
|
||||
LZMA Decoder interface
|
||||
|
||||
LZMA SDK 4.40 Copyright (c) 1999-2006 Igor Pavlov (2006-05-01)
|
||||
http://www.7-zip.org/
|
||||
|
||||
LZMA SDK is licensed under two licenses:
|
||||
1) GNU Lesser General Public License (GNU LGPL)
|
||||
2) Common Public License (CPL)
|
||||
It means that you can select one of these two licenses and
|
||||
follow rules of that license.
|
||||
|
||||
SPECIAL EXCEPTION:
|
||||
Igor Pavlov, as the author of this code, expressly permits you to
|
||||
statically or dynamically link your code (or bind by name) to the
|
||||
interfaces of this file without subjecting your linked code to the
|
||||
terms of the CPL or GNU LGPL. Any modifications or additions
|
||||
to this file, however, are subject to the LGPL or CPL terms.
|
||||
*/
|
||||
|
||||
#ifndef __LZMADECODE_H
|
||||
#define __LZMADECODE_H
|
||||
|
||||
#include "LzmaTypes.h"
|
||||
|
||||
/* #define _LZMA_IN_CB */
|
||||
/* Use callback for input data */
|
||||
|
||||
/* #define _LZMA_OUT_READ */
|
||||
/* Use read function for output data */
|
||||
|
||||
/* #define _LZMA_PROB32 */
|
||||
/* It can increase speed on some 32-bit CPUs,
|
||||
but memory usage will be doubled in that case */
|
||||
|
||||
/* #define _LZMA_LOC_OPT */
|
||||
/* Enable local speed optimizations inside code */
|
||||
|
||||
#ifdef _LZMA_PROB32
|
||||
#define CProb UInt32
|
||||
#else
|
||||
#define CProb UInt16
|
||||
#endif
|
||||
|
||||
#define LZMA_RESULT_OK 0
|
||||
#define LZMA_RESULT_DATA_ERROR 1
|
||||
|
||||
#ifdef _LZMA_IN_CB
|
||||
typedef struct _ILzmaInCallback
|
||||
{
|
||||
int (*Read)(void *object, const unsigned char **buffer, SizeT *bufferSize);
|
||||
} ILzmaInCallback;
|
||||
#endif
|
||||
|
||||
#define LZMA_BASE_SIZE 1846
|
||||
#define LZMA_LIT_SIZE 768
|
||||
|
||||
#define LZMA_PROPERTIES_SIZE 5
|
||||
|
||||
typedef struct _CLzmaProperties
|
||||
{
|
||||
int lc;
|
||||
int lp;
|
||||
int pb;
|
||||
#ifdef _LZMA_OUT_READ
|
||||
UInt32 DictionarySize;
|
||||
#endif
|
||||
}CLzmaProperties;
|
||||
|
||||
int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, int size);
|
||||
|
||||
#define LzmaGetNumProbs(Properties) (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((Properties)->lc + (Properties)->lp)))
|
||||
|
||||
#define kLzmaNeedInitId (-2)
|
||||
|
||||
typedef struct _CLzmaDecoderState
|
||||
{
|
||||
CLzmaProperties Properties;
|
||||
CProb *Probs;
|
||||
|
||||
#ifdef _LZMA_IN_CB
|
||||
const unsigned char *Buffer;
|
||||
const unsigned char *BufferLim;
|
||||
#endif
|
||||
|
||||
#ifdef _LZMA_OUT_READ
|
||||
unsigned char *Dictionary;
|
||||
UInt32 Range;
|
||||
UInt32 Code;
|
||||
UInt32 DictionaryPos;
|
||||
UInt32 GlobalPos;
|
||||
UInt32 DistanceLimit;
|
||||
UInt32 Reps[4];
|
||||
int State;
|
||||
int RemainLen;
|
||||
unsigned char TempDictionary[4];
|
||||
#endif
|
||||
} CLzmaDecoderState;
|
||||
|
||||
#ifdef _LZMA_OUT_READ
|
||||
#define LzmaDecoderInit(vs) { (vs)->RemainLen = kLzmaNeedInitId; }
|
||||
#endif
|
||||
|
||||
int LzmaDecode(CLzmaDecoderState *vs,
|
||||
#ifdef _LZMA_IN_CB
|
||||
ILzmaInCallback *inCallback,
|
||||
#else
|
||||
const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,
|
||||
#endif
|
||||
unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed);
|
||||
|
||||
#endif
|
||||
45
target/linux/ramips/image/lzma-loader/src/LzmaTypes.h
Normal file
45
target/linux/ramips/image/lzma-loader/src/LzmaTypes.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
LzmaTypes.h
|
||||
|
||||
Types for LZMA Decoder
|
||||
|
||||
This file written and distributed to public domain by Igor Pavlov.
|
||||
This file is part of LZMA SDK 4.40 (2006-05-01)
|
||||
*/
|
||||
|
||||
#ifndef __LZMATYPES_H
|
||||
#define __LZMATYPES_H
|
||||
|
||||
#ifndef _7ZIP_BYTE_DEFINED
|
||||
#define _7ZIP_BYTE_DEFINED
|
||||
typedef unsigned char Byte;
|
||||
#endif
|
||||
|
||||
#ifndef _7ZIP_UINT16_DEFINED
|
||||
#define _7ZIP_UINT16_DEFINED
|
||||
typedef unsigned short UInt16;
|
||||
#endif
|
||||
|
||||
#ifndef _7ZIP_UINT32_DEFINED
|
||||
#define _7ZIP_UINT32_DEFINED
|
||||
#ifdef _LZMA_UINT32_IS_ULONG
|
||||
typedef unsigned long UInt32;
|
||||
#else
|
||||
typedef unsigned int UInt32;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* #define _LZMA_NO_SYSTEM_SIZE_T */
|
||||
/* You can use it, if you don't want <stddef.h> */
|
||||
|
||||
#ifndef _7ZIP_SIZET_DEFINED
|
||||
#define _7ZIP_SIZET_DEFINED
|
||||
#ifdef _LZMA_NO_SYSTEM_SIZE_T
|
||||
typedef UInt32 SizeT;
|
||||
#else
|
||||
#include <stddef.h>
|
||||
typedef size_t SizeT;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
109
target/linux/ramips/image/lzma-loader/src/Makefile
Normal file
109
target/linux/ramips/image/lzma-loader/src/Makefile
Normal file
@@ -0,0 +1,109 @@
|
||||
#
|
||||
# Makefile for the LZMA compressed kernel loader for
|
||||
# Atheros AR7XXX/AR9XXX based boards
|
||||
#
|
||||
# Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
|
||||
#
|
||||
# Some parts of this file was based on the OpenWrt specific lzma-loader
|
||||
# for the BCM47xx and ADM5120 based boards:
|
||||
# Copyright (C) 2004 Manuel Novoa III (mjn3@codepoet.org)
|
||||
# Copyright (C) 2005 Mineharu Takahara <mtakahar@yahoo.com>
|
||||
# Copyright (C) 2005 by Oleg I. Vdovikin <oleg@cs.msu.su>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
LOADADDR :=
|
||||
LZMA_TEXT_START := 0x80a00000
|
||||
LOADER_DATA :=
|
||||
BOARD :=
|
||||
FLASH_OFFS :=
|
||||
FLASH_MAX :=
|
||||
PLATFORM :=
|
||||
CACHE_FLAGS :=
|
||||
|
||||
CC := $(CROSS_COMPILE)gcc
|
||||
LD := $(CROSS_COMPILE)ld
|
||||
OBJCOPY := $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP := $(CROSS_COMPILE)objdump
|
||||
|
||||
|
||||
include $(PLATFORM).mk
|
||||
|
||||
BIN_FLAGS := -O binary -R .reginfo -R .note -R .comment -R .mdebug \
|
||||
-R .MIPS.abiflags -S
|
||||
|
||||
CFLAGS = -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -Os \
|
||||
-fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \
|
||||
-mno-abicalls -fno-pic -ffunction-sections -pipe -mlong-calls \
|
||||
-fno-common -ffreestanding -fhonour-copts -nostartfiles \
|
||||
-mabi=32 -march=mips32r2 \
|
||||
-Wa,-32 -Wa,-march=mips32r2 -Wa,-mips32r2 -Wa,--trap
|
||||
CFLAGS += -D_LZMA_PROB32
|
||||
CFLAGS += -flto
|
||||
CFLAGS += $(CACHE_FLAGS)
|
||||
|
||||
ASFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
LDFLAGS = -static -Wl,--gc-sections -Wl,-no-warn-mismatch
|
||||
LDFLAGS += -Wl,-e,startup -T loader.lds -Wl,-Ttext,$(LZMA_TEXT_START)
|
||||
LDFLAGS += -flto -fwhole-program -Wl,-z,max-page-size=4096
|
||||
|
||||
O_FORMAT = $(shell $(OBJDUMP) -i | head -2 | grep elf32)
|
||||
|
||||
OBJECTS := head.o loader.o cache.o board-$(PLATFORM).o printf.o LzmaDecode.o
|
||||
|
||||
ifneq ($(strip $(LOADER_DATA)),)
|
||||
OBJECTS += data.o
|
||||
CFLAGS += -DLZMA_WRAPPER=1 -DLOADADDR=$(LOADADDR)
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(KERNEL_CMDLINE)),)
|
||||
CFLAGS += -DCONFIG_KERNEL_CMDLINE='"$(KERNEL_CMDLINE)"'
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(FLASH_OFFS)),)
|
||||
CFLAGS += -DCONFIG_FLASH_OFFS=$(FLASH_OFFS)
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(FLASH_MAX)),)
|
||||
CFLAGS += -DCONFIG_FLASH_MAX=$(FLASH_MAX)
|
||||
endif
|
||||
|
||||
all: loader.elf
|
||||
|
||||
# Don't build dependencies, this may die if $(CC) isn't gcc
|
||||
dep:
|
||||
|
||||
install:
|
||||
|
||||
%.o : %.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
%.o : %.S
|
||||
$(CC) $(ASFLAGS) -c -o $@ $<
|
||||
|
||||
data.o: $(LOADER_DATA)
|
||||
$(LD) -r -b binary --oformat $(O_FORMAT) -T lzma-data.lds -o $@ $<
|
||||
|
||||
loader: $(OBJECTS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS)
|
||||
|
||||
loader.bin: loader
|
||||
$(OBJCOPY) $(BIN_FLAGS) $< $@
|
||||
|
||||
loader2.o: loader.bin
|
||||
$(LD) -r -b binary --oformat $(O_FORMAT) -o $@ $<
|
||||
|
||||
loader.elf: loader2.o
|
||||
$(LD) -e startup -T loader2.lds -Ttext $(LOADADDR) -z max-page-size=4096 -o $@ $<
|
||||
|
||||
mrproper: clean
|
||||
|
||||
clean:
|
||||
rm -f loader *.elf *.bin *.o
|
||||
|
||||
|
||||
|
||||
39
target/linux/ramips/image/lzma-loader/src/board-mt7621.c
Normal file
39
target/linux/ramips/image/lzma-loader/src/board-mt7621.c
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Arch specific code for mt7621 based boards, based on code for Ralink boards
|
||||
*
|
||||
* Copyright (C) 2018 Tobias Schramm <tobleminer@gmail.com>
|
||||
*
|
||||
* 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 <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include "config.h"
|
||||
|
||||
#define READREG(r) *(volatile uint32_t *)(r)
|
||||
#define WRITEREG(r,v) *(volatile uint32_t *)(r) = v
|
||||
|
||||
#define KSEG1ADDR(_x) (((_x) & 0x1fffffff) | 0xa0000000)
|
||||
|
||||
#define UART_BASE 0xBE000C00
|
||||
|
||||
#define UART_TBR_OFFSET 0x00
|
||||
#define UART_LSR_OFFSET 0x14
|
||||
|
||||
#define UART_LSR_TEMT (1 << 6)
|
||||
|
||||
#define UART_READ(r) READREG(UART_BASE + (r))
|
||||
#define UART_WRITE(r,v) WRITEREG(UART_BASE + (r), (v))
|
||||
|
||||
void board_putc(int ch)
|
||||
{
|
||||
while (((UART_READ(UART_LSR_OFFSET)) & UART_LSR_TEMT) == 0);
|
||||
UART_WRITE(UART_TBR_OFFSET, ch);
|
||||
while (((UART_READ(UART_LSR_OFFSET)) & UART_LSR_TEMT) == 0);
|
||||
}
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
}
|
||||
42
target/linux/ramips/image/lzma-loader/src/board-ralink.c
Normal file
42
target/linux/ramips/image/lzma-loader/src/board-ralink.c
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Arch specific code for Ralink based boards
|
||||
*
|
||||
* Copyright (C) 2013 John Crispin <blogic@openwrt.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 <stddef.h>
|
||||
#include "config.h"
|
||||
|
||||
#define READREG(r) *(volatile unsigned int *)(r)
|
||||
#define WRITEREG(r,v) *(volatile unsigned int *)(r) = v
|
||||
|
||||
#define KSEG1ADDR(_x) (((_x) & 0x1fffffff) | 0xa0000000)
|
||||
|
||||
#ifdef CONFIG_SOC_RT288X
|
||||
#define UART_BASE 0xb0300c00
|
||||
#else
|
||||
#define UART_BASE 0xb0000c00
|
||||
#endif
|
||||
|
||||
#define UART_TX 1
|
||||
#define UART_LSR 7
|
||||
|
||||
#define UART_LSR_THRE 0x20
|
||||
|
||||
#define UART_READ(r) READREG(UART_BASE + 4 * (r))
|
||||
#define UART_WRITE(r,v) WRITEREG(UART_BASE + 4 * (r), (v))
|
||||
|
||||
void board_putc(int ch)
|
||||
{
|
||||
while (((UART_READ(UART_LSR)) & UART_LSR_THRE) == 0);
|
||||
UART_WRITE(UART_TX, ch);
|
||||
while (((UART_READ(UART_LSR)) & UART_LSR_THRE) == 0);
|
||||
}
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
}
|
||||
43
target/linux/ramips/image/lzma-loader/src/cache.c
Normal file
43
target/linux/ramips/image/lzma-loader/src/cache.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* LZMA compressed kernel loader for Atheros AR7XXX/AR9XXX based boards
|
||||
*
|
||||
* Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
|
||||
*
|
||||
* The cache manipulation routine has been taken from the U-Boot project.
|
||||
* (C) Copyright 2003
|
||||
* Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
|
||||
*
|
||||
* 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 "cache.h"
|
||||
#include "cacheops.h"
|
||||
#include "config.h"
|
||||
|
||||
#define cache_op(op,addr) \
|
||||
__asm__ __volatile__( \
|
||||
" .set push \n" \
|
||||
" .set noreorder \n" \
|
||||
" .set mips3\n\t \n" \
|
||||
" cache %0, %1 \n" \
|
||||
" .set pop \n" \
|
||||
: \
|
||||
: "i" (op), "R" (*(unsigned char *)(addr)))
|
||||
|
||||
void flush_cache(unsigned long start_addr, unsigned long size)
|
||||
{
|
||||
unsigned long lsize = CONFIG_CACHELINE_SIZE;
|
||||
unsigned long addr = start_addr & ~(lsize - 1);
|
||||
unsigned long aend = (start_addr + size - 1) & ~(lsize - 1);
|
||||
|
||||
while (1) {
|
||||
cache_op(Hit_Writeback_Inv_D, addr);
|
||||
cache_op(Hit_Invalidate_I, addr);
|
||||
if (addr == aend)
|
||||
break;
|
||||
addr += lsize;
|
||||
}
|
||||
}
|
||||
17
target/linux/ramips/image/lzma-loader/src/cache.h
Normal file
17
target/linux/ramips/image/lzma-loader/src/cache.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* LZMA compressed kernel loader for Atheros AR7XXX/AR9XXX based boards
|
||||
*
|
||||
* Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __CACHE_H
|
||||
#define __CACHE_H
|
||||
|
||||
void flush_cache(unsigned long start_addr, unsigned long size);
|
||||
|
||||
#endif /* __CACHE_H */
|
||||
85
target/linux/ramips/image/lzma-loader/src/cacheops.h
Normal file
85
target/linux/ramips/image/lzma-loader/src/cacheops.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Cache operations for the cache instruction.
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* (C) Copyright 1996, 97, 99, 2002, 03 Ralf Baechle
|
||||
* (C) Copyright 1999 Silicon Graphics, Inc.
|
||||
*/
|
||||
#ifndef __ASM_CACHEOPS_H
|
||||
#define __ASM_CACHEOPS_H
|
||||
|
||||
/*
|
||||
* Cache Operations available on all MIPS processors with R4000-style caches
|
||||
*/
|
||||
#define Index_Invalidate_I 0x00
|
||||
#define Index_Writeback_Inv_D 0x01
|
||||
#define Index_Load_Tag_I 0x04
|
||||
#define Index_Load_Tag_D 0x05
|
||||
#define Index_Store_Tag_I 0x08
|
||||
#define Index_Store_Tag_D 0x09
|
||||
#if defined(CONFIG_CPU_LOONGSON2)
|
||||
#define Hit_Invalidate_I 0x00
|
||||
#else
|
||||
#define Hit_Invalidate_I 0x10
|
||||
#endif
|
||||
#define Hit_Invalidate_D 0x11
|
||||
#define Hit_Writeback_Inv_D 0x15
|
||||
|
||||
/*
|
||||
* R4000-specific cacheops
|
||||
*/
|
||||
#define Create_Dirty_Excl_D 0x0d
|
||||
#define Fill 0x14
|
||||
#define Hit_Writeback_I 0x18
|
||||
#define Hit_Writeback_D 0x19
|
||||
|
||||
/*
|
||||
* R4000SC and R4400SC-specific cacheops
|
||||
*/
|
||||
#define Index_Invalidate_SI 0x02
|
||||
#define Index_Writeback_Inv_SD 0x03
|
||||
#define Index_Load_Tag_SI 0x06
|
||||
#define Index_Load_Tag_SD 0x07
|
||||
#define Index_Store_Tag_SI 0x0A
|
||||
#define Index_Store_Tag_SD 0x0B
|
||||
#define Create_Dirty_Excl_SD 0x0f
|
||||
#define Hit_Invalidate_SI 0x12
|
||||
#define Hit_Invalidate_SD 0x13
|
||||
#define Hit_Writeback_Inv_SD 0x17
|
||||
#define Hit_Writeback_SD 0x1b
|
||||
#define Hit_Set_Virtual_SI 0x1e
|
||||
#define Hit_Set_Virtual_SD 0x1f
|
||||
|
||||
/*
|
||||
* R5000-specific cacheops
|
||||
*/
|
||||
#define R5K_Page_Invalidate_S 0x17
|
||||
|
||||
/*
|
||||
* RM7000-specific cacheops
|
||||
*/
|
||||
#define Page_Invalidate_T 0x16
|
||||
|
||||
/*
|
||||
* R10000-specific cacheops
|
||||
*
|
||||
* Cacheops 0x02, 0x06, 0x0a, 0x0c-0x0e, 0x16, 0x1a and 0x1e are unused.
|
||||
* Most of the _S cacheops are identical to the R4000SC _SD cacheops.
|
||||
*/
|
||||
#define Index_Writeback_Inv_S 0x03
|
||||
#define Index_Load_Tag_S 0x07
|
||||
#define Index_Store_Tag_S 0x0B
|
||||
#define Hit_Invalidate_S 0x13
|
||||
#define Cache_Barrier 0x14
|
||||
#define Hit_Writeback_Inv_S 0x17
|
||||
#define Index_Load_Data_I 0x18
|
||||
#define Index_Load_Data_D 0x19
|
||||
#define Index_Load_Data_S 0x1b
|
||||
#define Index_Store_Data_I 0x1c
|
||||
#define Index_Store_Data_D 0x1d
|
||||
#define Index_Store_Data_S 0x1f
|
||||
|
||||
#endif /* __ASM_CACHEOPS_H */
|
||||
27
target/linux/ramips/image/lzma-loader/src/config.h
Normal file
27
target/linux/ramips/image/lzma-loader/src/config.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* LZMA compressed kernel loader for Atheros AR7XXX/AR9XXX based boards
|
||||
*
|
||||
* Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CONFIG_H_
|
||||
#define _CONFIG_H_
|
||||
|
||||
#ifndef CONFIG_FLASH_OFFS
|
||||
#define CONFIG_FLASH_OFFS 0
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_FLASH_MAX
|
||||
#define CONFIG_FLASH_MAX 0
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_FLASH_STEP
|
||||
#define CONFIG_FLASH_STEP 0x1000
|
||||
#endif
|
||||
|
||||
#endif /* _CONFIG_H_ */
|
||||
39
target/linux/ramips/image/lzma-loader/src/cp0regdef.h
Normal file
39
target/linux/ramips/image/lzma-loader/src/cp0regdef.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001 by Ralf Baechle
|
||||
*
|
||||
* Copyright (C) 2001, Monta Vista Software
|
||||
* Author: jsun@mvista.com or jsun@junsun.net
|
||||
*/
|
||||
#ifndef _cp0regdef_h_
|
||||
#define _cp0regdef_h_
|
||||
|
||||
#define CP0_INDEX $0
|
||||
#define CP0_RANDOM $1
|
||||
#define CP0_ENTRYLO0 $2
|
||||
#define CP0_ENTRYLO1 $3
|
||||
#define CP0_CONTEXT $4
|
||||
#define CP0_PAGEMASK $5
|
||||
#define CP0_WIRED $6
|
||||
#define CP0_BADVADDR $8
|
||||
#define CP0_COUNT $9
|
||||
#define CP0_ENTRYHI $10
|
||||
#define CP0_COMPARE $11
|
||||
#define CP0_STATUS $12
|
||||
#define CP0_CAUSE $13
|
||||
#define CP0_EPC $14
|
||||
#define CP0_PRID $15
|
||||
#define CP0_CONFIG $16
|
||||
#define CP0_LLADDR $17
|
||||
#define CP0_WATCHLO $18
|
||||
#define CP0_WATCHHI $19
|
||||
#define CP0_XCONTEXT $20
|
||||
#define CP0_FRAMEMASK $21
|
||||
#define CP0_DIAGNOSTIC $22
|
||||
#define CP0_PERFORMANCE $25
|
||||
#define CP0_ECC $26
|
||||
#define CP0_CACHEERR $27
|
||||
#define CP0_TAGLO $28
|
||||
#define CP0_TAGHI $29
|
||||
#define CP0_ERROREPC $30
|
||||
|
||||
#endif
|
||||
121
target/linux/ramips/image/lzma-loader/src/head.S
Normal file
121
target/linux/ramips/image/lzma-loader/src/head.S
Normal file
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* LZMA compressed kernel loader for Atheros AR7XXX/AR9XXX based boards
|
||||
*
|
||||
* Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
|
||||
*
|
||||
* Some parts of this code was based on the OpenWrt specific lzma-loader
|
||||
* for the BCM47xx and ADM5120 based boards:
|
||||
* Copyright (C) 2004 Manuel Novoa III (mjn3@codepoet.org)
|
||||
* Copyright (C) 2005 by Oleg I. Vdovikin <oleg@cs.msu.su>
|
||||
*
|
||||
* 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 <asm/asm.h>
|
||||
#include <asm/regdef.h>
|
||||
#include "cp0regdef.h"
|
||||
#include "cacheops.h"
|
||||
#include "config.h"
|
||||
|
||||
#define KSEG0 0x80000000
|
||||
|
||||
.macro ehb
|
||||
sll zero, 3
|
||||
.endm
|
||||
|
||||
.text
|
||||
|
||||
LEAF(startup)
|
||||
.set noreorder
|
||||
.set mips32
|
||||
|
||||
mtc0 zero, CP0_WATCHLO # clear watch registers
|
||||
mtc0 zero, CP0_WATCHHI
|
||||
mtc0 zero, CP0_CAUSE # clear before writing status register
|
||||
|
||||
mfc0 t0, CP0_STATUS
|
||||
li t1, 0x1000001f
|
||||
or t0, t1
|
||||
xori t0, 0x1f
|
||||
mtc0 t0, CP0_STATUS
|
||||
ehb
|
||||
|
||||
mtc0 zero, CP0_COUNT
|
||||
mtc0 zero, CP0_COMPARE
|
||||
ehb
|
||||
|
||||
la t0, __reloc_label # get linked address of label
|
||||
bal __reloc_label # branch and link to label to
|
||||
nop # get actual address
|
||||
__reloc_label:
|
||||
subu t0, ra, t0 # get reloc_delta
|
||||
|
||||
beqz t0, __reloc_done # if delta is 0 we are in the right place
|
||||
nop
|
||||
|
||||
/* Copy our code to the right place */
|
||||
la t1, _code_start # get linked address of _code_start
|
||||
la t2, _code_end # get linked address of _code_end
|
||||
addu t0, t0, t1 # calculate actual address of _code_start
|
||||
|
||||
__reloc_copy:
|
||||
lw t3, 0(t0)
|
||||
sw t3, 0(t1)
|
||||
add t1, 4
|
||||
blt t1, t2, __reloc_copy
|
||||
add t0, 4
|
||||
|
||||
/* flush cache */
|
||||
la t0, _code_start
|
||||
la t1, _code_end
|
||||
|
||||
li t2, ~(CONFIG_CACHELINE_SIZE - 1)
|
||||
and t0, t2
|
||||
and t1, t2
|
||||
li t2, CONFIG_CACHELINE_SIZE
|
||||
|
||||
b __flush_check
|
||||
nop
|
||||
|
||||
__flush_line:
|
||||
cache Hit_Writeback_Inv_D, 0(t0)
|
||||
cache Hit_Invalidate_I, 0(t0)
|
||||
add t0, t2
|
||||
|
||||
__flush_check:
|
||||
bne t0, t1, __flush_line
|
||||
nop
|
||||
|
||||
sync
|
||||
|
||||
__reloc_done:
|
||||
|
||||
/* clear bss */
|
||||
la t0, _bss_start
|
||||
la t1, _bss_end
|
||||
b __bss_check
|
||||
nop
|
||||
|
||||
__bss_fill:
|
||||
sw zero, 0(t0)
|
||||
addi t0, 4
|
||||
|
||||
__bss_check:
|
||||
bne t0, t1, __bss_fill
|
||||
nop
|
||||
|
||||
/* Setup new "C" stack */
|
||||
la sp, _stack
|
||||
|
||||
/* reserve stack space for a0-a3 registers */
|
||||
subu sp, 16
|
||||
|
||||
/* jump to the decompressor routine */
|
||||
la t0, loader_main
|
||||
jr t0
|
||||
nop
|
||||
|
||||
.set reorder
|
||||
END(startup)
|
||||
1
target/linux/ramips/image/lzma-loader/src/lantiq.mk
Normal file
1
target/linux/ramips/image/lzma-loader/src/lantiq.mk
Normal file
@@ -0,0 +1 @@
|
||||
CACHE_FLAGS+=-DCONFIG_ICACHE_SIZE="(32 * 1024)" -DCONFIG_DCACHE_SIZE="(32 * 1024)" -DCONFIG_CACHELINE_SIZE=32
|
||||
265
target/linux/ramips/image/lzma-loader/src/loader.c
Normal file
265
target/linux/ramips/image/lzma-loader/src/loader.c
Normal file
@@ -0,0 +1,265 @@
|
||||
/*
|
||||
* LZMA compressed kernel loader for Atheros AR7XXX/AR9XXX based boards
|
||||
*
|
||||
* Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
|
||||
*
|
||||
* Some parts of this code was based on the OpenWrt specific lzma-loader
|
||||
* for the BCM47xx and ADM5120 based boards:
|
||||
* Copyright (C) 2004 Manuel Novoa III (mjn3@codepoet.org)
|
||||
* Copyright (C) 2005 Mineharu Takahara <mtakahar@yahoo.com>
|
||||
* Copyright (C) 2005 by Oleg I. Vdovikin <oleg@cs.msu.su>
|
||||
*
|
||||
* The image_header structure has been taken from the U-Boot project.
|
||||
* (C) Copyright 2008 Semihalf
|
||||
* (C) Copyright 2000-2005
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*
|
||||
* 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 <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "cache.h"
|
||||
#include "printf.h"
|
||||
#include "LzmaDecode.h"
|
||||
|
||||
#define AR71XX_FLASH_START 0x1f000000
|
||||
#define AR71XX_FLASH_END 0x1fe00000
|
||||
|
||||
#define KSEG0 0x80000000
|
||||
#define KSEG1 0xa0000000
|
||||
|
||||
#define KSEG1ADDR(a) ((((unsigned)(a)) & 0x1fffffffU) | KSEG1)
|
||||
|
||||
#undef LZMA_DEBUG
|
||||
|
||||
#ifdef LZMA_DEBUG
|
||||
# define DBG(f, a...) printf(f, ## a)
|
||||
#else
|
||||
# define DBG(f, a...) do {} while (0)
|
||||
#endif
|
||||
|
||||
#define IH_MAGIC_OKLI 0x4f4b4c49 /* 'OKLI' */
|
||||
|
||||
#define IH_NMLEN 32 /* Image Name Length */
|
||||
|
||||
typedef struct image_header {
|
||||
uint32_t ih_magic; /* Image Header Magic Number */
|
||||
uint32_t ih_hcrc; /* Image Header CRC Checksum */
|
||||
uint32_t ih_time; /* Image Creation Timestamp */
|
||||
uint32_t ih_size; /* Image Data Size */
|
||||
uint32_t ih_load; /* Data Load Address */
|
||||
uint32_t ih_ep; /* Entry Point Address */
|
||||
uint32_t ih_dcrc; /* Image Data CRC Checksum */
|
||||
uint8_t ih_os; /* Operating System */
|
||||
uint8_t ih_arch; /* CPU architecture */
|
||||
uint8_t ih_type; /* Image Type */
|
||||
uint8_t ih_comp; /* Compression Type */
|
||||
uint8_t ih_name[IH_NMLEN]; /* Image Name */
|
||||
} image_header_t;
|
||||
|
||||
/* beyond the image end, size not known in advance */
|
||||
extern unsigned char workspace[];
|
||||
extern void board_init(void);
|
||||
|
||||
static CLzmaDecoderState lzma_state;
|
||||
static unsigned char *lzma_data;
|
||||
static unsigned long lzma_datasize;
|
||||
static unsigned long lzma_outsize;
|
||||
static unsigned long kernel_la;
|
||||
|
||||
#ifdef CONFIG_KERNEL_CMDLINE
|
||||
#define kernel_argc 2
|
||||
static const char kernel_cmdline[] = CONFIG_KERNEL_CMDLINE;
|
||||
static const char *kernel_argv[] = {
|
||||
NULL,
|
||||
kernel_cmdline,
|
||||
NULL,
|
||||
};
|
||||
#endif /* CONFIG_KERNEL_CMDLINE */
|
||||
|
||||
static void halt(void)
|
||||
{
|
||||
printf("\nSystem halted!\n");
|
||||
for(;;);
|
||||
}
|
||||
|
||||
static __inline__ unsigned long get_be32(void *buf)
|
||||
{
|
||||
unsigned char *p = buf;
|
||||
|
||||
return (((unsigned long) p[0] << 24) +
|
||||
((unsigned long) p[1] << 16) +
|
||||
((unsigned long) p[2] << 8) +
|
||||
(unsigned long) p[3]);
|
||||
}
|
||||
|
||||
static __inline__ unsigned char lzma_get_byte(void)
|
||||
{
|
||||
unsigned char c;
|
||||
|
||||
lzma_datasize--;
|
||||
c = *lzma_data++;
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
static int lzma_init_props(void)
|
||||
{
|
||||
unsigned char props[LZMA_PROPERTIES_SIZE];
|
||||
int res;
|
||||
int i;
|
||||
|
||||
/* read lzma properties */
|
||||
for (i = 0; i < LZMA_PROPERTIES_SIZE; i++)
|
||||
props[i] = lzma_get_byte();
|
||||
|
||||
/* read the lower half of uncompressed size in the header */
|
||||
lzma_outsize = ((SizeT) lzma_get_byte()) +
|
||||
((SizeT) lzma_get_byte() << 8) +
|
||||
((SizeT) lzma_get_byte() << 16) +
|
||||
((SizeT) lzma_get_byte() << 24);
|
||||
|
||||
/* skip rest of the header (upper half of uncompressed size) */
|
||||
for (i = 0; i < 4; i++)
|
||||
lzma_get_byte();
|
||||
|
||||
res = LzmaDecodeProperties(&lzma_state.Properties, props,
|
||||
LZMA_PROPERTIES_SIZE);
|
||||
return res;
|
||||
}
|
||||
|
||||
static int lzma_decompress(unsigned char *outStream)
|
||||
{
|
||||
SizeT ip, op;
|
||||
int ret;
|
||||
|
||||
lzma_state.Probs = (CProb *) workspace;
|
||||
|
||||
ret = LzmaDecode(&lzma_state, lzma_data, lzma_datasize, &ip, outStream,
|
||||
lzma_outsize, &op);
|
||||
|
||||
if (ret != LZMA_RESULT_OK) {
|
||||
int i;
|
||||
|
||||
DBG("LzmaDecode error %d at %08x, osize:%d ip:%d op:%d\n",
|
||||
ret, lzma_data + ip, lzma_outsize, ip, op);
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
DBG("%02x ", lzma_data[ip + i]);
|
||||
|
||||
DBG("\n");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if (LZMA_WRAPPER)
|
||||
static void lzma_init_data(void)
|
||||
{
|
||||
extern unsigned char _lzma_data_start[];
|
||||
extern unsigned char _lzma_data_end[];
|
||||
|
||||
kernel_la = LOADADDR;
|
||||
lzma_data = _lzma_data_start;
|
||||
lzma_datasize = _lzma_data_end - _lzma_data_start;
|
||||
}
|
||||
#else
|
||||
static void lzma_init_data(void)
|
||||
{
|
||||
struct image_header *hdr = NULL;
|
||||
unsigned char *flash_base;
|
||||
unsigned long flash_ofs;
|
||||
unsigned long kernel_ofs;
|
||||
unsigned long kernel_size;
|
||||
|
||||
flash_base = (unsigned char *) KSEG1ADDR(AR71XX_FLASH_START);
|
||||
|
||||
printf("Looking for OpenWrt image... ");
|
||||
|
||||
for (flash_ofs = CONFIG_FLASH_OFFS;
|
||||
flash_ofs <= (CONFIG_FLASH_OFFS + CONFIG_FLASH_MAX);
|
||||
flash_ofs += CONFIG_FLASH_STEP) {
|
||||
unsigned long magic;
|
||||
unsigned char *p;
|
||||
|
||||
p = flash_base + flash_ofs;
|
||||
magic = get_be32(p);
|
||||
if (magic == IH_MAGIC_OKLI) {
|
||||
hdr = (struct image_header *) p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (hdr == NULL) {
|
||||
printf("not found!\n");
|
||||
halt();
|
||||
}
|
||||
|
||||
printf("found at 0x%08x\n", flash_base + flash_ofs);
|
||||
|
||||
kernel_ofs = sizeof(struct image_header);
|
||||
kernel_size = get_be32(&hdr->ih_size);
|
||||
kernel_la = get_be32(&hdr->ih_load);
|
||||
|
||||
lzma_data = flash_base + flash_ofs + kernel_ofs;
|
||||
lzma_datasize = kernel_size;
|
||||
}
|
||||
#endif /* (LZMA_WRAPPER) */
|
||||
|
||||
void loader_main(unsigned long reg_a0, unsigned long reg_a1,
|
||||
unsigned long reg_a2, unsigned long reg_a3)
|
||||
{
|
||||
void (*kernel_entry) (unsigned long, unsigned long, unsigned long,
|
||||
unsigned long);
|
||||
int res;
|
||||
|
||||
board_init();
|
||||
|
||||
printf("\n\nOpenWrt kernel loader for MIPS based SoC\n");
|
||||
printf("Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>\n");
|
||||
|
||||
lzma_init_data();
|
||||
|
||||
res = lzma_init_props();
|
||||
if (res != LZMA_RESULT_OK) {
|
||||
printf("Incorrect LZMA stream properties!\n");
|
||||
halt();
|
||||
}
|
||||
|
||||
printf("Decompressing kernel... ");
|
||||
|
||||
res = lzma_decompress((unsigned char *) kernel_la);
|
||||
if (res != LZMA_RESULT_OK) {
|
||||
printf("failed, ");
|
||||
switch (res) {
|
||||
case LZMA_RESULT_DATA_ERROR:
|
||||
printf("data error!\n");
|
||||
break;
|
||||
default:
|
||||
printf("unknown error %d!\n", res);
|
||||
}
|
||||
halt();
|
||||
} else {
|
||||
printf("done!\n");
|
||||
}
|
||||
|
||||
flush_cache(kernel_la, lzma_outsize);
|
||||
|
||||
printf("Starting kernel at %08x...\n\n", kernel_la);
|
||||
|
||||
#ifdef CONFIG_KERNEL_CMDLINE
|
||||
reg_a0 = kernel_argc;
|
||||
reg_a1 = (unsigned long) kernel_argv;
|
||||
reg_a2 = 0;
|
||||
reg_a3 = 0;
|
||||
#endif
|
||||
|
||||
kernel_entry = (void *) kernel_la;
|
||||
kernel_entry(reg_a0, reg_a1, reg_a2, reg_a3);
|
||||
}
|
||||
35
target/linux/ramips/image/lzma-loader/src/loader.lds
Normal file
35
target/linux/ramips/image/lzma-loader/src/loader.lds
Normal file
@@ -0,0 +1,35 @@
|
||||
OUTPUT_ARCH(mips)
|
||||
SECTIONS {
|
||||
.text : {
|
||||
_code_start = .;
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
*(.data.lzma)
|
||||
}
|
||||
|
||||
. = ALIGN(32);
|
||||
.data : {
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
. = . + 524288; /* workaround for buggy bootloaders */
|
||||
}
|
||||
|
||||
. = ALIGN(32);
|
||||
_code_end = .;
|
||||
|
||||
_bss_start = .;
|
||||
.bss : {
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
}
|
||||
|
||||
. = ALIGN(32);
|
||||
_bss_end = .;
|
||||
|
||||
. = . + 8192;
|
||||
_stack = .;
|
||||
|
||||
workspace = .;
|
||||
}
|
||||
10
target/linux/ramips/image/lzma-loader/src/loader2.lds
Normal file
10
target/linux/ramips/image/lzma-loader/src/loader2.lds
Normal file
@@ -0,0 +1,10 @@
|
||||
OUTPUT_ARCH(mips)
|
||||
SECTIONS {
|
||||
.text : {
|
||||
startup = .;
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
}
|
||||
}
|
||||
8
target/linux/ramips/image/lzma-loader/src/lzma-data.lds
Normal file
8
target/linux/ramips/image/lzma-loader/src/lzma-data.lds
Normal file
@@ -0,0 +1,8 @@
|
||||
OUTPUT_ARCH(mips)
|
||||
SECTIONS {
|
||||
.data.lzma : {
|
||||
_lzma_data_start = .;
|
||||
*(.data)
|
||||
_lzma_data_end = .;
|
||||
}
|
||||
}
|
||||
1
target/linux/ramips/image/lzma-loader/src/mt7621.mk
Normal file
1
target/linux/ramips/image/lzma-loader/src/mt7621.mk
Normal file
@@ -0,0 +1 @@
|
||||
CACHE_FLAGS+=-DCONFIG_ICACHE_SIZE="(32 * 1024)" -DCONFIG_DCACHE_SIZE="(16 * 1024)" -DCONFIG_CACHELINE_SIZE=32
|
||||
350
target/linux/ramips/image/lzma-loader/src/printf.c
Normal file
350
target/linux/ramips/image/lzma-loader/src/printf.c
Normal file
@@ -0,0 +1,350 @@
|
||||
/*
|
||||
* Copyright (C) 2001 MontaVista Software Inc.
|
||||
* Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
|
||||
*
|
||||
* 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 the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "printf.h"
|
||||
|
||||
extern void board_putc(int ch);
|
||||
|
||||
/* this is the maximum width for a variable */
|
||||
#define LP_MAX_BUF 256
|
||||
|
||||
/* macros */
|
||||
#define IsDigit(x) ( ((x) >= '0') && ((x) <= '9') )
|
||||
#define Ctod(x) ( (x) - '0')
|
||||
|
||||
/* forward declaration */
|
||||
static int PrintChar(char *, char, int, int);
|
||||
static int PrintString(char *, char *, int, int);
|
||||
static int PrintNum(char *, unsigned long, int, int, int, int, char, int);
|
||||
|
||||
/* private variable */
|
||||
static const char theFatalMsg[] = "fatal error in lp_Print!";
|
||||
|
||||
/* -*-
|
||||
* A low level printf() function.
|
||||
*/
|
||||
static void
|
||||
lp_Print(void (*output)(void *, char *, int),
|
||||
void * arg,
|
||||
char *fmt,
|
||||
va_list ap)
|
||||
{
|
||||
|
||||
#define OUTPUT(arg, s, l) \
|
||||
{ if (((l) < 0) || ((l) > LP_MAX_BUF)) { \
|
||||
(*output)(arg, (char*)theFatalMsg, sizeof(theFatalMsg)-1); for(;;); \
|
||||
} else { \
|
||||
(*output)(arg, s, l); \
|
||||
} \
|
||||
}
|
||||
|
||||
char buf[LP_MAX_BUF];
|
||||
|
||||
char c;
|
||||
char *s;
|
||||
long int num;
|
||||
|
||||
int longFlag;
|
||||
int negFlag;
|
||||
int width;
|
||||
int prec;
|
||||
int ladjust;
|
||||
char padc;
|
||||
|
||||
int length;
|
||||
|
||||
for(;;) {
|
||||
{
|
||||
/* scan for the next '%' */
|
||||
char *fmtStart = fmt;
|
||||
while ( (*fmt != '\0') && (*fmt != '%')) {
|
||||
fmt ++;
|
||||
}
|
||||
|
||||
/* flush the string found so far */
|
||||
OUTPUT(arg, fmtStart, fmt-fmtStart);
|
||||
|
||||
/* are we hitting the end? */
|
||||
if (*fmt == '\0') break;
|
||||
}
|
||||
|
||||
/* we found a '%' */
|
||||
fmt ++;
|
||||
|
||||
/* check for long */
|
||||
if (*fmt == 'l') {
|
||||
longFlag = 1;
|
||||
fmt ++;
|
||||
} else {
|
||||
longFlag = 0;
|
||||
}
|
||||
|
||||
/* check for other prefixes */
|
||||
width = 0;
|
||||
prec = -1;
|
||||
ladjust = 0;
|
||||
padc = ' ';
|
||||
|
||||
if (*fmt == '-') {
|
||||
ladjust = 1;
|
||||
fmt ++;
|
||||
}
|
||||
|
||||
if (*fmt == '0') {
|
||||
padc = '0';
|
||||
fmt++;
|
||||
}
|
||||
|
||||
if (IsDigit(*fmt)) {
|
||||
while (IsDigit(*fmt)) {
|
||||
width = 10 * width + Ctod(*fmt++);
|
||||
}
|
||||
}
|
||||
|
||||
if (*fmt == '.') {
|
||||
fmt ++;
|
||||
if (IsDigit(*fmt)) {
|
||||
prec = 0;
|
||||
while (IsDigit(*fmt)) {
|
||||
prec = prec*10 + Ctod(*fmt++);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* check format flag */
|
||||
negFlag = 0;
|
||||
switch (*fmt) {
|
||||
case 'b':
|
||||
if (longFlag) {
|
||||
num = va_arg(ap, long int);
|
||||
} else {
|
||||
num = va_arg(ap, int);
|
||||
}
|
||||
length = PrintNum(buf, num, 2, 0, width, ladjust, padc, 0);
|
||||
OUTPUT(arg, buf, length);
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
case 'D':
|
||||
if (longFlag) {
|
||||
num = va_arg(ap, long int);
|
||||
} else {
|
||||
num = va_arg(ap, int);
|
||||
}
|
||||
if (num < 0) {
|
||||
num = - num;
|
||||
negFlag = 1;
|
||||
}
|
||||
length = PrintNum(buf, num, 10, negFlag, width, ladjust, padc, 0);
|
||||
OUTPUT(arg, buf, length);
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
case 'O':
|
||||
if (longFlag) {
|
||||
num = va_arg(ap, long int);
|
||||
} else {
|
||||
num = va_arg(ap, int);
|
||||
}
|
||||
length = PrintNum(buf, num, 8, 0, width, ladjust, padc, 0);
|
||||
OUTPUT(arg, buf, length);
|
||||
break;
|
||||
|
||||
case 'u':
|
||||
case 'U':
|
||||
if (longFlag) {
|
||||
num = va_arg(ap, long int);
|
||||
} else {
|
||||
num = va_arg(ap, int);
|
||||
}
|
||||
length = PrintNum(buf, num, 10, 0, width, ladjust, padc, 0);
|
||||
OUTPUT(arg, buf, length);
|
||||
break;
|
||||
|
||||
case 'x':
|
||||
if (longFlag) {
|
||||
num = va_arg(ap, long int);
|
||||
} else {
|
||||
num = va_arg(ap, int);
|
||||
}
|
||||
length = PrintNum(buf, num, 16, 0, width, ladjust, padc, 0);
|
||||
OUTPUT(arg, buf, length);
|
||||
break;
|
||||
|
||||
case 'X':
|
||||
if (longFlag) {
|
||||
num = va_arg(ap, long int);
|
||||
} else {
|
||||
num = va_arg(ap, int);
|
||||
}
|
||||
length = PrintNum(buf, num, 16, 0, width, ladjust, padc, 1);
|
||||
OUTPUT(arg, buf, length);
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
c = (char)va_arg(ap, int);
|
||||
length = PrintChar(buf, c, width, ladjust);
|
||||
OUTPUT(arg, buf, length);
|
||||
break;
|
||||
|
||||
case 's':
|
||||
s = (char*)va_arg(ap, char *);
|
||||
length = PrintString(buf, s, width, ladjust);
|
||||
OUTPUT(arg, buf, length);
|
||||
break;
|
||||
|
||||
case '\0':
|
||||
fmt --;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* output this char as it is */
|
||||
OUTPUT(arg, fmt, 1);
|
||||
} /* switch (*fmt) */
|
||||
|
||||
fmt ++;
|
||||
} /* for(;;) */
|
||||
|
||||
/* special termination call */
|
||||
OUTPUT(arg, "\0", 1);
|
||||
}
|
||||
|
||||
|
||||
/* --------------- local help functions --------------------- */
|
||||
static int
|
||||
PrintChar(char * buf, char c, int length, int ladjust)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (length < 1) length = 1;
|
||||
if (ladjust) {
|
||||
*buf = c;
|
||||
for (i=1; i< length; i++) buf[i] = ' ';
|
||||
} else {
|
||||
for (i=0; i< length-1; i++) buf[i] = ' ';
|
||||
buf[length - 1] = c;
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
||||
static int
|
||||
PrintString(char * buf, char* s, int length, int ladjust)
|
||||
{
|
||||
int i;
|
||||
int len=0;
|
||||
char* s1 = s;
|
||||
while (*s1++) len++;
|
||||
if (length < len) length = len;
|
||||
|
||||
if (ladjust) {
|
||||
for (i=0; i< len; i++) buf[i] = s[i];
|
||||
for (i=len; i< length; i++) buf[i] = ' ';
|
||||
} else {
|
||||
for (i=0; i< length-len; i++) buf[i] = ' ';
|
||||
for (i=length-len; i < length; i++) buf[i] = s[i-length+len];
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
||||
static int
|
||||
PrintNum(char * buf, unsigned long u, int base, int negFlag,
|
||||
int length, int ladjust, char padc, int upcase)
|
||||
{
|
||||
/* algorithm :
|
||||
* 1. prints the number from left to right in reverse form.
|
||||
* 2. fill the remaining spaces with padc if length is longer than
|
||||
* the actual length
|
||||
* TRICKY : if left adjusted, no "0" padding.
|
||||
* if negtive, insert "0" padding between "0" and number.
|
||||
* 3. if (!ladjust) we reverse the whole string including paddings
|
||||
* 4. otherwise we only reverse the actual string representing the num.
|
||||
*/
|
||||
|
||||
int actualLength =0;
|
||||
char *p = buf;
|
||||
int i;
|
||||
|
||||
do {
|
||||
int tmp = u %base;
|
||||
if (tmp <= 9) {
|
||||
*p++ = '0' + tmp;
|
||||
} else if (upcase) {
|
||||
*p++ = 'A' + tmp - 10;
|
||||
} else {
|
||||
*p++ = 'a' + tmp - 10;
|
||||
}
|
||||
u /= base;
|
||||
} while (u != 0);
|
||||
|
||||
if (negFlag) {
|
||||
*p++ = '-';
|
||||
}
|
||||
|
||||
/* figure out actual length and adjust the maximum length */
|
||||
actualLength = p - buf;
|
||||
if (length < actualLength) length = actualLength;
|
||||
|
||||
/* add padding */
|
||||
if (ladjust) {
|
||||
padc = ' ';
|
||||
}
|
||||
if (negFlag && !ladjust && (padc == '0')) {
|
||||
for (i = actualLength-1; i< length-1; i++) buf[i] = padc;
|
||||
buf[length -1] = '-';
|
||||
} else {
|
||||
for (i = actualLength; i< length; i++) buf[i] = padc;
|
||||
}
|
||||
|
||||
|
||||
/* prepare to reverse the string */
|
||||
{
|
||||
int begin = 0;
|
||||
int end;
|
||||
if (ladjust) {
|
||||
end = actualLength - 1;
|
||||
} else {
|
||||
end = length -1;
|
||||
}
|
||||
|
||||
while (end > begin) {
|
||||
char tmp = buf[begin];
|
||||
buf[begin] = buf[end];
|
||||
buf[end] = tmp;
|
||||
begin ++;
|
||||
end --;
|
||||
}
|
||||
}
|
||||
|
||||
/* adjust the string pointer */
|
||||
return length;
|
||||
}
|
||||
|
||||
static void printf_output(void *arg, char *s, int l)
|
||||
{
|
||||
int i;
|
||||
|
||||
// special termination call
|
||||
if ((l==1) && (s[0] == '\0')) return;
|
||||
|
||||
for (i=0; i< l; i++) {
|
||||
board_putc(s[i]);
|
||||
if (s[i] == '\n') board_putc('\r');
|
||||
}
|
||||
}
|
||||
|
||||
void printf(char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
lp_Print(printf_output, 0, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
18
target/linux/ramips/image/lzma-loader/src/printf.h
Normal file
18
target/linux/ramips/image/lzma-loader/src/printf.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2001 MontaVista Software Inc.
|
||||
* Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
|
||||
*
|
||||
* 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 the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _printf_h_
|
||||
#define _printf_h_
|
||||
|
||||
#include <stdarg.h>
|
||||
void printf(char *fmt, ...);
|
||||
|
||||
#endif /* _printf_h_ */
|
||||
1
target/linux/ramips/image/lzma-loader/src/ralink.mk
Normal file
1
target/linux/ramips/image/lzma-loader/src/ralink.mk
Normal file
@@ -0,0 +1 @@
|
||||
CACHE_FLAGS+=-DCONFIG_ICACHE_SIZE="(32 * 1024)" -DCONFIG_DCACHE_SIZE="(16 * 1024)" -DCONFIG_CACHELINE_SIZE=32
|
||||
849
target/linux/ramips/image/mt7620.mk
Normal file
849
target/linux/ramips/image/mt7620.mk
Normal file
@@ -0,0 +1,849 @@
|
||||
#
|
||||
# MT7620A Profiles
|
||||
#
|
||||
|
||||
DEVICE_VARS += TPLINK_FLASHLAYOUT TPLINK_HWID TPLINK_HWREV TPLINK_HWREVADD TPLINK_HVERSION \
|
||||
DLINK_ROM_ID DLINK_FAMILY_MEMBER DLINK_FIRMWARE_SIZE DLINK_IMAGE_OFFSET
|
||||
|
||||
define Build/elecom-header
|
||||
cp $@ $(KDIR)/v_0.0.0.bin
|
||||
( \
|
||||
mkhash md5 $(KDIR)/v_0.0.0.bin && \
|
||||
echo 458 \
|
||||
) | mkhash md5 > $(KDIR)/v_0.0.0.md5
|
||||
$(STAGING_DIR_HOST)/bin/tar -c \
|
||||
$(if $(SOURCE_DATE_EPOCH),--mtime=@$(SOURCE_DATE_EPOCH)) \
|
||||
-f $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5
|
||||
endef
|
||||
|
||||
define Build/elx-header
|
||||
$(eval hw_id=$(word 1,$(1)))
|
||||
$(eval xor_pattern=$(word 2,$(1)))
|
||||
( \
|
||||
echo -ne "\x00\x00\x00\x00\x00\x00\x00\x03" | \
|
||||
dd bs=42 count=1 conv=sync; \
|
||||
hw_id="$(hw_id)"; \
|
||||
echo -ne "\x$${hw_id:0:2}\x$${hw_id:2:2}\x$${hw_id:4:2}\x$${hw_id:6:2}" | \
|
||||
dd bs=20 count=1 conv=sync; \
|
||||
echo -ne "$$(printf '%08x' $$(stat -c%s $@) | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \
|
||||
dd bs=8 count=1 conv=sync; \
|
||||
echo -ne "$$($(STAGING_DIR_HOST)/bin/mkhash md5 $@ | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \
|
||||
dd bs=58 count=1 conv=sync; \
|
||||
) > $(KDIR)/tmp/$(DEVICE_NAME).header
|
||||
$(call Build/xor-image,-p $(xor_pattern) -x)
|
||||
cat $(KDIR)/tmp/$(DEVICE_NAME).header $@ > $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Device/ai-br100
|
||||
DTS := AI-BR100
|
||||
IMAGE_SIZE := 7936k
|
||||
DEVICE_TITLE := Aigale Ai-BR100
|
||||
DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += ai-br100
|
||||
|
||||
define Device/alfa-network_ac1200rm
|
||||
DTS := AC1200RM
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_TITLE := ALFA Network AC1200RM
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += alfa-network_ac1200rm
|
||||
|
||||
define Device/alfa-network_r36m-e4g
|
||||
DTS := R36M-E4G
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_TITLE := ALFA Network R36M-E4G
|
||||
DEVICE_PACKAGES := kmod-i2c-ralink kmod-usb2 kmod-usb-ohci uboot-envtools uqmi
|
||||
endef
|
||||
TARGET_DEVICES += alfa-network_r36m-e4g
|
||||
|
||||
define Device/alfa-network_tube-e4g
|
||||
DTS := TUBE-E4G
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_TITLE := ALFA Network Tube-E4G
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci uboot-envtools uqmi \
|
||||
-iwinfo -kmod-rt2800-soc -wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += alfa-network_tube-e4g
|
||||
|
||||
define Device/amit_jboot
|
||||
DLINK_IMAGE_OFFSET := 0x10000
|
||||
KERNEL := $(KERNEL_DTB)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata
|
||||
IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory
|
||||
DEVICE_PACKAGES := jboot-tools kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
|
||||
define Device/Archer
|
||||
TPLINK_HWREVADD := 0
|
||||
TPLINK_HVERSION := 3
|
||||
KERNEL := $(KERNEL_DTB)
|
||||
KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header -e
|
||||
IMAGE/factory.bin := tplink-v2-image -e
|
||||
IMAGE/sysupgrade.bin := tplink-v2-image -s -e | append-metadata
|
||||
endef
|
||||
|
||||
define Device/ArcherC20i
|
||||
$(Device/Archer)
|
||||
DTS := ArcherC20i
|
||||
SUPPORTED_DEVICES := c20i
|
||||
TPLINK_FLASHLAYOUT := 8Mmtk
|
||||
TPLINK_HWID := 0xc2000001
|
||||
TPLINK_HWREV := 58
|
||||
IMAGES += factory.bin
|
||||
DEVICE_TITLE := TP-Link ArcherC20i
|
||||
DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += ArcherC20i
|
||||
|
||||
define Device/ArcherC50v1
|
||||
$(Device/Archer)
|
||||
DTS := ArcherC50
|
||||
SUPPORTED_DEVICES := c50
|
||||
TPLINK_FLASHLAYOUT := 8Mmtk
|
||||
TPLINK_HWID := 0xc7500001
|
||||
TPLINK_HWREV := 69
|
||||
IMAGES += factory-us.bin factory-eu.bin
|
||||
IMAGE/factory-us.bin := tplink-v2-image -e -w 0
|
||||
IMAGE/factory-eu.bin := tplink-v2-image -e -w 2
|
||||
DEVICE_TITLE := TP-Link ArcherC50v1
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += ArcherC50v1
|
||||
|
||||
define Device/ArcherMR200
|
||||
$(Device/Archer)
|
||||
DTS := ArcherMR200
|
||||
SUPPORTED_DEVICES := mr200
|
||||
TPLINK_FLASHLAYOUT := 8MLmtk
|
||||
TPLINK_HWID := 0xd7500001
|
||||
TPLINK_HWREV := 0x4a
|
||||
DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-net kmod-usb-net-rndis kmod-usb-serial kmod-usb-serial-option adb-enablemodem
|
||||
DEVICE_TITLE := TP-Link ArcherMR200
|
||||
endef
|
||||
TARGET_DEVICES += ArcherMR200
|
||||
|
||||
define Device/bdcom_wap2100-sk
|
||||
DTS := BDCOM-WAP2100-SK
|
||||
IMAGE_SIZE := 15808k
|
||||
DEVICE_TITLE := BDCOM WAP2100-SK (ZTE ZXECS EBG3130)
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76x2 kmod-mt76x0e kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += bdcom_wap2100-sk
|
||||
|
||||
define Device/bocco
|
||||
DTS := BOCCO
|
||||
DEVICE_TITLE := YUKAI Engineering BOCCO
|
||||
DEVICE_PACKAGES := kmod-sound-core kmod-sound-mt7620 kmod-i2c-ralink
|
||||
endef
|
||||
TARGET_DEVICES += bocco
|
||||
|
||||
define Device/c108
|
||||
DTS := C108
|
||||
IMAGE_SIZE := 16777216
|
||||
DEVICE_TITLE := HNET C108
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620
|
||||
endef
|
||||
TARGET_DEVICES += c108
|
||||
|
||||
define Device/cf-wr800n
|
||||
DTS := CF-WR800N
|
||||
DEVICE_TITLE := Comfast CF-WR800N
|
||||
endef
|
||||
TARGET_DEVICES += cf-wr800n
|
||||
|
||||
define Device/cs-qr10
|
||||
DTS := CS-QR10
|
||||
DEVICE_TITLE := Planex CS-QR10
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci \
|
||||
kmod-sound-core kmod-sound-mt7620 \
|
||||
kmod-i2c-ralink kmod-sdhci-mt7620
|
||||
endef
|
||||
TARGET_DEVICES += cs-qr10
|
||||
|
||||
define Device/d240
|
||||
DTS := D240
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Sanlinking Technologies D240
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620
|
||||
endef
|
||||
TARGET_DEVICES += d240
|
||||
|
||||
define Device/db-wrt01
|
||||
DTS := DB-WRT01
|
||||
DEVICE_TITLE := Planex DB-WRT01
|
||||
endef
|
||||
TARGET_DEVICES += db-wrt01
|
||||
|
||||
define Device/dch-m225
|
||||
$(Device/seama)
|
||||
DTS := DCH-M225
|
||||
BLOCKSIZE := 4k
|
||||
SEAMA_SIGNATURE := wapn22_dlink.2013gui_dap1320b
|
||||
IMAGE_SIZE := 6848k
|
||||
DEVICE_TITLE := D-Link DCH-M225
|
||||
DEVICE_PACKAGES := kmod-sound-core kmod-sound-mt7620 kmod-i2c-ralink
|
||||
endef
|
||||
TARGET_DEVICES += dch-m225
|
||||
|
||||
define Device/dir-810l
|
||||
DTS := DIR-810L
|
||||
DEVICE_PACKAGES := kmod-mt76x0e
|
||||
DEVICE_TITLE := D-Link DIR-810L
|
||||
IMAGE_SIZE := 6720k
|
||||
endef
|
||||
TARGET_DEVICES += dir-810l
|
||||
|
||||
define Device/dlink_dir-510l
|
||||
$(Device/amit_jboot)
|
||||
DTS := DIR-510L
|
||||
DEVICE_TITLE := D-Link DIR-510L
|
||||
DEVICE_PACKAGES += kmod-mt76x0e
|
||||
DLINK_ROM_ID := DLK6E3805001
|
||||
DLINK_FAMILY_MEMBER := 0x6E38
|
||||
DLINK_FIRMWARE_SIZE := 0xDE0000
|
||||
DLINK_IMAGE_OFFSET := 0x210000
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dir-510l
|
||||
|
||||
define Device/dlink_dwr-116-a1
|
||||
$(Device/amit_jboot)
|
||||
DTS := DWR-116-A1
|
||||
DEVICE_TITLE := D-Link DWR-116 A1/A2
|
||||
DLINK_ROM_ID := DLK6E3803001
|
||||
DLINK_FAMILY_MEMBER := 0x6E38
|
||||
DLINK_FIRMWARE_SIZE := 0x7E0000
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dwr-116-a1
|
||||
|
||||
define Device/dlink_dwr-118-a1
|
||||
$(Device/amit_jboot)
|
||||
DTS := DWR-118-A1
|
||||
DEVICE_TITLE := D-Link DWR-118 A1
|
||||
DEVICE_PACKAGES += kmod-mt76x0e
|
||||
DLINK_ROM_ID := DLK6E3811001
|
||||
DLINK_FAMILY_MEMBER := 0x6E38
|
||||
DLINK_FIRMWARE_SIZE := 0xFE0000
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dwr-118-a1
|
||||
|
||||
define Device/dlink_dwr-118-a2
|
||||
$(Device/amit_jboot)
|
||||
DTS := DWR-118-A2
|
||||
DEVICE_TITLE := D-Link DWR-118 A2
|
||||
DEVICE_PACKAGES += kmod-mt76x2
|
||||
DLINK_ROM_ID := DLK6E3814001
|
||||
DLINK_FAMILY_MEMBER := 0x6E38
|
||||
DLINK_FIRMWARE_SIZE := 0xFE0000
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dwr-118-a2
|
||||
|
||||
define Device/dlink_dwr-921-c1
|
||||
$(Device/amit_jboot)
|
||||
DTS := DWR-921-C1
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := D-Link DWR-921 C1
|
||||
DLINK_ROM_ID := DLK6E2414001
|
||||
DLINK_FAMILY_MEMBER := 0x6E24
|
||||
DLINK_FIRMWARE_SIZE := 0xFE0000
|
||||
DEVICE_PACKAGES += kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dwr-921-c1
|
||||
|
||||
define Device/dlink_dwr-921-c3
|
||||
$(Device/dlink_dwr-921-c1)
|
||||
DEVICE_TITLE := D-Link DWR-921 C3
|
||||
DLINK_ROM_ID := DLK6E2414009
|
||||
SUPPORTED_DEVICES := dlink,dwr-921-c1
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dwr-921-c3
|
||||
|
||||
define Device/dlink_dwr-922-e2
|
||||
$(Device/amit_jboot)
|
||||
DTS := DWR-922-E2
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := D-Link DWR-922 E2
|
||||
DLINK_ROM_ID := DLK6E2414005
|
||||
DLINK_FAMILY_MEMBER := 0x6E24
|
||||
DLINK_FIRMWARE_SIZE := 0xFE0000
|
||||
DEVICE_PACKAGES += kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dwr-922-e2
|
||||
|
||||
define Device/e1700
|
||||
DTS := E1700
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
umedia-header 0x013326
|
||||
DEVICE_TITLE := Linksys E1700
|
||||
endef
|
||||
TARGET_DEVICES += e1700
|
||||
|
||||
define Device/ex2700
|
||||
NETGEAR_HW_ID := 29764623+4+0+32+2x2+0
|
||||
NETGEAR_BOARD_ID := EX2700
|
||||
DTS := EX2700
|
||||
BLOCKSIZE := 4k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
IMAGES += factory.bin
|
||||
KERNEL := $(KERNEL_DTB) | uImage lzma | pad-offset 64k 64 | append-uImage-fakehdr filesystem
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
netgear-dni
|
||||
DEVICE_TITLE := Netgear EX2700
|
||||
endef
|
||||
#TARGET_DEVICES += ex2700
|
||||
|
||||
define Device/ex3700-ex3800
|
||||
NETGEAR_BOARD_ID := U12H319T00_NETGEAR
|
||||
DTS := EX3700
|
||||
BLOCKSIZE := 4k
|
||||
IMAGE_SIZE := 7744k
|
||||
IMAGES += factory.chk
|
||||
IMAGE/factory.chk := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | netgear-chk
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
DEVICE_TITLE := Netgear EX3700/EX3800
|
||||
SUPPORTED_DEVICES := ex3700
|
||||
endef
|
||||
TARGET_DEVICES += ex3700-ex3800
|
||||
|
||||
define Device/gl-mt300a
|
||||
DTS := GL-MT300A
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := GL-Inet GL-MT300A
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += gl-mt300a
|
||||
|
||||
define Device/u25awf-h1
|
||||
DTS := U25AWF-H1
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_TITLE := Kimax U25AWF-H1
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += u25awf-h1
|
||||
|
||||
define Device/gl-mt300n
|
||||
DTS := GL-MT300N
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := GL-Inet GL-MT300N
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += gl-mt300n
|
||||
|
||||
define Device/gl-mt750
|
||||
DTS := GL-MT750
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := GL-Inet GL-MT750
|
||||
DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += gl-mt750
|
||||
|
||||
define Device/hc5661
|
||||
DTS := HC5661
|
||||
IMAGE_SIZE := 15872k
|
||||
DEVICE_TITLE := HiWiFi HC5661
|
||||
DEVICE_PACKAGES := kmod-sdhci-mt7620
|
||||
endef
|
||||
TARGET_DEVICES += hc5661
|
||||
|
||||
define Device/hc5761
|
||||
DTS := HC5761
|
||||
IMAGE_SIZE := 15872k
|
||||
DEVICE_TITLE := HiWiFi HC5761
|
||||
DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += hc5761
|
||||
|
||||
define Device/hc5861
|
||||
DTS := HC5861
|
||||
IMAGE_SIZE := 15872k
|
||||
DEVICE_TITLE := HiWiFi HC5861
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += hc5861
|
||||
|
||||
define Device/head-weblink_hdrm200
|
||||
DTS := HDRM200
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_TITLE := Head Weblink HDRM2000
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 \
|
||||
uqmi kmod-usb-serial kmod-usb-serial-option
|
||||
endef
|
||||
TARGET_DEVICES += head-weblink_hdrm200
|
||||
|
||||
define Device/iodata_wn-ac1167gr
|
||||
DTS := WN-AC1167GR
|
||||
DEVICE_TITLE := I-O DATA WN-AC1167GR
|
||||
IMAGE_SIZE := 6864k
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
elx-header 01040016 8844A2D168B45A2D
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
endef
|
||||
TARGET_DEVICES += iodata_wn-ac1167gr
|
||||
|
||||
define Device/iodata_wn-ac733gr3
|
||||
DTS := WN-AC733GR3
|
||||
DEVICE_TITLE := I-O DATA WN-AC733GR3
|
||||
IMAGE_SIZE := 6992k
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
elx-header 01040006 8844A2D168B45A2D
|
||||
DEVICE_PACKAGES := kmod-mt76x0e kmod-switch-rtl8367b
|
||||
endef
|
||||
TARGET_DEVICES += iodata_wn-ac733gr3
|
||||
|
||||
define Device/kimax_u35wf
|
||||
DTS := U35WF
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_TITLE := Kimax U35WF
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += kimax_u35wf
|
||||
|
||||
define Device/kng_rc
|
||||
DTS := kng_rc
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := ZyXEL Keenetic Viva
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-switch-rtl8366-smi kmod-switch-rtl8367b
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | pad-to 64k | check-size $$$$(IMAGE_SIZE) | \
|
||||
zyimage -d 8997 -v "ZyXEL Keenetic Viva"
|
||||
SUPPORTED_DEVICES := kng_rc
|
||||
endef
|
||||
TARGET_DEVICES += kng_rc
|
||||
|
||||
define Device/kn_rc
|
||||
DTS := kn_rc
|
||||
DEVICE_TITLE := ZyXEL Keenetic Omni
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | pad-to 64k | check-size $$$$(IMAGE_SIZE) | \
|
||||
zyimage -d 4882 -v "ZyXEL Keenetic Omni"
|
||||
SUPPORTED_DEVICES := kn_rc
|
||||
endef
|
||||
TARGET_DEVICES += kn_rc
|
||||
|
||||
define Device/kn_rf
|
||||
DTS := kn_rf
|
||||
DEVICE_TITLE := ZyXEL Keenetic Omni II
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | pad-to 64k | check-size $$$$(IMAGE_SIZE) | \
|
||||
zyimage -d 2102034 -v "ZyXEL Keenetic Omni II"
|
||||
SUPPORTED_DEVICES := kn_rf
|
||||
endef
|
||||
TARGET_DEVICES += kn_rf
|
||||
|
||||
define Device/microwrt
|
||||
DTS := MicroWRT
|
||||
IMAGE_SIZE := 16128k
|
||||
DEVICE_TITLE := Microduino MicroWRT
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += microwrt
|
||||
|
||||
define Device/lava_lr-25g001
|
||||
$(Device/amit_jboot)
|
||||
DTS := LR-25G001
|
||||
DEVICE_TITLE := LAVA LR-25G001
|
||||
DLINK_ROM_ID := LVA6E3804001
|
||||
DLINK_FAMILY_MEMBER := 0x6E38
|
||||
DLINK_FIRMWARE_SIZE := 0xFE0000
|
||||
DEVICE_PACKAGES += kmod-mt76x0e
|
||||
endef
|
||||
TARGET_DEVICES += lava_lr-25g001
|
||||
|
||||
define Device/miwifi-mini
|
||||
DTS := MIWIFI-MINI
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Xiaomi MiWiFi Mini
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += miwifi-mini
|
||||
|
||||
define Device/mlw221
|
||||
DTS := MLW221
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Kingston MLW221
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += mlw221
|
||||
|
||||
define Device/mlwg2
|
||||
DTS := MLWG2
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Kingston MLWG2
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += mlwg2
|
||||
|
||||
define Device/mt7620a
|
||||
DTS := MT7620a
|
||||
DEVICE_TITLE := MediaTek MT7620a EVB
|
||||
endef
|
||||
TARGET_DEVICES += mt7620a
|
||||
|
||||
define Device/mt7620a_mt7530
|
||||
DTS := MT7620a_MT7530
|
||||
DEVICE_TITLE := MediaTek MT7620a + MT7530 EVB
|
||||
SUPPORTED_DEVICES := mt7620a_mt7530
|
||||
endef
|
||||
TARGET_DEVICES += mt7620a_mt7530
|
||||
|
||||
define Device/mt7620a_mt7610e
|
||||
DTS := MT7620a_MT7610e
|
||||
DEVICE_TITLE := MediaTek MT7620a + MT7610e EVB
|
||||
DEVICE_PACKAGES := kmod-mt76x0e
|
||||
SUPPORTED_DEVICES := mt7620a_mt7610e
|
||||
endef
|
||||
TARGET_DEVICES += mt7620a_mt7610e
|
||||
|
||||
define Device/mt7620a_v22sg
|
||||
DTS := MT7620a_V22SG
|
||||
DEVICE_TITLE := MediaTek MT7620a V22SG
|
||||
SUPPORTED_DEVICES := mt7620a_v22sg
|
||||
endef
|
||||
TARGET_DEVICES += mt7620a_v22sg
|
||||
|
||||
define Device/mzk-750dhp
|
||||
DTS := MZK-750DHP
|
||||
DEVICE_TITLE := Planex MZK-750DHP
|
||||
DEVICE_PACKAGES := kmod-mt76x0e
|
||||
endef
|
||||
TARGET_DEVICES += mzk-750dhp
|
||||
|
||||
define Device/mzk-ex300np
|
||||
DTS := MZK-EX300NP
|
||||
DEVICE_TITLE := Planex MZK-EX300NP
|
||||
endef
|
||||
TARGET_DEVICES += mzk-ex300np
|
||||
|
||||
define Device/mzk-ex750np
|
||||
DTS := MZK-EX750NP
|
||||
DEVICE_TITLE := Planex MZK-EX750NP
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
endef
|
||||
TARGET_DEVICES += mzk-ex750np
|
||||
|
||||
define Device/na930
|
||||
DTS := NA930
|
||||
IMAGE_SIZE := 20m
|
||||
DEVICE_TITLE := Sercomm NA930
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += na930
|
||||
|
||||
define Device/oy-0001
|
||||
DTS := OY-0001
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Oh Yeah OY-0001
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += oy-0001
|
||||
|
||||
define Device/psg1208
|
||||
DTS := PSG1208
|
||||
DEVICE_TITLE := Phicomm PSG1208
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
endef
|
||||
TARGET_DEVICES += psg1208
|
||||
|
||||
define Device/psg1218a
|
||||
DTS := PSG1218A
|
||||
DEVICE_TITLE := Phicomm PSG1218 rev.Ax
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
SUPPORTED_DEVICES += psg1218
|
||||
endef
|
||||
TARGET_DEVICES += psg1218a
|
||||
|
||||
define Device/psg1218b
|
||||
DTS := PSG1218B
|
||||
DEVICE_TITLE := Phicomm PSG1218 rev.Bx
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
SUPPORTED_DEVICES += psg1218
|
||||
endef
|
||||
TARGET_DEVICES += psg1218b
|
||||
|
||||
define Device/phicomm_k2g
|
||||
DTS := K2G
|
||||
IMAGE_SIZE := 7552k
|
||||
DEVICE_TITLE := Phicomm K2G
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
endef
|
||||
TARGET_DEVICES += phicomm_k2g
|
||||
|
||||
define Device/rp-n53
|
||||
DTS := RP-N53
|
||||
DEVICE_TITLE := Asus RP-N53
|
||||
DEVICE_PACKAGES := kmod-rt2800-pci
|
||||
endef
|
||||
TARGET_DEVICES += rp-n53
|
||||
|
||||
define Device/rt-n12p
|
||||
DTS := RT-N12-PLUS
|
||||
DEVICE_TITLE := Asus RT-N11P/RT-N12+/RT-N12Eb1
|
||||
endef
|
||||
TARGET_DEVICES += rt-n12p
|
||||
|
||||
define Device/rt-n14u
|
||||
DTS := RT-N14U
|
||||
DEVICE_TITLE := Asus RT-N14u
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += rt-n14u
|
||||
|
||||
define Device/rt-ac51u
|
||||
DTS := RT-AC51U
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Asus RT-AC51U
|
||||
DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += rt-ac51u
|
||||
|
||||
define Device/tiny-ac
|
||||
DTS := TINY-AC
|
||||
DEVICE_TITLE := Dovado Tiny AC
|
||||
DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += tiny-ac
|
||||
|
||||
define Device/edimax_br-6478ac-v2
|
||||
DTS := BR-6478AC-V2
|
||||
DEVICE_TITLE := Edimax BR-6478AC V2
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := 7616k
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
|
||||
edimax-header -s CSYS -m RN68 -f 0x70000 -S 0x01100000 | pad-rootfs | \
|
||||
append-metadata | check-size $$$$(IMAGE_SIZE)
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += edimax_br-6478ac-v2
|
||||
|
||||
define Device/tplink_c2-v1
|
||||
$(Device/Archer)
|
||||
DTS := ArcherC2-v1
|
||||
TPLINK_FLASHLAYOUT := 8Mmtk
|
||||
TPLINK_HWID := 0xc7500001
|
||||
TPLINK_HWREV := 50
|
||||
DEVICE_TITLE := TP-Link Archer C2 v1
|
||||
DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-switch-rtl8366-smi kmod-switch-rtl8367b
|
||||
endef
|
||||
TARGET_DEVICES += tplink_c2-v1
|
||||
|
||||
define Device/tplink_c20-v1
|
||||
$(Device/Archer)
|
||||
DTS := ArcherC20v1
|
||||
TPLINK_FLASHLAYOUT := 8Mmtk
|
||||
TPLINK_HWID := 0xc2000001
|
||||
TPLINK_HWREV := 0x44
|
||||
TPLINK_HWREVADD := 0x1
|
||||
DEVICE_TITLE := TP-Link ArcherC20 v1
|
||||
DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += tplink_c20-v1
|
||||
|
||||
define Device/vonets_var11n-300
|
||||
DTS := VAR11N-300
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
BLOCKSIZE := 4k
|
||||
DEVICE_TITLE := Vonets VAR11N-300
|
||||
endef
|
||||
TARGET_DEVICES += vonets_var11n-300
|
||||
|
||||
define Device/ravpower_wd03
|
||||
DTS := WD03
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_8M)
|
||||
DEVICE_TITLE := Ravpower WD03
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += ravpower_wd03
|
||||
|
||||
define Device/whr-1166d
|
||||
DTS := WHR-1166D
|
||||
IMAGE_SIZE := 15040k
|
||||
DEVICE_TITLE := Buffalo WHR-1166D
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
endef
|
||||
TARGET_DEVICES += whr-1166d
|
||||
|
||||
define Device/whr-300hp2
|
||||
DTS := WHR-300HP2
|
||||
IMAGE_SIZE := 6848k
|
||||
DEVICE_TITLE := Buffalo WHR-300HP2
|
||||
endef
|
||||
TARGET_DEVICES += whr-300hp2
|
||||
|
||||
define Device/whr-600d
|
||||
DTS := WHR-600D
|
||||
IMAGE_SIZE := 6848k
|
||||
DEVICE_TITLE := Buffalo WHR-600D
|
||||
DEVICE_PACKAGES := kmod-rt2800-pci
|
||||
endef
|
||||
TARGET_DEVICES += whr-600d
|
||||
|
||||
define Device/wmr-300
|
||||
DTS := WMR-300
|
||||
DEVICE_TITLE := Buffalo WMR-300
|
||||
endef
|
||||
TARGET_DEVICES += wmr-300
|
||||
|
||||
define Device/wn3000rpv3
|
||||
NETGEAR_HW_ID := 29764836+8+0+32+2x2+0
|
||||
NETGEAR_BOARD_ID := WN3000RPv3
|
||||
DTS := WN3000RPV3
|
||||
BLOCKSIZE := 4k
|
||||
IMAGES += factory.bin
|
||||
KERNEL := $(KERNEL_DTB) | uImage lzma | pad-offset 64k 64 | append-uImage-fakehdr filesystem
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
netgear-dni
|
||||
DEVICE_TITLE := Netgear WN3000RPv3
|
||||
endef
|
||||
TARGET_DEVICES += wn3000rpv3
|
||||
|
||||
define Device/wrh-300cr
|
||||
DTS := WRH-300CR
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
elecom-header
|
||||
DEVICE_TITLE := Elecom WRH-300CR
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += wrh-300cr
|
||||
|
||||
define Device/wrtnode
|
||||
DTS := WRTNODE
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := WRTNode
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += wrtnode
|
||||
|
||||
define Device/wt3020-4M
|
||||
DTS := WT3020-4M
|
||||
BLOCKSIZE := 4k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
IMAGES += factory.bin
|
||||
SUPPORTED_DEVICES += wt3020
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
poray-header -B WT3020 -F 4M
|
||||
DEVICE_TITLE := Nexx WT3020 (4MB)
|
||||
endef
|
||||
#TARGET_DEVICES += wt3020-4M
|
||||
|
||||
define Device/wt3020-8M
|
||||
DTS := WT3020-8M
|
||||
IMAGES += factory.bin
|
||||
SUPPORTED_DEVICES += wt3020
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
poray-header -B WT3020 -F 8M
|
||||
DEVICE_TITLE := Nexx WT3020 (8MB)
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += wt3020-8M
|
||||
|
||||
define Device/y1
|
||||
DTS := Y1
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Lenovo Y1
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += y1
|
||||
|
||||
define Device/y1s
|
||||
DTS := Y1S
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Lenovo Y1S
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += y1s
|
||||
|
||||
define Device/youku-yk1
|
||||
DTS := YOUKU-YK1
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
DEVICE_TITLE := YOUKU YK1
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += youku-yk1
|
||||
|
||||
define Device/we1026-5g-16m
|
||||
DTS := WE1026-5G-16M
|
||||
IMAGE_SIZE := 16777216
|
||||
SUPPORTED_DEVICES += we1026-5g-16m
|
||||
DEVICE_TITLE := Zbtlink ZBT-WE1026-5G (16M)
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620
|
||||
endef
|
||||
TARGET_DEVICES += we1026-5g-16m
|
||||
|
||||
define Device/zbt-ape522ii
|
||||
DTS := ZBT-APE522II
|
||||
DEVICE_TITLE := Zbtlink ZBT-APE522II
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
endef
|
||||
TARGET_DEVICES += zbt-ape522ii
|
||||
|
||||
define Device/zbt-cpe102
|
||||
DTS := ZBT-CPE102
|
||||
DEVICE_TITLE := Zbtlink ZBT-CPE102
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += zbt-cpe102
|
||||
|
||||
define Device/zbt-wa05
|
||||
DTS := ZBT-WA05
|
||||
DEVICE_TITLE := Zbtlink ZBT-WA05
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += zbt-wa05
|
||||
|
||||
define Device/zbt-we2026
|
||||
DTS := ZBT-WE2026
|
||||
DEVICE_TITLE := Zbtlink ZBT-WE2026
|
||||
endef
|
||||
TARGET_DEVICES += zbt-we2026
|
||||
|
||||
define Device/zbt-we826-16M
|
||||
DTS := ZBT-WE826-16M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
SUPPORTED_DEVICES += zbt-we826
|
||||
DEVICE_TITLE := Zbtlink ZBT-WE826 (16M)
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620
|
||||
endef
|
||||
TARGET_DEVICES += zbt-we826-16M
|
||||
|
||||
define Device/zbt-we826-32M
|
||||
DTS := ZBT-WE826-32M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
DEVICE_TITLE := Zbtlink ZBT-WE826 (32M)
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620
|
||||
endef
|
||||
TARGET_DEVICES += zbt-we826-32M
|
||||
|
||||
define Device/zbtlink_zbt-we826-e
|
||||
DTS := ZBT-WE826-E
|
||||
IMAGE_SIZE := 32448k
|
||||
DEVICE_TITLE := Zbtlink ZBT-WE826-E
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 uqmi \
|
||||
kmod-usb-serial kmod-usb-serial-option
|
||||
endef
|
||||
TARGET_DEVICES += zbtlink_zbt-we826-e
|
||||
|
||||
define Device/zbt-wr8305rt
|
||||
DTS := ZBT-WR8305RT
|
||||
DEVICE_TITLE := Zbtlink ZBT-WR8305RT
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += zbt-wr8305rt
|
||||
|
||||
define Device/zte-q7
|
||||
DTS := ZTE-Q7
|
||||
DEVICE_TITLE := ZTE Q7
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += zte-q7
|
||||
684
target/linux/ramips/image/mt7621.mk
Normal file
684
target/linux/ramips/image/mt7621.mk
Normal file
@@ -0,0 +1,684 @@
|
||||
#
|
||||
# MT7621 Profiles
|
||||
#
|
||||
|
||||
KERNEL_DTB += -d21
|
||||
DEVICE_VARS += TPLINK_BOARD_ID TPLINK_HEADER_VERSION TPLINK_HWID TPLINK_HWREV
|
||||
|
||||
define Build/elecom-gst-factory
|
||||
$(eval product=$(word 1,$(1)))
|
||||
$(eval version=$(word 2,$(1)))
|
||||
( $(STAGING_DIR_HOST)/bin/mkhash md5 $@ | tr -d '\n' ) >> $@
|
||||
( \
|
||||
echo -n "ELECOM $(product) v$(version)" | \
|
||||
dd bs=32 count=1 conv=sync; \
|
||||
dd if=$@; \
|
||||
) > $@.new
|
||||
mv $@.new $@
|
||||
echo -n "MT7621_ELECOM_$(product)" >> $@
|
||||
endef
|
||||
|
||||
define Build/elecom-wrc-factory
|
||||
$(eval product=$(word 1,$(1)))
|
||||
$(eval version=$(word 2,$(1)))
|
||||
$(STAGING_DIR_HOST)/bin/mkhash md5 $@ >> $@
|
||||
( \
|
||||
echo -n "ELECOM $(product) v$(version)" | \
|
||||
dd bs=32 count=1 conv=sync; \
|
||||
dd if=$@; \
|
||||
) > $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/iodata-factory
|
||||
$(eval fw_size=$(word 1,$(1)))
|
||||
$(eval fw_type=$(word 2,$(1)))
|
||||
$(eval product=$(word 3,$(1)))
|
||||
$(eval factory_bin=$(word 4,$(1)))
|
||||
if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(fw_size)" ]; then \
|
||||
$(CP) $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) $(factory_bin); \
|
||||
$(STAGING_DIR_HOST)/bin/mksenaofw \
|
||||
-r 0x30a -p $(product) -t $(fw_type) \
|
||||
-e $(factory_bin) -o $(factory_bin).new; \
|
||||
mv $(factory_bin).new $(factory_bin); \
|
||||
$(CP) $(factory_bin) $(BIN_DIR)/; \
|
||||
else \
|
||||
echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
|
||||
fi
|
||||
endef
|
||||
|
||||
# The OEM webinterface expects an kernel with initramfs which has the uImage
|
||||
# header field ih_name.
|
||||
# We don't wan't to set the header name field for the kernel include in the
|
||||
# sysupgrade image as well, as this image shouldn't be accepted by the OEM
|
||||
# webinterface. It will soft-brick the board.
|
||||
define Build/wr1201-factory-header
|
||||
mkimage -A $(LINUX_KARCH) \
|
||||
-O linux -T kernel \
|
||||
-C lzma -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
|
||||
-n 'WR1201_8_128' -d $@ $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/netis-tail
|
||||
echo -n $(1) >> $@
|
||||
echo -n $(UIMAGE_NAME)-yun | $(STAGING_DIR_HOST)/bin/mkhash md5 | \
|
||||
sed 's/../\\\\x&/g' | xargs echo -ne >> $@
|
||||
endef
|
||||
|
||||
define Build/ubnt-erx-factory-image
|
||||
if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \
|
||||
echo '21001:6' > $(1).compat; \
|
||||
$(TAR) -cf $(1) --transform='s/^.*/compat/' $(1).compat; \
|
||||
\
|
||||
$(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \
|
||||
mkhash md5 $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) > $(1).md5; \
|
||||
$(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp.md5/' $(1).md5; \
|
||||
\
|
||||
echo "dummy" > $(1).rootfs; \
|
||||
$(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp/' $(1).rootfs; \
|
||||
\
|
||||
mkhash md5 $(1).rootfs > $(1).md5; \
|
||||
$(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp.md5/' $(1).md5; \
|
||||
\
|
||||
echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version; \
|
||||
$(TAR) -rf $(1) --transform='s/^.*/version.tmp/' $(1).version; \
|
||||
\
|
||||
$(CP) $(1) $(BIN_DIR)/; \
|
||||
else \
|
||||
echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
|
||||
fi
|
||||
endef
|
||||
|
||||
define Device/11acnas
|
||||
DTS := 11ACNAS
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
UIMAGE_NAME := 11AC-NAS-Router(0.0.0)
|
||||
DEVICE_TITLE := WeVO 11AC NAS Router
|
||||
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += 11acnas
|
||||
|
||||
define Device/alfa-network_quad-e4g
|
||||
DTS := QUAD-E4G
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_TITLE := ALFA Network Quad-E4G
|
||||
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 \
|
||||
uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += alfa-network_quad-e4g
|
||||
|
||||
define Device/asus_rt-ac57u
|
||||
DTS := RT-AC57U
|
||||
DEVICE_TITLE := ASUS RT-AC57U
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += asus_rt-ac57u
|
||||
|
||||
define Device/dir-860l-b1
|
||||
$(Device/seama)
|
||||
DTS := DIR-860L-B1
|
||||
BLOCKSIZE := 64k
|
||||
SEAMA_SIGNATURE := wrgac13_dlink.2013gui_dir860lb
|
||||
KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := D-Link DIR-860L B1
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += dir-860l-b1
|
||||
|
||||
define Device/mediatek_ap-mt7621a-v60
|
||||
DTS := AP-MT7621A-V60
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_8M)
|
||||
DEVICE_TITLE := Mediatek AP-MT7621A-V60 EVB
|
||||
DEVICE_PACKAGES := kmod-usb3 kmod-sdhci-mt7620 kmod-sound-mt7620
|
||||
endef
|
||||
TARGET_DEVICES += mediatek_ap-mt7621a-v60
|
||||
|
||||
define Device/xzwifi_creativebox-v1
|
||||
DTS := CreativeBox-v1
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
DEVICE_TITLE := CreativeBox v1
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-ata-core kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
|
||||
kmod-usb3
|
||||
endef
|
||||
TARGET_DEVICES += xzwifi_creativebox-v1
|
||||
|
||||
define Device/elecom_wrc-1167ghbk2-s
|
||||
DTS := WRC-1167GHBK2-S
|
||||
IMAGE_SIZE := 15488k
|
||||
DEVICE_TITLE := ELECOM WRC-1167GHBK2-S
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) |\
|
||||
elecom-wrc-factory WRC-1167GHBK2-S 0.00
|
||||
endef
|
||||
TARGET_DEVICES += elecom_wrc-1167ghbk2-s
|
||||
|
||||
define Device/elecom_wrc-2533gst
|
||||
DTS := WRC-2533GST
|
||||
IMAGE_SIZE := 11264k
|
||||
DEVICE_TITLE := ELECOM WRC-2533GST
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) |\
|
||||
elecom-gst-factory WRC-2533GST 0.00
|
||||
endef
|
||||
TARGET_DEVICES += elecom_wrc-2533gst
|
||||
|
||||
define Device/elecom_wrc-1900gst
|
||||
DTS := WRC-1900GST
|
||||
IMAGE_SIZE := 11264k
|
||||
DEVICE_TITLE := ELECOM WRC-1900GST
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) |\
|
||||
elecom-gst-factory WRC-1900GST 0.00
|
||||
endef
|
||||
TARGET_DEVICES += elecom_wrc-1900gst
|
||||
|
||||
define Device/ew1200
|
||||
DTS := EW1200
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := AFOUNDRY EW1200
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-ata-core kmod-ata-ahci kmod-mt76x2 kmod-mt7603 kmod-usb3 \
|
||||
kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += ew1200
|
||||
|
||||
define Device/firewrt
|
||||
DTS := FIREWRT
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Firefly FireWRT
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += firewrt
|
||||
|
||||
define Device/gehua_ghl-r-001
|
||||
DTS := GHL-R-001
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
DEVICE_TITLE := GeHua GHL-R-001
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += gehua_ghl-r-001
|
||||
|
||||
define Device/gnubee_gb-pc1
|
||||
DTS := GB-PC1
|
||||
DEVICE_TITLE := GnuBee Personal Cloud One
|
||||
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
endef
|
||||
TARGET_DEVICES += gnubee_gb-pc1
|
||||
|
||||
define Device/gnubee_gb-pc2
|
||||
DTS := GB-PC2
|
||||
DEVICE_TITLE := GnuBee Personal Cloud Two
|
||||
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
endef
|
||||
TARGET_DEVICES += gnubee_gb-pc2
|
||||
|
||||
define Device/hc5962
|
||||
DTS := HC5962
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_SIZE := 2097152
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
|
||||
DEVICE_TITLE := HiWiFi HC5962
|
||||
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += hc5962
|
||||
|
||||
define Device/iodata_wn-ax1167gr
|
||||
DTS := WN-AX1167GR
|
||||
IMAGE_SIZE := 15552k
|
||||
KERNEL_INITRAMFS := $$(KERNEL) | \
|
||||
iodata-factory 7864320 4 0x1055 $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.bin
|
||||
DEVICE_TITLE := I-O DATA WN-AX1167GR
|
||||
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += iodata_wn-ax1167gr
|
||||
|
||||
define Device/iodata_wn-gx300gr
|
||||
DTS := WN-GX300GR
|
||||
IMAGE_SIZE := 7798784
|
||||
DEVICE_TITLE := I-O DATA WN-GX300GR
|
||||
DEVICE_PACKAGES := kmod-mt7603 wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += iodata_wn-gx300gr
|
||||
|
||||
define Device/k2p
|
||||
DTS := K2P
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Phicomm K2P
|
||||
endef
|
||||
TARGET_DEVICES += k2p
|
||||
|
||||
define Device/xiaomi_mir3p
|
||||
DTS := MIR3P
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_SIZE:= 4096k
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
DEVICE_TITLE := Xiaomi Mi Router 3 Pro
|
||||
IMAGES += factory.bin
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic \
|
||||
uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += xiaomi_mir3p
|
||||
|
||||
define Device/xiaomi_mir3g
|
||||
DTS := MIR3G
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_SIZE := 4096k
|
||||
IMAGE_SIZE := 32768k
|
||||
UBINIZE_OPTS := -E 5
|
||||
BOARD_NAME := mir3g
|
||||
IMAGES += kernel1.bin rootfs0.bin
|
||||
IMAGE/kernel1.bin := append-kernel
|
||||
IMAGE/rootfs0.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
DEVICE_TITLE := Xiaomi Mi Router 3G
|
||||
SUPPORTED_DEVICES += R3G
|
||||
SUPPORTED_DEVICES += mir3g
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic \
|
||||
uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += xiaomi_mir3g
|
||||
|
||||
define Device/mt7621
|
||||
DTS := MT7621
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := MediaTek MT7621 EVB
|
||||
endef
|
||||
TARGET_DEVICES += mt7621
|
||||
|
||||
define Device/newifi-d1
|
||||
DTS := Newifi-D1
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
DEVICE_TITLE := Newifi D1
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += newifi-d1
|
||||
|
||||
define Device/d-team_newifi-d2
|
||||
DTS := Newifi-D2
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
DEVICE_TITLE := Newifi D2
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += d-team_newifi-d2
|
||||
|
||||
define Device/pbr-m1
|
||||
DTS := PBR-M1
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := PBR-M1
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-ata-core kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \
|
||||
kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += pbr-m1
|
||||
|
||||
define Device/r6220
|
||||
DTS := R6220
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_SIZE := 4096k
|
||||
IMAGE_SIZE := 28672k
|
||||
UBINIZE_OPTS := -E 5
|
||||
SERCOMM_HWID := AYA
|
||||
SERCOMM_HWVER := A001
|
||||
SERCOMM_SWVER := 0x0086
|
||||
IMAGES += factory.img kernel.bin rootfs.bin
|
||||
IMAGE/factory.img := pad-extra 2048k | append-kernel | pad-to 6144k | append-ubi | \
|
||||
pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | zip R6220.bin | sercom-seal
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
IMAGE/kernel.bin := append-kernel
|
||||
IMAGE/rootfs.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
|
||||
DEVICE_TITLE := Netgear R6220
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += r6220
|
||||
|
||||
define Device/netgear_ex6150
|
||||
DTS := EX6150
|
||||
DEVICE_TITLE := Netgear EX6150
|
||||
DEVICE_PACKAGES := kmod-mt76x2 wpad-basic
|
||||
NETGEAR_BOARD_ID := U12H318T00_NETGEAR
|
||||
IMAGE_SIZE := 14848k
|
||||
IMAGES += factory.chk
|
||||
IMAGE/factory.chk := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | netgear-chk
|
||||
endef
|
||||
TARGET_DEVICES += netgear_ex6150
|
||||
|
||||
define Device/netgear_r6350
|
||||
DTS := R6350
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_SIZE := 4096k
|
||||
IMAGE_SIZE := 40960k
|
||||
UBINIZE_OPTS := -E 5
|
||||
SERCOMM_HWID := CHJ
|
||||
SERCOMM_HWVER := A001
|
||||
SERCOMM_SWVER := 0x0052
|
||||
IMAGES += factory.img kernel.bin rootfs.bin
|
||||
IMAGE/factory.img := pad-extra 2048k | append-kernel | pad-to 6144k | append-ubi | \
|
||||
pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | zip $$$$(DEVICE_MODEL).bin | sercom-seal
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
IMAGE/kernel.bin := append-kernel
|
||||
IMAGE/rootfs.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
|
||||
DEVICE_TITLE := Netgear R6350
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-mt7603 kmod-mt7615e kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += netgear_r6350
|
||||
|
||||
define Device/MikroTik
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := 16128k
|
||||
DEVICE_PACKAGES := kmod-usb3
|
||||
LOADER_TYPE := elf
|
||||
PLATFORM := mt7621
|
||||
KERNEL := $(KERNEL_DTB) | loader-kernel
|
||||
IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | pad-to $$$$(BLOCKSIZE) | \
|
||||
append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
|
||||
endef
|
||||
|
||||
define Device/mikrotik_rb750gr3
|
||||
$(Device/MikroTik)
|
||||
DTS := RB750Gr3
|
||||
DEVICE_TITLE := MikroTik RouterBOARD RB750Gr3
|
||||
DEVICE_PACKAGES += kmod-gpio-beeper
|
||||
endef
|
||||
TARGET_DEVICES += mikrotik_rb750gr3
|
||||
|
||||
define Device/mikrotik_rbm33g
|
||||
$(Device/MikroTik)
|
||||
DTS := RBM33G
|
||||
DEVICE_TITLE := MikroTik RouterBOARD M33G
|
||||
endef
|
||||
TARGET_DEVICES += mikrotik_rbm33g
|
||||
|
||||
define Device/mikrotik_rbm11g
|
||||
$(Device/MikroTik)
|
||||
DTS := RBM11G
|
||||
DEVICE_TITLE := MikroTik RouterBOARD M11G
|
||||
endef
|
||||
TARGET_DEVICES += mikrotik_rbm11g
|
||||
|
||||
define Device/mtc_wr1201
|
||||
DTS := WR1201
|
||||
IMAGE_SIZE := 16000k
|
||||
DEVICE_TITLE := MTC Wireless Router WR1201
|
||||
KERNEL_INITRAMFS := $(KERNEL_DTB) | wr1201-factory-header
|
||||
DEVICE_PACKAGES := kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
|
||||
kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += mtc_wr1201
|
||||
|
||||
define Device/re350-v1
|
||||
DTS := RE350
|
||||
DEVICE_TITLE := TP-LINK RE350 v1
|
||||
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
|
||||
TPLINK_BOARD_ID := RE350-V1
|
||||
TPLINK_HWID := 0x0
|
||||
TPLINK_HWREV := 0
|
||||
TPLINK_HEADER_VERSION := 1
|
||||
IMAGE_SIZE := 6016k
|
||||
KERNEL := $(KERNEL_DTB) | tplink-v1-header -e -O
|
||||
IMAGES += factory.bin
|
||||
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | append-metadata | check-size $$$$(IMAGE_SIZE)
|
||||
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
|
||||
endef
|
||||
TARGET_DEVICES += re350-v1
|
||||
|
||||
define Device/re6500
|
||||
DTS := RE6500
|
||||
DEVICE_TITLE := Linksys RE6500
|
||||
DEVICE_PACKAGES := kmod-mt76x2 wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += re6500
|
||||
|
||||
define Device/sap-g3200u3
|
||||
DTS := SAP-G3200U3
|
||||
DEVICE_TITLE := STORYLiNK SAP-G3200U3
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += sap-g3200u3
|
||||
|
||||
define Device/sk-wb8
|
||||
DTS := SK-WB8
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := SamKnows Whitebox 8
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport \
|
||||
uboot-envtools wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += sk-wb8
|
||||
|
||||
define Device/telco-electronics_x1
|
||||
DTS := Telco-Electronics-X1
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_TITLE := Telco Electronics X1
|
||||
DEVICE_PACKAGES := kmod-usb3 kmod-mt76 wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += telco-electronics_x1
|
||||
|
||||
define Device/timecloud
|
||||
DTS := Timecloud
|
||||
DEVICE_TITLE := Thunder Timecloud
|
||||
DEVICE_PACKAGES := kmod-usb3
|
||||
endef
|
||||
TARGET_DEVICES += timecloud
|
||||
|
||||
define Device/ubnt-erx
|
||||
DTS := UBNT-ERX
|
||||
FILESYSTEMS := squashfs
|
||||
KERNEL_SIZE := 3145728
|
||||
KERNEL_INITRAMFS := $$(KERNEL) | ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
DEVICE_TITLE := Ubiquiti EdgeRouter X
|
||||
SUPPORTED_DEVICES += ubiquiti,edgerouterx
|
||||
endef
|
||||
TARGET_DEVICES += ubnt-erx
|
||||
|
||||
define Device/ubnt-erx-sfp
|
||||
$(Device/ubnt-erx)
|
||||
DTS := UBNT-ERX-SFP
|
||||
DEVICE_TITLE := Ubiquiti EdgeRouter X-SFP
|
||||
DEVICE_PACKAGES += kmod-i2c-algo-pca kmod-gpio-pca953x kmod-i2c-gpio-custom
|
||||
SUPPORTED_DEVICES += ubiquiti,edgerouterx-sfp
|
||||
endef
|
||||
TARGET_DEVICES += ubnt-erx-sfp
|
||||
|
||||
define Device/unielec_u7621-06-256m-16m
|
||||
DTS := U7621-06-256M-16M
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_TITLE := UniElec U7621-06 (256M RAM/16M flash)
|
||||
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
|
||||
SUPPORTED_DEVICES += u7621-06-256M-16M
|
||||
endef
|
||||
TARGET_DEVICES += unielec_u7621-06-256m-16m
|
||||
|
||||
define Device/unielec_u7621-06-512m-64m
|
||||
DTS := U7621-06-512M-64M
|
||||
IMAGE_SIZE := 65216k
|
||||
DEVICE_TITLE := UniElec U7621-06 (512M RAM/64M flash)
|
||||
DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
|
||||
endef
|
||||
TARGET_DEVICES += unielec_u7621-06-512m-64m
|
||||
|
||||
define Device/vr500
|
||||
DTS := VR500
|
||||
IMAGE_SIZE := 66453504
|
||||
DEVICE_TITLE := Planex VR500
|
||||
DEVICE_PACKAGES := kmod-usb3
|
||||
endef
|
||||
TARGET_DEVICES += vr500
|
||||
|
||||
define Device/w2914nsv2
|
||||
DTS := W2914NSV2
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
UIMAGE_NAME := W2914NS-V2(0.0.0)
|
||||
DEVICE_TITLE := WeVO W2914NS v2
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += w2914nsv2
|
||||
|
||||
define Device/wf-2881
|
||||
DTS := WF-2881
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
FILESYSTEMS := squashfs
|
||||
IMAGE_SIZE := 129280k
|
||||
KERNEL := $(KERNEL_DTB) | pad-offset $$(BLOCKSIZE) 64 | uImage lzma
|
||||
UBINIZE_OPTS := -E 5
|
||||
UIMAGE_NAME := WF2881_0.0.00
|
||||
KERNEL_INITRAMFS := $(KERNEL_DTB) | netis-tail WF2881 | uImage lzma
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-ubi | append-metadata | check-size $$$$(IMAGE_SIZE)
|
||||
DEVICE_TITLE := NETIS WF-2881
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += wf-2881
|
||||
|
||||
define Device/mqmaker_witi-256m
|
||||
DTS := WITI-256M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := MQmaker WiTi (256MB RAM)
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-ata-core kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \
|
||||
kmod-usb-ledtrig-usbport wpad-basic
|
||||
SUPPORTED_DEVICES += witi
|
||||
endef
|
||||
TARGET_DEVICES += mqmaker_witi-256m
|
||||
|
||||
define Device/mqmaker_witi-512m
|
||||
DTS := WITI-512M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := MQmaker WiTi (512MB RAM)
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-ata-core kmod-ata-ahci kmod-mt76x2 kmod-sdhci-mt7620 kmod-usb3 \
|
||||
kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += mqmaker_witi-512m
|
||||
|
||||
define Device/wndr3700v5
|
||||
DTS := WNDR3700V5
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := 15232k
|
||||
SERCOMM_HWID := AYB
|
||||
SERCOMM_HWVER := A001
|
||||
SERCOMM_SWVER := 0x1054
|
||||
IMAGES += factory.img
|
||||
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs
|
||||
IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
|
||||
IMAGE/factory.img := pad-extra 320k | $$(IMAGE/default) | pad-to $$$$(BLOCKSIZE) | \
|
||||
sercom-footer | pad-to 128 | zip WNDR3700v5.bin | sercom-seal
|
||||
DEVICE_TITLE := Netgear WNDR3700v5
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += wndr3700v5
|
||||
|
||||
define Device/youhua_wr1200js
|
||||
DTS := WR1200JS
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_TITLE := YouHua WR1200JS
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += youhua_wr1200js
|
||||
|
||||
define Device/youku_yk-l2
|
||||
DTS := YOUKU-YK2
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Youku YK-L2
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += youku_yk-l2
|
||||
|
||||
define Device/wsr-1166
|
||||
DTS := WSR-1166
|
||||
IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Buffalo WSR-1166
|
||||
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += wsr-1166
|
||||
|
||||
define Device/wsr-600
|
||||
DTS := WSR-600
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Buffalo WSR-600
|
||||
DEVICE_PACKAGES := kmod-mt7603 kmod-rt2800-pci wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += wsr-600
|
||||
|
||||
define Device/zbt-we1326
|
||||
DTS := ZBT-WE1326
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := ZBT WE1326
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-sdhci-mt7620 wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += zbt-we1326
|
||||
|
||||
define Device/zbtlink_zbt-we3526
|
||||
DTS := ZBT-WE3526
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := ZBT WE3526
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
|
||||
kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += zbtlink_zbt-we3526
|
||||
|
||||
define Device/zbt-wg2626
|
||||
DTS := ZBT-WG2626
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := ZBT WG2626
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt76x2 kmod-usb3 \
|
||||
kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += zbt-wg2626
|
||||
|
||||
define Device/zbt-wg3526-16M
|
||||
DTS := ZBT-WG3526-16M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
SUPPORTED_DEVICES += zbt-wg3526
|
||||
DEVICE_TITLE := ZBT WG3526 (16MB flash)
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
|
||||
kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += zbt-wg3526-16M
|
||||
|
||||
define Device/zbt-wg3526-32M
|
||||
DTS := ZBT-WG3526-32M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
SUPPORTED_DEVICES += ac1200pro
|
||||
DEVICE_TITLE := ZBT WG3526 (32MB flash)
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \
|
||||
kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic
|
||||
endef
|
||||
TARGET_DEVICES += zbt-wg3526-32M
|
||||
488
target/linux/ramips/image/mt76x8.mk
Normal file
488
target/linux/ramips/image/mt76x8.mk
Normal file
@@ -0,0 +1,488 @@
|
||||
#
|
||||
# MT76x8 Profiles
|
||||
#
|
||||
|
||||
define Device/tplink
|
||||
TPLINK_FLASHLAYOUT :=
|
||||
TPLINK_HWID :=
|
||||
TPLINK_HWREV :=
|
||||
TPLINK_HWREVADD :=
|
||||
TPLINK_HVERSION :=
|
||||
KERNEL := $(KERNEL_DTB)
|
||||
KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header -e
|
||||
IMAGES += tftp-recovery.bin
|
||||
IMAGE/factory.bin := tplink-v2-image -e
|
||||
IMAGE/tftp-recovery.bin := pad-extra 128k | $$(IMAGE/factory.bin)
|
||||
IMAGE/sysupgrade.bin := tplink-v2-image -s -e | append-metadata | \
|
||||
check-size $$$$(IMAGE_SIZE)
|
||||
endef
|
||||
DEVICE_VARS += TPLINK_FLASHLAYOUT TPLINK_HWID TPLINK_HWREV TPLINK_HWREVADD TPLINK_HVERSION
|
||||
|
||||
|
||||
define Device/alfa-network_awusfree1
|
||||
DTS := AWUSFREE1
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_8M)
|
||||
DEVICE_TITLE := ALFA Network AWUSFREE1
|
||||
DEVICE_PACKAGES := uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += alfa-network_awusfree1
|
||||
|
||||
define Device/cudy_wr1000
|
||||
DTS := WR1000
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_8M)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 92.122
|
||||
JCG_MAXSIZE := 7872k
|
||||
DEVICE_TITLE := Cudy WR1000
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
SUPPORTED_DEVICES += wr1000
|
||||
endef
|
||||
TARGET_DEVICES += cudy_wr1000
|
||||
|
||||
define Device/tama_w06
|
||||
DTS := W06
|
||||
IMAGE_SIZE := 15040k
|
||||
DEVICE_TITLE := Tama W06
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += tama_w06
|
||||
|
||||
define Device/duzun-dm06
|
||||
DTS := DUZUN-DM06
|
||||
DEVICE_TITLE := DuZun DM06
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += duzun-dm06
|
||||
|
||||
define Device/gl-mt300n-v2
|
||||
DTS := GL-MT300N-V2
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_TITLE := GL-iNet GL-MT300N-V2
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += gl-mt300n-v2
|
||||
|
||||
define Device/glinet_vixmini
|
||||
DTS := VIXMINI
|
||||
IMAGE_SIZE := 7872k
|
||||
DEVICE_TITLE := GL.iNet VIXMINI
|
||||
SUPPORTED_DEVICES += vixmini
|
||||
endef
|
||||
TARGET_DEVICES += glinet_vixmini
|
||||
|
||||
define Device/hc5661a
|
||||
DTS := HC5661A
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := HiWiFi HC5661A
|
||||
endef
|
||||
TARGET_DEVICES += hc5661a
|
||||
|
||||
define Device/hilink_hlk-7628n
|
||||
DTS := HLK-7628N
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
DEVICE_TITLE := HILINK HLK7628N
|
||||
endef
|
||||
TARGET_DEVICES += hilink_hlk-7628n
|
||||
|
||||
define Device/hiwifi_hc5861b
|
||||
DTS := HC5861B
|
||||
IMAGE_SIZE := 15808k
|
||||
DEVICE_TITLE := HiWiFi HC5861B
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
endef
|
||||
TARGET_DEVICES += hiwifi_hc5861b
|
||||
|
||||
define Device/LinkIt7688
|
||||
DTS := LINKIT7688
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
SUPPORTED_DEVICES := linkits7688 linkits7688d
|
||||
DEVICE_TITLE := MediaTek LinkIt Smart 7688
|
||||
DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += LinkIt7688
|
||||
|
||||
define Device/mac1200r-v2
|
||||
DTS := MAC1200RV2
|
||||
DEVICE_TITLE := Mercury MAC1200R v2.0
|
||||
SUPPORTED_DEVICES := mac1200rv2
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
endef
|
||||
TARGET_DEVICES += mac1200r-v2
|
||||
|
||||
define Device/miwifi-nano
|
||||
DTS := MIWIFI-NANO
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Xiaomi MiWiFi Nano
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += miwifi-nano
|
||||
|
||||
define Device/mt7628
|
||||
DTS := MT7628
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := MediaTek MT7628 EVB
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += mt7628
|
||||
|
||||
define Device/netgear_r6120
|
||||
DTS := R6120
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Netgear R6120
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci
|
||||
SERCOMM_HWID := CGQ
|
||||
SERCOMM_HWVER := A001
|
||||
SERCOMM_SWVER := 0x0040
|
||||
IMAGES += factory.img
|
||||
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE)| append-rootfs | pad-rootfs
|
||||
IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
|
||||
IMAGE/factory.img := pad-extra 576k | $$(IMAGE/default) | pad-to $$$$(BLOCKSIZE) | \
|
||||
sercom-footer | pad-to 128 | zip R6120.bin | sercom-seal
|
||||
endef
|
||||
TARGET_DEVICES += netgear_r6120
|
||||
|
||||
define Device/omega2
|
||||
DTS := OMEGA2
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Onion Omega2
|
||||
DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci uboot-envtools
|
||||
endef
|
||||
TARGET_DEVICES += omega2
|
||||
|
||||
define Device/omega2p
|
||||
DTS := OMEGA2P
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
DEVICE_TITLE := Onion Omega2+
|
||||
DEVICE_PACKAGES:= kmod-usb2 kmod-usb-ohci uboot-envtools kmod-sdhci-mt7620
|
||||
endef
|
||||
TARGET_DEVICES += omega2p
|
||||
|
||||
define Device/pbr-d1
|
||||
DTS := PBR-D1
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := PBR-D1
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += pbr-d1
|
||||
|
||||
define Device/rakwireless_rak633
|
||||
DTS := RAK633
|
||||
DEVICE_TITLE := Rakwireless RAK633
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += rakwireless_rak633
|
||||
|
||||
define Device/skylab_skw92a
|
||||
DTS := SKW92A
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_TITLE := Skylab SKW92A
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += skylab_skw92a
|
||||
|
||||
define Device/totolink_lr1200
|
||||
DTS := TOTOLINK-LR1200
|
||||
IMAGE_SIZE := 7872k
|
||||
DEVICE_TITLE := TOTOLINK LR1200
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 uqmi
|
||||
endef
|
||||
TARGET_DEVICES += totolink_lr1200
|
||||
|
||||
define Device/tplink_tl-wa801nd-v5
|
||||
$(Device/tplink)
|
||||
DTS := TL-WA801NDV5
|
||||
IMAGE_SIZE := 7808k
|
||||
DEVICE_TITLE := TP-Link TL-WA801ND v5
|
||||
TPLINK_FLASHLAYOUT := 8Mmtk
|
||||
TPLINK_HWID := 0x08010005
|
||||
TPLINK_HWREV := 0x1
|
||||
TPLINK_HWREVADD := 0x5
|
||||
TPLINK_HVERSION := 3
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wa801nd-v5
|
||||
|
||||
define Device/tplink_tl-wr802n-v4
|
||||
$(Device/tplink)
|
||||
DTS := TL-WR802NV4
|
||||
IMAGE_SIZE := 7808k
|
||||
DEVICE_TITLE := TP-Link TL-WR802N v4
|
||||
TPLINK_FLASHLAYOUT := 8Mmtk
|
||||
TPLINK_HWID := 0x08020004
|
||||
TPLINK_HWREV := 0x1
|
||||
TPLINK_HWREVADD := 0x4
|
||||
TPLINK_HVERSION := 3
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wr802n-v4
|
||||
|
||||
define Device/tl-wr840n-v4
|
||||
$(Device/tplink)
|
||||
DTS := TL-WR840NV4
|
||||
IMAGE_SIZE := 7808k
|
||||
DEVICE_TITLE := TP-Link TL-WR840N v4
|
||||
TPLINK_FLASHLAYOUT := 8Mmtk
|
||||
TPLINK_HWID := 0x08400004
|
||||
TPLINK_HWREV := 0x1
|
||||
TPLINK_HWREVADD := 0x4
|
||||
TPLINK_HVERSION := 3
|
||||
endef
|
||||
TARGET_DEVICES += tl-wr840n-v4
|
||||
|
||||
define Device/tl-wr840n-v5
|
||||
DTS := TL-WR840NV5
|
||||
IMAGE_SIZE := 3904k
|
||||
DEVICE_TITLE := TP-Link TL-WR840N v5
|
||||
TPLINK_FLASHLAYOUT := 4Mmtk
|
||||
TPLINK_HWID := 0x08400005
|
||||
TPLINK_HWREV := 0x1
|
||||
TPLINK_HWREVADD := 0x5
|
||||
TPLINK_HVERSION := 3
|
||||
KERNEL := $(KERNEL_DTB)
|
||||
KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header -e
|
||||
IMAGE/sysupgrade.bin := tplink-v2-image -s -e | append-metadata | \
|
||||
check-size $$$$(IMAGE_SIZE)
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += tl-wr840n-v5
|
||||
|
||||
define Device/tl-wr841n-v13
|
||||
$(Device/tplink)
|
||||
DTS := TL-WR841NV13
|
||||
IMAGE_SIZE := 7808k
|
||||
DEVICE_TITLE := TP-Link TL-WR841N v13
|
||||
TPLINK_FLASHLAYOUT := 8Mmtk
|
||||
TPLINK_HWID := 0x08410013
|
||||
TPLINK_HWREV := 0x268
|
||||
TPLINK_HWREVADD := 0x13
|
||||
TPLINK_HVERSION := 3
|
||||
endef
|
||||
TARGET_DEVICES += tl-wr841n-v13
|
||||
|
||||
define Device/tplink_c20-v4
|
||||
$(Device/tplink)
|
||||
DTS := ArcherC20v4
|
||||
IMAGE_SIZE := 7808k
|
||||
DEVICE_TITLE := TP-Link ArcherC20 v4
|
||||
TPLINK_FLASHLAYOUT := 8Mmtk
|
||||
TPLINK_HWID := 0xc200004
|
||||
TPLINK_HWREV := 0x1
|
||||
TPLINK_HWREVADD := 0x4
|
||||
TPLINK_HVERSION := 3
|
||||
DEVICE_PACKAGES := kmod-mt76x0e
|
||||
endef
|
||||
TARGET_DEVICES += tplink_c20-v4
|
||||
|
||||
define Device/tplink_c50-v3
|
||||
$(Device/tplink)
|
||||
DTS := ArcherC50V3
|
||||
IMAGE_SIZE := 7808k
|
||||
DEVICE_TITLE := TP-Link ArcherC50 v3
|
||||
TPLINK_FLASHLAYOUT := 8Mmtk
|
||||
TPLINK_HWID := 0x001D9BA4
|
||||
TPLINK_HWREV := 0x79
|
||||
TPLINK_HWREVADD := 0x1
|
||||
TPLINK_HVERSION := 3
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
endef
|
||||
TARGET_DEVICES += tplink_c50-v3
|
||||
|
||||
define Device/tplink_c50-v4
|
||||
$(Device/tplink)
|
||||
DTS := ArcherC50V4
|
||||
IMAGE_SIZE := 7616k
|
||||
DEVICE_TITLE := TP-Link ArcherC50 v4
|
||||
TPLINK_FLASHLAYOUT := 8MSUmtk
|
||||
TPLINK_HWID := 0x001D589B
|
||||
TPLINK_HWREV := 0x93
|
||||
TPLINK_HWREVADD := 0x2
|
||||
TPLINK_HVERSION := 3
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
IMAGES := sysupgrade.bin
|
||||
endef
|
||||
TARGET_DEVICES += tplink_c50-v4
|
||||
|
||||
define Device/tplink_tl-mr3020-v3
|
||||
$(Device/tplink)
|
||||
DTS := TL-MR3020V3
|
||||
IMAGE_SIZE := 7808k
|
||||
DEVICE_TITLE := TP-Link TL-MR3020 v3
|
||||
TPLINK_FLASHLAYOUT := 8Mmtk
|
||||
TPLINK_HWID := 0x30200003
|
||||
TPLINK_HWREV := 0x3
|
||||
TPLINK_HWREVADD := 0x3
|
||||
TPLINK_HVERSION := 3
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-mr3020-v3
|
||||
|
||||
define Device/tplink_tl-mr3420-v5
|
||||
$(Device/tplink)
|
||||
DTS := TL-MR3420V5
|
||||
IMAGE_SIZE := 7808k
|
||||
DEVICE_TITLE := TP-Link TL-MR3420 v5
|
||||
TPLINK_FLASHLAYOUT := 8Mmtk
|
||||
TPLINK_HWID := 0x34200005
|
||||
TPLINK_HWREV := 0x5
|
||||
TPLINK_HWREVADD := 0x5
|
||||
TPLINK_HVERSION := 3
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-mr3420-v5
|
||||
|
||||
define Device/tplink_tl-wr842n-v5
|
||||
$(Device/tplink)
|
||||
DTS := TL-WR842NV5
|
||||
IMAGE_SIZE := 7808k
|
||||
DEVICE_TITLE := TP-Link TL-WR842N v5
|
||||
TPLINK_FLASHLAYOUT := 8Mmtk
|
||||
TPLINK_HWID := 0x08420005
|
||||
TPLINK_HWREV := 0x5
|
||||
TPLINK_HWREVADD := 0x5
|
||||
TPLINK_HVERSION := 3
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wr842n-v5
|
||||
|
||||
define Device/tplink_tl-wr902ac-v3
|
||||
$(Device/tplink)
|
||||
DTS := TL-WR902ACV3
|
||||
IMAGE_SIZE := 7808k
|
||||
DEVICE_TITLE := TP-Link TL-WR902AC v3
|
||||
TPLINK_FLASHLAYOUT := 8Mmtk
|
||||
TPLINK_HWID := 0x000dc88f
|
||||
TPLINK_HWREV := 0x89
|
||||
TPLINK_HWREVADD := 0x1
|
||||
TPLINK_HVERSION := 3
|
||||
DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += tplink_tl-wr902ac-v3
|
||||
|
||||
define Device/u7628-01-128M-16M
|
||||
DTS := U7628-01-128M-16M
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_TITLE := UniElec U7628-01 (128M RAM/16M flash)
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += u7628-01-128M-16M
|
||||
|
||||
define Device/vocore2
|
||||
DTS := VOCORE2
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := VoCore VoCore2
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport \
|
||||
kmod-sdhci-mt7620
|
||||
endef
|
||||
TARGET_DEVICES += vocore2
|
||||
|
||||
define Device/vocore2lite
|
||||
DTS := VOCORE2LITE
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := VoCore VoCore2-Lite
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport \
|
||||
kmod-sdhci-mt7620
|
||||
endef
|
||||
TARGET_DEVICES += vocore2lite
|
||||
|
||||
define Device/wavlink_wl-wn570ha1
|
||||
DTS := WL-WN570HA1
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_8M)
|
||||
DEVICE_TITLE := Wavlink WL-WN570HA1
|
||||
DEVICE_PACKAGES := kmod-mt76x0e
|
||||
endef
|
||||
TARGET_DEVICES += wavlink_wl-wn570ha1
|
||||
|
||||
define Device/wavlink_wl-wn575a3
|
||||
DTS := WL-WN575A3
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_8M)
|
||||
DEVICE_TITLE := Wavlink WL-WN575A3
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
SUPPORTED_DEVICES += wl-wn575a3
|
||||
endef
|
||||
TARGET_DEVICES += wavlink_wl-wn575a3
|
||||
|
||||
define Device/wcr-1166ds
|
||||
DTS := WCR-1166DS
|
||||
BUFFALO_TAG_PLATFORM := MTK
|
||||
BUFFALO_TAG_VERSION := 9.99
|
||||
BUFFALO_TAG_MINOR := 9.99
|
||||
IMAGES += factory.bin
|
||||
IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata
|
||||
IMAGE/factory.bin := \
|
||||
trx -M 0x746f435c | pad-rootfs | append-metadata | \
|
||||
buffalo-enc WCR-1166DS $$(BUFFALO_TAG_VERSION) -l | \
|
||||
buffalo-tag-dhp WCR-1166DS JP JP | buffalo-enc-tag -l | \
|
||||
buffalo-dhp-image
|
||||
DEVICE_TITLE := Buffalo WCR-1166DS
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
endef
|
||||
TARGET_DEVICES += wcr-1166ds
|
||||
|
||||
define Device/widora_neo-16m
|
||||
DTS := WIDORA-NEO-16M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := Widora-NEO (16M)
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
SUPPORTED_DEVICES += widora-neo
|
||||
endef
|
||||
TARGET_DEVICES += widora_neo-16m
|
||||
|
||||
define Device/widora_neo-32m
|
||||
DTS := WIDORA-NEO-32M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
DEVICE_TITLE := Widora-NEO (32M)
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += widora_neo-32m
|
||||
|
||||
define Device/wiznet_wizfi630s
|
||||
DTS := WIZFI630S
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_32M)
|
||||
DEVICE_TITLE := WIZnet WizFi630S
|
||||
SUPPORTED_DEVICES += wizfi630s
|
||||
endef
|
||||
TARGET_DEVICES += wiznet_wizfi630s
|
||||
|
||||
define Device/wrtnode2p
|
||||
DTS := WRTNODE2P
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := WRTnode 2P
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += wrtnode2p
|
||||
|
||||
define Device/wrtnode2r
|
||||
DTS := WRTNODE2R
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := WRTnode 2R
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += wrtnode2r
|
||||
|
||||
define Device/xiaomi_mir4a-100m
|
||||
DTS := XIAOMI-MIR4A-100M
|
||||
IMAGE_SIZE := 14976k
|
||||
DEVICE_TITLE := Xiaomi Mi Router 4A (100M Edition)
|
||||
DEVICE_PACKAGES := kmod-mt76x2
|
||||
endef
|
||||
TARGET_DEVICES += xiaomi_mir4a-100m
|
||||
|
||||
define Device/zbtlink_zbt-we1226
|
||||
DTS := ZBT-WE1226
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_8M)
|
||||
DEVICE_TITLE := ZBTlink ZBT-WE1226
|
||||
endef
|
||||
TARGET_DEVICES += zbtlink_zbt-we1226
|
||||
|
||||
define Device/zyxel_keenetic-extra-ii
|
||||
DTS := ki_rb
|
||||
IMAGE_SIZE := 14912k
|
||||
BLOCKSIZE := 64k
|
||||
DEVICE_TITLE := ZyXEL Keenetic Extra II
|
||||
DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | pad-to $$$$(BLOCKSIZE) | \
|
||||
check-size $$$$(IMAGE_SIZE) | zyimage -d 6162 -v "ZyXEL Keenetic Extra II"
|
||||
endef
|
||||
TARGET_DEVICES += zyxel_keenetic-extra-ii
|
||||
91
target/linux/ramips/image/rt288x.mk
Normal file
91
target/linux/ramips/image/rt288x.mk
Normal file
@@ -0,0 +1,91 @@
|
||||
#
|
||||
# RT288X Profiles
|
||||
#
|
||||
|
||||
define Build/gemtek-header
|
||||
if [ -f $@ ]; then \
|
||||
mkheader_gemtek $@ $@.new $(1) && \
|
||||
mv $@.new $@; \
|
||||
fi
|
||||
endef
|
||||
|
||||
define Device/ar670w
|
||||
DTS := AR670W
|
||||
BLOCKSIZE := 64k
|
||||
DEVICE_TITLE := Airlink AR670W
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
KERNEL := $(KERNEL_DTB) | pad-to $$(BLOCKSIZE)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
wrg-header wrgn16a_airlink_ar670w
|
||||
endef
|
||||
TARGET_DEVICES += ar670w
|
||||
|
||||
define Device/ar725w
|
||||
DTS := AR725W
|
||||
DEVICE_TITLE := Airlink AR725W
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size 3328k | \
|
||||
gemtek-header ar725w
|
||||
endef
|
||||
TARGET_DEVICES += ar725w
|
||||
|
||||
define Device/dlink_dap-1522-a1
|
||||
DTS := DAP-1522-A1
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := 3801088
|
||||
DEVICE_TITLE := D-Link DAP-1522 A1
|
||||
DEVICE_PACKAGES := kmod-switch-rtl8366s
|
||||
KERNEL := $(KERNEL_DTB)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
append-kernel | pad-offset $$$$(BLOCKSIZE) 96 | \
|
||||
append-rootfs | pad-rootfs -x 96 | \
|
||||
wrg-header wapnd01_dlink_dap1522 | \
|
||||
check-size $$$$(IMAGE_SIZE)
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dap-1522-a1
|
||||
|
||||
define Device/f5d8235-v1
|
||||
DTS := F5D8235_V1
|
||||
IMAGE_SIZE := 7744k
|
||||
DEVICE_TITLE := Belkin F5D8235 V1
|
||||
DEVICE_PACKAGES := kmod-switch-rtl8366s kmod-usb-core kmod-usb-ohci \
|
||||
kmod-usb-ohci-pci kmod-usb2 kmod-usb2-pci kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += f5d8235-v1
|
||||
|
||||
define Device/rt-n15
|
||||
DTS := RT-N15
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Asus RT-N15
|
||||
DEVICE_PACKAGES := kmod-switch-rtl8366s
|
||||
endef
|
||||
TARGET_DEVICES += rt-n15
|
||||
|
||||
define Device/v11st-fe
|
||||
DTS := V11STFE
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Ralink V11ST-FE
|
||||
endef
|
||||
TARGET_DEVICES += v11st-fe
|
||||
|
||||
define Device/wli-tx4-ag300n
|
||||
DTS := WLI-TX4-AG300N
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Buffalo WLI-TX4-AG300N
|
||||
DEVICE_PACKAGES := kmod-switch-ip17xx
|
||||
endef
|
||||
TARGET_DEVICES += wli-tx4-ag300n
|
||||
|
||||
define Device/wzr-agl300nh
|
||||
DTS := WZR-AGL300NH
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Buffalo WZR-AGL300NH
|
||||
DEVICE_PACKAGES := kmod-switch-rtl8366s
|
||||
endef
|
||||
TARGET_DEVICES += wzr-agl300nh
|
||||
926
target/linux/ramips/image/rt305x.mk
Normal file
926
target/linux/ramips/image/rt305x.mk
Normal file
@@ -0,0 +1,926 @@
|
||||
#
|
||||
# RT305X Profiles
|
||||
#
|
||||
define Build/buffalo-tftp-header
|
||||
( \
|
||||
echo -n -e "# Airstation FirmWare\nrun u_fw\nreset\n\n" | \
|
||||
dd bs=512 count=1 conv=sync; \
|
||||
dd if=$@; \
|
||||
) > $@.tmp && \
|
||||
$(STAGING_DIR_HOST)/bin/buffalo-tftp -i $@.tmp -o $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/dap-header
|
||||
$(STAGING_DIR_HOST)/bin/mkdapimg $(1) -i $@ -o $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/hilink-header
|
||||
$(STAGING_DIR_HOST)/bin/mkhilinkfw -e -i $@ -o $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
|
||||
define Device/3g150b
|
||||
DTS := 3G150B
|
||||
BLOCKSIZE := 4k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
UIMAGE_NAME:= Linux Kernel Image
|
||||
DEVICE_TITLE := Tenda 3G150B
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-dwc2 kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += 3g150b
|
||||
|
||||
define Device/3g300m
|
||||
DTS := 3G300M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
UIMAGE_NAME := 3G150M_SPI Kernel Image
|
||||
DEVICE_TITLE := Tenda 3G300M
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-dwc2 kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += 3g300m
|
||||
|
||||
define Device/3g-6200n
|
||||
DTS := 3G-6200N
|
||||
IMAGE_SIZE := 3648k
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
|
||||
edimax-header -s CSYS -m 3G62 -f 0x50000 -S 0x01100000 | pad-rootfs | \
|
||||
append-metadata | check-size $$$$(IMAGE_SIZE)
|
||||
DEVICE_TITLE := Edimax 3g-6200n
|
||||
endef
|
||||
TARGET_DEVICES += 3g-6200n
|
||||
|
||||
define Device/3g-6200nl
|
||||
DTS := 3G-6200NL
|
||||
IMAGE_SIZE := 3648k
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
|
||||
edimax-header -s CSYS -m 3G62 -f 0x50000 -S 0x01100000 | pad-rootfs | \
|
||||
append-metadata | check-size $$$$(IMAGE_SIZE)
|
||||
DEVICE_TITLE := Edimax 3g-6200nl
|
||||
endef
|
||||
TARGET_DEVICES += 3g-6200nl
|
||||
|
||||
define Device/a5-v11
|
||||
DTS := A5-V11
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | poray-header -B A5-V11 -F 4M
|
||||
DEVICE_TITLE := A5-V11
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += a5-v11
|
||||
|
||||
define Device/air3gii
|
||||
DTS := AIR3GII
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := AirLive Air3GII
|
||||
endef
|
||||
TARGET_DEVICES += air3gii
|
||||
|
||||
define Device/all0256n-4M
|
||||
DTS := ALL0256N-4M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Allnet ALL0256N (4MB)
|
||||
DEVICE_PACKAGES := rssileds
|
||||
endef
|
||||
TARGET_DEVICES += all0256n-4M
|
||||
|
||||
define Device/all0256n-8M
|
||||
DTS := ALL0256N-8M
|
||||
DEVICE_TITLE := Allnet ALL0256N (8MB)
|
||||
DEVICE_PACKAGES := rssileds
|
||||
endef
|
||||
TARGET_DEVICES += all0256n-8M
|
||||
|
||||
define Device/all5002
|
||||
DTS := ALL5002
|
||||
IMAGE_SIZE := 32448k
|
||||
DEVICE_TITLE := Allnet ALL5002
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \
|
||||
kmod-i2c-core kmod-i2c-gpio kmod-hwmon-lm92 kmod-gpio-pcf857x
|
||||
endef
|
||||
TARGET_DEVICES += all5002
|
||||
|
||||
define Device/all5003
|
||||
DTS := ALL5003
|
||||
IMAGE_SIZE := 32448k
|
||||
DEVICE_TITLE := Allnet ALL5003
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \
|
||||
kmod-i2c-core kmod-i2c-gpio kmod-hwmon-lm92 kmod-gpio-pcf857x
|
||||
endef
|
||||
TARGET_DEVICES += all5003
|
||||
|
||||
define Device/asl26555-8M
|
||||
DTS := ASL26555-8M
|
||||
IMAGE_SIZE := 7744k
|
||||
SUPPORTED_DEVICES += asl26555
|
||||
DEVICE_TITLE := Alpha ASL26555
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-dwc2 kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += asl26555-8M
|
||||
|
||||
define Device/asl26555-16M
|
||||
DTS := ASL26555-16M
|
||||
IMAGE_SIZE := 15872k
|
||||
SUPPORTED_DEVICES += asl26555
|
||||
DEVICE_TITLE := Alpha ASL26555 16M
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-dwc2 kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += asl26555-16M
|
||||
|
||||
define Device/atp-52b
|
||||
DTS := ATP-52B
|
||||
IMAGE_SIZE := 7808k
|
||||
DEVICE_TITLE := Argus ATP-52B
|
||||
endef
|
||||
TARGET_DEVICES += atp-52b
|
||||
|
||||
define Device/awm002-evb-4M
|
||||
DTS := AWM002-EVB-4M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := AsiaRF AWM002-EVB (4M)
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 \
|
||||
kmod-i2c-core kmod-i2c-gpio
|
||||
endef
|
||||
TARGET_DEVICES += awm002-evb-4M
|
||||
|
||||
define Device/awm002-evb-8M
|
||||
DTS := AWM002-EVB-8M
|
||||
DEVICE_TITLE := AsiaRF AWM002-EVB (8M)/AsiaRF AWM003 EVB
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 \
|
||||
kmod-i2c-core kmod-i2c-gpio
|
||||
endef
|
||||
TARGET_DEVICES += awm002-evb-8M
|
||||
|
||||
define Device/awapn2403
|
||||
DTS := AWAPN2403
|
||||
BLOCKSIZE := 4k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := AsiaRF AWAPN2403
|
||||
endef
|
||||
TARGET_DEVICES += awapn2403
|
||||
|
||||
define Device/bc2
|
||||
DTS := BC2
|
||||
DEVICE_TITLE := NexAira BC2
|
||||
endef
|
||||
TARGET_DEVICES += bc2
|
||||
|
||||
define Device/broadway
|
||||
DTS := BROADWAY
|
||||
IMAGE_SIZE := 7744k
|
||||
UIMAGE_NAME:= Broadway Kernel Image
|
||||
DEVICE_TITLE := Hauppauge Broadway
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-dwc2 kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += broadway
|
||||
|
||||
define Device/carambola
|
||||
DTS := CARAMBOLA
|
||||
DEVICE_TITLE := 8devices Carambola
|
||||
DEVICE_PACKAGES :=
|
||||
endef
|
||||
TARGET_DEVICES += carambola
|
||||
|
||||
define Device/d105
|
||||
DTS := D105
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Huawei D105
|
||||
endef
|
||||
TARGET_DEVICES += d105
|
||||
|
||||
define Device/dap-1350
|
||||
DTS := DAP-1350
|
||||
IMAGES += factory.bin factory-NA.bin
|
||||
IMAGE_SIZE := 7488k
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
dap-header -s RT3052-AP-DAP1350WW-3
|
||||
IMAGE/factory-NA.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
dap-header -s RT3052-AP-DAP1350-3
|
||||
DEVICE_TITLE := D-Link DAP-1350
|
||||
endef
|
||||
TARGET_DEVICES += dap-1350
|
||||
|
||||
define Device/dcs-930
|
||||
DTS := DCS-930
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := D-Link DCS-930
|
||||
DEVICE_PACKAGES := kmod-video-core kmod-video-uvc kmod-sound-core kmod-usb-audio kmod-usb-core kmod-usb-dwc2
|
||||
endef
|
||||
TARGET_DEVICES += dcs-930
|
||||
|
||||
define Device/dcs-930l-b1
|
||||
DTS := DCS-930L-B1
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := D-Link DCS-930L B1
|
||||
DEVICE_PACKAGES := kmod-video-core kmod-video-uvc kmod-sound-core kmod-usb-audio kmod-usb-core kmod-usb-ohci kmod-usb2
|
||||
endef
|
||||
TARGET_DEVICES += dcs-930l-b1
|
||||
|
||||
define Device/dir-300-b1
|
||||
DTS := DIR-300-B1
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | wrg-header wrgn23_dlwbr_dir300b
|
||||
DEVICE_TITLE := D-Link DIR-300 B1
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += dir-300-b1
|
||||
|
||||
define Device/dir-300-b7
|
||||
DTS := DIR-300-B7
|
||||
BLOCKSIZE := 4k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := D-Link DIR-300 B7
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += dir-300-b7
|
||||
|
||||
define Device/dir-320-b1
|
||||
DTS := DIR-320-B1
|
||||
DEVICE_TITLE := D-Link DIR-320 B1
|
||||
endef
|
||||
TARGET_DEVICES += dir-320-b1
|
||||
|
||||
define Device/dir-600-b1
|
||||
DTS := DIR-600-B1
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
SUPPORTED_DEVICES := dir-600-b1 dir-600-b2
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | wrg-header wrgn23_dlwbr_dir600b
|
||||
DEVICE_TITLE := D-Link DIR-600 B1/B2
|
||||
endef
|
||||
TARGET_DEVICES += dir-600-b1
|
||||
|
||||
define Device/dir-610-a1
|
||||
$(Device/seama)
|
||||
DTS := DIR-610-A1
|
||||
BLOCKSIZE := 4k
|
||||
SEAMA_SIGNATURE := wrgn59_dlob.hans_dir610
|
||||
KERNEL := $(KERNEL_DTB)
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := D-Link DIR-610 A1
|
||||
DEVICE_PACKAGES := kmod-ledtrig-netdev kmod-ledtrig-timer
|
||||
endef
|
||||
TARGET_DEVICES += dir-610-a1
|
||||
|
||||
define Device/dir-615-d
|
||||
DTS := DIR-615-D
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | wrg-header wrgn23_dlwbr_dir615d
|
||||
DEVICE_TITLE := D-Link DIR-615 D
|
||||
endef
|
||||
TARGET_DEVICES += dir-615-d
|
||||
|
||||
|
||||
define Device/dir-615-h1
|
||||
DTS := DIR-615-H1
|
||||
BLOCKSIZE := 4k
|
||||
IMAGES += factory.bin
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | senao-header -r 0x218 -p 0x30 -t 3
|
||||
DEVICE_TITLE := D-Link DIR-615 H1
|
||||
endef
|
||||
TARGET_DEVICES += dir-615-h1
|
||||
|
||||
define Device/dir-620-a1
|
||||
DTS := DIR-620-A1
|
||||
DEVICE_TITLE := D-Link DIR-620 A1
|
||||
endef
|
||||
TARGET_DEVICES += dir-620-a1
|
||||
|
||||
define Device/dir-620-d1
|
||||
DTS := DIR-620-D1
|
||||
DEVICE_TITLE := D-Link DIR-620 D1
|
||||
endef
|
||||
TARGET_DEVICES += dir-620-d1
|
||||
|
||||
define Device/dwr-512-b
|
||||
DTS := DWR-512-B
|
||||
IMAGE_SIZE := 7800k
|
||||
DEVICE_TITLE := D-Link DWR-512 B
|
||||
DEVICE_PACKAGES := jboot-tools kmod-usb2 kmod-spi-dev kmod-usb-serial \
|
||||
kmod-usb-serial-option kmod-usb-net kmod-usb-net-cdc-ether \
|
||||
comgt-ncm
|
||||
DLINK_ROM_ID := DLK6E2412001
|
||||
DLINK_FAMILY_MEMBER := 0x6E24
|
||||
DLINK_FIRMWARE_SIZE := 0x7E0000
|
||||
KERNEL := $(KERNEL_DTB)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata
|
||||
IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory
|
||||
endef
|
||||
TARGET_DEVICES += dwr-512-b
|
||||
|
||||
define Device/esr-9753
|
||||
DTS := ESR-9753
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := EnGenius ESR-9753
|
||||
endef
|
||||
TARGET_DEVICES += esr-9753
|
||||
|
||||
define Device/f5d8235-v2
|
||||
DTS := F5D8235_V2
|
||||
IMAGE_SIZE := 7744k
|
||||
DEVICE_TITLE := Belkin F5D8235 v2
|
||||
DEVICE_PACKAGES := kmod-switch-rtl8366rb
|
||||
endef
|
||||
TARGET_DEVICES += f5d8235-v2
|
||||
|
||||
define Device/f7c027
|
||||
DTS := F7C027
|
||||
IMAGE_SIZE := 7616k
|
||||
DEVICE_TITLE := Belkin F7C027
|
||||
endef
|
||||
TARGET_DEVICES += f7c027
|
||||
|
||||
define Device/fonera20n
|
||||
DTS := FONERA20N
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | \
|
||||
edimax-header -s RSDK -m NL1T -f 0x50000 -S 0xc0000
|
||||
DEVICE_TITLE := Fonera 2.0N
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-dwc2 kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += fonera20n
|
||||
|
||||
define Device/freestation5
|
||||
DTS := FREESTATION5
|
||||
DEVICE_TITLE := ARC Wireless FreeStation
|
||||
DEVICE_PACKAGES := kmod-usb-dwc2 kmod-rt2500-usb kmod-rt2800-usb kmod-rt2x00-usb
|
||||
endef
|
||||
TARGET_DEVICES += freestation5
|
||||
|
||||
define Device/hg255d
|
||||
DTS := HG255D
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := HuaWei HG255D
|
||||
endef
|
||||
TARGET_DEVICES += hg255d
|
||||
|
||||
define Device/hlk-rm04
|
||||
DTS := HLKRM04
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | hilink-header
|
||||
DEVICE_TITLE := Hi-Link HLK-RM04
|
||||
endef
|
||||
TARGET_DEVICES += hlk-rm04
|
||||
|
||||
define Device/ht-tm02
|
||||
DTS := HT-TM02
|
||||
DEVICE_TITLE := HooToo HT-TM02
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += ht-tm02
|
||||
|
||||
define Device/hw550-3g
|
||||
DTS := HW550-3G
|
||||
DEVICE_TITLE := Aztech HW550-3G
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-dwc2 kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += hw550-3g
|
||||
|
||||
define Device/ip2202
|
||||
DTS := IP2202
|
||||
DEVICE_TITLE := Poray IP2202
|
||||
endef
|
||||
TARGET_DEVICES += ip2202
|
||||
|
||||
define Device/jhr-n805r
|
||||
DTS := JHR-N805R
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 29.24
|
||||
DEVICE_TITLE := JCG JHR-N805R
|
||||
endef
|
||||
TARGET_DEVICES += jhr-n805r
|
||||
|
||||
define Device/jhr-n825r
|
||||
DTS := JHR-N825R
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 23.24
|
||||
DEVICE_TITLE := JCG JHR-N825R
|
||||
endef
|
||||
TARGET_DEVICES += jhr-n825r
|
||||
|
||||
define Device/jhr-n926r
|
||||
DTS := JHR-N926R
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 25.24
|
||||
DEVICE_TITLE := JCG JHR-N926R
|
||||
endef
|
||||
TARGET_DEVICES += jhr-n926r
|
||||
|
||||
define Device/m2m
|
||||
DTS := M2M
|
||||
UIMAGE_NAME:= Linux Kernel Image
|
||||
DEVICE_TITLE := Intenso Memory 2 Move
|
||||
DEVICE_PACKAGES := kmod-ledtrig-netdev kmod-ledtrig-timer \
|
||||
kmod-usb-core kmod-usb2 kmod-usb-storage kmod-scsi-core \
|
||||
kmod-fs-ext4 kmod-fs-vfat block-mount
|
||||
endef
|
||||
TARGET_DEVICES += m2m
|
||||
|
||||
define Device/m3
|
||||
DTS := M3
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | poray-header -B M3 -F 4M
|
||||
DEVICE_TITLE := Poray M3
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ledtrig-netdev \
|
||||
kmod-ledtrig-timer
|
||||
endef
|
||||
TARGET_DEVICES += m3
|
||||
|
||||
define Device/m4-4M
|
||||
DTS := M4-4M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | poray-header -B M4 -F 4M
|
||||
DEVICE_TITLE := Poray M4 (4MB)
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ledtrig-netdev \
|
||||
kmod-ledtrig-timer
|
||||
endef
|
||||
TARGET_DEVICES += m4-4M
|
||||
|
||||
define Device/m4-8M
|
||||
DTS := M4-8M
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | poray-header -B M4 -F 8M
|
||||
DEVICE_TITLE := Poray M4 (8MB)
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ledtrig-netdev kmod-ledtrig-timer
|
||||
endef
|
||||
TARGET_DEVICES += m4-8M
|
||||
|
||||
define Device/miniembplug
|
||||
DTS := MINIEMBPLUG
|
||||
DEVICE_TITLE := Omnima MiniEMBPlug
|
||||
endef
|
||||
TARGET_DEVICES += miniembplug
|
||||
|
||||
define Device/miniembwifi
|
||||
DTS := MINIEMBWIFI
|
||||
DEVICE_TITLE := Omnima MiniEMBWiFi
|
||||
endef
|
||||
TARGET_DEVICES += miniembwifi
|
||||
|
||||
define Device/mofi3500-3gn
|
||||
DTS := MOFI3500-3GN
|
||||
DEVICE_TITLE := MoFi Network MOFI3500-3GN
|
||||
endef
|
||||
TARGET_DEVICES += mofi3500-3gn
|
||||
|
||||
define Device/mpr-a1
|
||||
DTS := MPRA1
|
||||
BLOCKSIZE := 4k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
UIMAGE_NAME:= Linux Kernel Image
|
||||
DEVICE_TITLE := HAME MPR-A1
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-netdev
|
||||
endef
|
||||
TARGET_DEVICES += mpr-a1
|
||||
|
||||
define Device/mpr-a2
|
||||
DTS := MPRA2
|
||||
UIMAGE_NAME:= Linux Kernel Image
|
||||
DEVICE_TITLE := HAME MPR-A2
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-netdev
|
||||
endef
|
||||
TARGET_DEVICES += mpr-a2
|
||||
|
||||
define Device/mr-102n
|
||||
DTS := MR-102N
|
||||
DEVICE_TITLE := AXIMCom MR-102N
|
||||
endef
|
||||
TARGET_DEVICES += mr-102n
|
||||
|
||||
define Device/mzk-dp150n
|
||||
DTS := MZK-DP150N
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Planex MZK-DP150N
|
||||
DEVICE_PACKAGES := kmod-spi-dev
|
||||
endef
|
||||
TARGET_DEVICES += mzk-dp150n
|
||||
|
||||
define Device/mzk-w300nh2
|
||||
DTS := MZK-W300NH2
|
||||
IMAGE_SIZE := 3648k
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | \
|
||||
edimax-header -s CSYS -m RN52 -f 0x50000 -S 0xc0000
|
||||
DEVICE_TITLE := Planex MZK-W300NH2
|
||||
endef
|
||||
TARGET_DEVICES += mzk-w300nh2
|
||||
|
||||
define Device/mzk-wdpr
|
||||
DTS := MZK-WDPR
|
||||
DEVICE_TITLE := Planex MZK-WDPR
|
||||
endef
|
||||
TARGET_DEVICES += mzk-wdpr
|
||||
|
||||
define Device/nbg-419n
|
||||
DTS := NBG-419N
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := ZyXEL NBG-419N
|
||||
endef
|
||||
TARGET_DEVICES += nbg-419n
|
||||
|
||||
define Device/nbg-419n2
|
||||
DTS := NBG-419N2
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_8M)
|
||||
DEVICE_TITLE := ZyXEL NBG-419N2
|
||||
endef
|
||||
TARGET_DEVICES += nbg-419n2
|
||||
|
||||
define Device/ncs601w
|
||||
DTS := NCS601W
|
||||
DEVICE_TITLE := Wansview NCS601W
|
||||
DEVICE_PACKAGES := kmod-video-core kmod-video-uvc \
|
||||
kmod-usb-core kmod-usb-ohci
|
||||
endef
|
||||
TARGET_DEVICES += ncs601w
|
||||
|
||||
define Device/nixcore-x1-8M
|
||||
DTS := NIXCORE-8M
|
||||
IMAGE_SIZE := 7872k
|
||||
SUPPORTED_DEVICES += nixcore-x1
|
||||
DEVICE_TITLE := NixcoreX1 (8M)
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-i2c-core kmod-i2c-ralink kmod-spi-dev
|
||||
endef
|
||||
TARGET_DEVICES += nixcore-x1-8M
|
||||
|
||||
define Device/nixcore-x1-16M
|
||||
DTS := NIXCORE-16M
|
||||
IMAGE_SIZE := 16064k
|
||||
SUPPORTED_DEVICES += nixcore-x1
|
||||
DEVICE_TITLE := NixcoreX1 (16M)
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-i2c-core kmod-i2c-ralink kmod-spi-dev
|
||||
endef
|
||||
TARGET_DEVICES += nixcore-x1-16M
|
||||
|
||||
define Device/nw718
|
||||
DTS := NW718
|
||||
IMAGE_SIZE := 3712k
|
||||
UIMAGE_NAME:= ARA1B4NCRNW718;1
|
||||
DEVICE_TITLE := Netcore NW718
|
||||
endef
|
||||
TARGET_DEVICES += nw718
|
||||
|
||||
define Device/psr-680w
|
||||
DTS := PSR-680W
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Petatel PSR-680W Wireless 3G Router
|
||||
endef
|
||||
TARGET_DEVICES += psr-680w
|
||||
|
||||
define Device/pwh2004
|
||||
DTS := PWH2004
|
||||
DEVICE_TITLE := Prolink PWH2004
|
||||
DEVICE_PACKAGES :=
|
||||
endef
|
||||
TARGET_DEVICES += pwh2004
|
||||
|
||||
define Device/px-4885-4M
|
||||
DTS := PX-4885-4M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := 7Links PX-4885 (4M)
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-dwc2 kmod-usb2 kmod-usb-ohci \
|
||||
kmod-usb-ledtrig-usbport kmod-leds-gpio
|
||||
endef
|
||||
TARGET_DEVICES += px-4885-4M
|
||||
|
||||
define Device/px-4885-8M
|
||||
DTS := PX-4885-8M
|
||||
DEVICE_TITLE := 7Links PX-4885 (8M)
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-dwc2 kmod-usb2 kmod-usb-ohci \
|
||||
kmod-usb-ledtrig-usbport kmod-leds-gpio
|
||||
endef
|
||||
TARGET_DEVICES += px-4885-8M
|
||||
|
||||
define Device/rt5350f-olinuxino
|
||||
DTS := RT5350F-OLINUXINO
|
||||
DEVICE_TITLE := RT5350F-OLinuXino
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 \
|
||||
kmod-i2c-core kmod-i2c-ralink \
|
||||
kmod-spi-dev
|
||||
endef
|
||||
TARGET_DEVICES += rt5350f-olinuxino
|
||||
|
||||
define Device/rt5350f-olinuxino-evb
|
||||
DTS := RT5350F-OLINUXINO-EVB
|
||||
DEVICE_TITLE := RT5350F-OLinuXino-EVB
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 \
|
||||
kmod-i2c-core kmod-i2c-ralink \
|
||||
kmod-spi-dev
|
||||
endef
|
||||
TARGET_DEVICES += rt5350f-olinuxino-evb
|
||||
|
||||
define Device/rt-g32-b1
|
||||
DTS := RT-G32-B1
|
||||
BLOCKSIZE := 4k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Asus RT-G32 B1
|
||||
endef
|
||||
TARGET_DEVICES += rt-g32-b1
|
||||
|
||||
define Device/rt-n10-plus
|
||||
DTS := RT-N10-PLUS
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Asus RT-N10+
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += rt-n10-plus
|
||||
|
||||
define Device/rt-n13u
|
||||
DTS := RT-N13U
|
||||
DEVICE_TITLE := Asus RT-N13U
|
||||
DEVICE_PACKAGES := kmod-leds-gpio kmod-rt2800-pci kmod-usb-dwc2
|
||||
endef
|
||||
TARGET_DEVICES += rt-n13u
|
||||
|
||||
define Device/rut5xx
|
||||
DTS := RUT5XX
|
||||
DEVICE_TITLE := Teltonika RUT5XX
|
||||
DEVICE_PACKAGES := om-watchdog
|
||||
endef
|
||||
TARGET_DEVICES += rut5xx
|
||||
|
||||
define Device/sl-r7205
|
||||
DTS := SL-R7205
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Skyline SL-R7205 Wireless 3G Router
|
||||
endef
|
||||
TARGET_DEVICES += sl-r7205
|
||||
|
||||
define Device/tew-638apb-v2
|
||||
DTS := TEW-638APB-V2
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
IMAGE/sysupgrade.bin := $$(sysupgrade_bin) | umedia-header 0x026382 | \
|
||||
append-metadata | check-size $$$$(IMAGE_SIZE)
|
||||
DEVICE_TITLE := TRENDnet TEW-638APB v2
|
||||
endef
|
||||
TARGET_DEVICES += tew-638apb-v2
|
||||
|
||||
define Device/tew-714tru
|
||||
DTS := TEW-714TRU
|
||||
DEVICE_TITLE := TRENDnet TEW-714TRU
|
||||
endef
|
||||
TARGET_DEVICES += tew-714tru
|
||||
|
||||
define Device/ur-326n4g
|
||||
DTS := UR-326N4G
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := UPVEL UR-326N4G
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-dwc2 kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += ur-326n4g
|
||||
|
||||
define Device/ur-336un
|
||||
DTS := UR-336UN
|
||||
DEVICE_TITLE := UPVEL UR-336UN
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-dwc2 kmod-usb-ledtrig-usbport
|
||||
endef
|
||||
TARGET_DEVICES += ur-336un
|
||||
|
||||
define Device/v22rw-2x2
|
||||
DTS := V22RW-2X2
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Ralink AP-RT3052-V22RW-2X2
|
||||
endef
|
||||
TARGET_DEVICES += v22rw-2x2
|
||||
|
||||
define Device/vocore-8M
|
||||
DTS := VOCORE-8M
|
||||
IMAGE_SIZE := 7872k
|
||||
SUPPORTED_DEVICES += vocore
|
||||
DEVICE_TITLE := VoCore (8M)
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 \
|
||||
kmod-i2c-core kmod-i2c-ralink \
|
||||
kmod-spi-dev
|
||||
endef
|
||||
TARGET_DEVICES += vocore-8M
|
||||
|
||||
define Device/vocore-16M
|
||||
DTS := VOCORE-16M
|
||||
IMAGE_SIZE := 16064k
|
||||
SUPPORTED_DEVICES += vocore
|
||||
DEVICE_TITLE := VoCore (16M)
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 \
|
||||
kmod-i2c-core kmod-i2c-ralink \
|
||||
kmod-spi-dev
|
||||
endef
|
||||
TARGET_DEVICES += vocore-16M
|
||||
|
||||
define Device/w150m
|
||||
DTS := W150M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
UIMAGE_NAME:= W150M Kernel Image
|
||||
DEVICE_TITLE := Tenda W150M
|
||||
endef
|
||||
TARGET_DEVICES += w150m
|
||||
|
||||
define Device/w306r-v20
|
||||
DTS := W306R_V20
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
UIMAGE_NAME:= linkn Kernel Image
|
||||
DEVICE_TITLE := Tenda W306R V2.0
|
||||
endef
|
||||
TARGET_DEVICES += w306r-v20
|
||||
|
||||
define Device/w502u
|
||||
DTS := W502U
|
||||
DEVICE_TITLE := ALFA Networks W502U
|
||||
endef
|
||||
TARGET_DEVICES += w502u
|
||||
|
||||
define Device/wcr-150gn
|
||||
DTS := WCR150GN
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Sparklan WCR-150GN
|
||||
endef
|
||||
TARGET_DEVICES += wcr-150gn
|
||||
|
||||
define Device/whr-g300n
|
||||
DTS := WHR-G300N
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := 3801088
|
||||
DEVICE_TITLE := Buffalo WHR-G300N
|
||||
IMAGES += tftp.bin
|
||||
IMAGE/tftp.bin := $$(sysupgrade_bin) | \
|
||||
check-size $$$$(IMAGE_SIZE) | buffalo-tftp-header
|
||||
endef
|
||||
TARGET_DEVICES += whr-g300n
|
||||
|
||||
define Device/wizard8800
|
||||
DTS := WIZARD8800
|
||||
UIMAGE_NAME:= Linux Kernel Image
|
||||
DEVICE_TITLE := EasyAcc WIZARD 8800
|
||||
endef
|
||||
TARGET_DEVICES += wizard8800
|
||||
|
||||
define Device/wizfi630a
|
||||
DTS := WIZFI630A
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
||||
DEVICE_TITLE := WIZnet WizFi630A
|
||||
endef
|
||||
TARGET_DEVICES += wizfi630a
|
||||
|
||||
define Device/wl-330n
|
||||
DTS := WL-330N
|
||||
BLOCKSIZE := 4k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Asus WL-330N
|
||||
endef
|
||||
TARGET_DEVICES += wl-330n
|
||||
|
||||
define Device/wl-330n3g
|
||||
DTS := WL-330N3G
|
||||
BLOCKSIZE := 4k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Asus WL-330N3G
|
||||
DEVICE_PACKAGES :=
|
||||
endef
|
||||
TARGET_DEVICES += wl-330n3g
|
||||
|
||||
define Device/wl-351
|
||||
DTS := WL-351
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := Sitecom WL-351 v1
|
||||
DEVICE_PACKAGES := kmod-switch-rtl8366rb kmod-swconfig swconfig
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += wl-351
|
||||
|
||||
define Device/wnce2001
|
||||
DTS := WNCE2001
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
IMAGES += factory.bin factory-NA.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
dap-header -s RT3052-AP-WNCE2001-3 -r WW -v 1.0.0.99
|
||||
IMAGE/factory-NA.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
dap-header -s RT3052-AP-WNCE2001-3 -r NA -v 1.0.0.99
|
||||
DEVICE_TITLE := Netgear WNCE2001
|
||||
endef
|
||||
TARGET_DEVICES += wnce2001
|
||||
|
||||
define Device/wr512-3gn-4M
|
||||
DTS := WR512-3GN-4M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := WR512-3GN (4M)
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += wr512-3gn-4M
|
||||
|
||||
define Device/wr512-3gn-8M
|
||||
DTS := WR512-3GN-8M
|
||||
DEVICE_TITLE := WR512-3GN (8M)
|
||||
endef
|
||||
TARGET_DEVICES += wr512-3gn-8M
|
||||
|
||||
define Device/wr6202
|
||||
DTS := WR6202
|
||||
DEVICE_TITLE := AWB WR6202
|
||||
endef
|
||||
TARGET_DEVICES += wr6202
|
||||
|
||||
define Device/wt1520-4M
|
||||
DTS := WT1520-4M
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | poray-header -B WT1520 -F 4M
|
||||
DEVICE_TITLE := Nexx WT1520 (4MB)
|
||||
endef
|
||||
TARGET_DEVICES += wt1520-4M
|
||||
|
||||
define Device/wt1520-8M
|
||||
DTS := WT1520-8M
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | poray-header -B WT1520 -F 8M
|
||||
DEVICE_TITLE := Nexx WT1520 (8MB)
|
||||
endef
|
||||
TARGET_DEVICES += wt1520-8M
|
||||
|
||||
define Device/x5
|
||||
DTS := X5
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | poray-header -B X5 -F 8M
|
||||
DEVICE_TITLE := Poray X5/X6
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ledtrig-netdev kmod-ledtrig-timer
|
||||
endef
|
||||
TARGET_DEVICES += x5
|
||||
|
||||
|
||||
define Device/x8
|
||||
DTS := X8
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := \
|
||||
$$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | poray-header -B X8 -F 8M
|
||||
DEVICE_TITLE := Poray X8
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ledtrig-netdev kmod-ledtrig-timer
|
||||
endef
|
||||
TARGET_DEVICES += x8
|
||||
|
||||
define Device/xdxrn502j
|
||||
DTS := XDXRN502J
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := XDX RN502J
|
||||
endef
|
||||
TARGET_DEVICES += xdxrn502j
|
||||
|
||||
define Device/kn
|
||||
DTS := kn
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := 7872k
|
||||
DEVICE_TITLE := ZyXEL Keenetic
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ehci \
|
||||
kmod-usb-ledtrig-usbport kmod-usb-dwc2
|
||||
endef
|
||||
TARGET_DEVICES += kn
|
||||
|
||||
define Device/zyxel_keenetic-start
|
||||
DTS := kn_st
|
||||
IMAGE_SIZE := $(ralink_default_fw_size_4M)
|
||||
DEVICE_TITLE := ZyXEL Keenetic Start
|
||||
endef
|
||||
TARGET_DEVICES += zyxel_keenetic-start
|
||||
|
||||
define Device/zorlik_zl5900v2
|
||||
DTS := ZL5900V2
|
||||
DEVICE_TITLE := Zorlik ZL5900V2
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-netdev
|
||||
endef
|
||||
TARGET_DEVICES += zorlik_zl5900v2
|
||||
119
target/linux/ramips/image/rt3883.mk
Normal file
119
target/linux/ramips/image/rt3883.mk
Normal file
@@ -0,0 +1,119 @@
|
||||
#
|
||||
# RT3662/RT3883 Profiles
|
||||
#
|
||||
define Build/mkrtn56uimg
|
||||
$(STAGING_DIR_HOST)/bin/mkrtn56uimg $(1) $@
|
||||
endef
|
||||
|
||||
define Device/br-6475nd
|
||||
DTS := BR-6475ND
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := 7744k
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
|
||||
edimax-header -s CSYS -m RN54 -f 0x70000 -S 0x01100000 | pad-rootfs | \
|
||||
append-metadata | check-size $$$$(IMAGE_SIZE)
|
||||
DEVICE_TITLE := Edimax BR-6475nD
|
||||
DEVICE_PACKAGES := swconfig
|
||||
endef
|
||||
TARGET_DEVICES += br-6475nd
|
||||
|
||||
define Device/cy-swr1100
|
||||
$(Device/seama)
|
||||
DTS := CY-SWR1100
|
||||
BLOCKSIZE := 64k
|
||||
KERNEL := $(KERNEL_DTB)
|
||||
SEAMA_SIGNATURE := wrgnd10_samsung_ss815
|
||||
DEVICE_TITLE := Samsung CY-SWR1100
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 \
|
||||
kmod-usb-ledtrig-usbport swconfig
|
||||
endef
|
||||
TARGET_DEVICES += cy-swr1100
|
||||
|
||||
|
||||
define Device/dir-645
|
||||
$(Device/seama)
|
||||
DTS := DIR-645
|
||||
BLOCKSIZE := 4k
|
||||
KERNEL := $(KERNEL_DTB)
|
||||
SEAMA_SIGNATURE := wrgn39_dlob.hans_dir645
|
||||
DEVICE_TITLE := D-Link DIR-645
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig
|
||||
endef
|
||||
TARGET_DEVICES += dir-645
|
||||
|
||||
|
||||
define Device/belkin_f9k1109v1
|
||||
DTS := F9K1109V1
|
||||
BLOCKSIZE := 64k
|
||||
DEVICE_TITLE := Belkin F9K1109 Version 1.0
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig
|
||||
IMAGE_SIZE := 7224k
|
||||
KERNEL := kernel-bin | append-dtb | lzma -d16 | uImage lzma
|
||||
# Stock firmware checks for this uImage image name during upload.
|
||||
UIMAGE_NAME := N750F9K1103VB
|
||||
endef
|
||||
TARGET_DEVICES += belkin_f9k1109v1
|
||||
|
||||
define Device/hpm
|
||||
DTS := HPM
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := 16064k
|
||||
DEVICE_TITLE := Omnima HPM
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2
|
||||
endef
|
||||
TARGET_DEVICES += hpm
|
||||
|
||||
|
||||
define Device/rt-n56u
|
||||
DTS := RT-N56U
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE/sysupgrade.bin += | mkrtn56uimg -s
|
||||
DEVICE_TITLE := Asus RT-N56U
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig
|
||||
endef
|
||||
TARGET_DEVICES += rt-n56u
|
||||
|
||||
|
||||
define Device/tew-691gr
|
||||
DTS := TEW-691GR
|
||||
BLOCKSIZE := 64k
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
umedia-header 0x026910
|
||||
DEVICE_TITLE := TRENDnet TEW-691GR
|
||||
DEVICE_PACKAGES := swconfig
|
||||
endef
|
||||
TARGET_DEVICES += tew-691gr
|
||||
|
||||
|
||||
define Device/tew-692gr
|
||||
DTS := TEW-692GR
|
||||
BLOCKSIZE := 64k
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
umedia-header 0x026920
|
||||
DEVICE_TITLE := TRENDnet TEW-692GR
|
||||
DEVICE_PACKAGES := swconfig
|
||||
endef
|
||||
TARGET_DEVICES += tew-692gr
|
||||
|
||||
|
||||
define Device/wlr-6000
|
||||
DTS := WLR-6000
|
||||
BLOCKSIZE := 4k
|
||||
IMAGE_SIZE := 7244k
|
||||
IMAGES += factory.dlf
|
||||
IMAGE/factory.dlf := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
|
||||
senao-header -r 0x0202 -p 0x41 -t 2
|
||||
DEVICE_TITLE := Sitecom WLR-6000
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig
|
||||
endef
|
||||
TARGET_DEVICES += wlr-6000
|
||||
|
||||
|
||||
define Device/wmdr-143n
|
||||
DTS := WMDR-143N
|
||||
BLOCKSIZE := 64k
|
||||
DEVICE_TITLE := Loewe WMDR-143N
|
||||
endef
|
||||
TARGET_DEVICES += wmdr-143n
|
||||
Reference in New Issue
Block a user