Merge Official Source
This commit is contained in:
@@ -986,6 +986,19 @@ config KERNEL_IP_MROUTE
|
||||
Multicast routing requires a multicast routing daemon in
|
||||
addition to kernel support.
|
||||
|
||||
if KERNEL_IP_MROUTE
|
||||
|
||||
config KERNEL_IP_MROUTE_MULTIPLE_TABLES
|
||||
def_bool y
|
||||
|
||||
config KERNEL_IP_PIMSM_V1
|
||||
def_bool y
|
||||
|
||||
config KERNEL_IP_PIMSM_V2
|
||||
def_bool y
|
||||
|
||||
endif
|
||||
|
||||
#
|
||||
# IPv6 configuration
|
||||
#
|
||||
@@ -1008,8 +1021,15 @@ if KERNEL_IPV6
|
||||
Multicast routing requires a multicast routing daemon in
|
||||
addition to kernel support.
|
||||
|
||||
config KERNEL_IPV6_PIMSM_V2
|
||||
def_bool n
|
||||
if KERNEL_IPV6_MROUTE
|
||||
|
||||
config KERNEL_IPV6_MROUTE_MULTIPLE_TABLES
|
||||
def_bool y
|
||||
|
||||
config KERNEL_IPV6_PIMSM_V2
|
||||
def_bool y
|
||||
|
||||
endif
|
||||
|
||||
config KERNEL_IPV6_SEG6_LWTUNNEL
|
||||
bool "Enable support for lightweight tunnels"
|
||||
|
||||
@@ -6,11 +6,11 @@ ifdef CONFIG_TESTING_KERNEL
|
||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||
endif
|
||||
|
||||
LINUX_VERSION-5.4 = .169
|
||||
LINUX_VERSION-5.10 = .89
|
||||
LINUX_VERSION-5.4 = .170
|
||||
LINUX_VERSION-5.10 = .90
|
||||
|
||||
LINUX_KERNEL_HASH-5.4.169 = 554382d95f71afd5f9b49292eb5d1cbe3be1a0bad22d21487c9e6d506ee01a19
|
||||
LINUX_KERNEL_HASH-5.10.89 = 92218b1a4a18f1cb9ec07d2b7fce41577452aa552c54c25b6d5fe9b4b543bb30
|
||||
LINUX_KERNEL_HASH-5.4.170 = b09f74e0cf5fc7cf5de6aa932fe654c962cb10118bdbbdddb397022c6e6d382c
|
||||
LINUX_KERNEL_HASH-5.10.90 = 945e4264c014a3d9dfc0a4639309dd1ec2fb545416556421f931b95da78c2725
|
||||
|
||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||
|
||||
@@ -57,6 +57,8 @@ openmesh,mr900-v2|\
|
||||
openmesh,mr1750-v1|\
|
||||
openmesh,mr1750-v2|\
|
||||
openmesh,om5p|\
|
||||
openmesh,om5p-an|\
|
||||
openmesh,om5p-ac-v1|\
|
||||
openmesh,om5p-ac-v2|\
|
||||
samsung,wam250|\
|
||||
ubnt,nanostation-m|\
|
||||
|
||||
@@ -52,6 +52,7 @@ ravpower,rp-wd03)
|
||||
jcg,q20)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
||||
;;
|
||||
linksys,ea6350-v4|\
|
||||
linksys,ea7300-v1|\
|
||||
linksys,ea7300-v2|\
|
||||
linksys,ea7500-v2|\
|
||||
|
||||
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ltq-deu
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
PKG_LICENSE:=GPL-2.0+
|
||||
@@ -21,7 +21,7 @@ define KernelPackage/ltq-deu-template
|
||||
TITLE:=deu driver for $(1)
|
||||
URL:=http://www.lantiq.com/
|
||||
VARIANT:=$(1)
|
||||
DEPENDS:=@TARGET_lantiq_$(2) +kmod-crypto-manager @LINUX_5_4
|
||||
DEPENDS:=@TARGET_lantiq_$(2) +kmod-crypto-manager +kmod-crypto-des
|
||||
FILES:=$(PKG_BUILD_DIR)/ltq_deu_$(1).ko
|
||||
AUTOLOAD:=$(call AutoProbe,ltq_deu_$(1))
|
||||
endef
|
||||
|
||||
@@ -7,18 +7,18 @@ endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),ar9)
|
||||
CFLAGS_MODULE = -DCONFIG_AR9 -DCONFIG_CRYPTO_DEV_DEU -DCONFIG_CRYPTO_DEV_SPEED_TEST -DCONFIG_CRYPTO_DEV_DES \
|
||||
-DCONFIG_CRYPTO_DEV_AES -DCONFIG_CRYPTO_DEV_SHA1 -DCONFIG_CRYPTO_DEV_MD5 -DCONFIG_CRYPTO_DEV_ARC4 \
|
||||
-DCONFIG_CRYPTO_DEV_AES -DCONFIG_CRYPTO_DEV_SHA1 -DCONFIG_CRYPTO_DEV_MD5 \
|
||||
-DCONFIG_CRYPTO_DEV_SHA1_HMAC -DCONFIG_CRYPTO_DEV_MD5_HMAC
|
||||
obj-m = ltq_deu_ar9.o
|
||||
ltq_deu_ar9-objs = ifxmips_deu.o ifxmips_deu_ar9.o ifxmips_des.o ifxmips_aes.o ifxmips_arc4.o \
|
||||
ltq_deu_ar9-objs = ifxmips_deu.o ifxmips_deu_ar9.o ifxmips_des.o ifxmips_aes.o \
|
||||
ifxmips_sha1.o ifxmips_md5.o ifxmips_sha1_hmac.o ifxmips_md5_hmac.o
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),vr9)
|
||||
CFLAGS_MODULE = -DCONFIG_VR9 -DCONFIG_CRYPTO_DEV_DEU -DCONFIG_CRYPTO_DEV_SPEED_TEST -DCONFIG_CRYPTO_DEV_DES \
|
||||
-DCONFIG_CRYPTO_DEV_AES -DCONFIG_CRYPTO_DEV_SHA1 -DCONFIG_CRYPTO_DEV_MD5 -DCONFIG_CRYPTO_DEV_ARC4 \
|
||||
-DCONFIG_CRYPTO_DEV_AES -DCONFIG_CRYPTO_DEV_SHA1 -DCONFIG_CRYPTO_DEV_MD5 \
|
||||
-DCONFIG_CRYPTO_DEV_SHA1_HMAC -DCONFIG_CRYPTO_DEV_MD5_HMAC
|
||||
obj-m = ltq_deu_vr9.o
|
||||
ltq_deu_vr9-objs = ifxmips_deu.o ifxmips_deu_vr9.o ifxmips_des.o ifxmips_aes.o ifxmips_arc4.o \
|
||||
ltq_deu_vr9-objs = ifxmips_deu.o ifxmips_deu_vr9.o ifxmips_des.o ifxmips_aes.o \
|
||||
ifxmips_sha1.o ifxmips_md5.o ifxmips_sha1_hmac.o ifxmips_md5_hmac.o
|
||||
endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -47,6 +47,7 @@
|
||||
#include <linux/errno.h>
|
||||
#include <linux/crypto.h>
|
||||
#include <crypto/algapi.h>
|
||||
#include <crypto/internal/skcipher.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <linux/delay.h>
|
||||
@@ -88,7 +89,6 @@ struct arc4_ctx {
|
||||
extern int disable_deudma;
|
||||
extern int disable_multiblock;
|
||||
|
||||
|
||||
/*! \fn static void _deu_arc4 (void *ctx_arg, u8 *out_arg, const u8 *in_arg, u8 *iv_arg, u32 nbytes, int encdec, int mode)
|
||||
\ingroup IFX_ARC4_FUNCTIONS
|
||||
\brief main interface to ARC4 hardware
|
||||
@@ -203,6 +203,19 @@ static int arc4_set_key(struct crypto_tfm *tfm, const u8 *inkey,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \fn static int arc4_set_key_skcipher(struct crypto_skcipher *tfm, const u8 *in_key, unsigned int key_len)
|
||||
\ingroup IFX_ARC4_FUNCTIONS
|
||||
\brief sets ARC4 key
|
||||
\param tfm linux crypto skcipher
|
||||
\param in_key input key
|
||||
\param key_len key lengths less than or equal to 16 bytes supported
|
||||
*/
|
||||
static int arc4_set_key_skcipher(struct crypto_skcipher *tfm, const u8 *inkey,
|
||||
unsigned int key_len)
|
||||
{
|
||||
return arc4_set_key(crypto_skcipher_ctx(tfm), inkey, key_len);
|
||||
}
|
||||
|
||||
/*! \fn static void _deu_arc4_ecb(void *ctx, uint8_t *dst, const uint8_t *src, uint8_t *iv, size_t nbytes, int encdec, int inplace)
|
||||
\ingroup IFX_ARC4_FUNCTIONS
|
||||
\brief sets ARC4 hardware to ECB mode
|
||||
@@ -243,7 +256,7 @@ static struct crypto_alg ifxdeu_arc4_alg = {
|
||||
.cra_name = "arc4",
|
||||
.cra_driver_name = "ifxdeu-arc4",
|
||||
.cra_priority = 300,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_CIPHER,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_CIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.cra_blocksize = ARC4_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct arc4_ctx),
|
||||
.cra_module = THIS_MODULE,
|
||||
@@ -259,61 +272,51 @@ static struct crypto_alg ifxdeu_arc4_alg = {
|
||||
}
|
||||
};
|
||||
|
||||
/*! \fn static int ecb_arc4_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes)
|
||||
/*! \fn static int ecb_arc4_encrypt(struct skcipher_request *req)
|
||||
\ingroup IFX_ARC4_FUNCTIONS
|
||||
\brief ECB ARC4 encrypt using linux crypto blkcipher
|
||||
\param desc blkcipher descriptor
|
||||
\param dst output scatterlist
|
||||
\param src input scatterlist
|
||||
\param nbytes data size in bytes
|
||||
*/
|
||||
static int ecb_arc4_encrypt(struct blkcipher_desc *desc,
|
||||
struct scatterlist *dst, struct scatterlist *src,
|
||||
unsigned int nbytes)
|
||||
\brief ECB ARC4 encrypt using linux crypto skcipher
|
||||
\param req skcipher_request
|
||||
*/
|
||||
static int ecb_arc4_encrypt(struct skcipher_request *req)
|
||||
{
|
||||
struct arc4_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
|
||||
struct blkcipher_walk walk;
|
||||
struct arc4_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
|
||||
struct skcipher_walk walk;
|
||||
unsigned int nbytes;
|
||||
int err;
|
||||
|
||||
DPRINTF(1, "\n");
|
||||
blkcipher_walk_init(&walk, dst, src, nbytes);
|
||||
err = blkcipher_walk_virt(desc, &walk);
|
||||
err = skcipher_walk_virt(&walk, req, false);
|
||||
|
||||
while ((nbytes = walk.nbytes)) {
|
||||
_deu_arc4_ecb(ctx, walk.dst.virt.addr, walk.src.virt.addr,
|
||||
NULL, nbytes, CRYPTO_DIR_ENCRYPT, 0);
|
||||
nbytes &= ARC4_BLOCK_SIZE - 1;
|
||||
err = blkcipher_walk_done(desc, &walk, nbytes);
|
||||
err = skcipher_walk_done(&walk, nbytes);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/*! \fn static int ecb_arc4_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes)
|
||||
/*! \fn static int ecb_arc4_decrypt(struct skcipher_request *req)
|
||||
\ingroup IFX_ARC4_FUNCTIONS
|
||||
\brief ECB ARC4 decrypt using linux crypto blkcipher
|
||||
\param desc blkcipher descriptor
|
||||
\param dst output scatterlist
|
||||
\param src input scatterlist
|
||||
\param nbytes data size in bytes
|
||||
*/
|
||||
static int ecb_arc4_decrypt(struct blkcipher_desc *desc,
|
||||
struct scatterlist *dst, struct scatterlist *src,
|
||||
unsigned int nbytes)
|
||||
\brief ECB ARC4 decrypt using linux crypto skcipher
|
||||
\param desc skcipher_request
|
||||
*/
|
||||
static int ecb_arc4_decrypt(struct skcipher_request *req)
|
||||
{
|
||||
struct arc4_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
|
||||
struct blkcipher_walk walk;
|
||||
struct arc4_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
|
||||
struct skcipher_walk walk;
|
||||
unsigned int nbytes;
|
||||
int err;
|
||||
|
||||
DPRINTF(1, "\n");
|
||||
blkcipher_walk_init(&walk, dst, src, nbytes);
|
||||
err = blkcipher_walk_virt(desc, &walk);
|
||||
err = skcipher_walk_virt(&walk, req, false);
|
||||
|
||||
while ((nbytes = walk.nbytes)) {
|
||||
_deu_arc4_ecb(ctx, walk.dst.virt.addr, walk.src.virt.addr,
|
||||
NULL, nbytes, CRYPTO_DIR_DECRYPT, 0);
|
||||
nbytes &= ARC4_BLOCK_SIZE - 1;
|
||||
err = blkcipher_walk_done(desc, &walk, nbytes);
|
||||
err = skcipher_walk_done(&walk, nbytes);
|
||||
}
|
||||
|
||||
return err;
|
||||
@@ -322,25 +325,20 @@ static int ecb_arc4_decrypt(struct blkcipher_desc *desc,
|
||||
/*
|
||||
* \brief ARC4 function mappings
|
||||
*/
|
||||
static struct crypto_alg ifxdeu_ecb_arc4_alg = {
|
||||
.cra_name = "ecb(arc4)",
|
||||
.cra_driver_name = "ifxdeu-ecb(arc4)",
|
||||
.cra_priority = 400,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
|
||||
.cra_blocksize = ARC4_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct arc4_ctx),
|
||||
.cra_type = &crypto_blkcipher_type,
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_list = LIST_HEAD_INIT(ifxdeu_ecb_arc4_alg.cra_list),
|
||||
.cra_u = {
|
||||
.blkcipher = {
|
||||
.min_keysize = ARC4_MIN_KEY_SIZE,
|
||||
.max_keysize = ARC4_MAX_KEY_SIZE,
|
||||
.setkey = arc4_set_key,
|
||||
.encrypt = ecb_arc4_encrypt,
|
||||
.decrypt = ecb_arc4_decrypt,
|
||||
}
|
||||
}
|
||||
static struct skcipher_alg ifxdeu_ecb_arc4_alg = {
|
||||
.base.cra_name = "ecb(arc4)",
|
||||
.base.cra_driver_name = "ifxdeu-ecb(arc4)",
|
||||
.base.cra_priority = 400,
|
||||
.base.cra_flags = CRYPTO_ALG_TYPE_SKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.base.cra_blocksize = ARC4_BLOCK_SIZE,
|
||||
.base.cra_ctxsize = sizeof(struct arc4_ctx),
|
||||
.base.cra_module = THIS_MODULE,
|
||||
.base.cra_list = LIST_HEAD_INIT(ifxdeu_ecb_arc4_alg.base.cra_list),
|
||||
.min_keysize = ARC4_MIN_KEY_SIZE,
|
||||
.max_keysize = ARC4_MAX_KEY_SIZE,
|
||||
.setkey = arc4_set_key_skcipher,
|
||||
.encrypt = ecb_arc4_encrypt,
|
||||
.decrypt = ecb_arc4_decrypt,
|
||||
};
|
||||
|
||||
/*! \fn int ifxdeu_init_arc4(void)
|
||||
@@ -355,7 +353,7 @@ int ifxdeu_init_arc4(void)
|
||||
if ((ret = crypto_register_alg(&ifxdeu_arc4_alg)))
|
||||
goto arc4_err;
|
||||
|
||||
if ((ret = crypto_register_alg(&ifxdeu_ecb_arc4_alg)))
|
||||
if ((ret = crypto_register_skcipher(&ifxdeu_ecb_arc4_alg)))
|
||||
goto ecb_arc4_err;
|
||||
|
||||
arc4_chip_init ();
|
||||
@@ -370,7 +368,7 @@ arc4_err:
|
||||
printk(KERN_ERR "IFX arc4 initialization failed!\n");
|
||||
return ret;
|
||||
ecb_arc4_err:
|
||||
crypto_unregister_alg(&ifxdeu_ecb_arc4_alg);
|
||||
crypto_unregister_skcipher(&ifxdeu_ecb_arc4_alg);
|
||||
printk (KERN_ERR "IFX ecb_arc4 initialization failed!\n");
|
||||
return ret;
|
||||
|
||||
@@ -383,9 +381,7 @@ ecb_arc4_err:
|
||||
void ifxdeu_fini_arc4(void)
|
||||
{
|
||||
crypto_unregister_alg (&ifxdeu_arc4_alg);
|
||||
crypto_unregister_alg (&ifxdeu_ecb_arc4_alg);
|
||||
crypto_unregister_skcipher (&ifxdeu_ecb_arc4_alg);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -964,7 +964,7 @@ static struct lq_aes_alg aes_drivers_alg[] = {
|
||||
.alg = {
|
||||
.cra_name = "aes",
|
||||
.cra_driver_name = "ifxdeu-aes",
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY | CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct aes_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
@@ -984,7 +984,7 @@ static struct lq_aes_alg aes_drivers_alg[] = {
|
||||
.alg = {
|
||||
.cra_name = "ecb(aes)",
|
||||
.cra_driver_name = "ifxdeu-ecb(aes)",
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY | CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct aes_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
@@ -1004,7 +1004,7 @@ static struct lq_aes_alg aes_drivers_alg[] = {
|
||||
.alg = {
|
||||
.cra_name = "cbc(aes)",
|
||||
.cra_driver_name = "ifxdeu-cbc(aes)",
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY | CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct aes_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
@@ -1024,7 +1024,7 @@ static struct lq_aes_alg aes_drivers_alg[] = {
|
||||
.alg = {
|
||||
.cra_name = "ctr(aes)",
|
||||
.cra_driver_name = "ifxdeu-ctr(aes)",
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY | CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct aes_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
@@ -1044,7 +1044,7 @@ static struct lq_aes_alg aes_drivers_alg[] = {
|
||||
.alg = {
|
||||
.cra_name = "rfc3686(ctr(aes))",
|
||||
.cra_driver_name = "ifxdeu-rfc3686(ctr(aes))",
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY | CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = AES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct aes_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
|
||||
@@ -761,7 +761,7 @@ static struct lq_des_alg des_drivers_alg [] = {
|
||||
.alg = {
|
||||
.cra_name = "des",
|
||||
.cra_driver_name = "lqdeu-des",
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY | CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = DES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct des_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
@@ -782,7 +782,7 @@ static struct lq_des_alg des_drivers_alg [] = {
|
||||
.alg = {
|
||||
.cra_name = "ecb(des)",
|
||||
.cra_driver_name = "lqdeu-ecb(des)",
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY | CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = DES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct des_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
@@ -802,7 +802,7 @@ static struct lq_des_alg des_drivers_alg [] = {
|
||||
.alg = {
|
||||
.cra_name = "cbc(des)",
|
||||
.cra_driver_name = "lqdeu-cbc(des)",
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY | CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = DES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct des_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
@@ -822,7 +822,7 @@ static struct lq_des_alg des_drivers_alg [] = {
|
||||
.alg = {
|
||||
.cra_name = "des3_ede",
|
||||
.cra_driver_name = "lqdeu-des3_ede",
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY | CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = DES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct des_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
@@ -842,7 +842,7 @@ static struct lq_des_alg des_drivers_alg [] = {
|
||||
.alg = {
|
||||
.cra_name = "ecb(des3_ede)",
|
||||
.cra_driver_name = "lqdeu-ecb(des3_ede)",
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY | CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = DES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct des_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
@@ -862,7 +862,7 @@ static struct lq_des_alg des_drivers_alg [] = {
|
||||
.alg = {
|
||||
.cra_name = "cbc(des3_ede)",
|
||||
.cra_driver_name = "lqdeu-cbc(des3_ede)",
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY | CRYPTO_ALG_ASYNC,
|
||||
.cra_blocksize = DES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct des_ctx),
|
||||
.cra_type = &crypto_ablkcipher_type,
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
#include <linux/delay.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <crypto/algapi.h>
|
||||
#include <crypto/des.h>
|
||||
#include <crypto/internal/skcipher.h>
|
||||
#include "ifxmips_deu.h"
|
||||
|
||||
#if defined(CONFIG_DANUBE)
|
||||
@@ -105,17 +107,18 @@ void des_dma_memory_copy(u32 *outcopy, u32 *out_dma, u8 *out_arg, int nbytes);
|
||||
void ifx_deu_des (void *ctx_arg, u8 *out_arg, const u8 *in_arg,
|
||||
u8 *iv_arg, u32 nbytes, int encdec, int mode);
|
||||
|
||||
struct des_ctx {
|
||||
struct ifx_deu_des_ctx {
|
||||
int controlr_M;
|
||||
int key_length;
|
||||
u8 iv[DES_BLOCK_SIZE];
|
||||
u32 expkey[DES3_EDE_EXPKEY_WORDS];
|
||||
struct des_ctx des_context;
|
||||
struct des3_ede_ctx des3_ede_context;
|
||||
};
|
||||
|
||||
extern int disable_multiblock;
|
||||
extern int disable_deudma;
|
||||
|
||||
|
||||
/*! \fn int des_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen)
|
||||
* \ingroup IFX_DES_FUNCTIONS
|
||||
* \brief sets DES key
|
||||
@@ -126,18 +129,42 @@ extern int disable_deudma;
|
||||
int des_setkey(struct crypto_tfm *tfm, const u8 *key,
|
||||
unsigned int keylen)
|
||||
{
|
||||
struct des_ctx *dctx = crypto_tfm_ctx(tfm);
|
||||
struct ifx_deu_des_ctx *dctx = crypto_tfm_ctx(tfm);
|
||||
int err;
|
||||
|
||||
//printk("setkey in %s\n", __FILE__);
|
||||
|
||||
err = des_expand_key(&dctx->des_context, key, keylen);
|
||||
if (err == -ENOKEY) {
|
||||
if (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_FORBID_WEAK_KEYS)
|
||||
err = -EINVAL;
|
||||
else
|
||||
err = 0;
|
||||
}
|
||||
|
||||
dctx->controlr_M = 0; // des
|
||||
dctx->key_length = keylen;
|
||||
|
||||
memcpy ((u8 *) (dctx->expkey), key, keylen);
|
||||
|
||||
return 0;
|
||||
if (err)
|
||||
memset(dctx, 0, sizeof(*dctx));
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/*! \fn int des_setkey_skcipher (struct crypto_skcipher *tfm, const uint8_t *in_key, unsigned int key_len)
|
||||
* \ingroup IFX_AES_FUNCTIONS
|
||||
* \brief sets the AES keys for skcipher
|
||||
* \param tfm linux crypto skcipher
|
||||
* \param in_key input key
|
||||
* \param key_len key lengths of 16, 24 and 32 bytes supported
|
||||
* \return -EINVAL - bad key length, 0 - SUCCESS
|
||||
*/
|
||||
int des_setkey_skcipher (struct crypto_skcipher *tfm, const u8 *in_key, unsigned int key_len)
|
||||
{
|
||||
return des_setkey(crypto_skcipher_tfm(tfm), in_key, key_len);
|
||||
}
|
||||
|
||||
/*! \fn void ifx_deu_des(void *ctx_arg, u8 *out_arg, const u8 *in_arg, u8 *iv_arg, u32 nbytes, int encdec, int mode)
|
||||
* \ingroup IFX_DES_FUNCTIONS
|
||||
@@ -155,7 +182,7 @@ void ifx_deu_des (void *ctx_arg, u8 *out_arg, const u8 *in_arg,
|
||||
u8 *iv_arg, u32 nbytes, int encdec, int mode)
|
||||
{
|
||||
volatile struct des_t *des = (struct des_t *) DES_3DES_START;
|
||||
struct des_ctx *dctx = ctx_arg;
|
||||
struct ifx_deu_des_ctx *dctx = ctx_arg;
|
||||
u32 *key = dctx->expkey;
|
||||
unsigned long flag;
|
||||
|
||||
@@ -257,8 +284,6 @@ void ifx_deu_des (void *ctx_arg, u8 *out_arg, const u8 *in_arg,
|
||||
* \param mode operation mode such as ebc, cbc
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*! \fn void ifx_deu_des_ecb (void *ctx, uint8_t *dst, const uint8_t *src, uint8_t *iv, size_t nbytes, int encdec, int inplace)
|
||||
* \ingroup IFX_DES_FUNCTIONS
|
||||
* \brief sets DES hardware to ECB mode
|
||||
@@ -270,7 +295,6 @@ void ifx_deu_des (void *ctx_arg, u8 *out_arg, const u8 *in_arg,
|
||||
* \param encdec 1 for encrypt; 0 for decrypt
|
||||
* \param inplace not used
|
||||
*/
|
||||
|
||||
void ifx_deu_des_ecb (void *ctx, uint8_t *dst, const uint8_t *src,
|
||||
uint8_t *iv, size_t nbytes, int encdec, int inplace)
|
||||
{
|
||||
@@ -345,31 +369,31 @@ void ifx_deu_des_ctr (void *ctx, uint8_t *dst, const uint8_t *src,
|
||||
ifx_deu_des (ctx, dst, src, iv, nbytes, encdec, 4);
|
||||
}
|
||||
|
||||
/*! \fn void des_encrypt (struct crypto_tfm *tfm, uint8_t *out, const uint8_t *in)
|
||||
/*! \fn void ifx_deu_des_encrypt (struct crypto_tfm *tfm, uint8_t *out, const uint8_t *in)
|
||||
* \ingroup IFX_DES_FUNCTIONS
|
||||
* \brief encrypt DES_BLOCK_SIZE of data
|
||||
* \param tfm linux crypto algo transform
|
||||
* \param out output bytestream
|
||||
* \param in input bytestream
|
||||
*/
|
||||
void des_encrypt (struct crypto_tfm *tfm, uint8_t * out, const uint8_t * in)
|
||||
void ifx_deu_des_encrypt (struct crypto_tfm *tfm, uint8_t * out, const uint8_t * in)
|
||||
{
|
||||
struct des_ctx *ctx = crypto_tfm_ctx(tfm);
|
||||
struct ifx_deu_des_ctx *ctx = crypto_tfm_ctx(tfm);
|
||||
ifx_deu_des (ctx, out, in, NULL, DES_BLOCK_SIZE,
|
||||
CRYPTO_DIR_ENCRYPT, 0);
|
||||
|
||||
}
|
||||
|
||||
/*! \fn void des_decrypt (struct crypto_tfm *tfm, uint8_t *out, const uint8_t *in)
|
||||
/*! \fn void ifx_deu_des_decrypt (struct crypto_tfm *tfm, uint8_t *out, const uint8_t *in)
|
||||
* \ingroup IFX_DES_FUNCTIONS
|
||||
* \brief encrypt DES_BLOCK_SIZE of data
|
||||
* \param tfm linux crypto algo transform
|
||||
* \param out output bytestream
|
||||
* \param in input bytestream
|
||||
*/
|
||||
void des_decrypt (struct crypto_tfm *tfm, uint8_t * out, const uint8_t * in)
|
||||
void ifx_deu_des_decrypt (struct crypto_tfm *tfm, uint8_t * out, const uint8_t * in)
|
||||
{
|
||||
struct des_ctx *ctx = crypto_tfm_ctx(tfm);
|
||||
struct ifx_deu_des_ctx *ctx = crypto_tfm_ctx(tfm);
|
||||
ifx_deu_des (ctx, out, in, NULL, DES_BLOCK_SIZE,
|
||||
CRYPTO_DIR_DECRYPT, 0);
|
||||
}
|
||||
@@ -398,16 +422,41 @@ void des_decrypt (struct crypto_tfm *tfm, uint8_t * out, const uint8_t * in)
|
||||
int des3_ede_setkey(struct crypto_tfm *tfm, const u8 *key,
|
||||
unsigned int keylen)
|
||||
{
|
||||
struct des_ctx *dctx = crypto_tfm_ctx(tfm);
|
||||
struct ifx_deu_des_ctx *dctx = crypto_tfm_ctx(tfm);
|
||||
int err;
|
||||
|
||||
//printk("setkey in %s\n", __FILE__);
|
||||
|
||||
err = des3_ede_expand_key(&dctx->des3_ede_context, key, keylen);
|
||||
if (err == -ENOKEY) {
|
||||
if (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_FORBID_WEAK_KEYS)
|
||||
err = -EINVAL;
|
||||
else
|
||||
err = 0;
|
||||
}
|
||||
|
||||
dctx->controlr_M = keylen / 8 + 1; // 3DES EDE1 / EDE2 / EDE3 Mode
|
||||
dctx->key_length = keylen;
|
||||
|
||||
memcpy ((u8 *) (dctx->expkey), key, keylen);
|
||||
|
||||
return 0;
|
||||
if (err)
|
||||
memset(dctx, 0, sizeof(*dctx));
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/*! \fn int des3_ede_setkey_skcipher(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen)
|
||||
* \ingroup IFX_DES_FUNCTIONS
|
||||
* \brief sets 3DES key
|
||||
* \param tfm linux crypto skcipher transform
|
||||
* \param key input key
|
||||
* \param keylen key length
|
||||
*/
|
||||
int des3_ede_setkey_skcipher(struct crypto_skcipher *tfm, const u8 *key,
|
||||
unsigned int keylen)
|
||||
{
|
||||
return des3_ede_setkey(crypto_skcipher_tfm(tfm), key, keylen);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -417,9 +466,9 @@ struct crypto_alg ifxdeu_des_alg = {
|
||||
.cra_name = "des",
|
||||
.cra_driver_name = "ifxdeu-des",
|
||||
.cra_priority = 300,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_CIPHER,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_CIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.cra_blocksize = DES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct des_ctx),
|
||||
.cra_ctxsize = sizeof(struct ifx_deu_des_ctx),
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_alignmask = 3,
|
||||
.cra_list = LIST_HEAD_INIT(ifxdeu_des_alg.cra_list),
|
||||
@@ -427,8 +476,8 @@ struct crypto_alg ifxdeu_des_alg = {
|
||||
.cia_min_keysize = DES_KEY_SIZE,
|
||||
.cia_max_keysize = DES_KEY_SIZE,
|
||||
.cia_setkey = des_setkey,
|
||||
.cia_encrypt = des_encrypt,
|
||||
.cia_decrypt = des_decrypt } }
|
||||
.cia_encrypt = ifx_deu_des_encrypt,
|
||||
.cia_decrypt = ifx_deu_des_decrypt } }
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -438,79 +487,68 @@ struct crypto_alg ifxdeu_des3_ede_alg = {
|
||||
.cra_name = "des3_ede",
|
||||
.cra_driver_name = "ifxdeu-des3_ede",
|
||||
.cra_priority = 300,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_CIPHER,
|
||||
.cra_blocksize = DES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct des_ctx),
|
||||
.cra_flags = CRYPTO_ALG_TYPE_CIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.cra_blocksize = DES3_EDE_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct ifx_deu_des_ctx),
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_alignmask = 3,
|
||||
.cra_list = LIST_HEAD_INIT(ifxdeu_des3_ede_alg.cra_list),
|
||||
.cra_u = { .cipher = {
|
||||
.cia_min_keysize = DES_KEY_SIZE,
|
||||
.cia_max_keysize = DES_KEY_SIZE,
|
||||
.cia_min_keysize = DES3_EDE_KEY_SIZE,
|
||||
.cia_max_keysize = DES3_EDE_KEY_SIZE,
|
||||
.cia_setkey = des3_ede_setkey,
|
||||
.cia_encrypt = des_encrypt,
|
||||
.cia_decrypt = des_decrypt } }
|
||||
.cia_encrypt = ifx_deu_des_encrypt,
|
||||
.cia_decrypt = ifx_deu_des_decrypt } }
|
||||
};
|
||||
|
||||
/*! \fn int ecb_des_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes)
|
||||
* \ingroup IFX_DES_FUNCTIONS
|
||||
* \brief ECB DES encrypt using linux crypto blkcipher
|
||||
* \param desc blkcipher descriptor
|
||||
* \param dst output scatterlist
|
||||
* \param src input scatterlist
|
||||
* \param nbytes data size in bytes
|
||||
*/
|
||||
int ecb_des_encrypt(struct blkcipher_desc *desc,
|
||||
struct scatterlist *dst, struct scatterlist *src,
|
||||
unsigned int nbytes)
|
||||
/*! \fn int ecb_des_encrypt(struct skcipher_req *req)
|
||||
* \ingroup IFX_AES_FUNCTIONS
|
||||
* \brief ECB DES encrypt using linux crypto skcipher
|
||||
* \param req skcipher request
|
||||
* \return err
|
||||
*/
|
||||
int ecb_des_encrypt(struct skcipher_request *req)
|
||||
{
|
||||
struct des_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
|
||||
struct blkcipher_walk walk;
|
||||
struct ifx_deu_des_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
|
||||
struct skcipher_walk walk;
|
||||
int err;
|
||||
unsigned int enc_bytes;
|
||||
unsigned int enc_bytes, nbytes;
|
||||
|
||||
blkcipher_walk_init(&walk, dst, src, nbytes);
|
||||
err = blkcipher_walk_virt(desc, &walk);
|
||||
err = skcipher_walk_virt(&walk, req, false);
|
||||
|
||||
while ((nbytes = enc_bytes = walk.nbytes)) {
|
||||
enc_bytes -= (nbytes % DES_BLOCK_SIZE);
|
||||
ifx_deu_des_ecb(ctx, walk.dst.virt.addr, walk.src.virt.addr,
|
||||
NULL, enc_bytes, CRYPTO_DIR_ENCRYPT, 0);
|
||||
nbytes &= DES_BLOCK_SIZE - 1;
|
||||
err = blkcipher_walk_done(desc, &walk, nbytes);
|
||||
err = skcipher_walk_done(&walk, nbytes);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/*! \fn int ecb_des_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes)
|
||||
* \ingroup IFX_DES_FUNCTIONS
|
||||
* \brief ECB DES decrypt using linux crypto blkcipher
|
||||
* \param desc blkcipher descriptor
|
||||
* \param dst output scatterlist
|
||||
* \param src input scatterlist
|
||||
* \param nbytes data size in bytes
|
||||
/*! \fn int ecb_des_decrypt(struct skcipher_req *req)
|
||||
* \ingroup IFX_AES_FUNCTIONS
|
||||
* \brief ECB DES decrypt using linux crypto skcipher
|
||||
* \param req skcipher request
|
||||
* \return err
|
||||
*/
|
||||
int ecb_des_decrypt(struct blkcipher_desc *desc,
|
||||
struct scatterlist *dst, struct scatterlist *src,
|
||||
unsigned int nbytes)
|
||||
*/
|
||||
int ecb_des_decrypt(struct skcipher_request *req)
|
||||
{
|
||||
struct des_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
|
||||
struct blkcipher_walk walk;
|
||||
struct ifx_deu_des_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
|
||||
struct skcipher_walk walk;
|
||||
int err;
|
||||
unsigned int dec_bytes;
|
||||
unsigned int dec_bytes, nbytes;
|
||||
|
||||
DPRINTF(1, "\n");
|
||||
blkcipher_walk_init(&walk, dst, src, nbytes);
|
||||
err = blkcipher_walk_virt(desc, &walk);
|
||||
err = skcipher_walk_virt(&walk, req, false);
|
||||
|
||||
while ((nbytes = dec_bytes = walk.nbytes)) {
|
||||
dec_bytes -= (nbytes % DES_BLOCK_SIZE);
|
||||
ifx_deu_des_ecb(ctx, walk.dst.virt.addr, walk.src.virt.addr,
|
||||
NULL, dec_bytes, CRYPTO_DIR_DECRYPT, 0);
|
||||
nbytes &= DES_BLOCK_SIZE - 1;
|
||||
err = blkcipher_walk_done(desc, &walk, nbytes);
|
||||
err = skcipher_walk_done(&walk, nbytes);
|
||||
}
|
||||
|
||||
return err;
|
||||
@@ -518,73 +556,57 @@ int ecb_des_decrypt(struct blkcipher_desc *desc,
|
||||
|
||||
/*
|
||||
* \brief DES function mappings
|
||||
*/
|
||||
struct crypto_alg ifxdeu_ecb_des_alg = {
|
||||
.cra_name = "ecb(des)",
|
||||
.cra_driver_name = "ifxdeu-ecb(des)",
|
||||
.cra_priority = 400,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
|
||||
.cra_blocksize = DES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct des_ctx),
|
||||
.cra_type = &crypto_blkcipher_type,
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_list = LIST_HEAD_INIT(ifxdeu_ecb_des_alg.cra_list),
|
||||
.cra_u = {
|
||||
.blkcipher = {
|
||||
.min_keysize = DES_KEY_SIZE,
|
||||
.max_keysize = DES_KEY_SIZE,
|
||||
.setkey = des_setkey,
|
||||
.encrypt = ecb_des_encrypt,
|
||||
.decrypt = ecb_des_decrypt,
|
||||
}
|
||||
}
|
||||
*/
|
||||
struct skcipher_alg ifxdeu_ecb_des_alg = {
|
||||
.base.cra_name = "ecb(des)",
|
||||
.base.cra_driver_name = "ifxdeu-ecb(des)",
|
||||
.base.cra_priority = 400,
|
||||
.base.cra_flags = CRYPTO_ALG_TYPE_SKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.base.cra_blocksize = DES_BLOCK_SIZE,
|
||||
.base.cra_ctxsize = sizeof(struct ifx_deu_des_ctx),
|
||||
.base.cra_module = THIS_MODULE,
|
||||
.base.cra_list = LIST_HEAD_INIT(ifxdeu_ecb_des_alg.base.cra_list),
|
||||
.min_keysize = DES_KEY_SIZE,
|
||||
.max_keysize = DES_KEY_SIZE,
|
||||
.setkey = des_setkey_skcipher,
|
||||
.encrypt = ecb_des_encrypt,
|
||||
.decrypt = ecb_des_decrypt,
|
||||
};
|
||||
|
||||
/*
|
||||
* \brief DES function mappings
|
||||
*/
|
||||
struct crypto_alg ifxdeu_ecb_des3_ede_alg = {
|
||||
.cra_name = "ecb(des3_ede)",
|
||||
.cra_driver_name = "ifxdeu-ecb(des3_ede)",
|
||||
.cra_priority = 400,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
|
||||
.cra_blocksize = DES3_EDE_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct des_ctx),
|
||||
.cra_type = &crypto_blkcipher_type,
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_list = LIST_HEAD_INIT(ifxdeu_ecb_des3_ede_alg.cra_list),
|
||||
.cra_u = {
|
||||
.blkcipher = {
|
||||
.min_keysize = DES3_EDE_KEY_SIZE,
|
||||
.max_keysize = DES3_EDE_KEY_SIZE,
|
||||
.setkey = des3_ede_setkey,
|
||||
.encrypt = ecb_des_encrypt,
|
||||
.decrypt = ecb_des_decrypt,
|
||||
}
|
||||
}
|
||||
*/
|
||||
struct skcipher_alg ifxdeu_ecb_des3_ede_alg = {
|
||||
.base.cra_name = "ecb(des3_ede)",
|
||||
.base.cra_driver_name = "ifxdeu-ecb(des3_ede)",
|
||||
.base.cra_priority = 400,
|
||||
.base.cra_flags = CRYPTO_ALG_TYPE_SKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.base.cra_blocksize = DES3_EDE_BLOCK_SIZE,
|
||||
.base.cra_ctxsize = sizeof(struct ifx_deu_des_ctx),
|
||||
.base.cra_module = THIS_MODULE,
|
||||
.base.cra_list = LIST_HEAD_INIT(ifxdeu_ecb_des3_ede_alg.base.cra_list),
|
||||
.min_keysize = DES3_EDE_KEY_SIZE,
|
||||
.max_keysize = DES3_EDE_KEY_SIZE,
|
||||
.setkey = des3_ede_setkey_skcipher,
|
||||
.encrypt = ecb_des_encrypt,
|
||||
.decrypt = ecb_des_decrypt,
|
||||
};
|
||||
|
||||
/*! \fn int cbc_des_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes)
|
||||
* \ingroup IFX_DES_FUNCTIONS
|
||||
* \brief CBC DES encrypt using linux crypto blkcipher
|
||||
* \param desc blkcipher descriptor
|
||||
* \param dst output scatterlist
|
||||
* \param src input scatterlist
|
||||
* \param nbytes data size in bytes
|
||||
/*! \fn int cbc_des_encrypt(struct skcipher_req *req)
|
||||
* \ingroup IFX_AES_FUNCTIONS
|
||||
* \brief CBC DES encrypt using linux crypto skcipher
|
||||
* \param req skcipher request
|
||||
* \return err
|
||||
*/
|
||||
int cbc_des_encrypt(struct blkcipher_desc *desc,
|
||||
struct scatterlist *dst, struct scatterlist *src,
|
||||
unsigned int nbytes)
|
||||
*/
|
||||
int cbc_des_encrypt(struct skcipher_request *req)
|
||||
{
|
||||
struct des_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
|
||||
struct blkcipher_walk walk;
|
||||
struct ifx_deu_des_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
|
||||
struct skcipher_walk walk;
|
||||
int err;
|
||||
unsigned int enc_bytes;
|
||||
unsigned int enc_bytes, nbytes;
|
||||
|
||||
DPRINTF(1, "\n");
|
||||
blkcipher_walk_init(&walk, dst, src, nbytes);
|
||||
err = blkcipher_walk_virt(desc, &walk);
|
||||
err = skcipher_walk_virt(&walk, req, false);
|
||||
|
||||
while ((nbytes = enc_bytes = walk.nbytes)) {
|
||||
u8 *iv = walk.iv;
|
||||
@@ -592,33 +614,27 @@ int cbc_des_encrypt(struct blkcipher_desc *desc,
|
||||
ifx_deu_des_cbc(ctx, walk.dst.virt.addr, walk.src.virt.addr,
|
||||
iv, enc_bytes, CRYPTO_DIR_ENCRYPT, 0);
|
||||
nbytes &= DES_BLOCK_SIZE - 1;
|
||||
err = blkcipher_walk_done(desc, &walk, nbytes);
|
||||
err = skcipher_walk_done(&walk, nbytes);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/*! \fn int cbc_des_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes)
|
||||
* \ingroup IFX_DES_FUNCTIONS
|
||||
* \brief CBC DES decrypt using linux crypto blkcipher
|
||||
* \param desc blkcipher descriptor
|
||||
* \param dst output scatterlist
|
||||
* \param src input scatterlist
|
||||
* \param nbytes data size in bytes
|
||||
/*! \fn int cbc_des_encrypt(struct skcipher_req *req)
|
||||
* \ingroup IFX_AES_FUNCTIONS
|
||||
* \brief CBC DES decrypt using linux crypto skcipher
|
||||
* \param req skcipher request
|
||||
* \return err
|
||||
*/
|
||||
int cbc_des_decrypt(struct blkcipher_desc *desc,
|
||||
struct scatterlist *dst, struct scatterlist *src,
|
||||
unsigned int nbytes)
|
||||
*/
|
||||
int cbc_des_decrypt(struct skcipher_request *req)
|
||||
{
|
||||
struct des_ctx *ctx = crypto_blkcipher_ctx(desc->tfm);
|
||||
struct blkcipher_walk walk;
|
||||
struct ifx_deu_des_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
|
||||
struct skcipher_walk walk;
|
||||
int err;
|
||||
unsigned int dec_bytes;
|
||||
unsigned int dec_bytes, nbytes;
|
||||
|
||||
DPRINTF(1, "\n");
|
||||
blkcipher_walk_init(&walk, dst, src, nbytes);
|
||||
err = blkcipher_walk_virt(desc, &walk);
|
||||
err = skcipher_walk_virt(&walk, req, false);
|
||||
|
||||
while ((nbytes = dec_bytes = walk.nbytes)) {
|
||||
u8 *iv = walk.iv;
|
||||
@@ -626,7 +642,7 @@ int cbc_des_decrypt(struct blkcipher_desc *desc,
|
||||
ifx_deu_des_cbc(ctx, walk.dst.virt.addr, walk.src.virt.addr,
|
||||
iv, dec_bytes, CRYPTO_DIR_DECRYPT, 0);
|
||||
nbytes &= DES_BLOCK_SIZE - 1;
|
||||
err = blkcipher_walk_done(desc, &walk, nbytes);
|
||||
err = skcipher_walk_done(&walk, nbytes);
|
||||
}
|
||||
|
||||
return err;
|
||||
@@ -634,52 +650,42 @@ int cbc_des_decrypt(struct blkcipher_desc *desc,
|
||||
|
||||
/*
|
||||
* \brief DES function mappings
|
||||
*/
|
||||
struct crypto_alg ifxdeu_cbc_des_alg = {
|
||||
.cra_name = "cbc(des)",
|
||||
.cra_driver_name = "ifxdeu-cbc(des)",
|
||||
.cra_priority = 400,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
|
||||
.cra_blocksize = DES_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct des_ctx),
|
||||
.cra_type = &crypto_blkcipher_type,
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_list = LIST_HEAD_INIT(ifxdeu_cbc_des_alg.cra_list),
|
||||
.cra_u = {
|
||||
.blkcipher = {
|
||||
.min_keysize = DES_KEY_SIZE,
|
||||
.max_keysize = DES_KEY_SIZE,
|
||||
.ivsize = DES_BLOCK_SIZE,
|
||||
.setkey = des_setkey,
|
||||
.encrypt = cbc_des_encrypt,
|
||||
.decrypt = cbc_des_decrypt,
|
||||
}
|
||||
}
|
||||
*/
|
||||
struct skcipher_alg ifxdeu_cbc_des_alg = {
|
||||
.base.cra_name = "cbc(des)",
|
||||
.base.cra_driver_name = "ifxdeu-cbc(des)",
|
||||
.base.cra_priority = 400,
|
||||
.base.cra_flags = CRYPTO_ALG_TYPE_SKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.base.cra_blocksize = DES_BLOCK_SIZE,
|
||||
.base.cra_ctxsize = sizeof(struct ifx_deu_des_ctx),
|
||||
.base.cra_module = THIS_MODULE,
|
||||
.base.cra_list = LIST_HEAD_INIT(ifxdeu_cbc_des_alg.base.cra_list),
|
||||
.min_keysize = DES_KEY_SIZE,
|
||||
.max_keysize = DES_KEY_SIZE,
|
||||
.ivsize = DES_BLOCK_SIZE,
|
||||
.setkey = des_setkey_skcipher,
|
||||
.encrypt = cbc_des_encrypt,
|
||||
.decrypt = cbc_des_decrypt,
|
||||
};
|
||||
|
||||
/*
|
||||
* \brief DES function mappings
|
||||
*/
|
||||
struct crypto_alg ifxdeu_cbc_des3_ede_alg = {
|
||||
.cra_name = "cbc(des3_ede)",
|
||||
.cra_driver_name = "ifxdeu-cbc(des3_ede)",
|
||||
.cra_priority = 400,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER,
|
||||
.cra_blocksize = DES3_EDE_BLOCK_SIZE,
|
||||
.cra_ctxsize = sizeof(struct des_ctx),
|
||||
.cra_type = &crypto_blkcipher_type,
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_list = LIST_HEAD_INIT(ifxdeu_cbc_des3_ede_alg.cra_list),
|
||||
.cra_u = {
|
||||
.blkcipher = {
|
||||
.min_keysize = DES3_EDE_KEY_SIZE,
|
||||
.max_keysize = DES3_EDE_KEY_SIZE,
|
||||
.ivsize = DES_BLOCK_SIZE,
|
||||
.setkey = des3_ede_setkey,
|
||||
.encrypt = cbc_des_encrypt,
|
||||
.decrypt = cbc_des_decrypt,
|
||||
}
|
||||
}
|
||||
*/
|
||||
struct skcipher_alg ifxdeu_cbc_des3_ede_alg = {
|
||||
.base.cra_name = "cbc(des3_ede)",
|
||||
.base.cra_driver_name = "ifxdeu-cbc(des3_ede)",
|
||||
.base.cra_priority = 400,
|
||||
.base.cra_flags = CRYPTO_ALG_TYPE_SKCIPHER | CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.base.cra_blocksize = DES3_EDE_BLOCK_SIZE,
|
||||
.base.cra_ctxsize = sizeof(struct ifx_deu_des_ctx),
|
||||
.base.cra_module = THIS_MODULE,
|
||||
.base.cra_list = LIST_HEAD_INIT(ifxdeu_cbc_des3_ede_alg.base.cra_list),
|
||||
.min_keysize = DES3_EDE_KEY_SIZE,
|
||||
.max_keysize = DES3_EDE_KEY_SIZE,
|
||||
.ivsize = DES_BLOCK_SIZE,
|
||||
.setkey = des3_ede_setkey_skcipher,
|
||||
.encrypt = cbc_des_encrypt,
|
||||
.decrypt = cbc_des_decrypt,
|
||||
};
|
||||
|
||||
/*! \fn int ifxdeu_init_des (void)
|
||||
@@ -690,16 +696,17 @@ int ifxdeu_init_des (void)
|
||||
{
|
||||
int ret = -ENOSYS;
|
||||
|
||||
des_chip_init();
|
||||
|
||||
ret = crypto_register_alg(&ifxdeu_des_alg);
|
||||
if (ret < 0)
|
||||
goto des_err;
|
||||
|
||||
ret = crypto_register_alg(&ifxdeu_ecb_des_alg);
|
||||
ret = crypto_register_skcipher(&ifxdeu_ecb_des_alg);
|
||||
if (ret < 0)
|
||||
goto ecb_des_err;
|
||||
|
||||
ret = crypto_register_alg(&ifxdeu_cbc_des_alg);
|
||||
ret = crypto_register_skcipher(&ifxdeu_cbc_des_alg);
|
||||
if (ret < 0)
|
||||
goto cbc_des_err;
|
||||
|
||||
@@ -707,15 +714,14 @@ int ifxdeu_init_des (void)
|
||||
if (ret < 0)
|
||||
goto des3_ede_err;
|
||||
|
||||
ret = crypto_register_alg(&ifxdeu_ecb_des3_ede_alg);
|
||||
ret = crypto_register_skcipher(&ifxdeu_ecb_des3_ede_alg);
|
||||
if (ret < 0)
|
||||
goto ecb_des3_ede_err;
|
||||
|
||||
ret = crypto_register_alg(&ifxdeu_cbc_des3_ede_alg);
|
||||
ret = crypto_register_skcipher(&ifxdeu_cbc_des3_ede_alg);
|
||||
if (ret < 0)
|
||||
goto cbc_des3_ede_err;
|
||||
|
||||
des_chip_init();
|
||||
CRTCL_SECT_INIT;
|
||||
|
||||
|
||||
@@ -728,11 +734,11 @@ des_err:
|
||||
printk(KERN_ERR "IFX des initialization failed!\n");
|
||||
return ret;
|
||||
ecb_des_err:
|
||||
crypto_unregister_alg(&ifxdeu_ecb_des_alg);
|
||||
crypto_unregister_skcipher(&ifxdeu_ecb_des_alg);
|
||||
printk (KERN_ERR "IFX ecb_des initialization failed!\n");
|
||||
return ret;
|
||||
cbc_des_err:
|
||||
crypto_unregister_alg(&ifxdeu_cbc_des_alg);
|
||||
crypto_unregister_skcipher(&ifxdeu_cbc_des_alg);
|
||||
printk (KERN_ERR "IFX cbc_des initialization failed!\n");
|
||||
return ret;
|
||||
des3_ede_err:
|
||||
@@ -740,11 +746,11 @@ des3_ede_err:
|
||||
printk(KERN_ERR "IFX des3_ede initialization failed!\n");
|
||||
return ret;
|
||||
ecb_des3_ede_err:
|
||||
crypto_unregister_alg(&ifxdeu_ecb_des3_ede_alg);
|
||||
crypto_unregister_skcipher(&ifxdeu_ecb_des3_ede_alg);
|
||||
printk (KERN_ERR "IFX ecb_des3_ede initialization failed!\n");
|
||||
return ret;
|
||||
cbc_des3_ede_err:
|
||||
crypto_unregister_alg(&ifxdeu_cbc_des3_ede_alg);
|
||||
crypto_unregister_skcipher(&ifxdeu_cbc_des3_ede_alg);
|
||||
printk (KERN_ERR "IFX cbc_des3_ede initialization failed!\n");
|
||||
return ret;
|
||||
|
||||
@@ -757,11 +763,10 @@ cbc_des3_ede_err:
|
||||
void ifxdeu_fini_des (void)
|
||||
{
|
||||
crypto_unregister_alg (&ifxdeu_des_alg);
|
||||
crypto_unregister_alg (&ifxdeu_ecb_des_alg);
|
||||
crypto_unregister_alg (&ifxdeu_cbc_des_alg);
|
||||
crypto_unregister_skcipher (&ifxdeu_ecb_des_alg);
|
||||
crypto_unregister_skcipher (&ifxdeu_cbc_des_alg);
|
||||
crypto_unregister_alg (&ifxdeu_des3_ede_alg);
|
||||
crypto_unregister_alg (&ifxdeu_ecb_des3_ede_alg);
|
||||
crypto_unregister_alg (&ifxdeu_cbc_des3_ede_alg);
|
||||
crypto_unregister_skcipher (&ifxdeu_ecb_des3_ede_alg);
|
||||
crypto_unregister_skcipher (&ifxdeu_cbc_des3_ede_alg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,8 @@
|
||||
#endif /* CONFIG_xxxx */
|
||||
|
||||
int disable_deudma = 1;
|
||||
spinlock_t ltq_deu_hash_lock;
|
||||
EXPORT_SYMBOL_GPL(ltq_deu_hash_lock);
|
||||
|
||||
void chip_version(void);
|
||||
|
||||
@@ -84,6 +86,7 @@ static int ltq_deu_probe(struct platform_device *pdev)
|
||||
|
||||
|
||||
START_DEU_POWER;
|
||||
CRTCL_SECT_HASH_INIT;
|
||||
|
||||
#define IFX_DEU_DRV_VERSION "2.0.0"
|
||||
printk(KERN_INFO "Infineon Technologies DEU driver version %s \n", IFX_DEU_DRV_VERSION);
|
||||
|
||||
@@ -131,6 +131,10 @@ void __exit lqdeu_fini_async_des(void);
|
||||
void __exit deu_fini (void);
|
||||
int deu_dma_init (void);
|
||||
|
||||
extern spinlock_t ltq_deu_hash_lock;
|
||||
#define CRTCL_SECT_HASH_INIT spin_lock_init(<q_deu_hash_lock)
|
||||
#define CRTCL_SECT_HASH_START spin_lock_irqsave(<q_deu_hash_lock, flag)
|
||||
#define CRTCL_SECT_HASH_END spin_unlock_irqrestore(<q_deu_hash_lock, flag)
|
||||
|
||||
|
||||
#define DEU_WAKELIST_INIT(queue) \
|
||||
|
||||
@@ -117,6 +117,14 @@
|
||||
hash->controlr.INIT = 1; \
|
||||
} while(0)
|
||||
|
||||
#define MD5_HASH_INIT \
|
||||
do { \
|
||||
volatile struct deu_hash_t *hash = (struct deu_hash_t *) HASH_START; \
|
||||
hash->controlr.SM = 1; \
|
||||
hash->controlr.ALGO = 1; \
|
||||
hash->controlr.INIT = 1; \
|
||||
} while(0)
|
||||
|
||||
/* DEU Common Structures for AR9*/
|
||||
|
||||
struct clc_controlr_t {
|
||||
|
||||
@@ -104,6 +104,14 @@
|
||||
hash->controlr.INIT = 1; \
|
||||
} while(0)
|
||||
|
||||
#define MD5_HASH_INIT \
|
||||
do { \
|
||||
volatile struct deu_hash_t *hash = (struct deu_hash_t *) HASH_START; \
|
||||
hash->controlr.SM = 1; \
|
||||
hash->controlr.ALGO = 1; \
|
||||
hash->controlr.INIT = 1; \
|
||||
} while(0)
|
||||
|
||||
/* DEU STRUCTURES */
|
||||
|
||||
struct clc_controlr_t {
|
||||
|
||||
@@ -107,7 +107,7 @@ void aes_chip_init (void)
|
||||
|
||||
// start crypto engine with write to ILR
|
||||
aes->controlr.SM = 1;
|
||||
aes->controlr.NDC = 0;
|
||||
aes->controlr.NDC = 1;
|
||||
asm("sync");
|
||||
aes->controlr.ENDI = 1;
|
||||
asm("sync");
|
||||
|
||||
@@ -64,11 +64,6 @@
|
||||
#define MD5_HASH_WORDS 4
|
||||
#define HASH_START IFX_HASH_CON
|
||||
|
||||
static spinlock_t lock;
|
||||
#define CRTCL_SECT_INIT spin_lock_init(&lock)
|
||||
#define CRTCL_SECT_START spin_lock_irqsave(&lock, flag)
|
||||
#define CRTCL_SECT_END spin_unlock_irqrestore(&lock, flag)
|
||||
|
||||
//#define CRYPTO_DEBUG
|
||||
#ifdef CRYPTO_DEBUG
|
||||
extern char debug_level;
|
||||
@@ -86,18 +81,6 @@ struct md5_ctx {
|
||||
|
||||
extern int disable_deudma;
|
||||
|
||||
/*! \fn static u32 endian_swap(u32 input)
|
||||
* \ingroup IFX_MD5_FUNCTIONS
|
||||
* \brief perform dword level endian swap
|
||||
* \param input value of dword that requires to be swapped
|
||||
*/
|
||||
static u32 endian_swap(u32 input)
|
||||
{
|
||||
u8 *ptr = (u8 *)&input;
|
||||
|
||||
return ((ptr[3] << 24) | (ptr[2] << 16) | (ptr[1] << 8) | ptr[0]);
|
||||
}
|
||||
|
||||
/*! \fn static void md5_transform(u32 *hash, u32 const *in)
|
||||
* \ingroup IFX_MD5_FUNCTIONS
|
||||
* \brief main interface to md5 hardware
|
||||
@@ -110,18 +93,20 @@ static void md5_transform(struct md5_ctx *mctx, u32 *hash, u32 const *in)
|
||||
volatile struct deu_hash_t *hashs = (struct deu_hash_t *) HASH_START;
|
||||
unsigned long flag;
|
||||
|
||||
CRTCL_SECT_START;
|
||||
CRTCL_SECT_HASH_START;
|
||||
|
||||
MD5_HASH_INIT;
|
||||
|
||||
if (mctx->started) {
|
||||
hashs->D1R = endian_swap(*((u32 *) hash + 0));
|
||||
hashs->D2R = endian_swap(*((u32 *) hash + 1));
|
||||
hashs->D3R = endian_swap(*((u32 *) hash + 2));
|
||||
hashs->D4R = endian_swap(*((u32 *) hash + 3));
|
||||
hashs->D1R = *((u32 *) hash + 0);
|
||||
hashs->D2R = *((u32 *) hash + 1);
|
||||
hashs->D3R = *((u32 *) hash + 2);
|
||||
hashs->D4R = *((u32 *) hash + 3);
|
||||
}
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
hashs->MR = endian_swap(in[i]);
|
||||
// printk("in[%d]: %08x\n", i, endian_swap(in[i]));
|
||||
hashs->MR = in[i];
|
||||
// printk("in[%d]: %08x\n", i, in[i]);
|
||||
};
|
||||
|
||||
//wait for processing
|
||||
@@ -129,14 +114,14 @@ static void md5_transform(struct md5_ctx *mctx, u32 *hash, u32 const *in)
|
||||
// this will not take long
|
||||
}
|
||||
|
||||
*((u32 *) hash + 0) = endian_swap (hashs->D1R);
|
||||
*((u32 *) hash + 1) = endian_swap (hashs->D2R);
|
||||
*((u32 *) hash + 2) = endian_swap (hashs->D3R);
|
||||
*((u32 *) hash + 3) = endian_swap (hashs->D4R);
|
||||
*((u32 *) hash + 0) = hashs->D1R;
|
||||
*((u32 *) hash + 1) = hashs->D2R;
|
||||
*((u32 *) hash + 2) = hashs->D3R;
|
||||
*((u32 *) hash + 3) = hashs->D4R;
|
||||
|
||||
mctx->started = 1;
|
||||
CRTCL_SECT_HASH_END;
|
||||
|
||||
CRTCL_SECT_END;
|
||||
mctx->started = 1;
|
||||
}
|
||||
|
||||
/*! \fn static inline void md5_transform_helper(struct md5_ctx *ctx)
|
||||
@@ -160,11 +145,6 @@ static int md5_init(struct shash_desc *desc)
|
||||
struct md5_ctx *mctx = shash_desc_ctx(desc);
|
||||
volatile struct deu_hash_t *hash = (struct deu_hash_t *) HASH_START;
|
||||
|
||||
hash->controlr.ENDI = 0;
|
||||
hash->controlr.SM = 1;
|
||||
hash->controlr.ALGO = 1; // 1 = md5 0 = sha1
|
||||
hash->controlr.INIT = 1; // Initialize the hash operation by writing a '1' to the INIT bit.
|
||||
|
||||
mctx->byte_count = 0;
|
||||
mctx->started = 0;
|
||||
return 0;
|
||||
@@ -232,24 +212,12 @@ static int md5_final(struct shash_desc *desc, u8 *out)
|
||||
}
|
||||
|
||||
memset(p, 0, padding);
|
||||
mctx->block[14] = endian_swap(mctx->byte_count << 3);
|
||||
mctx->block[15] = endian_swap(mctx->byte_count >> 29);
|
||||
|
||||
#if 0
|
||||
le32_to_cpu_array(mctx->block, (sizeof(mctx->block) -
|
||||
sizeof(u64)) / sizeof(u32));
|
||||
#endif
|
||||
mctx->block[14] = le32_to_cpu(mctx->byte_count << 3);
|
||||
mctx->block[15] = le32_to_cpu(mctx->byte_count >> 29);
|
||||
|
||||
md5_transform(mctx, mctx->hash, mctx->block);
|
||||
|
||||
CRTCL_SECT_START;
|
||||
|
||||
*((u32 *) out + 0) = endian_swap (hashs->D1R);
|
||||
*((u32 *) out + 1) = endian_swap (hashs->D2R);
|
||||
*((u32 *) out + 2) = endian_swap (hashs->D3R);
|
||||
*((u32 *) out + 3) = endian_swap (hashs->D4R);
|
||||
|
||||
CRTCL_SECT_END;
|
||||
memcpy(out, mctx->hash, MD5_DIGEST_SIZE);
|
||||
|
||||
// Wipe context
|
||||
memset(mctx, 0, sizeof(*mctx));
|
||||
@@ -270,7 +238,7 @@ static struct shash_alg ifxdeu_md5_alg = {
|
||||
.cra_name = "md5",
|
||||
.cra_driver_name= "ifxdeu-md5",
|
||||
.cra_priority = 300,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_HASH,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_HASH | CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.cra_blocksize = MD5_HMAC_BLOCK_SIZE,
|
||||
.cra_module = THIS_MODULE,
|
||||
}
|
||||
@@ -288,8 +256,6 @@ int ifxdeu_init_md5 (void)
|
||||
if ((ret = crypto_register_shash(&ifxdeu_md5_alg)))
|
||||
goto md5_err;
|
||||
|
||||
CRTCL_SECT_INIT;
|
||||
|
||||
printk (KERN_NOTICE "IFX DEU MD5 initialized%s.\n", disable_deudma ? "" : " (DMA)");
|
||||
return ret;
|
||||
|
||||
@@ -308,4 +274,3 @@ void ifxdeu_fini_md5 (void)
|
||||
crypto_unregister_shash(&ifxdeu_md5_alg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -63,11 +63,6 @@
|
||||
#define MD5_HMAC_DBN_TEMP_SIZE 1024 // size in dword, needed for dbn workaround
|
||||
#define HASH_START IFX_HASH_CON
|
||||
|
||||
static spinlock_t lock;
|
||||
#define CRTCL_SECT_INIT spin_lock_init(&lock)
|
||||
#define CRTCL_SECT_START spin_lock_irqsave(&lock, flag)
|
||||
#define CRTCL_SECT_END spin_unlock_irqrestore(&lock, flag)
|
||||
|
||||
//#define CRYPTO_DEBUG
|
||||
#ifdef CRYPTO_DEBUG
|
||||
extern char debug_level;
|
||||
@@ -84,24 +79,15 @@ struct md5_hmac_ctx {
|
||||
u32 block[MD5_BLOCK_WORDS];
|
||||
u64 byte_count;
|
||||
u32 dbn;
|
||||
int started;
|
||||
unsigned int keylen;
|
||||
struct shash_desc *desc;
|
||||
u32 (*temp)[MD5_BLOCK_WORDS];
|
||||
};
|
||||
|
||||
static u32 temp[MD5_HMAC_DBN_TEMP_SIZE];
|
||||
|
||||
extern int disable_deudma;
|
||||
|
||||
/*! \fn static u32 endian_swap(u32 input)
|
||||
* \ingroup IFX_MD5_HMAC_FUNCTIONS
|
||||
* \brief perform dword level endian swap
|
||||
* \param input value of dword that requires to be swapped
|
||||
*/
|
||||
static u32 endian_swap(u32 input)
|
||||
{
|
||||
u8 *ptr = (u8 *)&input;
|
||||
|
||||
return ((ptr[3] << 24) | (ptr[2] << 16) | (ptr[1] << 8) | ptr[0]);
|
||||
}
|
||||
static int md5_hmac_final_impl(struct shash_desc *desc, u8 *out, bool hash_final);
|
||||
|
||||
/*! \fn static void md5_hmac_transform(struct crypto_tfm *tfm, u32 const *in)
|
||||
* \ingroup IFX_MD5_HMAC_FUNCTIONS
|
||||
@@ -113,14 +99,14 @@ static void md5_hmac_transform(struct shash_desc *desc, u32 const *in)
|
||||
{
|
||||
struct md5_hmac_ctx *mctx = crypto_shash_ctx(desc->tfm);
|
||||
|
||||
memcpy(&temp[mctx->dbn<<4], in, 64); //dbn workaround
|
||||
mctx->dbn += 1;
|
||||
|
||||
if ( (mctx->dbn<<4) > MD5_HMAC_DBN_TEMP_SIZE )
|
||||
if ( ((mctx->dbn<<4)+1) > MD5_HMAC_DBN_TEMP_SIZE )
|
||||
{
|
||||
printk("MD5_HMAC_DBN_TEMP_SIZE exceeded\n");
|
||||
//printk("MD5_HMAC_DBN_TEMP_SIZE exceeded\n");
|
||||
md5_hmac_final_impl(desc, (u8 *)mctx->hash, false);
|
||||
}
|
||||
|
||||
memcpy(&mctx->temp[mctx->dbn], in, 64); //dbn workaround
|
||||
mctx->dbn += 1;
|
||||
}
|
||||
|
||||
/*! \fn int md5_hmac_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen)
|
||||
@@ -133,41 +119,46 @@ static void md5_hmac_transform(struct shash_desc *desc, u32 const *in)
|
||||
static int md5_hmac_setkey(struct crypto_shash *tfm, const u8 *key, unsigned int keylen)
|
||||
{
|
||||
struct md5_hmac_ctx *mctx = crypto_shash_ctx(tfm);
|
||||
volatile struct deu_hash_t *hash = (struct deu_hash_t *) HASH_START;
|
||||
int err;
|
||||
//printk("copying keys to context with length %d\n", keylen);
|
||||
|
||||
if (keylen > MAX_HASH_KEYLEN) {
|
||||
printk("Key length more than what DEU hash can handle\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
char *hash_alg_name = "md5";
|
||||
|
||||
hash->KIDX |= 0x80000000; // reset all 16 words of the key to '0'
|
||||
memcpy(&mctx->key, key, keylen);
|
||||
mctx->keylen = keylen;
|
||||
mctx->desc->tfm = crypto_alloc_shash(hash_alg_name, 0, 0);
|
||||
if (IS_ERR(mctx->desc->tfm)) return PTR_ERR(mctx->desc->tfm);
|
||||
|
||||
memset(mctx->key, 0, MAX_HASH_KEYLEN);
|
||||
err = crypto_shash_digest(mctx->desc, key, keylen, mctx->key);
|
||||
if (err) return err;
|
||||
|
||||
mctx->keylen = MD5_DIGEST_SIZE;
|
||||
|
||||
crypto_free_shash(mctx->desc->tfm);
|
||||
} else {
|
||||
memcpy(mctx->key, key, keylen);
|
||||
mctx->keylen = keylen;
|
||||
}
|
||||
memset(mctx->key + mctx->keylen, 0, MAX_HASH_KEYLEN - mctx->keylen);
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*! \fn int md5_hmac_setkey_hw(const u8 *key, unsigned int keylen)
|
||||
* \ingroup IFX_MD5_HMAC_FUNCTIONS
|
||||
* \brief sets md5 hmac key into the hardware registers
|
||||
* \param key input key
|
||||
* \param keylen key length greater than 64 bytes IS NOT SUPPORTED
|
||||
*/
|
||||
|
||||
static int md5_hmac_setkey_hw(const u8 *key, unsigned int keylen)
|
||||
{
|
||||
volatile struct deu_hash_t *hash = (struct deu_hash_t *) HASH_START;
|
||||
unsigned long flag;
|
||||
int i, j;
|
||||
u32 *in_key = (u32 *)key;
|
||||
|
||||
//printk("\nsetkey keylen: %d\n key: ", keylen);
|
||||
|
||||
CRTCL_SECT_START;
|
||||
hash->KIDX |= 0x80000000; // reset all 16 words of the key to '0'
|
||||
j = 0;
|
||||
for (i = 0; i < keylen; i+=4)
|
||||
{
|
||||
@@ -177,7 +168,6 @@ static int md5_hmac_setkey_hw(const u8 *key, unsigned int keylen)
|
||||
asm("sync");
|
||||
j++;
|
||||
}
|
||||
CRTCL_SECT_END;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -194,11 +184,11 @@ static int md5_hmac_init(struct shash_desc *desc)
|
||||
|
||||
|
||||
mctx->dbn = 0; //dbn workaround
|
||||
md5_hmac_setkey_hw(mctx->key, mctx->keylen);
|
||||
mctx->started = 0;
|
||||
mctx->byte_count = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(md5_hmac_init);
|
||||
|
||||
/*! \fn void md5_hmac_update(struct crypto_tfm *tfm, const u8 *data, unsigned int len)
|
||||
* \ingroup IFX_MD5_HMAC_FUNCTIONS
|
||||
@@ -237,15 +227,26 @@ static int md5_hmac_update(struct shash_desc *desc, const u8 *data, unsigned int
|
||||
memcpy(mctx->block, data, len);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(md5_hmac_update);
|
||||
|
||||
/*! \fn void md5_hmac_final(struct crypto_tfm *tfm, u8 *out)
|
||||
/*! \fn static int md5_hmac_final(struct crypto_tfm *tfm, u8 *out)
|
||||
* \ingroup IFX_MD5_HMAC_FUNCTIONS
|
||||
* \brief compute final md5 hmac value
|
||||
* \brief call md5_hmac_final_impl with hash_final true
|
||||
* \param tfm linux crypto algo transform
|
||||
* \param out final md5 hmac output value
|
||||
*/
|
||||
static int md5_hmac_final(struct shash_desc *desc, u8 *out)
|
||||
{
|
||||
return md5_hmac_final_impl(desc, out, true);
|
||||
}
|
||||
|
||||
/*! \fn static int md5_hmac_final_impl(struct crypto_tfm *tfm, u8 *out, bool hash_final)
|
||||
* \ingroup IFX_MD5_HMAC_FUNCTIONS
|
||||
* \brief compute final or intermediate md5 hmac value
|
||||
* \param tfm linux crypto algo transform
|
||||
* \param out final md5 hmac output value
|
||||
* \param in finalize or intermediate processing
|
||||
*/
|
||||
static int md5_hmac_final_impl(struct shash_desc *desc, u8 *out, bool hash_final)
|
||||
{
|
||||
struct md5_hmac_ctx *mctx = crypto_shash_ctx(desc->tfm);
|
||||
const unsigned int offset = mctx->byte_count & 0x3f;
|
||||
@@ -255,27 +256,36 @@ static int md5_hmac_final(struct shash_desc *desc, u8 *out)
|
||||
unsigned long flag;
|
||||
int i = 0;
|
||||
int dbn;
|
||||
u32 *in = &temp[0];
|
||||
u32 *in = mctx->temp[0];
|
||||
|
||||
if (hash_final) {
|
||||
*p++ = 0x80;
|
||||
if (padding < 0) {
|
||||
memset(p, 0x00, padding + sizeof (u64));
|
||||
md5_hmac_transform(desc, mctx->block);
|
||||
p = (char *)mctx->block;
|
||||
padding = 56;
|
||||
}
|
||||
|
||||
memset(p, 0, padding);
|
||||
mctx->block[14] = le32_to_cpu((mctx->byte_count + 64) << 3); // need to add 512 bit of the IPAD operation
|
||||
mctx->block[15] = 0x00000000;
|
||||
|
||||
*p++ = 0x80;
|
||||
if (padding < 0) {
|
||||
memset(p, 0x00, padding + sizeof (u64));
|
||||
md5_hmac_transform(desc, mctx->block);
|
||||
p = (char *)mctx->block;
|
||||
padding = 56;
|
||||
}
|
||||
|
||||
memset(p, 0, padding);
|
||||
mctx->block[14] = endian_swap((mctx->byte_count + 64) << 3); // need to add 512 bit of the IPAD operation
|
||||
mctx->block[15] = 0x00000000;
|
||||
CRTCL_SECT_HASH_START;
|
||||
|
||||
md5_hmac_transform(desc, mctx->block);
|
||||
MD5_HASH_INIT;
|
||||
|
||||
CRTCL_SECT_START;
|
||||
md5_hmac_setkey_hw(mctx->key, mctx->keylen);
|
||||
|
||||
//printk("\ndbn = %d\n", mctx->dbn);
|
||||
hashs->DBN = mctx->dbn;
|
||||
if (hash_final) {
|
||||
hashs->DBN = mctx->dbn;
|
||||
} else {
|
||||
hashs->DBN = mctx->dbn + 5;
|
||||
}
|
||||
asm("sync");
|
||||
|
||||
*IFX_HASH_CON = 0x0703002D; //khs, go, init, ndc, endi, kyue, hmen, md5
|
||||
@@ -285,6 +295,15 @@ static int md5_hmac_final(struct shash_desc *desc, u8 *out)
|
||||
// this will not take long
|
||||
}
|
||||
|
||||
if (mctx->started) {
|
||||
hashs->D1R = *((u32 *) mctx->hash + 0);
|
||||
hashs->D2R = *((u32 *) mctx->hash + 1);
|
||||
hashs->D3R = *((u32 *) mctx->hash + 2);
|
||||
hashs->D4R = *((u32 *) mctx->hash + 3);
|
||||
} else {
|
||||
mctx->started = 1;
|
||||
}
|
||||
|
||||
for (dbn = 0; dbn < mctx->dbn; dbn++)
|
||||
{
|
||||
for (i = 0; i < 16; i++) {
|
||||
@@ -302,11 +321,12 @@ static int md5_hmac_final(struct shash_desc *desc, u8 *out)
|
||||
in += 16;
|
||||
}
|
||||
|
||||
|
||||
#if 1
|
||||
//wait for digest ready
|
||||
while (! hashs->controlr.DGRY) {
|
||||
// this will not take long
|
||||
if (hash_final) {
|
||||
//wait for digest ready
|
||||
while (! hashs->controlr.DGRY) {
|
||||
// this will not take long
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -314,26 +334,49 @@ static int md5_hmac_final(struct shash_desc *desc, u8 *out)
|
||||
*((u32 *) out + 1) = hashs->D2R;
|
||||
*((u32 *) out + 2) = hashs->D3R;
|
||||
*((u32 *) out + 3) = hashs->D4R;
|
||||
*((u32 *) out + 4) = hashs->D5R;
|
||||
|
||||
/* reset the context after we finish with the hash */
|
||||
mctx->byte_count = 0;
|
||||
memset(&mctx->hash[0], 0, sizeof(MD5_HASH_WORDS));
|
||||
memset(&mctx->block[0], 0, sizeof(MD5_BLOCK_WORDS));
|
||||
memset(&temp[0], 0, MD5_HMAC_DBN_TEMP_SIZE);
|
||||
CRTCL_SECT_HASH_END;
|
||||
|
||||
CRTCL_SECT_END;
|
||||
|
||||
|
||||
return 0;
|
||||
if (hash_final) {
|
||||
/* reset the context after we finish with the hash */
|
||||
md5_hmac_init(desc);
|
||||
} else {
|
||||
mctx->dbn = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(md5_hmac_final);
|
||||
/*! \fn void md5_hmac_init_tfm(struct crypto_tfm *tfm)
|
||||
* \ingroup IFX_MD5_HMAC_FUNCTIONS
|
||||
* \brief initialize pointers in md5_hmac_ctx
|
||||
* \param tfm linux crypto algo transform
|
||||
*/
|
||||
static int md5_hmac_init_tfm(struct crypto_tfm *tfm)
|
||||
{
|
||||
struct md5_hmac_ctx *mctx = crypto_tfm_ctx(tfm);
|
||||
mctx->temp = kzalloc(4 * MD5_HMAC_DBN_TEMP_SIZE, GFP_KERNEL);
|
||||
if (IS_ERR(mctx->temp)) return PTR_ERR(mctx->temp);
|
||||
mctx->desc = kzalloc(sizeof(struct shash_desc), GFP_KERNEL);
|
||||
if (IS_ERR(mctx->desc)) return PTR_ERR(mctx->desc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \fn void md5_hmac_exit_tfm(struct crypto_tfm *tfm)
|
||||
* \ingroup IFX_MD5_HMAC_FUNCTIONS
|
||||
* \brief free pointers in md5_hmac_ctx
|
||||
* \param tfm linux crypto algo transform
|
||||
*/
|
||||
static void md5_hmac_exit_tfm(struct crypto_tfm *tfm)
|
||||
{
|
||||
struct md5_hmac_ctx *mctx = crypto_tfm_ctx(tfm);
|
||||
kfree(mctx->temp);
|
||||
kfree(mctx->desc);
|
||||
}
|
||||
|
||||
/*
|
||||
* \brief MD5_HMAC function mappings
|
||||
*/
|
||||
|
||||
static struct shash_alg ifxdeu_md5_hmac_alg = {
|
||||
.digestsize = MD5_DIGEST_SIZE,
|
||||
.init = md5_hmac_init,
|
||||
@@ -345,10 +388,12 @@ static struct shash_alg ifxdeu_md5_hmac_alg = {
|
||||
.cra_name = "hmac(md5)",
|
||||
.cra_driver_name= "ifxdeu-md5_hmac",
|
||||
.cra_priority = 400,
|
||||
.cra_ctxsize = sizeof(struct md5_hmac_ctx),
|
||||
.cra_flags = CRYPTO_ALG_TYPE_HASH,
|
||||
.cra_ctxsize = sizeof(struct md5_hmac_ctx),
|
||||
.cra_flags = CRYPTO_ALG_TYPE_HASH | CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.cra_blocksize = MD5_HMAC_BLOCK_SIZE,
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_init = md5_hmac_init_tfm,
|
||||
.cra_exit = md5_hmac_exit_tfm,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -365,8 +410,6 @@ int ifxdeu_init_md5_hmac (void)
|
||||
if ((ret = crypto_register_shash(&ifxdeu_md5_hmac_alg)))
|
||||
goto md5_hmac_err;
|
||||
|
||||
CRTCL_SECT_INIT;
|
||||
|
||||
printk (KERN_NOTICE "IFX DEU MD5_HMAC initialized%s.\n", disable_deudma ? "" : " (DMA)");
|
||||
return ret;
|
||||
|
||||
@@ -383,5 +426,3 @@ void ifxdeu_fini_md5_hmac (void)
|
||||
{
|
||||
crypto_unregister_shash(&ifxdeu_md5_hmac_alg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -38,14 +38,13 @@
|
||||
\brief ifx deu sha1 functions
|
||||
*/
|
||||
|
||||
|
||||
/* Project header */
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/crypto.h>
|
||||
#include <linux/cryptohash.h>
|
||||
#include <crypto/sha.h>
|
||||
#include <crypto/hash.h>
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/scatterlist.h>
|
||||
@@ -65,11 +64,6 @@
|
||||
#define SHA1_HMAC_BLOCK_SIZE 64
|
||||
#define HASH_START IFX_HASH_CON
|
||||
|
||||
static spinlock_t lock;
|
||||
#define CRTCL_SECT_INIT spin_lock_init(&lock)
|
||||
#define CRTCL_SECT_START spin_lock_irqsave(&lock, flag)
|
||||
#define CRTCL_SECT_END spin_unlock_irqrestore(&lock, flag)
|
||||
|
||||
//#define CRYPTO_DEBUG
|
||||
#ifdef CRYPTO_DEBUG
|
||||
extern char debug_level;
|
||||
@@ -91,20 +85,21 @@ struct sha1_ctx {
|
||||
|
||||
extern int disable_deudma;
|
||||
|
||||
|
||||
/*! \fn static void sha1_transform (u32 *state, const u32 *in)
|
||||
/*! \fn static void sha1_transform1 (u32 *state, const u32 *in)
|
||||
* \ingroup IFX_SHA1_FUNCTIONS
|
||||
* \brief main interface to sha1 hardware
|
||||
* \param state current state
|
||||
* \param in 64-byte block of input
|
||||
*/
|
||||
static void sha1_transform (struct sha1_ctx *sctx, u32 *state, const u32 *in)
|
||||
static void sha1_transform1 (struct sha1_ctx *sctx, u32 *state, const u32 *in)
|
||||
{
|
||||
int i = 0;
|
||||
volatile struct deu_hash_t *hashs = (struct deu_hash_t *) HASH_START;
|
||||
unsigned long flag;
|
||||
|
||||
CRTCL_SECT_START;
|
||||
CRTCL_SECT_HASH_START;
|
||||
|
||||
SHA_HASH_INIT;
|
||||
|
||||
/* For context switching purposes, the previous hash output
|
||||
* is loaded back into the output register
|
||||
@@ -137,20 +132,18 @@ static void sha1_transform (struct sha1_ctx *sctx, u32 *state, const u32 *in)
|
||||
|
||||
sctx->started = 1;
|
||||
|
||||
CRTCL_SECT_END;
|
||||
CRTCL_SECT_HASH_END;
|
||||
}
|
||||
|
||||
/*! \fn static void sha1_init(struct crypto_tfm *tfm)
|
||||
/*! \fn static void sha1_init1(struct crypto_tfm *tfm)
|
||||
* \ingroup IFX_SHA1_FUNCTIONS
|
||||
* \brief initialize sha1 hardware
|
||||
* \param tfm linux crypto algo transform
|
||||
*/
|
||||
static int sha1_init(struct shash_desc *desc)
|
||||
static int sha1_init1(struct shash_desc *desc)
|
||||
{
|
||||
struct sha1_ctx *sctx = shash_desc_ctx(desc);
|
||||
|
||||
SHA_HASH_INIT;
|
||||
|
||||
sctx->started = 0;
|
||||
sctx->count = 0;
|
||||
return 0;
|
||||
@@ -174,9 +167,9 @@ static int sha1_update(struct shash_desc * desc, const u8 *data,
|
||||
|
||||
if ((j + len) > 63) {
|
||||
memcpy (&sctx->buffer[j], data, (i = 64 - j));
|
||||
sha1_transform (sctx, sctx->state, (const u32 *)sctx->buffer);
|
||||
sha1_transform1 (sctx, sctx->state, (const u32 *)sctx->buffer);
|
||||
for (; i + 63 < len; i += 64) {
|
||||
sha1_transform (sctx, sctx->state, (const u32 *)&data[i]);
|
||||
sha1_transform1 (sctx, sctx->state, (const u32 *)&data[i]);
|
||||
}
|
||||
|
||||
j = 0;
|
||||
@@ -229,15 +222,7 @@ static int sha1_final(struct shash_desc *desc, u8 *out)
|
||||
/* Append length */
|
||||
sha1_update (desc, bits, sizeof bits);
|
||||
|
||||
CRTCL_SECT_START;
|
||||
|
||||
*((u32 *) out + 0) = hashs->D1R;
|
||||
*((u32 *) out + 1) = hashs->D2R;
|
||||
*((u32 *) out + 2) = hashs->D3R;
|
||||
*((u32 *) out + 3) = hashs->D4R;
|
||||
*((u32 *) out + 4) = hashs->D5R;
|
||||
|
||||
CRTCL_SECT_END;
|
||||
memcpy(out, sctx->hash, SHA1_DIGEST_SIZE);
|
||||
|
||||
// Wipe context
|
||||
memset (sctx, 0, sizeof *sctx);
|
||||
@@ -250,7 +235,7 @@ static int sha1_final(struct shash_desc *desc, u8 *out)
|
||||
*/
|
||||
static struct shash_alg ifxdeu_sha1_alg = {
|
||||
.digestsize = SHA1_DIGEST_SIZE,
|
||||
.init = sha1_init,
|
||||
.init = sha1_init1,
|
||||
.update = sha1_update,
|
||||
.final = sha1_final,
|
||||
.descsize = sizeof(struct sha1_ctx),
|
||||
@@ -259,7 +244,7 @@ static struct shash_alg ifxdeu_sha1_alg = {
|
||||
.cra_name = "sha1",
|
||||
.cra_driver_name= "ifxdeu-sha1",
|
||||
.cra_priority = 300,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_HASH,
|
||||
.cra_flags = CRYPTO_ALG_TYPE_HASH | CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.cra_blocksize = SHA1_HMAC_BLOCK_SIZE,
|
||||
.cra_module = THIS_MODULE,
|
||||
}
|
||||
@@ -278,8 +263,6 @@ int ifxdeu_init_sha1 (void)
|
||||
if ((ret = crypto_register_shash(&ifxdeu_sha1_alg)))
|
||||
goto sha1_err;
|
||||
|
||||
CRTCL_SECT_INIT;
|
||||
|
||||
printk (KERN_NOTICE "IFX DEU SHA1 initialized%s.\n", disable_deudma ? "" : " (DMA)");
|
||||
return ret;
|
||||
|
||||
@@ -298,5 +281,3 @@ void ifxdeu_fini_sha1 (void)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -38,14 +38,13 @@
|
||||
\brief ifx sha1 hmac functions
|
||||
*/
|
||||
|
||||
|
||||
/* Project header */
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/crypto.h>
|
||||
#include <linux/cryptohash.h>
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <crypto/sha.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/scatterlist.h>
|
||||
#include <asm/byteorder.h>
|
||||
@@ -60,17 +59,14 @@
|
||||
#endif
|
||||
|
||||
#define SHA1_DIGEST_SIZE 20
|
||||
#define SHA1_BLOCK_WORDS 16
|
||||
#define SHA1_HASH_WORDS 5
|
||||
#define SHA1_HMAC_BLOCK_SIZE 64
|
||||
#define SHA1_HMAC_DBN_TEMP_SIZE 1024 // size in dword, needed for dbn workaround
|
||||
#define HASH_START IFX_HASH_CON
|
||||
|
||||
#define SHA1_HMAC_MAX_KEYLEN 64
|
||||
|
||||
static spinlock_t lock;
|
||||
#define CRTCL_SECT_INIT spin_lock_init(&lock)
|
||||
#define CRTCL_SECT_START spin_lock_irqsave(&lock, flag)
|
||||
#define CRTCL_SECT_END spin_unlock_irqrestore(&lock, flag)
|
||||
|
||||
#ifdef CRYPTO_DEBUG
|
||||
extern char debug_level;
|
||||
#define DPRINTF(level, format, args...) if (level < debug_level) printk(KERN_INFO "[%s %s %d]: " format, __FILE__, __func__, __LINE__, ##args);
|
||||
@@ -83,16 +79,19 @@ struct sha1_hmac_ctx {
|
||||
|
||||
u8 buffer[SHA1_HMAC_BLOCK_SIZE];
|
||||
u8 key[SHA1_HMAC_MAX_KEYLEN];
|
||||
u32 state[5];
|
||||
u32 hash[SHA1_HASH_WORDS];
|
||||
u32 dbn;
|
||||
int started;
|
||||
u64 count;
|
||||
|
||||
struct shash_desc *desc;
|
||||
u32 (*temp)[SHA1_BLOCK_WORDS];
|
||||
};
|
||||
|
||||
static u32 temp[SHA1_HMAC_DBN_TEMP_SIZE];
|
||||
|
||||
extern int disable_deudma;
|
||||
|
||||
static int sha1_hmac_final_impl(struct shash_desc *desc, u8 *out, bool hash_final);
|
||||
|
||||
/*! \fn static void sha1_hmac_transform(struct crypto_tfm *tfm, u32 const *in)
|
||||
* \ingroup IFX_SHA1_HMAC_FUNCTIONS
|
||||
* \brief save input block to context
|
||||
@@ -103,14 +102,15 @@ static int sha1_hmac_transform(struct shash_desc *desc, u32 const *in)
|
||||
{
|
||||
struct sha1_hmac_ctx *sctx = crypto_shash_ctx(desc->tfm);
|
||||
|
||||
memcpy(&temp[sctx->dbn<<4], in, 64); //dbn workaround
|
||||
sctx->dbn += 1;
|
||||
|
||||
if ( (sctx->dbn<<4) > SHA1_HMAC_DBN_TEMP_SIZE )
|
||||
if ( ((sctx->dbn<<4)+1) > SHA1_HMAC_DBN_TEMP_SIZE )
|
||||
{
|
||||
printk("SHA1_HMAC_DBN_TEMP_SIZE exceeded\n");
|
||||
//printk("SHA1_HMAC_DBN_TEMP_SIZE exceeded\n");
|
||||
sha1_hmac_final_impl(desc, (u8 *)sctx->hash, false);
|
||||
}
|
||||
|
||||
|
||||
memcpy(&sctx->temp[sctx->dbn], in, 64); //dbn workaround
|
||||
sctx->dbn += 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -124,24 +124,32 @@ static int sha1_hmac_transform(struct shash_desc *desc, u32 const *in)
|
||||
static int sha1_hmac_setkey(struct crypto_shash *tfm, const u8 *key, unsigned int keylen)
|
||||
{
|
||||
struct sha1_hmac_ctx *sctx = crypto_shash_ctx(tfm);
|
||||
volatile struct deu_hash_t *hashs = (struct deu_hash_t *) HASH_START;
|
||||
|
||||
int err;
|
||||
|
||||
if (keylen > SHA1_HMAC_MAX_KEYLEN) {
|
||||
printk("Key length exceeds maximum key length\n");
|
||||
return -EINVAL;
|
||||
char *hash_alg_name = "sha1";
|
||||
|
||||
sctx->desc->tfm = crypto_alloc_shash(hash_alg_name, 0, 0);
|
||||
if (IS_ERR(sctx->desc->tfm)) return PTR_ERR(sctx->desc->tfm);
|
||||
|
||||
memset(sctx->key, 0, SHA1_HMAC_MAX_KEYLEN);
|
||||
err = crypto_shash_digest(sctx->desc, key, keylen, sctx->key);
|
||||
if (err) return err;
|
||||
|
||||
sctx->keylen = SHA1_DIGEST_SIZE;
|
||||
|
||||
crypto_free_shash(sctx->desc->tfm);
|
||||
} else {
|
||||
memcpy(sctx->key, key, keylen);
|
||||
sctx->keylen = keylen;
|
||||
}
|
||||
memset(sctx->key + sctx->keylen, 0, SHA1_HMAC_MAX_KEYLEN - sctx->keylen);
|
||||
|
||||
//printk("Setting keys of len: %d\n", keylen);
|
||||
|
||||
hashs->KIDX |= 0x80000000; //reset keys back to 0
|
||||
memcpy(&sctx->key, key, keylen);
|
||||
sctx->keylen = keylen;
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*! \fn int sha1_hmac_setkey_hw(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen)
|
||||
* \ingroup IFX_SHA1_HMAC_FUNCTIONS
|
||||
* \brief sets sha1 hmac key into hw registers
|
||||
@@ -153,12 +161,11 @@ static int sha1_hmac_setkey_hw(const u8 *key, unsigned int keylen)
|
||||
{
|
||||
volatile struct deu_hash_t *hash = (struct deu_hash_t *) HASH_START;
|
||||
int i, j;
|
||||
unsigned long flag;
|
||||
u32 *in_key = (u32 *)key;
|
||||
|
||||
j = 0;
|
||||
|
||||
CRTCL_SECT_START;
|
||||
hash->KIDX |= 0x80000000; //reset keys back to 0
|
||||
for (i = 0; i < keylen; i+=4)
|
||||
{
|
||||
hash->KIDX = j;
|
||||
@@ -167,7 +174,6 @@ static int sha1_hmac_setkey_hw(const u8 *key, unsigned int keylen)
|
||||
j++;
|
||||
}
|
||||
|
||||
CRTCL_SECT_END;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -182,7 +188,8 @@ static int sha1_hmac_init(struct shash_desc *desc)
|
||||
|
||||
//printk("debug ln: %d, fn: %s\n", __LINE__, __func__);
|
||||
sctx->dbn = 0; //dbn workaround
|
||||
sha1_hmac_setkey_hw(sctx->key, sctx->keylen);
|
||||
sctx->started = 0;
|
||||
sctx->count = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -220,15 +227,26 @@ static int sha1_hmac_update(struct shash_desc *desc, const u8 *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \fn static void sha1_hmac_final(struct crypto_tfm *tfm, u8 *out)
|
||||
/*! \fn static int sha1_hmac_final(struct crypto_tfm *tfm, u8 *out)
|
||||
* \ingroup IFX_SHA1_HMAC_FUNCTIONS
|
||||
* \brief ompute final sha1 hmac value
|
||||
* \brief call sha1_hmac_final_impl with hash_final true
|
||||
* \param tfm linux crypto algo transform
|
||||
* \param out final sha1 hmac output value
|
||||
*/
|
||||
static int sha1_hmac_final(struct shash_desc *desc, u8 *out)
|
||||
{
|
||||
//struct sha1_hmac_ctx *sctx = shash_desc_ctx(desc);
|
||||
return sha1_hmac_final_impl(desc, out, true);
|
||||
}
|
||||
|
||||
/*! \fn static int sha1_hmac_final_impl(struct crypto_tfm *tfm, u8 *out, bool hash_final)
|
||||
* \ingroup IFX_SHA1_HMAC_FUNCTIONS
|
||||
* \brief ompute final or intermediate sha1 hmac value
|
||||
* \param tfm linux crypto algo transform
|
||||
* \param out final sha1 hmac output value
|
||||
* \param in finalize or intermediate processing
|
||||
*/
|
||||
static int sha1_hmac_final_impl(struct shash_desc *desc, u8 *out, bool hash_final)
|
||||
{
|
||||
struct sha1_hmac_ctx *sctx = crypto_shash_ctx(desc->tfm);
|
||||
u32 index, padlen;
|
||||
u64 t;
|
||||
@@ -238,37 +256,48 @@ static int sha1_hmac_final(struct shash_desc *desc, u8 *out)
|
||||
unsigned long flag;
|
||||
int i = 0;
|
||||
int dbn;
|
||||
u32 *in = &temp[0];
|
||||
|
||||
t = sctx->count + 512; // need to add 512 bit of the IPAD operation
|
||||
bits[7] = 0xff & t;
|
||||
t >>= 8;
|
||||
bits[6] = 0xff & t;
|
||||
t >>= 8;
|
||||
bits[5] = 0xff & t;
|
||||
t >>= 8;
|
||||
bits[4] = 0xff & t;
|
||||
t >>= 8;
|
||||
bits[3] = 0xff & t;
|
||||
t >>= 8;
|
||||
bits[2] = 0xff & t;
|
||||
t >>= 8;
|
||||
bits[1] = 0xff & t;
|
||||
t >>= 8;
|
||||
bits[0] = 0xff & t;
|
||||
u32 *in = sctx->temp[0];
|
||||
|
||||
/* Pad out to 56 mod 64 */
|
||||
index = (sctx->count >> 3) & 0x3f;
|
||||
padlen = (index < 56) ? (56 - index) : ((64 + 56) - index);
|
||||
sha1_hmac_update (desc, padding, padlen);
|
||||
if (hash_final) {
|
||||
t = sctx->count + 512; // need to add 512 bit of the IPAD operation
|
||||
bits[7] = 0xff & t;
|
||||
t >>= 8;
|
||||
bits[6] = 0xff & t;
|
||||
t >>= 8;
|
||||
bits[5] = 0xff & t;
|
||||
t >>= 8;
|
||||
bits[4] = 0xff & t;
|
||||
t >>= 8;
|
||||
bits[3] = 0xff & t;
|
||||
t >>= 8;
|
||||
bits[2] = 0xff & t;
|
||||
t >>= 8;
|
||||
bits[1] = 0xff & t;
|
||||
t >>= 8;
|
||||
bits[0] = 0xff & t;
|
||||
|
||||
/* Append length */
|
||||
sha1_hmac_update (desc, bits, sizeof bits);
|
||||
/* Pad out to 56 mod 64 */
|
||||
index = (sctx->count >> 3) & 0x3f;
|
||||
padlen = (index < 56) ? (56 - index) : ((64 + 56) - index);
|
||||
sha1_hmac_update (desc, padding, padlen);
|
||||
|
||||
/* Append length */
|
||||
sha1_hmac_update (desc, bits, sizeof bits);
|
||||
}
|
||||
|
||||
CRTCL_SECT_HASH_START;
|
||||
|
||||
SHA_HASH_INIT;
|
||||
|
||||
sha1_hmac_setkey_hw(sctx->key, sctx->keylen);
|
||||
|
||||
if (hash_final) {
|
||||
hashs->DBN = sctx->dbn;
|
||||
} else {
|
||||
hashs->DBN = sctx->dbn + 5;
|
||||
}
|
||||
asm("sync");
|
||||
|
||||
CRTCL_SECT_START;
|
||||
|
||||
hashs->DBN = sctx->dbn;
|
||||
|
||||
//for vr9 change, ENDI = 1
|
||||
*IFX_HASH_CON = HASH_CON_VALUE;
|
||||
|
||||
@@ -277,28 +306,40 @@ static int sha1_hmac_final(struct shash_desc *desc, u8 *out)
|
||||
// this will not take long
|
||||
}
|
||||
|
||||
if (sctx->started) {
|
||||
hashs->D1R = *((u32 *) sctx->hash + 0);
|
||||
hashs->D2R = *((u32 *) sctx->hash + 1);
|
||||
hashs->D3R = *((u32 *) sctx->hash + 2);
|
||||
hashs->D4R = *((u32 *) sctx->hash + 3);
|
||||
hashs->D5R = *((u32 *) sctx->hash + 4);
|
||||
} else {
|
||||
sctx->started = 1;
|
||||
}
|
||||
|
||||
for (dbn = 0; dbn < sctx->dbn; dbn++)
|
||||
{
|
||||
for (i = 0; i < 16; i++) {
|
||||
hashs->MR = in[i];
|
||||
};
|
||||
for (i = 0; i < 16; i++) {
|
||||
hashs->MR = in[i];
|
||||
};
|
||||
|
||||
hashs->controlr.GO = 1;
|
||||
asm("sync");
|
||||
hashs->controlr.GO = 1;
|
||||
asm("sync");
|
||||
|
||||
//wait for processing
|
||||
while (hashs->controlr.BSY) {
|
||||
//wait for processing
|
||||
while (hashs->controlr.BSY) {
|
||||
// this will not take long
|
||||
}
|
||||
}
|
||||
|
||||
in += 16;
|
||||
}
|
||||
in += 16;
|
||||
}
|
||||
|
||||
|
||||
#if 1
|
||||
//wait for digest ready
|
||||
while (! hashs->controlr.DGRY) {
|
||||
// this will not take long
|
||||
if (hash_final) {
|
||||
//wait for digest ready
|
||||
while (! hashs->controlr.DGRY) {
|
||||
// this will not take long
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -308,40 +349,71 @@ static int sha1_hmac_final(struct shash_desc *desc, u8 *out)
|
||||
*((u32 *) out + 3) = hashs->D4R;
|
||||
*((u32 *) out + 4) = hashs->D5R;
|
||||
|
||||
memset(&sctx->buffer[0], 0, SHA1_HMAC_BLOCK_SIZE);
|
||||
sctx->count = 0;
|
||||
|
||||
//printk("debug ln: %d, fn: %s\n", __LINE__, __func__);
|
||||
CRTCL_SECT_END;
|
||||
CRTCL_SECT_HASH_END;
|
||||
|
||||
if (hash_final) {
|
||||
sha1_hmac_init(desc);
|
||||
} else {
|
||||
sctx->dbn = 0;
|
||||
}
|
||||
//printk("debug ln: %d, fn: %s\n", __LINE__, __func__);
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* \brief SHA1-HMAC function mappings
|
||||
/*! \fn void sha1_hmac_init_tfm(struct crypto_tfm *tfm)
|
||||
* \ingroup IFX_SHA1_HMAC_FUNCTIONS
|
||||
* \brief initialize pointers in sha1_hmac_ctx
|
||||
* \param tfm linux crypto algo transform
|
||||
*/
|
||||
static int sha1_hmac_init_tfm(struct crypto_tfm *tfm)
|
||||
{
|
||||
struct sha1_hmac_ctx *sctx = crypto_tfm_ctx(tfm);
|
||||
sctx->temp = kzalloc(4 * SHA1_HMAC_DBN_TEMP_SIZE, GFP_KERNEL);
|
||||
if (IS_ERR(sctx->temp)) return PTR_ERR(sctx->temp);
|
||||
sctx->desc = kzalloc(sizeof(struct shash_desc), GFP_KERNEL);
|
||||
if (IS_ERR(sctx->desc)) return PTR_ERR(sctx->desc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \fn void sha1_hmac_exit_tfm(struct crypto_tfm *tfm)
|
||||
* \ingroup IFX_SHA1_HMAC_FUNCTIONS
|
||||
* \brief free pointers in sha1_hmac_ctx
|
||||
* \param tfm linux crypto algo transform
|
||||
*/
|
||||
static void sha1_hmac_exit_tfm(struct crypto_tfm *tfm)
|
||||
{
|
||||
struct sha1_hmac_ctx *sctx = crypto_tfm_ctx(tfm);
|
||||
kfree(sctx->temp);
|
||||
kfree(sctx->desc);
|
||||
}
|
||||
|
||||
/*
|
||||
* \brief SHA1_HMAC function mappings
|
||||
*/
|
||||
|
||||
static struct shash_alg ifxdeu_sha1_hmac_alg = {
|
||||
.digestsize = SHA1_DIGEST_SIZE,
|
||||
.init = sha1_hmac_init,
|
||||
.update = sha1_hmac_update,
|
||||
.final = sha1_hmac_final,
|
||||
.setkey = sha1_hmac_setkey,
|
||||
.descsize = sizeof(struct sha1_hmac_ctx),
|
||||
.base = {
|
||||
.cra_name = "hmac(sha1)",
|
||||
.cra_driver_name= "ifxdeu-sha1_hmac",
|
||||
.cra_priority = 400,
|
||||
.cra_ctxsize = sizeof(struct sha1_hmac_ctx),
|
||||
.cra_flags = CRYPTO_ALG_TYPE_HASH,
|
||||
.cra_blocksize = SHA1_HMAC_BLOCK_SIZE,
|
||||
.cra_module = THIS_MODULE,
|
||||
.digestsize = SHA1_DIGEST_SIZE,
|
||||
.init = sha1_hmac_init,
|
||||
.update = sha1_hmac_update,
|
||||
.final = sha1_hmac_final,
|
||||
.setkey = sha1_hmac_setkey,
|
||||
.descsize = sizeof(struct sha1_hmac_ctx),
|
||||
.base = {
|
||||
.cra_name = "hmac(sha1)",
|
||||
.cra_driver_name= "ifxdeu-sha1_hmac",
|
||||
.cra_priority = 400,
|
||||
.cra_ctxsize = sizeof(struct sha1_hmac_ctx),
|
||||
.cra_flags = CRYPTO_ALG_TYPE_HASH | CRYPTO_ALG_KERN_DRIVER_ONLY,
|
||||
.cra_blocksize = SHA1_HMAC_BLOCK_SIZE,
|
||||
.cra_module = THIS_MODULE,
|
||||
.cra_init = sha1_hmac_init_tfm,
|
||||
.cra_exit = sha1_hmac_exit_tfm,
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
/*! \fn int ifxdeu_init_sha1_hmac (void)
|
||||
* \ingroup IFX_SHA1_HMAC_FUNCTIONS
|
||||
* \brief initialize sha1 hmac driver
|
||||
@@ -355,8 +427,6 @@ int ifxdeu_init_sha1_hmac (void)
|
||||
if ((ret = crypto_register_shash(&ifxdeu_sha1_hmac_alg)))
|
||||
goto sha1_err;
|
||||
|
||||
CRTCL_SECT_INIT;
|
||||
|
||||
printk (KERN_NOTICE "IFX DEU SHA1_HMAC initialized%s.\n", disable_deudma ? "" : " (DMA)");
|
||||
return ret;
|
||||
|
||||
@@ -376,4 +446,3 @@ void ifxdeu_fini_sha1_hmac (void)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -6,13 +6,17 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=lib_ifxos
|
||||
PKG_VERSION:=1.5.19
|
||||
PKG_RELEASE:=4
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_URL:=https://github.com/xdarklight/$(PKG_NAME)/archive/v$(PKG_VERSION)
|
||||
PKG_HASH:=ed7fe39311d7a4a13d23ed0ae2445c0d825b472b5a98da9b72bcaabcf5ed2d5f
|
||||
PKG_NAME:=ifxos
|
||||
PKG_VERSION:=1.7.1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
UGW_VERSION=8.5.2.10
|
||||
UGW_BASENAME=$(PKG_NAME)-ugw_$(UGW_VERSION)
|
||||
|
||||
PKG_SOURCE:=$(UGW_BASENAME).tar.bz2
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(UGW_BASENAME)
|
||||
PKG_SOURCE_URL:=https://gitlab.com/prpl-foundation/intel/$(PKG_NAME)/-/archive/ugw_$(UGW_VERSION)/
|
||||
PKG_HASH:=055a1f5eab0abfaac34ac7b1613b93ec341fe9ae8462cb11c36c2b0989ce0ca7
|
||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
PKG_LICENSE:=GPL-2.0 BSD-2-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@@ -45,7 +49,7 @@ ifdef CONFIG_TARGET_lantiq
|
||||
$(INSTALL_DIR) $(1)/usr/{lib,include/ifxos}
|
||||
$(CP) $(PKG_BUILD_DIR)/src/include/* $(1)/usr/include/ifxos
|
||||
mkdir -p $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/src/libifxos.a $(1)/usr/lib/libifxos.a
|
||||
$(CP) $(PKG_BUILD_DIR)/src/.libs/libifxos.a $(1)/usr/lib/libifxos.a
|
||||
endef
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,24 +1,10 @@
|
||||
--- a/src/include/linux/ifxos_linux_thread.h
|
||||
+++ b/src/include/linux/ifxos_linux_thread.h
|
||||
@@ -206,7 +206,7 @@ typedef struct
|
||||
/**
|
||||
LINUX User Thread - map the Thread ID.
|
||||
*/
|
||||
-typedef int IFXOS_thread_t;
|
||||
+typedef pthread_t IFXOS_thread_t;
|
||||
--- a/src/include/linux/ifxos_linux_common.h
|
||||
+++ b/src/include/linux/ifxos_linux_common.h
|
||||
@@ -49,6 +49,7 @@
|
||||
IFX Linux adaptation - Includes (Linux Kernel)
|
||||
========================================================================= */
|
||||
#include <linux/kernel.h>
|
||||
+#include <linux/version.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
/**
|
||||
LINUX Kernel Process - map the Process ID.
|
||||
--- a/src/linux/ifxos_linux_socket_appl.c
|
||||
+++ b/src/linux/ifxos_linux_socket_appl.c
|
||||
@@ -363,8 +363,8 @@ IFX_int_t IFXOS_SocketSendTo(
|
||||
IFXOS_RETURN_IF_POINTER_NULL(pBuffer, IFX_ERROR);
|
||||
IFXOS_RETURN_IF_ARG_LE_ZERO(bufSize_byte, IFX_ERROR);
|
||||
|
||||
- ret = (IFX_int_t)sendto((int)socFd, (const char*)pBuffer,
|
||||
- (int)bufSize_byte, 0, pSocAddr, sizeof(IFXOS_sockAddr_t));
|
||||
+ ret = (IFX_int_t)sendto(socFd, pBuffer,
|
||||
+ bufSize_byte, 0, (struct sockaddr *)pSocAddr, sizeof(IFXOS_sockAddr_t));
|
||||
|
||||
return ret;
|
||||
}
|
||||
/* ============================================================================
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
--- a/src/linux/ifxos_linux_copy_user_space_drv.c
|
||||
+++ b/src/linux/ifxos_linux_copy_user_space_drv.c
|
||||
@@ -29,7 +29,7 @@
|
||||
#ifdef MODULE
|
||||
#include <linux/module.h>
|
||||
#endif
|
||||
--- a/src/linux/ifxos_linux_socket_drv.c
|
||||
+++ b/src/linux/ifxos_linux_socket_drv.c
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <linux/net.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/inet.h>
|
||||
-#include <asm/uaccess.h>
|
||||
+#include <linux/uaccess.h>
|
||||
|
||||
#include "ifx_types.h"
|
||||
#include "ifxos_rt_if_check.h"
|
||||
--- a/src/linux/ifxos_linux_socket_drv.c
|
||||
+++ b/src/linux/ifxos_linux_socket_drv.c
|
||||
--- a/src/linux/ifxos_linux_socket_ipv6_drv.c
|
||||
+++ b/src/linux/ifxos_linux_socket_ipv6_drv.c
|
||||
@@ -25,7 +25,7 @@
|
||||
#endif
|
||||
#include <linux/version.h>
|
||||
#include <linux/in.h>
|
||||
#include <linux/net.h>
|
||||
-#include <asm/uaccess.h>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -45,8 +45,6 @@ endif !HAVE_GCC
|
||||
@@ -48,8 +48,6 @@ endif !HAVE_GCC
|
||||
|
||||
if ENABLE_DEBUG
|
||||
used_gcc_cflags += -O1 -g
|
||||
|
||||
@@ -1,119 +1,3 @@
|
||||
--- a/src/linux/ifxos_linux_thread_drv.c
|
||||
+++ b/src/linux/ifxos_linux_thread_drv.c
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <linux/smp_lock.h>
|
||||
#endif
|
||||
#include <linux/signal.h>
|
||||
+#include <linux/kthread.h>
|
||||
|
||||
|
||||
#include "ifx_types.h"
|
||||
@@ -70,10 +71,6 @@
|
||||
#if ( defined(IFXOS_HAVE_THREAD) && (IFXOS_HAVE_THREAD == 1) )
|
||||
|
||||
|
||||
-IFXOS_STATIC IFX_int32_t IFXOS_KernelThreadStartup(
|
||||
- IFXOS_ThreadCtrl_t *pThrCntrl);
|
||||
-
|
||||
-
|
||||
/* ============================================================================
|
||||
IFX Linux adaptation - Kernel Thread handling
|
||||
========================================================================= */
|
||||
@@ -98,9 +95,9 @@ IFXOS_STATIC IFX_int32_t IFXOS_KernelThr
|
||||
- IFX_SUCCESS on success
|
||||
- IFX_ERROR on error
|
||||
*/
|
||||
-IFXOS_STATIC IFX_int32_t IFXOS_KernelThreadStartup(
|
||||
- IFXOS_ThreadCtrl_t *pThrCntrl)
|
||||
+int IFXOS_KernelThreadStartup(void *data)
|
||||
{
|
||||
+ IFXOS_ThreadCtrl_t *pThrCntrl = (IFXOS_ThreadCtrl_t*) data;
|
||||
IFX_int32_t retVal = IFX_ERROR;
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
|
||||
struct task_struct *kthread = current;
|
||||
@@ -141,7 +138,7 @@ IFXOS_STATIC IFX_int32_t IFXOS_KernelThr
|
||||
/* let others run */
|
||||
unlock_kernel();
|
||||
#else
|
||||
- daemonize(pThrCntrl->thrParams.pName);
|
||||
+ //daemonize(pThrCntrl->thrParams.pName);
|
||||
|
||||
/* Enable signals in Kernel >= 2.6 */
|
||||
allow_signal(SIGKILL);
|
||||
@@ -221,9 +218,11 @@ IFX_int32_t IFXOS_ThreadInit(
|
||||
init_completion(&pThrCntrl->thrCompletion);
|
||||
|
||||
/* start kernel thread via the wrapper function */
|
||||
- pThrCntrl->tid = kernel_thread( (IFXOS_KERNEL_THREAD_StartRoutine)IFXOS_KernelThreadStartup,
|
||||
- (void *)pThrCntrl,
|
||||
- IFXOS_DRV_THREAD_OPTIONS);
|
||||
+ pThrCntrl->tid = kthread_run(IFXOS_KernelThreadStartup, (void *)pThrCntrl, pThrCntrl->thrParams.pName);
|
||||
+ if (IS_ERR(pThrCntrl->tid)) {
|
||||
+ IFXOS_PRN_USR_ERR_NL( IFXOS, IFXOS_PRN_LEVEL_ERR,
|
||||
+ ("IFXOS ERROR - Problem creating thread: %li" IFXOS_CRLF, PTR_ERR(pThrCntrl->tid)));
|
||||
+ }
|
||||
|
||||
pThrCntrl->bValid = IFX_TRUE;
|
||||
|
||||
--- a/src/include/linux/ifxos_linux_thread.h
|
||||
+++ b/src/include/linux/ifxos_linux_thread.h
|
||||
@@ -152,7 +152,7 @@ typedef struct
|
||||
IFXOS_ThreadFunction_t pThrFct;
|
||||
|
||||
/** Kernel thread process ID */
|
||||
- IFX_int32_t tid;
|
||||
+ struct task_struct *tid;
|
||||
|
||||
/** requested kernel thread priority */
|
||||
IFX_int32_t nPriority;
|
||||
--- a/src/linux/ifxos_linux_socket_drv.c
|
||||
+++ b/src/linux/ifxos_linux_socket_drv.c
|
||||
@@ -19,6 +19,7 @@
|
||||
/* ============================================================================
|
||||
IFX Linux adaptation - Global Includes - Kernel
|
||||
========================================================================= */
|
||||
+#include <linux/version.h>
|
||||
#include <linux/kernel.h>
|
||||
#ifdef MODULE
|
||||
#include <linux/module.h>
|
||||
@@ -166,23 +167,33 @@ IFX_int_t IFXOS_SocketSendTo(
|
||||
IFXOS_RETURN_IF_POINTER_NULL(pBuffer, IFX_ERROR);
|
||||
IFXOS_RETURN_IF_ARG_LE_ZERO(bufSize_byte, IFX_ERROR);
|
||||
|
||||
+ iov.iov_base = pBuffer;
|
||||
+ iov.iov_len = (unsigned int) bufSize_byte;
|
||||
+
|
||||
msg.msg_name = (void *) pSocAddr;
|
||||
msg.msg_namelen = sizeof(IFXOS_sockAddr_t);
|
||||
- msg.msg_iov = &iov;
|
||||
- msg.msg_iovlen = 1;
|
||||
msg.msg_control = IFX_NULL;
|
||||
msg.msg_controllen = 0;
|
||||
msg.msg_flags = MSG_DONTWAIT;
|
||||
|
||||
- msg.msg_iov->iov_base = pBuffer;
|
||||
- msg.msg_iov->iov_len = (unsigned int) bufSize_byte;
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
|
||||
+ msg.msg_iov = &iov;
|
||||
+ msg.msg_iovlen = 1;
|
||||
+#else
|
||||
+ iov_iter_init(&msg.msg_iter, WRITE, &iov, 1, bufSize_byte);
|
||||
+#endif
|
||||
|
||||
/* Modify address limitation which is used if user space is calling
|
||||
kernel space, otherwise sock_sendmsg() will fail.*/
|
||||
old_fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
|
||||
ret = sock_sendmsg((struct socket *) socFd, &msg, bufSize_byte);
|
||||
+#else
|
||||
+ ret = sock_sendmsg((struct socket *) socFd, &msg);
|
||||
+#endif
|
||||
+
|
||||
set_fs(old_fs);
|
||||
|
||||
return ret;
|
||||
--- a/src/linux/ifxos_linux_memory_map_drv.c
|
||||
+++ b/src/linux/ifxos_linux_memory_map_drv.c
|
||||
@@ -25,6 +25,7 @@
|
||||
@@ -124,28 +8,8 @@
|
||||
#include <linux/kernel.h>
|
||||
#ifdef MODULE
|
||||
#include <linux/module.h>
|
||||
@@ -87,6 +88,7 @@ IFX_int32_t IFXOS_Phy2VirtMap(
|
||||
IFXOS_RETURN_IF_POINTER_NOT_NULL(*ppVirtAddr, IFX_ERROR);
|
||||
IFXOS_RETURN_IF_ARG_LE_ZERO(addrRangeSize_byte, IFX_ERROR);
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
|
||||
if ( check_mem_region(physicalAddr, addrRangeSize_byte) )
|
||||
{
|
||||
IFXOS_PRN_USR_ERR_NL( IFXOS, IFXOS_PRN_LEVEL_ERR,
|
||||
@@ -98,10 +100,25 @@ IFX_int32_t IFXOS_Phy2VirtMap(
|
||||
|
||||
/* can't fail */
|
||||
request_mem_region(physicalAddr, addrRangeSize_byte, pName);
|
||||
+#else
|
||||
+ if ( !request_mem_region(physicalAddr, addrRangeSize_byte, pName) )
|
||||
+ {
|
||||
+ IFXOS_PRN_USR_ERR_NL( IFXOS, IFXOS_PRN_LEVEL_ERR,
|
||||
+ ("IFXOS: ERROR Phy2Virt map, region request - addr 0x%08lX (size 0x%lX) not free" IFXOS_CRLF,
|
||||
+ physicalAddr, addrRangeSize_byte));
|
||||
+
|
||||
+ return IFX_ERROR;
|
||||
+ }
|
||||
+#endif
|
||||
@@ -97,8 +98,13 @@ IFX_int32_t IFXOS_Phy2VirtMap(
|
||||
}
|
||||
|
||||
/* remap memory (not cache able): physical --> virtual */
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
|
||||
@@ -157,4 +21,4 @@
|
||||
+
|
||||
if (pVirtAddr == IFX_NULL)
|
||||
{
|
||||
IFXOS_PRN_USR_ERR_NL( IFXOS, IFXOS_PRN_LEVEL_ERR,
|
||||
IFXOS_PRN_USR_ERR_NL( IFXOS, IFXOS_PRN_LEVEL_ERR,
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
From 7d52945b0b261c54ec736ecc435936c5fb8b81a4 Mon Sep 17 00:00:00 2001
|
||||
From: Yousong Zhou <yszhou4tech@gmail.com>
|
||||
Date: Thu, 30 Nov 2017 11:07:12 +0800
|
||||
Subject: [PATCH] Fix app compilation failure from inclusion of wrong headers
|
||||
|
||||
Compiling against glibc can fail with the following errors
|
||||
|
||||
In file included from /home/stefan/Router/o26431-vmmc_v5/source/staging_dir/toolchain-mips_24kc_gcc-5.5.0_glibc/include/bits/fcntl-linux.h:321:0,
|
||||
from /home/stefan/Router/o26431-vmmc_v5/source/staging_dir/toolchain-mips_24kc_gcc-5.5.0_glibc/include/bits/fcntl.h:104,
|
||||
from /home/stefan/Router/o26431-vmmc_v5/source/staging_dir/toolchain-mips_24kc_gcc-5.5.0_glibc/include/fcntl.h:35,
|
||||
from linux/ifxos_linux_device_access_appl.c:30:
|
||||
/home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:12:2: error: unknown type name '__s16'
|
||||
__s16 l_type;
|
||||
^
|
||||
/home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:13:2: error: unknown type name '__s16'
|
||||
__s16 l_whence;
|
||||
^
|
||||
/home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:14:2: error: unknown type name '__s64'
|
||||
__s64 l_start;
|
||||
^
|
||||
/home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:15:2: error: unknown type name '__s64'
|
||||
__s64 l_len; /* len == 0 means until end of file */
|
||||
^
|
||||
/home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:16:2: error: unknown type name '__s32'
|
||||
__s32 l_sysid;
|
||||
^
|
||||
/home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:17:2: error: unknown type name '__u32'
|
||||
__u32 l_pid;
|
||||
^
|
||||
/home/stefan/Router/o26431-vmmc_v5/source/build_dir/target-mips_24kc_glibc/linux-lantiq_xrx200/linux-4.9.65/include/linux/falloc.h:18:2: error: unknown type name '__s32'
|
||||
__s32 l_pad[4]; /* reserved area */
|
||||
^
|
||||
Makefile:1945: recipe for target 'libifxos_a-ifxos_linux_device_access_appl.o' failed
|
||||
|
||||
Ref: https://bugs.openwrt.org/index.php?do=details&task_id=1196
|
||||
---
|
||||
src/Makefile.am | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -14,11 +14,7 @@ lib_LIBRARIES = libifxos.a
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I@srcdir@\
|
||||
- -I@srcdir@/include \
|
||||
- -I@KERNEL_INCL_PATH@ \
|
||||
- -I@KERNEL_BUILD_PATH@/include \
|
||||
- -I@KERNEL_BUILD_PATH@/include2 \
|
||||
- -I$(TARGET_INCL_PATH)
|
||||
+ -I@srcdir@/include
|
||||
|
||||
if HAVE_GCC
|
||||
|
||||
@@ -82,9 +82,9 @@
|
||||
|
||||
DSL_DRV_DevNodeInit();
|
||||
|
||||
+ dsl_class = class_create(THIS_MODULE, "dsl_cpe_api0");
|
||||
+ dsl_class = class_create(THIS_MODULE, DRV_DSL_CPE_API_DEV_NAME);
|
||||
+ dsl_devt = MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0);
|
||||
+ device_create(dsl_class, NULL, dsl_devt, NULL, "dsl_cpe_api0");
|
||||
+ device_create(dsl_class, NULL, dsl_devt, NULL, "dsl_cpe_api/0");
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -196,6 +196,21 @@ endef
|
||||
|
||||
$(eval $(call KernelPackage,et131x))
|
||||
|
||||
define KernelPackage/phy-microchip
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Microchip Ethernet PHY driver
|
||||
KCONFIG:=CONFIG_MICROCHIP_PHY
|
||||
DEPENDS:=+kmod-libphy
|
||||
FILES:=$(LINUX_DIR)/drivers/net/phy/microchip.ko
|
||||
AUTOLOAD:=$(call AutoLoad,18,microchip,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/phy-microchip/description
|
||||
Supports the LAN88XX PHYs.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,phy-microchip))
|
||||
|
||||
|
||||
define KernelPackage/phylib-broadcom
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
@@ -1019,13 +1034,28 @@ endef
|
||||
|
||||
$(eval $(call KernelPackage,forcedeth))
|
||||
|
||||
define KernelPackage/fixed-phy
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=MDIO Bus/PHY emulation with fixed speed/link PHYs
|
||||
DEPENDS:=+kmod-libphy
|
||||
KCONFIG:=CONFIG_FIXED_PHY
|
||||
FILES:=$(LINUX_DIR)/drivers/net/phy/fixed_phy.ko
|
||||
AUTOLOAD:=$(call AutoProbe,fixed_phy)
|
||||
endef
|
||||
|
||||
define KernelPackage/fixed-phy/description
|
||||
Kernel driver for "fixed" MDIO Bus to cover the boards
|
||||
and devices that use PHYs that are not connected to the real MDIO bus.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fixed-phy))
|
||||
|
||||
define KernelPackage/of-mdio
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=OpenFirmware MDIO support
|
||||
DEPENDS:=+kmod-libphy @!TARGET_x86
|
||||
DEPENDS:=+kmod-libphy +kmod-fixed-phy @!TARGET_x86
|
||||
KCONFIG:=CONFIG_OF_MDIO
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/net/phy/fixed_phy.ko \
|
||||
$(LINUX_DIR)/drivers/of/of_mdio.ko@lt5.10 \
|
||||
$(LINUX_DIR)/drivers/net/mdio/of_mdio.ko@ge5.10
|
||||
AUTOLOAD:=$(call AutoLoad,41,of_mdio)
|
||||
|
||||
@@ -1202,6 +1202,23 @@ endef
|
||||
$(eval $(call KernelPackage,usb-net-kaweth))
|
||||
|
||||
|
||||
define KernelPackage/usb-net-lan78xx
|
||||
TITLE:=USB-To-Ethernet Microchip LAN78XX convertors
|
||||
DEPENDS:=+kmod-fixed-phy +kmod-phy-microchip
|
||||
KCONFIG:=CONFIG_USB_LAN78XX
|
||||
FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/lan78xx.ko
|
||||
AUTOLOAD:=$(call AutoProbe,lan78xx)
|
||||
$(call AddDepends/usb-net)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-net-lan78xx/description
|
||||
Kernel module for Microchip LAN78XX based USB 2 & USB 3
|
||||
10/100/1000 Ethernet adapters.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,usb-net-lan78xx))
|
||||
|
||||
|
||||
define KernelPackage/usb-net-pegasus
|
||||
TITLE:=Kernel module for USB-to-Ethernet Pegasus convertors
|
||||
KCONFIG:=CONFIG_USB_PEGASUS
|
||||
@@ -1357,8 +1374,8 @@ $(eval $(call KernelPackage,usb-net-rtl8150))
|
||||
|
||||
define KernelPackage/usb-net-rtl8152
|
||||
TITLE:=Kernel module for USB-to-Ethernet Realtek convertors
|
||||
DEPENDS:=+r8152-firmware +kmod-crypto-sha256 +kmod-usb-net-cdc-ncm
|
||||
KCONFIG:=CONFIG_USB_RTL8152
|
||||
DEPENDS:=+!LINUX_5_4:kmod-crypto-sha256 +!LINUX_5_4:r8152-firmware
|
||||
FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/r8152.ko
|
||||
AUTOLOAD:=$(call AutoProbe,r8152)
|
||||
$(call AddDepends/usb-net, +LINUX_5_10:kmod-crypto-hash)
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=elfutils
|
||||
PKG_VERSION:=0.182
|
||||
PKG_VERSION:=0.186
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
|
||||
PKG_HASH:=ecc406914edf335f0b7fc084ebe6c460c4d6d5175bfdd6688c1c78d9146b8858
|
||||
PKG_HASH:=7f6fb9149b1673d38d9178a0d3e0fb8a1ec4f53a9f4c2ff89469609879641177
|
||||
|
||||
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
@@ -44,7 +44,7 @@ endef
|
||||
|
||||
define Package/libdw
|
||||
$(call Package/elfutils/Default)
|
||||
DEPENDS:=+libelf +libbz2
|
||||
DEPENDS:=+libelf +libbz2 +USE_MUSL:musl-fts
|
||||
TITLE+= (libdw)
|
||||
endef
|
||||
|
||||
@@ -74,6 +74,12 @@ CONFIGURE_ARGS += \
|
||||
--without-lzma \
|
||||
--without-zstd
|
||||
|
||||
HOST_CONFIGURE_VARS += \
|
||||
ac_cv_search__obstack_free=yes
|
||||
|
||||
CONFIGURE_VARS += \
|
||||
ac_cv_search__obstack_free=yes
|
||||
|
||||
TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral
|
||||
|
||||
define Build/InstallDev
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
From http://cgit.openembedded.org/openembedded-core/plain/meta/recipes-devtools/elfutils/files/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch
|
||||
|
||||
From 2e2232d0935bf8ef6e66ebffba3be68a73b5b3e5 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sun, 8 Sep 2019 15:57:59 -0700
|
||||
Subject: [PATCH] ppc_initreg.c: Incliude asm/ptrace.h for pt_regs definition
|
||||
|
||||
Fixes
|
||||
| ../../elfutils-0.176/backends/ppc_initreg.c:79:22: error: field 'r' has incomplete type
|
||||
| struct pt_regs r;
|
||||
| ^
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
backends/ppc_initreg.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/backends/ppc_initreg.c
|
||||
+++ b/backends/ppc_initreg.c
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <stdlib.h>
|
||||
#if defined(__powerpc__) && defined(__linux__)
|
||||
# include <sys/ptrace.h>
|
||||
+# include <asm/ptrace.h>
|
||||
# include <sys/user.h>
|
||||
#endif
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
Requires.private: zlib
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -590,6 +590,9 @@ AC_CONFIG_FILES([config/libelf.pc config
|
||||
AC_SUBST(USE_NLS, yes)
|
||||
AM_PO_SUBDIRS
|
||||
@@ -610,6 +610,9 @@ dnl AM_GNU_GETTEXT_REQUIRE_VERSION suppo
|
||||
AM_GNU_GETTEXT_VERSION([0.19.6])
|
||||
AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])
|
||||
|
||||
+case "$USE_NLS" in yes) intl_LDFLAGS="-lintl" ;; esac
|
||||
+AC_SUBST([intl_LDFLAGS])
|
||||
@@ -21,51 +21,3 @@
|
||||
dnl Appended to the config.h file.
|
||||
dnl We hide all kinds of configuration magic in lib/eu-config.h.
|
||||
AH_BOTTOM([#include <eu-config.h>])
|
||||
--- a/libasm/libasmP.h
|
||||
+++ b/libasm/libasmP.h
|
||||
@@ -36,6 +36,9 @@
|
||||
|
||||
#include "libdwelf.h"
|
||||
|
||||
+#ifdef _ /* fix libintl-stub */
|
||||
+#undef _
|
||||
+#endif
|
||||
/* gettext helper macros. */
|
||||
#define _(Str) dgettext ("elfutils", Str)
|
||||
|
||||
--- a/libdw/libdwP.h
|
||||
+++ b/libdw/libdwP.h
|
||||
@@ -37,6 +37,9 @@
|
||||
#include <dwarf.h>
|
||||
#include "atomics.h"
|
||||
|
||||
+#ifdef _ /* fix libintl-stub */
|
||||
+#undef _
|
||||
+#endif
|
||||
|
||||
/* gettext helper macros. */
|
||||
#define _(Str) dgettext ("elfutils", Str)
|
||||
--- a/libdwfl/libdwflP.h
|
||||
+++ b/libdwfl/libdwflP.h
|
||||
@@ -47,6 +47,9 @@
|
||||
|
||||
typedef struct Dwfl_Process Dwfl_Process;
|
||||
|
||||
+#ifdef _ /* fix libintl-stub */
|
||||
+#undef _
|
||||
+#endif
|
||||
/* gettext helper macros. */
|
||||
#define _(Str) dgettext ("elfutils", Str)
|
||||
|
||||
--- a/libelf/libelfP.h
|
||||
+++ b/libelf/libelfP.h
|
||||
@@ -39,6 +39,9 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
+#ifdef _ /* fix libintl-stub */
|
||||
+#undef _
|
||||
+#endif
|
||||
/* gettext helper macros. */
|
||||
#define _(Str) dgettext ("elfutils", Str)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@@ -27,7 +27,7 @@ AM_MAKEFLAGS = --no-print-directory
|
||||
pkginclude_HEADERS = version.h
|
||||
|
||||
SUBDIRS = config m4 lib libelf libcpu backends libebl libdwelf libdwfl libdw \
|
||||
SUBDIRS = config lib libelf libcpu backends libebl libdwelf libdwfl libdw \
|
||||
- libasm debuginfod src po doc tests
|
||||
+ libasm
|
||||
|
||||
|
||||
@@ -1,27 +1,3 @@
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=21002
|
||||
|
||||
--- a/lib/system.h
|
||||
+++ b/lib/system.h
|
||||
@@ -30,7 +30,18 @@
|
||||
#define LIB_SYSTEM_H 1
|
||||
|
||||
#include <errno.h>
|
||||
-#include <error.h>
|
||||
+#ifdef HAVE_ERROR_H
|
||||
+#include "error.h"
|
||||
+#else
|
||||
+#include "err.h"
|
||||
+#include <stdio.h>
|
||||
+#define error(status, errno, ...) \
|
||||
+ do { \
|
||||
+ fflush(stdout); \
|
||||
+ warn(__VA_ARGS__); \
|
||||
+ if (status) exit(status); \
|
||||
+ } while(0)
|
||||
+#endif
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/param.h>
|
||||
--- a/libdw/libdw_alloc.c
|
||||
+++ b/libdw/libdw_alloc.c
|
||||
@@ -152,5 +152,5 @@ __attribute ((noreturn)) attribute_hidde
|
||||
@@ -33,15 +9,21 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=21002
|
||||
}
|
||||
--- a/libdwfl/dwfl_error.c
|
||||
+++ b/libdwfl/dwfl_error.c
|
||||
@@ -154,7 +154,11 @@ dwfl_errmsg (int error)
|
||||
switch (error &~ 0xffff)
|
||||
{
|
||||
case OTHER_ERROR (ERRNO):
|
||||
@@ -140,6 +140,7 @@ __libdwfl_seterrno (Dwfl_Error error)
|
||||
static const char *
|
||||
errnomsg(int error)
|
||||
{
|
||||
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
return strerror_r (error & 0xffff, "bad", 0);
|
||||
/* Won't be changed by strerror_r, but not const so compiler doesn't throw warning */
|
||||
static char unknown[] = "unknown error";
|
||||
|
||||
@@ -150,6 +151,9 @@ errnomsg(int error)
|
||||
static __thread char msg[128];
|
||||
return strerror_r (error, msg, sizeof (msg)) ? unknown : msg;
|
||||
#endif
|
||||
+#else
|
||||
+ return strerror (error & 0xffff);
|
||||
+ return strerror (error & 0xffff);
|
||||
+#endif
|
||||
case OTHER_ERROR (LIBELF):
|
||||
return elf_errmsg (error & 0xffff);
|
||||
case OTHER_ERROR (LIBDW):
|
||||
}
|
||||
|
||||
const char *
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/libdwfl/argp-std.c
|
||||
+++ b/libdwfl/argp-std.c
|
||||
@@ -56,9 +56,6 @@ static const struct argp_option options[
|
||||
@@ -53,9 +53,6 @@ static const struct argp_option options[
|
||||
{ "linux-process-map", 'M', "FILE", 0,
|
||||
N_("Find addresses in files mapped as read from FILE"
|
||||
" in Linux /proc/PID/maps format"), 0 },
|
||||
@@ -10,7 +10,7 @@
|
||||
{ "debuginfo-path", OPT_DEBUGINFO, "PATH", 0,
|
||||
N_("Search path for separate debuginfo files"), 0 },
|
||||
{ NULL, 0, NULL, 0, NULL, 0 }
|
||||
@@ -85,15 +82,6 @@ static const Dwfl_Callbacks proc_callbac
|
||||
@@ -82,15 +79,6 @@ static const Dwfl_Callbacks proc_callbac
|
||||
.find_elf = INTUSE(dwfl_linux_proc_find_elf),
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/* Structure held at state->HOOK. */
|
||||
struct parse_opt
|
||||
{
|
||||
@@ -226,43 +214,6 @@ parse_opt (int key, char *arg, struct ar
|
||||
@@ -223,43 +211,6 @@ parse_opt (int key, char *arg, struct ar
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From e399540ab67ffe83ca3c4cb768a2f0f2f32a9057 Mon Sep 17 00:00:00 2001
|
||||
From: Rosen Penev <rosenp@gmail.com>
|
||||
Date: Sun, 5 Apr 2020 15:56:59 -0700
|
||||
Subject: [PATCH] libelf: remove usage of sys/cdefs
|
||||
|
||||
sys/cdefs is a deprecated glibc header that is unavailable with other
|
||||
libc implementations such as musl.
|
||||
|
||||
features.h under glibc includes sys/cdefs whereas it does not under musl.
|
||||
|
||||
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
||||
---
|
||||
lib/fixedsizehash.h | 1 -
|
||||
libelf/elf.h | 10 ++++++----
|
||||
2 files changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/lib/fixedsizehash.h
|
||||
+++ b/lib/fixedsizehash.h
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <sys/cdefs.h>
|
||||
|
||||
#include <system.h>
|
||||
|
||||
@@ -126,15 +126,6 @@
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
|
||||
@@ -1690,7 +1690,7 @@
|
||||
*
|
||||
* Comment this macro to disable support for SSL session tickets
|
||||
*/
|
||||
-#define MBEDTLS_SSL_SESSION_TICKETS
|
||||
+//#define MBEDTLS_SSL_SESSION_TICKETS
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_EXPORT_KEYS
|
||||
@@ -1720,7 +1720,7 @@
|
||||
*
|
||||
* Comment this macro to disable support for truncated HMAC in SSL
|
||||
@@ -216,15 +207,6 @@
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_RSA_C
|
||||
@@ -2913,7 +2913,7 @@
|
||||
*
|
||||
* Requires: MBEDTLS_CIPHER_C
|
||||
*/
|
||||
-#define MBEDTLS_SSL_TICKET_C
|
||||
+//#define MBEDTLS_SSL_TICKET_C
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_SSL_CLI_C
|
||||
@@ -3013,7 +3013,7 @@
|
||||
*
|
||||
* This module provides run-time version information.
|
||||
|
||||
@@ -519,10 +519,9 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
$(CP) \
|
||||
$(TOOLCHAIN_DIR)/lib/ld*.so.* \
|
||||
$(TOOLCHAIN_DIR)/lib/ld-$(LIBC_SO_VERSION).so \
|
||||
$(1)/lib/
|
||||
for file in libanl libc libcidn libcrypt libdl libm libnsl libnss_dns libnss_files libresolv libutil; do \
|
||||
for file in $(TOOLCHAIN_DIR)/lib/$$$$file.so.* $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so; do \
|
||||
for file in $(TOOLCHAIN_DIR)/lib/$$$$file.so.*; do \
|
||||
if [ -e "$$$$file" ]; then \
|
||||
$(CP) $$$$file $(1)/lib/; \
|
||||
fi; \
|
||||
@@ -561,7 +560,6 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||
ifneq ($(CONFIG_USE_MUSL),y)
|
||||
$(CP) \
|
||||
$(TOOLCHAIN_DIR)/lib/libpthread.so.* \
|
||||
$(TOOLCHAIN_DIR)/lib/libpthread-$(LIBC_SO_VERSION).so \
|
||||
$(1)/lib/
|
||||
endif
|
||||
endef
|
||||
@@ -581,7 +579,6 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||
ifneq ($(CONFIG_USE_MUSL),y)
|
||||
$(CP) \
|
||||
$(TOOLCHAIN_DIR)/lib/librt.so.* \
|
||||
$(TOOLCHAIN_DIR)/lib/librt-$(LIBC_SO_VERSION).so \
|
||||
$(1)/lib/
|
||||
endif
|
||||
endef
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=firewall
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall3.git
|
||||
PKG_SOURCE_DATE:=2021-08-14
|
||||
PKG_SOURCE_VERSION:=40e5f6a2bd0b5406eff7e1d2d4f95bbf8f9410a4
|
||||
PKG_MIRROR_HASH:=4acd7d3c688d31a07ad871dcdbcd06d975ac86745d9f3a6caed68e694635965c
|
||||
PKG_SOURCE_DATE:=2022-01-10
|
||||
PKG_SOURCE_VERSION:=0f16ea5f055722a532d4e68c7ba34ed084b48b37
|
||||
PKG_MIRROR_HASH:=219478ef95b170b5122030715eac7b3317f2ac4d67e1a936c22a78b10e056123
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
@@ -28,7 +28,10 @@ define Package/firewall
|
||||
SECTION:=net
|
||||
CATEGORY:=Base system
|
||||
TITLE:=OpenWrt C Firewall
|
||||
DEPENDS:=+libubox +libubus +libuci +libip4tc +IPV6:libip6tc +libxtables +kmod-ipt-core +kmod-ipt-conntrack +IPV6:kmod-nf-conntrack6 +kmod-ipt-nat +iptables-mod-fullconenat
|
||||
DEPENDS:=+libubox +libubus +libuci +libip4tc +IPV6:libip6tc +libxtables +kmod-ipt-core \
|
||||
+kmod-ipt-conntrack +IPV6:kmod-nf-conntrack6 +kmod-ipt-nat +iptables-mod-fullconenat
|
||||
PROVIDES:=uci-firewall
|
||||
CONFLICTS:=firewall4
|
||||
endef
|
||||
|
||||
define Package/firewall/description
|
||||
|
||||
@@ -9,9 +9,9 @@ PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git
|
||||
PKG_SOURCE_DATE:=2021-10-25
|
||||
PKG_SOURCE_VERSION:=eb0a3ee812d48f1faecbf6258c293e475b4016a0
|
||||
PKG_MIRROR_HASH:=46b5bdea13a285dbd1b3432fe8cfd8cb98a2797b86b176d7762e0987ec2f230c
|
||||
PKG_SOURCE_DATE:=2022-01-09
|
||||
PKG_SOURCE_VERSION:=07579df54f38d75afea44b2a3b41a6d9af9497a1
|
||||
PKG_MIRROR_HASH:=3326e5e9fd53fe9f679b62cdada83aea4951aefe95ed6d2b5eca5a4695add45c
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
@@ -21,8 +21,12 @@ define Package/firewall4
|
||||
SECTION:=net
|
||||
CATEGORY:=Base system
|
||||
TITLE:=OpenWrt 4th gen firewall
|
||||
DEPENDS:=+ucode +ucode-mod-fs +ucode-mod-uci +ucode-mod-ubus +kmod-nft-core +kmod-nft-fib +kmod-nft-nat +kmod-nft-nat6 +nftables-json
|
||||
CONFLICTS:=firewall kmod-ipt-nat
|
||||
DEPENDS:= \
|
||||
+kmod-nft-core +kmod-nft-fib +kmod-nft-offload \
|
||||
+kmod-nft-nat +kmod-nft-nat6 \
|
||||
+nftables-json \
|
||||
+ucode +ucode-mod-fs +ucode-mod-ubus +ucode-mod-uci
|
||||
PROVIDES:=uci-firewall
|
||||
endef
|
||||
|
||||
define Package/firewall4/description
|
||||
|
||||
@@ -9,14 +9,3 @@
|
||||
DSL_CPE_SIC_SET(DSL_TC_ATM, DSL_EMF_TC_CLEANED, DSL_EMF_TC_CLEANED, DSL_SYSTEMIF_MII, \
|
||||
DSL_TC_EFM, DSL_EMF_TC_CLEANED, DSL_EMF_TC_CLEANED, DSL_SYSTEMIF_MII),
|
||||
DSL_CPE_MAC_CFG_SET(DSL_EFM_SPEED_100, DSL_EFM_DUPLEX_FULL, DSL_EFM_FLOWCTRL_ON, DSL_EFM_AUTONEG_OFF, \
|
||||
--- a/src/dsl_cpe_control.c
|
||||
+++ b/src/dsl_cpe_control.c
|
||||
@@ -6761,7 +6761,7 @@ DSL_int_t dsl_cpe_daemon (
|
||||
for (nDevice = 0; nDevice < DSL_CPE_MAX_DSL_ENTITIES; nDevice++)
|
||||
{
|
||||
#if defined(INCLUDE_DSL_CPE_API_VRX)
|
||||
- sprintf (device, "%s/%d", DSL_CPE_DEVICE_NAME, nDevice);
|
||||
+ sprintf (device, "%s%d", DSL_CPE_DEVICE_NAME, nDevice);
|
||||
#else
|
||||
sprintf (device, "%s", DSL_CPE_DEVICE_NAME);
|
||||
#endif /* defined(INCLUDE_DSL_CPE_API_VRX)*/
|
||||
|
||||
@@ -735,7 +735,7 @@ static int metrics(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
vector_t vector = VECTOR_UNKNOWN;
|
||||
|
||||
#ifndef INCLUDE_DSL_CPE_API_DANUBE
|
||||
fd = open(DSL_CPE_DEVICE_NAME "0", O_RDWR, 0644);
|
||||
fd = open(DSL_CPE_DEVICE_NAME "/0", O_RDWR, 0644);
|
||||
#else
|
||||
fd = open(DSL_CPE_DEVICE_NAME, O_RDWR, 0644);
|
||||
#endif
|
||||
|
||||
@@ -12,9 +12,9 @@ PKG_FLAGS:=essential
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/opkg-lede.git
|
||||
PKG_SOURCE_DATE:=2021-06-13
|
||||
PKG_SOURCE_VERSION:=1bf042dd06751b693a8544d2317e5b969d666b69
|
||||
PKG_MIRROR_HASH:=aeda4e0f11805bf95fc7be6d38391ce579acd965c8ba6a490b3e8669815b7264
|
||||
PKG_SOURCE_DATE:=2022-01-09
|
||||
PKG_SOURCE_VERSION:=2edcfad1bb9a32f31199d5842aa087b4d30ec6f5
|
||||
PKG_MIRROR_HASH:=b21e51ffe5bae3ca01865415630cc1f4b471f69e0d7947264a579165c7d44294
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
@@ -211,15 +211,24 @@ config BUSYBOX_DEFAULT_MD5_SMALL
|
||||
config BUSYBOX_DEFAULT_SHA3_SMALL
|
||||
int
|
||||
default 1
|
||||
config BUSYBOX_DEFAULT_FEATURE_FAST_TOP
|
||||
config BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_FEATURE_ETC_NETWORKS
|
||||
config BUSYBOX_DEFAULT_FEATURE_VERBOSE_CP_MESSAGE
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_ETC_SERVICES
|
||||
config BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
|
||||
bool
|
||||
default n
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB
|
||||
int
|
||||
default 4
|
||||
config BUSYBOX_DEFAULT_MONOTONIC_SYSCALL
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_IOCTL_HEX2STR_ERROR
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_FEATURE_EDITING
|
||||
bool
|
||||
default y
|
||||
@@ -289,30 +298,6 @@ config BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
|
||||
config BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_FEATURE_VERBOSE_CP_MESSAGE
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB
|
||||
int
|
||||
default 4
|
||||
config BUSYBOX_DEFAULT_FEATURE_SKIP_ROOTFS
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_MONOTONIC_SYSCALL
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_IOCTL_HEX2STR_ERROR
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_FEATURE_HWIB
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_SEAMLESS_XZ
|
||||
bool
|
||||
default n
|
||||
@@ -391,6 +376,12 @@ config BUSYBOX_DEFAULT_FEATURE_CPIO_O
|
||||
config BUSYBOX_DEFAULT_FEATURE_CPIO_P
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_CPIO_IGNORE_DEVNO
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_CPIO_RENUMBER_INODES
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_DPKG
|
||||
bool
|
||||
default n
|
||||
@@ -484,6 +475,18 @@ config BUSYBOX_DEFAULT_FEATURE_UNZIP_XZ
|
||||
config BUSYBOX_DEFAULT_FEATURE_LZMA_FAST
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_VERBOSE
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_TIMEZONE
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_PRESERVE_HARDLINKS
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_BASENAME
|
||||
bool
|
||||
default y
|
||||
@@ -568,6 +571,9 @@ config BUSYBOX_DEFAULT_DF
|
||||
config BUSYBOX_DEFAULT_FEATURE_DF_FANCY
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_SKIP_ROOTFS
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_DIRNAME
|
||||
bool
|
||||
default y
|
||||
@@ -908,15 +914,6 @@ config BUSYBOX_DEFAULT_WHOAMI
|
||||
config BUSYBOX_DEFAULT_YES
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_FEATURE_VERBOSE
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_PRESERVE_HARDLINKS
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_CHVT
|
||||
bool
|
||||
default n
|
||||
@@ -1118,9 +1115,21 @@ config BUSYBOX_DEFAULT_FEATURE_FIND_PRINT0
|
||||
config BUSYBOX_DEFAULT_FEATURE_FIND_MTIME
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_FEATURE_FIND_ATIME
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_FIND_CTIME
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_FIND_MMIN
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_FEATURE_FIND_AMIN
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_FIND_CMIN
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_FIND_PERM
|
||||
bool
|
||||
default y
|
||||
@@ -1142,6 +1151,9 @@ config BUSYBOX_DEFAULT_FEATURE_FIND_NEWER
|
||||
config BUSYBOX_DEFAULT_FEATURE_FIND_INUM
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_FIND_SAMEFILE
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_FIND_EXEC
|
||||
bool
|
||||
default y
|
||||
@@ -2211,6 +2223,15 @@ config BUSYBOX_DEFAULT_FEATURE_PREFER_IPV4_ADDRESS
|
||||
config BUSYBOX_DEFAULT_VERBOSE_RESOLUTION_ERRORS
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_FEATURE_ETC_NETWORKS
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_ETC_SERVICES
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_HWIB
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_TLS_SHA1
|
||||
bool
|
||||
default n
|
||||
@@ -2265,6 +2286,9 @@ config BUSYBOX_DEFAULT_DNSDOMAINNAME
|
||||
config BUSYBOX_DEFAULT_HTTPD
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_HTTPD_PORT_DEFAULT
|
||||
int
|
||||
default 80
|
||||
config BUSYBOX_DEFAULT_FEATURE_HTTPD_RANGES
|
||||
bool
|
||||
default n
|
||||
@@ -2544,6 +2568,9 @@ config BUSYBOX_DEFAULT_TELNETD
|
||||
config BUSYBOX_DEFAULT_FEATURE_TELNETD_STANDALONE
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_TELNETD_PORT_DEFAULT
|
||||
int
|
||||
default 23
|
||||
config BUSYBOX_DEFAULT_FEATURE_TELNETD_INETD_WAIT
|
||||
bool
|
||||
default n
|
||||
@@ -2700,6 +2727,9 @@ config BUSYBOX_DEFAULT_LPR
|
||||
config BUSYBOX_DEFAULT_LPQ
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
|
||||
string
|
||||
default ""
|
||||
config BUSYBOX_DEFAULT_MAKEMIME
|
||||
bool
|
||||
default n
|
||||
@@ -2718,9 +2748,12 @@ config BUSYBOX_DEFAULT_FEATURE_REFORMIME_COMPAT
|
||||
config BUSYBOX_DEFAULT_SENDMAIL
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
|
||||
string
|
||||
default ""
|
||||
config BUSYBOX_DEFAULT_FEATURE_FAST_TOP
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FREE
|
||||
bool
|
||||
default y
|
||||
@@ -2835,9 +2868,6 @@ config BUSYBOX_DEFAULT_FEATURE_UPTIME_UTMP_SUPPORT
|
||||
config BUSYBOX_DEFAULT_WATCH
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_CHPST
|
||||
bool
|
||||
default n
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=busybox
|
||||
PKG_VERSION:=1.34.1
|
||||
PKG_VERSION:=1.35.0
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_FLAGS:=essential
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://www.busybox.net/downloads \
|
||||
http://sources.buildroot.net
|
||||
PKG_HASH:=415fbd89e5344c96acf449d94a6f956dbed62e18e835fc83e064db33a34bd549
|
||||
PKG_HASH:=faeeb244c35a348a334f4a59e44626ee870fb07b6884d68c10ae8bc19f83a694
|
||||
|
||||
PKG_BUILD_DEPENDS:=BUSYBOX_CONFIG_PAM:libpam
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
@@ -204,6 +204,20 @@ config BUSYBOX_CONFIG_FEATURE_CPIO_P
|
||||
depends on BUSYBOX_CONFIG_FEATURE_CPIO_O
|
||||
help
|
||||
Passthrough mode. Rarely used.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CPIO_IGNORE_DEVNO
|
||||
bool "Support --ignore-devno like GNU cpio"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CPIO_IGNORE_DEVNO
|
||||
depends on BUSYBOX_CONFIG_FEATURE_CPIO_O && BUSYBOX_CONFIG_LONG_OPTS
|
||||
help
|
||||
Optionally ignore device numbers when creating archives.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_CPIO_RENUMBER_INODES
|
||||
bool "Support --renumber-inodes like GNU cpio"
|
||||
default BUSYBOX_DEFAULT_FEATURE_CPIO_RENUMBER_INODES
|
||||
depends on BUSYBOX_CONFIG_FEATURE_CPIO_O && BUSYBOX_CONFIG_LONG_OPTS
|
||||
help
|
||||
Optionally renumber inodes when creating archives.
|
||||
config BUSYBOX_CONFIG_DPKG
|
||||
bool "dpkg (43 kb)"
|
||||
default BUSYBOX_DEFAULT_DPKG
|
||||
|
||||
@@ -6,6 +6,47 @@
|
||||
|
||||
menu "Coreutils"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VERBOSE
|
||||
bool "Support verbose options (usually -v) for various applets"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VERBOSE
|
||||
help
|
||||
Enable cp -v, rm -v and similar messages.
|
||||
Also enables long option (--verbose) if it exists.
|
||||
Without this option, -v is accepted but ignored.
|
||||
|
||||
comment "Common options for date and touch"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TIMEZONE
|
||||
bool "Allow timezone in dates"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TIMEZONE
|
||||
depends on BUSYBOX_CONFIG_DESKTOP
|
||||
help
|
||||
Permit the use of timezones when parsing user-provided data
|
||||
strings, e.g. '1996-04-09 12:45:00 -0500'.
|
||||
|
||||
This requires support for the '%z' extension to strptime() which
|
||||
may not be available in all implementations.
|
||||
|
||||
comment "Common options for cp and mv"
|
||||
depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_PRESERVE_HARDLINKS
|
||||
bool "Preserve hard links"
|
||||
default BUSYBOX_DEFAULT_FEATURE_PRESERVE_HARDLINKS
|
||||
depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV
|
||||
help
|
||||
Allow cp and mv to preserve hard links.
|
||||
|
||||
comment "Common options for df, du, ls"
|
||||
depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE
|
||||
bool "Support human readable output (example 13k, 23M, 235G)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE
|
||||
depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS
|
||||
help
|
||||
Allow df, du, and ls to have human readable output.
|
||||
|
||||
config BUSYBOX_CONFIG_BASENAME
|
||||
bool "basename (438 bytes)"
|
||||
default BUSYBOX_DEFAULT_BASENAME
|
||||
@@ -200,6 +241,26 @@ config BUSYBOX_CONFIG_FEATURE_DF_FANCY
|
||||
-a Show all filesystems
|
||||
-i Inodes
|
||||
-B <SIZE> Blocksize
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SKIP_ROOTFS
|
||||
bool "Skip rootfs in mount table"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SKIP_ROOTFS
|
||||
depends on BUSYBOX_CONFIG_DF
|
||||
help
|
||||
Ignore rootfs entry in mount table.
|
||||
|
||||
In Linux, kernel has a special filesystem, rootfs, which is initially
|
||||
mounted on /. It contains initramfs data, if kernel is configured
|
||||
to have one. Usually, another file system is mounted over / early
|
||||
in boot process, and therefore most tools which manipulate
|
||||
mount table, such as df, will skip rootfs entry.
|
||||
|
||||
However, some systems do not mount anything on /.
|
||||
If you need to configure busybox for one of these systems,
|
||||
you may find it useful to turn this option off to make df show
|
||||
initramfs statistics.
|
||||
|
||||
Otherwise, choose Y.
|
||||
config BUSYBOX_CONFIG_DIRNAME
|
||||
bool "dirname (329 bytes)"
|
||||
default BUSYBOX_DEFAULT_DIRNAME
|
||||
@@ -896,34 +957,4 @@ config BUSYBOX_CONFIG_YES
|
||||
yes is used to repeatedly output a specific string, or
|
||||
the default string 'y'.
|
||||
|
||||
comment "Common options"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VERBOSE
|
||||
bool "Support verbose options (usually -v) for various applets"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VERBOSE
|
||||
help
|
||||
Enable cp -v, rm -v and similar messages.
|
||||
Also enables long option (--verbose) if it exists.
|
||||
Without this option, -v is accepted but ignored.
|
||||
|
||||
comment "Common options for cp and mv"
|
||||
depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_PRESERVE_HARDLINKS
|
||||
bool "Preserve hard links"
|
||||
default BUSYBOX_DEFAULT_FEATURE_PRESERVE_HARDLINKS
|
||||
depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV
|
||||
help
|
||||
Allow cp and mv to preserve hard links.
|
||||
|
||||
comment "Common options for df, du, ls"
|
||||
depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE
|
||||
bool "Support human readable output (example 13k, 23M, 235G)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE
|
||||
depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS
|
||||
help
|
||||
Allow df, du, and ls to have human readable output.
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -23,21 +23,53 @@ config BUSYBOX_CONFIG_FEATURE_FIND_PRINT0
|
||||
interpreted by other programs.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_MTIME
|
||||
bool "Enable -mtime: modified time matching"
|
||||
bool "Enable -mtime: modification time matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_MTIME
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Allow searching based on the modification time of
|
||||
files, in days.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_ATIME
|
||||
bool "Enable -atime: access time matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_ATIME
|
||||
depends on BUSYBOX_CONFIG_FEATURE_FIND_MTIME
|
||||
help
|
||||
Allow searching based on the access time of
|
||||
files, in days.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_CTIME
|
||||
bool "Enable -ctime: status change timestamp matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_CTIME
|
||||
depends on BUSYBOX_CONFIG_FEATURE_FIND_MTIME
|
||||
help
|
||||
Allow searching based on the status change timestamp of
|
||||
files, in days.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_MMIN
|
||||
bool "Enable -mmin: modified time matching by minutes"
|
||||
bool "Enable -mmin: modification time matching by minutes"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_MMIN
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Allow searching based on the modification time of
|
||||
files, in minutes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_AMIN
|
||||
bool "Enable -amin: access time matching by minutes"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_AMIN
|
||||
depends on BUSYBOX_CONFIG_FEATURE_FIND_MMIN
|
||||
help
|
||||
Allow searching based on the access time of
|
||||
files, in minutes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_CMIN
|
||||
bool "Enable -cmin: status change timestamp matching by minutes"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_CMIN
|
||||
depends on BUSYBOX_CONFIG_FEATURE_FIND_MMIN
|
||||
help
|
||||
Allow searching based on the status change timestamp of
|
||||
files, in minutes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_PERM
|
||||
bool "Enable -perm: permissions matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_PERM
|
||||
@@ -79,6 +111,13 @@ config BUSYBOX_CONFIG_FEATURE_FIND_INUM
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_INUM
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_SAMEFILE
|
||||
bool "Enable -samefile: reference file matching"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_SAMEFILE
|
||||
depends on BUSYBOX_CONFIG_FIND
|
||||
help
|
||||
Support the 'find -samefile' option for searching by a reference file.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FIND_EXEC
|
||||
bool "Enable -exec: execute commands"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FIND_EXEC
|
||||
|
||||
@@ -117,32 +117,73 @@ config BUSYBOX_CONFIG_SHA3_SMALL
|
||||
64-bit x86: +270 bytes of code, 45% faster
|
||||
32-bit x86: +450 bytes of code, 75% faster
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FAST_TOP
|
||||
bool "Faster /proc scanning code (+100 bytes)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FAST_TOP # all "fast or small" options default to small
|
||||
config BUSYBOX_CONFIG_FEATURE_NON_POSIX_CP
|
||||
bool "Non-POSIX, but safer, copying to special nodes"
|
||||
default BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP
|
||||
help
|
||||
This option makes top and ps ~20% faster (or 20% less CPU hungry),
|
||||
but code size is slightly bigger.
|
||||
With this option, "cp file symlink" will delete symlink
|
||||
and create a regular file. This does not conform to POSIX,
|
||||
but prevents a symlink attack.
|
||||
Similarly, "cp file device" will not send file's data
|
||||
to the device. (To do that, use "cat file >device")
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_ETC_NETWORKS
|
||||
bool "Support /etc/networks"
|
||||
default BUSYBOX_DEFAULT_FEATURE_ETC_NETWORKS
|
||||
config BUSYBOX_CONFIG_FEATURE_VERBOSE_CP_MESSAGE
|
||||
bool "Give more precise messages when copy fails (cp, mv etc)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VERBOSE_CP_MESSAGE
|
||||
help
|
||||
Enable support for network names in /etc/networks. This is
|
||||
a rarely used feature which allows you to use names
|
||||
instead of IP/mask pairs in route command.
|
||||
Error messages with this feature enabled:
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_ETC_SERVICES
|
||||
bool "Consult /etc/services even for well-known ports"
|
||||
default BUSYBOX_DEFAULT_FEATURE_ETC_SERVICES
|
||||
$ cp file /does_not_exist/file
|
||||
cp: cannot create '/does_not_exist/file': Path does not exist
|
||||
$ cp file /vmlinuz/file
|
||||
cp: cannot stat '/vmlinuz/file': Path has non-directory component
|
||||
|
||||
If this feature is not enabled, they will be, respectively:
|
||||
|
||||
cp: cannot create '/does_not_exist/file': No such file or directory
|
||||
cp: cannot stat '/vmlinuz/file': Not a directory
|
||||
|
||||
This will cost you ~60 bytes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE
|
||||
bool "Use sendfile system call"
|
||||
default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
|
||||
help
|
||||
Look up e.g. "telnet" and "http" in /etc/services file
|
||||
instead of assuming ports 23 and 80.
|
||||
This is almost never necessary (everybody uses standard ports),
|
||||
and it makes sense to avoid reading this file.
|
||||
If you disable this option, in the cases where port is explicitly
|
||||
specified as a service name (e.g. "telnet HOST PORTNAME"),
|
||||
it will still be looked up in /etc/services.
|
||||
When enabled, busybox will use the kernel sendfile() function
|
||||
instead of read/write loops to copy data between file descriptors
|
||||
(for example, cp command does this a lot).
|
||||
If sendfile() doesn't work, copying code falls back to read/write
|
||||
loop. sendfile() was originally implemented for faster I/O
|
||||
from files to sockets, but since Linux 2.6.33 it was extended
|
||||
to work for many more file types.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_COPYBUF_KB
|
||||
int "Copy buffer size, in kilobytes"
|
||||
range 1 1024
|
||||
default BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB
|
||||
help
|
||||
Size of buffer used by cp, mv, install, wget etc.
|
||||
Buffers which are 4 kb or less will be allocated on stack.
|
||||
Bigger buffers will be allocated with mmap, with fallback to 4 kb
|
||||
stack buffer if mmap fails.
|
||||
|
||||
config BUSYBOX_CONFIG_MONOTONIC_SYSCALL
|
||||
bool "Use clock_gettime(CLOCK_MONOTONIC) syscall"
|
||||
default BUSYBOX_DEFAULT_MONOTONIC_SYSCALL
|
||||
help
|
||||
Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring
|
||||
time intervals (time, ping, traceroute etc need this).
|
||||
Probably requires Linux 2.6+. If not selected, gettimeofday
|
||||
will be used instead (which gives wrong results if date/time
|
||||
is reset).
|
||||
|
||||
config BUSYBOX_CONFIG_IOCTL_HEX2STR_ERROR
|
||||
bool "Use ioctl names rather than hex values in error messages"
|
||||
default BUSYBOX_DEFAULT_IOCTL_HEX2STR_ERROR
|
||||
help
|
||||
Use ioctl names rather than hex values in error messages
|
||||
(e.g. VT_DISALLOCATE rather than 0x5608). If disabled this
|
||||
saves about 1400 bytes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_EDITING
|
||||
bool "Command line editing"
|
||||
@@ -358,96 +399,3 @@ config BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN
|
||||
For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
|
||||
at shell prompt will list file named 0xff (single char name
|
||||
with char value 255), not file named '?'.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_NON_POSIX_CP
|
||||
bool "Non-POSIX, but safer, copying to special nodes"
|
||||
default BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP
|
||||
help
|
||||
With this option, "cp file symlink" will delete symlink
|
||||
and create a regular file. This does not conform to POSIX,
|
||||
but prevents a symlink attack.
|
||||
Similarly, "cp file device" will not send file's data
|
||||
to the device. (To do that, use "cat file >device")
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_VERBOSE_CP_MESSAGE
|
||||
bool "Give more precise messages when copy fails (cp, mv etc)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_VERBOSE_CP_MESSAGE
|
||||
help
|
||||
Error messages with this feature enabled:
|
||||
|
||||
$ cp file /does_not_exist/file
|
||||
cp: cannot create '/does_not_exist/file': Path does not exist
|
||||
$ cp file /vmlinuz/file
|
||||
cp: cannot stat '/vmlinuz/file': Path has non-directory component
|
||||
|
||||
If this feature is not enabled, they will be, respectively:
|
||||
|
||||
cp: cannot create '/does_not_exist/file': No such file or directory
|
||||
cp: cannot stat '/vmlinuz/file': Not a directory
|
||||
|
||||
This will cost you ~60 bytes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE
|
||||
bool "Use sendfile system call"
|
||||
default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE
|
||||
help
|
||||
When enabled, busybox will use the kernel sendfile() function
|
||||
instead of read/write loops to copy data between file descriptors
|
||||
(for example, cp command does this a lot).
|
||||
If sendfile() doesn't work, copying code falls back to read/write
|
||||
loop. sendfile() was originally implemented for faster I/O
|
||||
from files to sockets, but since Linux 2.6.33 it was extended
|
||||
to work for many more file types.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_COPYBUF_KB
|
||||
int "Copy buffer size, in kilobytes"
|
||||
range 1 1024
|
||||
default BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB
|
||||
help
|
||||
Size of buffer used by cp, mv, install, wget etc.
|
||||
Buffers which are 4 kb or less will be allocated on stack.
|
||||
Bigger buffers will be allocated with mmap, with fallback to 4 kb
|
||||
stack buffer if mmap fails.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SKIP_ROOTFS
|
||||
bool "Skip rootfs in mount table"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SKIP_ROOTFS
|
||||
help
|
||||
Ignore rootfs entry in mount table.
|
||||
|
||||
In Linux, kernel has a special filesystem, rootfs, which is initially
|
||||
mounted on /. It contains initramfs data, if kernel is configured
|
||||
to have one. Usually, another file system is mounted over / early
|
||||
in boot process, and therefore most tools which manipulate
|
||||
mount table, such as df, will skip rootfs entry.
|
||||
|
||||
However, some systems do not mount anything on /.
|
||||
If you need to configure busybox for one of these systems,
|
||||
you may find it useful to turn this option off to make df show
|
||||
initramfs statistics.
|
||||
|
||||
Otherwise, choose Y.
|
||||
|
||||
config BUSYBOX_CONFIG_MONOTONIC_SYSCALL
|
||||
bool "Use clock_gettime(CLOCK_MONOTONIC) syscall"
|
||||
default BUSYBOX_DEFAULT_MONOTONIC_SYSCALL
|
||||
help
|
||||
Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring
|
||||
time intervals (time, ping, traceroute etc need this).
|
||||
Probably requires Linux 2.6+. If not selected, gettimeofday
|
||||
will be used instead (which gives wrong results if date/time
|
||||
is reset).
|
||||
|
||||
config BUSYBOX_CONFIG_IOCTL_HEX2STR_ERROR
|
||||
bool "Use ioctl names rather than hex values in error messages"
|
||||
default BUSYBOX_DEFAULT_IOCTL_HEX2STR_ERROR
|
||||
help
|
||||
Use ioctl names rather than hex values in error messages
|
||||
(e.g. VT_DISALLOCATE rather than 0x5608). If disabled this
|
||||
saves about 1400 bytes.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HWIB
|
||||
bool "Support infiniband HW"
|
||||
default BUSYBOX_DEFAULT_FEATURE_HWIB
|
||||
help
|
||||
Support for printing infiniband addresses in network applets.
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
# DO NOT EDIT. This file is generated from Config.src
|
||||
menu "Mail Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MIME_CHARSET
|
||||
string "Default charset"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
|
||||
depends on BUSYBOX_CONFIG_MAKEMIME || BUSYBOX_CONFIG_REFORMIME || BUSYBOX_CONFIG_SENDMAIL
|
||||
help
|
||||
Default charset of the message.
|
||||
|
||||
config BUSYBOX_CONFIG_MAKEMIME
|
||||
bool "makemime (5.4 kb)"
|
||||
default BUSYBOX_DEFAULT_MAKEMIME
|
||||
@@ -41,11 +48,4 @@ config BUSYBOX_CONFIG_SENDMAIL
|
||||
help
|
||||
Barebones sendmail.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_MIME_CHARSET
|
||||
string "Default charset"
|
||||
default BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET
|
||||
depends on BUSYBOX_CONFIG_MAKEMIME || BUSYBOX_CONFIG_REFORMIME || BUSYBOX_CONFIG_SENDMAIL
|
||||
help
|
||||
Default charset of the message.
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -47,6 +47,32 @@ config BUSYBOX_CONFIG_VERBOSE_RESOLUTION_ERRORS
|
||||
"can't resolve 'hostname.com'" and want to know more.
|
||||
This may increase size of your executable a bit.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_ETC_NETWORKS
|
||||
bool "Support /etc/networks"
|
||||
default BUSYBOX_DEFAULT_FEATURE_ETC_NETWORKS
|
||||
help
|
||||
Enable support for network names in /etc/networks. This is
|
||||
a rarely used feature which allows you to use names
|
||||
instead of IP/mask pairs in route command.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_ETC_SERVICES
|
||||
bool "Consult /etc/services even for well-known ports"
|
||||
default BUSYBOX_DEFAULT_FEATURE_ETC_SERVICES
|
||||
help
|
||||
Look up e.g. "telnet" and "http" in /etc/services file
|
||||
instead of assuming ports 23 and 80.
|
||||
This is almost never necessary (everybody uses standard ports),
|
||||
and it makes sense to avoid reading this file.
|
||||
If you disable this option, in the cases where port is explicitly
|
||||
specified as a service name (e.g. "telnet HOST PORTNAME"),
|
||||
it will still be looked up in /etc/services.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HWIB
|
||||
bool "Support infiniband HW"
|
||||
default BUSYBOX_DEFAULT_FEATURE_HWIB
|
||||
help
|
||||
Support for printing infiniband addresses in network applets.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TLS_SHA1
|
||||
bool "In TLS code, support ciphers which use deprecated SHA1"
|
||||
depends on BUSYBOX_CONFIG_TLS
|
||||
@@ -173,6 +199,12 @@ config BUSYBOX_CONFIG_HTTPD
|
||||
help
|
||||
HTTP server.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HTTPD_PORT_DEFAULT
|
||||
int "Default port"
|
||||
default BUSYBOX_DEFAULT_FEATURE_HTTPD_PORT_DEFAULT
|
||||
range 1 65535
|
||||
depends on BUSYBOX_CONFIG_HTTPD
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_HTTPD_RANGES
|
||||
bool "Support 'Ranges:' header"
|
||||
default BUSYBOX_DEFAULT_FEATURE_HTTPD_RANGES
|
||||
@@ -774,7 +806,6 @@ config BUSYBOX_CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS
|
||||
bool "Enable long options"
|
||||
default BUSYBOX_DEFAULT_FEATURE_NSLOOKUP_LONG_OPTIONS
|
||||
depends on BUSYBOX_CONFIG_FEATURE_NSLOOKUP_BIG && BUSYBOX_CONFIG_LONG_OPTS
|
||||
|
||||
config BUSYBOX_CONFIG_NTPD
|
||||
bool "ntpd (22 kb)"
|
||||
default BUSYBOX_DEFAULT_NTPD
|
||||
@@ -945,6 +976,12 @@ config BUSYBOX_CONFIG_FEATURE_TELNETD_STANDALONE
|
||||
help
|
||||
Selecting this will make telnetd able to run standalone.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TELNETD_PORT_DEFAULT
|
||||
int "Default port"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TELNETD_PORT_DEFAULT
|
||||
range 1 65535
|
||||
depends on BUSYBOX_CONFIG_FEATURE_TELNETD_STANDALONE
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_TELNETD_INETD_WAIT
|
||||
bool "Support -w SEC option (inetd wait mode)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_TELNETD_INETD_WAIT
|
||||
|
||||
@@ -6,6 +6,21 @@
|
||||
|
||||
menu "Process Utilities"
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_FAST_TOP
|
||||
bool "Faster /proc scanning code (+100 bytes)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_FAST_TOP # all "fast or small" options default to small
|
||||
help
|
||||
This option makes top and ps ~20% faster (or 20% less CPU hungry),
|
||||
but code size is slightly bigger.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS
|
||||
bool "Support thread display in ps/pstree/top"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
|
||||
depends on BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_PSTREE
|
||||
help
|
||||
Enables the ps -T option, showing of threads in pstree,
|
||||
and 'h' command in top.
|
||||
|
||||
config BUSYBOX_CONFIG_FREE
|
||||
bool "free (3.1 kb)"
|
||||
default BUSYBOX_DEFAULT_FREE
|
||||
@@ -259,12 +274,4 @@ config BUSYBOX_CONFIG_WATCH
|
||||
watch is used to execute a program periodically, showing
|
||||
output to the screen.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SHOW_THREADS
|
||||
bool "Support thread display in ps/pstree/top"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SHOW_THREADS
|
||||
depends on BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_TOP || BUSYBOX_CONFIG_PSTREE
|
||||
help
|
||||
Enables the ps -T option, showing of threads in pstree,
|
||||
and 'h' command in top.
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/networking/libiproute/iplink.c
|
||||
+++ b/networking/libiproute/iplink.c
|
||||
@@ -652,7 +652,7 @@ static int do_add_or_delete(char **argv,
|
||||
@@ -683,7 +683,7 @@ static int do_add_or_delete(char **argv,
|
||||
}
|
||||
xrtnl_open(&rth);
|
||||
ll_init_map(&rth);
|
||||
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=lua
|
||||
PKG_VERSION:=5.1.5
|
||||
PKG_RELEASE:=9
|
||||
PKG_RELEASE:=10
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.lua.org/ftp/ \
|
||||
@@ -125,7 +125,7 @@ endif
|
||||
|
||||
define Host/Compile
|
||||
$(MAKE) -C $(HOST_BUILD_DIR) \
|
||||
CC="$(HOSTCC) -std=gnu99" \
|
||||
CC="$(HOSTCC) $(HOST_FPIC) -std=gnu99" \
|
||||
$(LUA_OS)
|
||||
endef
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=lua
|
||||
PKG_VERSION:=5.3.5
|
||||
PKG_RELEASE:=4
|
||||
PKG_RELEASE:=5
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.lua.org/ftp/ \
|
||||
@@ -110,7 +110,7 @@ endif
|
||||
|
||||
define Host/Compile
|
||||
$(MAKE) -C $(HOST_BUILD_DIR) \
|
||||
CC="$(HOSTCC) -std=gnu99" \
|
||||
CC="$(HOSTCC) $(HOST_FPIC) -std=gnu99" \
|
||||
$(LUA_OS)
|
||||
endef
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ TARGET_CFLAGS += \
|
||||
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
MAKE_VARS += CHECK_RUN_DIR=0
|
||||
MAKE_FLAGS += CHECK_RUN_DIR=0
|
||||
|
||||
define Build/Compile
|
||||
$(call Build/Compile/Default,mdadm)
|
||||
|
||||
@@ -13,7 +13,7 @@ produce a noisy warning.
|
||||
|
||||
--- a/drivers/usb/host/xhci-pci.c
|
||||
+++ b/drivers/usb/host/xhci-pci.c
|
||||
@@ -276,6 +276,7 @@ static void xhci_pci_quirks(struct devic
|
||||
@@ -279,6 +279,7 @@ static void xhci_pci_quirks(struct devic
|
||||
pdev->device == 0x0015) {
|
||||
xhci->quirks |= XHCI_RESET_ON_RESUME;
|
||||
xhci->quirks |= XHCI_ZERO_64B_REGS;
|
||||
|
||||
230
target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts
Normal file
230
target/linux/ath79/dts/ar9344_openmesh_om5p-an.dts
Normal file
@@ -0,0 +1,230 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "ar9344.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "openmesh,om5p-an", "qca,ar9344";
|
||||
model = "OpenMesh OM5P-AN";
|
||||
|
||||
chosen {
|
||||
/delete-property/ bootargs;
|
||||
};
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power_blue;
|
||||
led-failsafe = &led_power_blue;
|
||||
led-running = &led_power_blue;
|
||||
led-upgrade = &led_power_blue;
|
||||
label-mac-device = ð0;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_lan_wan_blue_pin>;
|
||||
|
||||
led_power_blue: power_blue {
|
||||
label = "blue:power";
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
wan_blue {
|
||||
label = "blue:wan";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
lan_blue {
|
||||
label = "blue:lan";
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wifi_green {
|
||||
label = "green:wifi";
|
||||
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
wifi_yellow {
|
||||
label = "yellow:wifi";
|
||||
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wifi_red {
|
||||
label = "red:wifi";
|
||||
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c {
|
||||
compatible = "i2c-gpio";
|
||||
gpios = <&gpio 21 GPIO_ACTIVE_HIGH /* sda */
|
||||
&gpio 20 GPIO_ACTIVE_HIGH /* scl */
|
||||
>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
i2c-gpio,scl-open-drain;
|
||||
i2c-gpio,sda-open-drain;
|
||||
|
||||
tmp423a@4c {
|
||||
compatible = "ti,tmp423";
|
||||
reg = <0x4c>;
|
||||
};
|
||||
};
|
||||
|
||||
watchdog {
|
||||
compatible = "linux,wdt-gpio";
|
||||
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||
hw_algo = "toggle";
|
||||
/* hw_margin_ms is actually 300s but driver limits it to 60s */
|
||||
hw_margin_ms = <60000>;
|
||||
always-running;
|
||||
};
|
||||
};
|
||||
|
||||
&ref {
|
||||
clock-frequency = <40000000>;
|
||||
};
|
||||
|
||||
&pinmux {
|
||||
led_lan_wan_blue_pin: pinmux_lan_wan_blue_pin {
|
||||
pinctrl-single,bits = <0xc 0x0 0xffff0000>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <40000000>;
|
||||
|
||||
/* partitions are passed via bootloader */
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x000000 0x040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x040000 0x010000>;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
label = "custom";
|
||||
reg = <0x050000 0x060000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@b0000 {
|
||||
label = "inactive";
|
||||
reg = <0x0b0000 0x7a0000>;
|
||||
};
|
||||
|
||||
partition@850000 {
|
||||
label = "inactive2";
|
||||
reg = <0x850000 0x7a0000>;
|
||||
};
|
||||
|
||||
art: partition@ff0000 {
|
||||
label = "ART";
|
||||
reg = <0xff0000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
phy-mask = <0x80>;
|
||||
|
||||
phy7: ethernet-phy@7 {
|
||||
reg = <7>;
|
||||
eee-broken-100tx;
|
||||
eee-broken-1000t;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
pll-data = <0x02000000 0x00000101 0x00001313>;
|
||||
|
||||
nvmem-cells = <&macaddr_art_0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
phy-mode = "rgmii-id";
|
||||
phy-handle = <&phy7>;
|
||||
|
||||
gmac-config {
|
||||
device = <&gmac>;
|
||||
rgmii-gmac0 = <1>;
|
||||
rxd-delay = <2>;
|
||||
rxdv-delay = <2>;
|
||||
switch-phy-swap = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
ð1 {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&macaddr_art_0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <1>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
nvmem-cells = <&macaddr_art_0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <2>;
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "pci168c,0030";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
qca,no-eeprom;
|
||||
nvmem-cells = <&macaddr_art_0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <16>;
|
||||
};
|
||||
};
|
||||
|
||||
&art {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_art_0: macaddr@0 {
|
||||
reg = <0x0 0x6>;
|
||||
};
|
||||
};
|
||||
216
target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v1.dts
Normal file
216
target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v1.dts
Normal file
@@ -0,0 +1,216 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca955x.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "openmesh,om5p-ac-v1", "qca,qca9558";
|
||||
model = "OpenMesh OM5P-AC v1";
|
||||
|
||||
chosen {
|
||||
/delete-property/ bootargs;
|
||||
};
|
||||
|
||||
aliases {
|
||||
serial0 = &uart;
|
||||
led-boot = &led_power_blue;
|
||||
led-failsafe = &led_power_blue;
|
||||
led-running = &led_power_blue;
|
||||
led-upgrade = &led_power_blue;
|
||||
label-mac-device = ð0;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_power_blue: power_blue {
|
||||
label = "blue:power";
|
||||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
wan_blue {
|
||||
label = "blue:wan";
|
||||
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
lan_blue {
|
||||
label = "blue:lan";
|
||||
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wifi_green {
|
||||
label = "green:wifi";
|
||||
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
|
||||
wifi_yellow {
|
||||
label = "yellow:wifi";
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
wifi_red {
|
||||
label = "red:wifi";
|
||||
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c {
|
||||
compatible = "i2c-gpio";
|
||||
gpios = <&gpio 11 GPIO_ACTIVE_HIGH /* sda */
|
||||
&gpio 12 GPIO_ACTIVE_HIGH /* scl */
|
||||
>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
i2c-gpio,scl-open-drain;
|
||||
i2c-gpio,sda-open-drain;
|
||||
|
||||
tmp423a@4c {
|
||||
compatible = "ti,tmp423";
|
||||
reg = <0x4c>;
|
||||
};
|
||||
};
|
||||
|
||||
watchdog {
|
||||
compatible = "linux,wdt-gpio";
|
||||
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||||
hw_algo = "toggle";
|
||||
/* hw_margin_ms is actually 300s but driver limits it to 60s */
|
||||
hw_margin_ms = <60000>;
|
||||
always-running;
|
||||
};
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <40000000>;
|
||||
|
||||
/* partitions are passed via bootloader */
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x000000 0x040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x040000 0x010000>;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
label = "custom";
|
||||
reg = <0x050000 0x060000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@b0000 {
|
||||
label = "inactive";
|
||||
reg = <0x0b0000 0x7a0000>;
|
||||
};
|
||||
|
||||
partition@850000 {
|
||||
label = "inactive2";
|
||||
reg = <0x850000 0x7a0000>;
|
||||
};
|
||||
|
||||
art: partition@ff0000 {
|
||||
label = "ART";
|
||||
reg = <0xff0000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
phy-mask = <0x6>;
|
||||
|
||||
phy1: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
eee-broken-100tx;
|
||||
eee-broken-1000t;
|
||||
};
|
||||
|
||||
phy2: ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
eee-broken-100tx;
|
||||
eee-broken-1000t;
|
||||
at803x-override-sgmii-link-check;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
pll-data = <0x82000101 0x80000101 0x80001313>;
|
||||
|
||||
nvmem-cells = <&macaddr_art_0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
phy-mode = "rgmii-id";
|
||||
phy-handle = <&phy1>;
|
||||
|
||||
gmac-config {
|
||||
device = <&gmac>;
|
||||
rgmii-enabled = <1>;
|
||||
rxd-delay = <3>;
|
||||
rxdv-delay = <3>;
|
||||
txd-delay = <0>;
|
||||
txen-delay = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
ð1 {
|
||||
status = "okay";
|
||||
|
||||
pll-data = <0x03000101 0x80000101 0x80001313>;
|
||||
|
||||
nvmem-cells = <&macaddr_art_6>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
qca955x-sgmii-fixup;
|
||||
|
||||
phy-handle = <&phy2>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
mtd-cal-data = <&art 0x1000>;
|
||||
nvmem-cells = <&macaddr_art_0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <2>;
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&art {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_art_0: macaddr@0 {
|
||||
reg = <0x0 0x6>;
|
||||
};
|
||||
|
||||
macaddr_art_6: macaddr@6 {
|
||||
reg = <0x6 0x6>;
|
||||
};
|
||||
};
|
||||
158
target/linux/ath79/dts/qca9563_asus_rp-ac66.dts
Normal file
158
target/linux/ath79/dts/qca9563_asus_rp-ac66.dts
Normal file
@@ -0,0 +1,158 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "qca956x.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
/ {
|
||||
model = "ASUS RP-AC66";
|
||||
compatible = "asus,rp-ac66", "qca,qca9563";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_orange;
|
||||
led-failsafe = &led_orange;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_orange;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_power: power {
|
||||
label = "green:power";
|
||||
gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_orange: wps {
|
||||
label = "orange:wps";
|
||||
gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
rssilow-wlan0 {
|
||||
label = "blue:rssilow-wlan0";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
rssimedium-wlan0 {
|
||||
label = "red:rssimedium-wlan0";
|
||||
gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
rssihigh-wlan0 {
|
||||
label = "green:rssihigh-wlan0";
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
rssilow-wlan1 {
|
||||
label = "blue:rssilow-wlan1";
|
||||
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
rssimedium-wlan1 {
|
||||
label = "red:rssimedium-wlan1";
|
||||
gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
rssihigh-wlan1 {
|
||||
label = "green:rssihigh-wlan1";
|
||||
gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
wps {
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
reset {
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x000000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x040000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
art: partition@50000 {
|
||||
label = "art";
|
||||
reg = <0x050000 0x10000>;
|
||||
read-only;
|
||||
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_art_1002: macaddr@1002 {
|
||||
reg = <0x1002 0x6>;
|
||||
};
|
||||
};
|
||||
|
||||
partition@60000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x060000 0xf20000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
phy-mask = <0>;
|
||||
|
||||
phy0: ethernet-phy@3 {
|
||||
reg = <0x3>;
|
||||
phy-mode = "sgmii";
|
||||
qca,mib-poll-interval = <500>;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
phy-mode = "sgmii";
|
||||
nvmem-cells = <&macaddr_art_1002>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
phy-handle = <&phy0>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
qca,no-eeprom;
|
||||
};
|
||||
@@ -48,6 +48,16 @@ alfa-network,r36a)
|
||||
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
|
||||
ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x10"
|
||||
;;
|
||||
asus,rp-ac66)
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_rssimon "wlan1" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow-wlan0" "RSSILOW" "blue:rssilow-wlan0" "wlan0" "1" "1"
|
||||
ucidef_set_led_rssi "rssimedium-wlan0" "RSSIMEDIUM" "red:rssimedium-wlan0" "wlan0" "1" "79"
|
||||
ucidef_set_led_rssi "rssihigh-wlan0" "RSSIHIGH" "green:rssihigh-wlan0" "wlan0" "70" "100"
|
||||
ucidef_set_led_rssi "rssilow-wlan1" "RSSILOW" "blue:rssilow-wlan1" "wlan1" "1" "1"
|
||||
ucidef_set_led_rssi "rssimedium-wlan1" "RSSIMEDIUM" "red:rssimedium-wlan1" "wlan1" "1" "79"
|
||||
ucidef_set_led_rssi "rssihigh-wlan1" "RSSIHIGH" "green:rssihigh-wlan1" "wlan1" "70" "100"
|
||||
;;
|
||||
avm,fritz1750e)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
||||
ucidef_set_rssimon "wlan1" "200000" "1"
|
||||
@@ -261,6 +271,14 @@ openmesh,om2p-hs-v4)
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth0"
|
||||
ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x02"
|
||||
;;
|
||||
openmesh,om5p-ac-v1)
|
||||
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
||||
;;
|
||||
openmesh,om5p-an)
|
||||
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
|
||||
ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x02"
|
||||
;;
|
||||
pcs,cr3000)
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "blue:lan1" "switch0" "0x04"
|
||||
|
||||
@@ -15,6 +15,7 @@ ath79_setup_interfaces()
|
||||
alfa-network,pi-wifi4|\
|
||||
arduino,yun|\
|
||||
aruba,ap-105|\
|
||||
asus,rp-ac66|\
|
||||
avm,fritz1750e|\
|
||||
avm,fritz300e|\
|
||||
avm,fritzdvbc|\
|
||||
@@ -534,6 +535,10 @@ ath79_setup_macs()
|
||||
lan_mac=$(macaddr_setbit $base_mac 29)
|
||||
[ $lan_mac = $base_mac ] && lan_mac=$(macaddr_unsetbit $base_mac 29)
|
||||
;;
|
||||
asus,rp-ac66)
|
||||
lan_mac=$(mtd_get_mac_binary art 0x1002)
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
avm,fritz1750e|\
|
||||
avm,fritz450e|\
|
||||
avm,fritzdvbc)
|
||||
|
||||
@@ -12,6 +12,9 @@ case "$FIRMWARE" in
|
||||
8dev,lima)
|
||||
caldata_extract "art" 0x1000 0x800
|
||||
;;
|
||||
asus,rp-ac66)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
;;
|
||||
avm,fritz1750e|\
|
||||
avm,fritz4020|\
|
||||
avm,fritz450e|\
|
||||
@@ -124,7 +127,8 @@ case "$FIRMWARE" in
|
||||
caldata_extract "art" 0x1000 0x1000
|
||||
;;
|
||||
openmesh,mr600-v1|\
|
||||
openmesh,mr600-v2)
|
||||
openmesh,mr600-v2|\
|
||||
openmesh,om5p-an)
|
||||
caldata_extract "ART" 0x5000 0x440
|
||||
;;
|
||||
wd,mynet-n600|\
|
||||
|
||||
@@ -21,6 +21,7 @@ case "$FIRMWARE" in
|
||||
avm,fritzdvbc)
|
||||
caldata_extract "urlader" 0x198a 0x844
|
||||
;;
|
||||
asus,rp-ac66|\
|
||||
comfast,cf-wr650ac-v1|\
|
||||
comfast,cf-wr650ac-v2|\
|
||||
devolo,dlan-pro-1200plus-ac|\
|
||||
@@ -164,6 +165,10 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
"ath10k/cal-pci-0000:01:00.0.bin")
|
||||
case $board in
|
||||
openmesh,om5p-ac-v1)
|
||||
caldata_extract "ART" 0x5000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16)
|
||||
;;
|
||||
sitecom,wlr-8100)
|
||||
caldata_extract "art" 0x5000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1)
|
||||
|
||||
@@ -80,7 +80,9 @@ platform_do_upgrade() {
|
||||
openmesh,om2p-hs-v3|\
|
||||
openmesh,om2p-hs-v4|\
|
||||
openmesh,om2p-lc|\
|
||||
openmesh,om5p)
|
||||
openmesh,om5p|\
|
||||
openmesh,om5p-ac-v1|\
|
||||
openmesh,om5p-an)
|
||||
PART_NAME="inactive"
|
||||
platform_do_upgrade_openmesh "$1"
|
||||
;;
|
||||
|
||||
@@ -357,6 +357,18 @@ define Device/aruba_ap-105
|
||||
endef
|
||||
TARGET_DEVICES += aruba_ap-105
|
||||
|
||||
define Device/asus_rp-ac66
|
||||
SOC := qca9563
|
||||
DEVICE_VENDOR := ASUS
|
||||
DEVICE_MODEL := RP-AC66
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
|
||||
append-rootfs | pad-rootfs
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct \
|
||||
rssileds -swconfig
|
||||
endef
|
||||
TARGET_DEVICES += asus_rp-ac66
|
||||
|
||||
define Device/atheros_db120
|
||||
$(Device/loader-okli-uimage)
|
||||
SOC := ar9344
|
||||
@@ -1937,6 +1949,17 @@ define Device/openmesh_om5p
|
||||
endef
|
||||
TARGET_DEVICES += openmesh_om5p
|
||||
|
||||
define Device/openmesh_om5p-ac-v1
|
||||
$(Device/openmesh_common_64k)
|
||||
SOC := qca9558
|
||||
DEVICE_MODEL := OM5P-AC
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
OPENMESH_CE_TYPE := OM5PAC
|
||||
SUPPORTED_DEVICES += om5p-ac
|
||||
endef
|
||||
TARGET_DEVICES += openmesh_om5p-ac-v1
|
||||
|
||||
define Device/openmesh_om5p-ac-v2
|
||||
SOC := qca9558
|
||||
DEVICE_VENDOR := OpenMesh
|
||||
@@ -1949,6 +1972,15 @@ define Device/openmesh_om5p-ac-v2
|
||||
endef
|
||||
TARGET_DEVICES += openmesh_om5p-ac-v2
|
||||
|
||||
define Device/openmesh_om5p-an
|
||||
$(Device/openmesh_common_64k)
|
||||
SOC := ar9344
|
||||
DEVICE_MODEL := OM5P-AN
|
||||
OPENMESH_CE_TYPE := OM5P
|
||||
SUPPORTED_DEVICES += om5p-an
|
||||
endef
|
||||
TARGET_DEVICES += openmesh_om5p-an
|
||||
|
||||
define Device/pcs_cap324
|
||||
SOC := ar9344
|
||||
DEVICE_VENDOR := PowerCloud Systems
|
||||
|
||||
@@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
||||
|
||||
--- a/drivers/usb/host/xhci-pci.c
|
||||
+++ b/drivers/usb/host/xhci-pci.c
|
||||
@@ -288,6 +288,7 @@ static void xhci_pci_quirks(struct devic
|
||||
@@ -291,6 +291,7 @@ static void xhci_pci_quirks(struct devic
|
||||
if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) {
|
||||
xhci->quirks |= XHCI_LPM_SUPPORT;
|
||||
xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS;
|
||||
|
||||
@@ -319,7 +319,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
int tx_size, err, i;
|
||||
struct ag71xx *ag;
|
||||
|
||||
@@ -1957,10 +1956,8 @@ static int ag71xx_probe(struct platform_
|
||||
@@ -1952,10 +1951,8 @@ static int ag71xx_probe(struct platform_
|
||||
ag->stop_desc->ctrl = 0;
|
||||
ag->stop_desc->next = (u32)ag->stop_desc_dma;
|
||||
|
||||
|
||||
@@ -705,6 +705,7 @@ CONFIG_BPF_JIT_DEFAULT_ON=y
|
||||
# CONFIG_BPF_PRELOAD is not set
|
||||
# CONFIG_BPF_STREAM_PARSER is not set
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
|
||||
# CONFIG_BPQETHER is not set
|
||||
CONFIG_BQL=y
|
||||
CONFIG_BRANCH_PROFILE_NONE=y
|
||||
|
||||
@@ -230,7 +230,7 @@ int parse_fit_partitions(struct parsed_partitions *state, u64 fit_start_sector,
|
||||
strlcat(state->pp_buf, tmp, PAGE_SIZE);
|
||||
|
||||
state->parts[*slot].has_info = true;
|
||||
|
||||
state->parts[*slot].flags |= ADDPART_FLAG_READONLY;
|
||||
if (config_loadables && !strcmp(image_name, config_loadables)) {
|
||||
printk(KERN_DEBUG "FIT: selecting configured loadable \"%s\" to be root filesystem\n", image_name);
|
||||
state->parts[*slot].flags |= ADDPART_FLAG_ROOTDEV;
|
||||
|
||||
@@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -2337,6 +2337,13 @@ config UNUSED_KSYMS_WHITELIST
|
||||
@@ -2347,6 +2347,13 @@ config UNUSED_KSYMS_WHITELIST
|
||||
one per line. The path can be absolute, or relative to the kernel
|
||||
source tree.
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
--- a/block/blk.h
|
||||
+++ b/block/blk.h
|
||||
@@ -361,6 +361,7 @@ char *disk_name(struct gendisk *hd, int
|
||||
@@ -361,6 +361,8 @@ char *disk_name(struct gendisk *hd, int
|
||||
#define ADDPART_FLAG_NONE 0
|
||||
#define ADDPART_FLAG_RAID 1
|
||||
#define ADDPART_FLAG_WHOLEDISK 2
|
||||
+#define ADDPART_FLAG_ROOTDEV 4
|
||||
+#define ADDPART_FLAG_READONLY 4
|
||||
+#define ADDPART_FLAG_ROOTDEV 8
|
||||
void delete_partition(struct hd_struct *part);
|
||||
int bdev_add_partition(struct block_device *bdev, int partno,
|
||||
sector_t start, sector_t length);
|
||||
@@ -73,13 +74,16 @@
|
||||
#ifdef CONFIG_SGI_PARTITION
|
||||
sgi_partition,
|
||||
#endif
|
||||
@@ -694,6 +701,11 @@ static bool blk_add_partition(struct gen
|
||||
@@ -694,6 +701,14 @@ static bool blk_add_partition(struct gen
|
||||
(state->parts[p].flags & ADDPART_FLAG_RAID))
|
||||
md_autodetect_dev(part_to_dev(part)->devt);
|
||||
|
||||
+#ifdef CONFIG_FIT_PARTITION
|
||||
+ if ((state->parts[p].flags & ADDPART_FLAG_ROOTDEV) && ROOT_DEV == 0)
|
||||
+ ROOT_DEV = part_to_dev(part)->devt;
|
||||
+
|
||||
+ if (state->parts[p].flags & ADDPART_FLAG_READONLY)
|
||||
+ part->policy = true;
|
||||
+#endif
|
||||
+
|
||||
return true;
|
||||
|
||||
@@ -109,30 +109,38 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
|
||||
static int aqr_config_intr(struct phy_device *phydev)
|
||||
{
|
||||
bool en = phydev->interrupts == PHY_INTERRUPT_ENABLED;
|
||||
@@ -738,6 +808,22 @@ static struct phy_driver aqr_driver[] =
|
||||
@@ -738,6 +808,30 @@ static struct phy_driver aqr_driver[] =
|
||||
.get_stats = aqr107_get_stats,
|
||||
.link_change_notify = aqr107_link_change_notify,
|
||||
},
|
||||
+{
|
||||
+ PHY_ID_MATCH_MODEL(PHY_ID_AQR112),
|
||||
+ .name = "Aquantia AQR112",
|
||||
+ .config_aneg = aqr_config_aneg_set_prot,
|
||||
+ .probe = aqr107_probe,
|
||||
+ .config_aneg = aqr_config_aneg_set_prot,
|
||||
+ .config_intr = aqr_config_intr,
|
||||
+ .ack_interrupt = aqr_ack_interrupt,
|
||||
+ .read_status = aqr107_read_status,
|
||||
+ .get_sset_count = aqr107_get_sset_count,
|
||||
+ .get_strings = aqr107_get_strings,
|
||||
+ .get_stats = aqr107_get_stats,
|
||||
+},
|
||||
+{
|
||||
+ PHY_ID_MATCH_MODEL(PHY_ID_AQR412),
|
||||
+ .name = "Aquantia AQR412",
|
||||
+ .config_aneg = aqr_config_aneg_set_prot,
|
||||
+ .probe = aqr107_probe,
|
||||
+ .config_aneg = aqr_config_aneg_set_prot,
|
||||
+ .config_intr = aqr_config_intr,
|
||||
+ .ack_interrupt = aqr_ack_interrupt,
|
||||
+ .read_status = aqr107_read_status,
|
||||
+ .get_sset_count = aqr107_get_sset_count,
|
||||
+ .get_strings = aqr107_get_strings,
|
||||
+ .get_stats = aqr107_get_stats,
|
||||
+},
|
||||
};
|
||||
|
||||
module_phy_driver(aqr_driver);
|
||||
@@ -748,9 +834,11 @@ static struct mdio_device_id __maybe_unu
|
||||
@@ -748,9 +842,11 @@ static struct mdio_device_id __maybe_unu
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR105) },
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR106) },
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR107) },
|
||||
@@ -0,0 +1,34 @@
|
||||
From 5f008cb22f60da4e10375f22266c1a4e20b1252e Mon Sep 17 00:00:00 2001
|
||||
From: Alex Marginean <alexandru.marginean@nxp.com>
|
||||
Date: Fri, 20 Sep 2019 18:22:52 +0300
|
||||
Subject: [PATCH] drivers: net: phy: aquantia: fix system side protocol
|
||||
misconfiguration
|
||||
|
||||
Do not set up protocols for speeds that are not supported by FW. Enabling
|
||||
these protocols leads to link issues on system side.
|
||||
|
||||
Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
|
||||
---
|
||||
drivers/net/phy/aquantia_main.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/phy/aquantia_main.c
|
||||
+++ b/drivers/net/phy/aquantia_main.c
|
||||
@@ -301,10 +301,16 @@ static int aqr_config_aneg_set_prot(stru
|
||||
phy_write_mmd(phydev, MDIO_MMD_VEND1, AQUANTIA_VND1_GSTART_RATE,
|
||||
aquantia_syscfg[if_type].start_rate);
|
||||
|
||||
- for (i = 0; i <= aquantia_syscfg[if_type].cnt; i++)
|
||||
+ for (i = 0; i <= aquantia_syscfg[if_type].cnt; i++) {
|
||||
+ u16 reg = phy_read_mmd(phydev, MDIO_MMD_VEND1,
|
||||
+ AQUANTIA_VND1_GSYSCFG_BASE + i);
|
||||
+ if (!reg)
|
||||
+ continue;
|
||||
+
|
||||
phy_write_mmd(phydev, MDIO_MMD_VEND1,
|
||||
AQUANTIA_VND1_GSYSCFG_BASE + i,
|
||||
aquantia_syscfg[if_type].syscfg);
|
||||
+ }
|
||||
|
||||
/* wake PHY back up */
|
||||
phy_write_mmd(phydev, MDIO_MMD_VEND1, AQUANTIA_VND1_GLOBAL_SC, 0);
|
||||
@@ -18,8 +18,8 @@ Add a new entry for AQR113 PHY_ID
|
||||
#define PHY_ID_AQR113C 0x31c31c12
|
||||
#define PHY_ID_AQCS109 0x03a1b5c2
|
||||
#define PHY_ID_AQR405 0x03a1b4b0
|
||||
@@ -817,6 +818,14 @@ static struct phy_driver aqr_driver[] =
|
||||
.read_status = aqr107_read_status,
|
||||
@@ -827,6 +828,14 @@ static struct phy_driver aqr_driver[] =
|
||||
.get_stats = aqr107_get_stats,
|
||||
},
|
||||
{
|
||||
+ PHY_ID_MATCH_MODEL(PHY_ID_AQR113),
|
||||
@@ -32,8 +32,8 @@ Add a new entry for AQR113 PHY_ID
|
||||
+{
|
||||
PHY_ID_MATCH_MODEL(PHY_ID_AQR412),
|
||||
.name = "Aquantia AQR412",
|
||||
.config_aneg = aqr_config_aneg_set_prot,
|
||||
@@ -835,6 +844,7 @@ static struct mdio_device_id __maybe_unu
|
||||
.probe = aqr107_probe,
|
||||
@@ -849,6 +858,7 @@ static struct mdio_device_id __maybe_unu
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR106) },
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR107) },
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR112) },
|
||||
@@ -21,30 +21,38 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
#define PHY_ID_AQR113 0x31c31c40
|
||||
#define PHY_ID_AQR113C 0x31c31c12
|
||||
#define PHY_ID_AQCS109 0x03a1b5c2
|
||||
@@ -818,6 +820,22 @@ static struct phy_driver aqr_driver[] =
|
||||
.read_status = aqr107_read_status,
|
||||
@@ -828,6 +830,30 @@ static struct phy_driver aqr_driver[] =
|
||||
.get_stats = aqr107_get_stats,
|
||||
},
|
||||
{
|
||||
+ PHY_ID_MATCH_MODEL(PHY_ID_AQR112C),
|
||||
+ .name = "Aquantia AQR112C",
|
||||
+ .probe = aqr107_probe,
|
||||
+ .config_aneg = aqr_config_aneg_set_prot,
|
||||
+ .config_intr = aqr_config_intr,
|
||||
+ .ack_interrupt = aqr_ack_interrupt,
|
||||
+ .read_status = aqr107_read_status,
|
||||
+ .get_sset_count = aqr107_get_sset_count,
|
||||
+ .get_strings = aqr107_get_strings,
|
||||
+ .get_stats = aqr107_get_stats,
|
||||
+},
|
||||
+{
|
||||
+ PHY_ID_MATCH_MODEL(PHY_ID_AQR112R),
|
||||
+ .name = "Aquantia AQR112R",
|
||||
+ .probe = aqr107_probe,
|
||||
+ .config_aneg = aqr_config_aneg_set_prot,
|
||||
+ .config_intr = aqr_config_intr,
|
||||
+ .ack_interrupt = aqr_ack_interrupt,
|
||||
+ .read_status = aqr107_read_status,
|
||||
+ .get_sset_count = aqr107_get_sset_count,
|
||||
+ .get_strings = aqr107_get_strings,
|
||||
+ .get_stats = aqr107_get_stats,
|
||||
+},
|
||||
+{
|
||||
PHY_ID_MATCH_MODEL(PHY_ID_AQR113),
|
||||
.name = "Aquantia AQR113",
|
||||
.config_aneg = aqr_config_aneg,
|
||||
@@ -844,6 +862,8 @@ static struct mdio_device_id __maybe_unu
|
||||
@@ -858,6 +884,8 @@ static struct mdio_device_id __maybe_unu
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR106) },
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR107) },
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR112) },
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
|
||||
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1790,6 +1790,15 @@ config EMBEDDED
|
||||
@@ -1800,6 +1800,15 @@ config EMBEDDED
|
||||
an embedded system so certain expert options are available
|
||||
for configuration.
|
||||
|
||||
|
||||
@@ -3,26 +3,6 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
|
||||
DEVICE_VARS += TPLINK_BOARD_ID
|
||||
|
||||
define Build/buffalo-rootfs-cksum
|
||||
( \
|
||||
echo -ne "\x$$(od -A n -t u1 $@ | tr -s ' ' '\n' | \
|
||||
$(STAGING_DIR_HOST)/bin/awk '{s+=$$0}END{printf "%x", 255-s%256}')"; \
|
||||
) >> $@
|
||||
endef
|
||||
|
||||
define Build/edimax-header
|
||||
$(eval edimax_model=$(word 1,$(1)))
|
||||
|
||||
$(STAGING_DIR_HOST)/bin/mkedimaximg \
|
||||
-b -s CSYS -m $(edimax_model) \
|
||||
-f 0x70000 -S 0x1200000 \
|
||||
-i $@ -o $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Device/Default
|
||||
PROFILES := Default
|
||||
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
|
||||
@@ -59,418 +39,6 @@ define Device/UbiFit
|
||||
IMAGE/nand-sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
|
||||
define Device/DniImage
|
||||
KERNEL_SUFFIX := -uImage
|
||||
KERNEL = kernel-bin | append-dtb | uImage none
|
||||
KERNEL_NAME := zImage
|
||||
NETGEAR_BOARD_ID :=
|
||||
NETGEAR_HW_ID :=
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGES += factory.img
|
||||
IMAGE/factory.img := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-ubi | netgear-dni
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | append-metadata
|
||||
endef
|
||||
|
||||
define Device/TpSafeImage
|
||||
KERNEL_SUFFIX := -uImage
|
||||
KERNEL = kernel-bin | append-dtb | uImage none
|
||||
KERNEL_NAME := zImage
|
||||
TPLINK_BOARD_ID :=
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
|
||||
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | append-metadata
|
||||
endef
|
||||
|
||||
define Device/ZyXELImage
|
||||
KERNEL_SUFFIX := -uImage
|
||||
KERNEL = kernel-bin | append-dtb | uImage none | pad-to $$(KERNEL_SIZE)
|
||||
KERNEL_NAME := zImage
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to $$$$(BLOCKSIZE) | zyxel-ras-image separate-kernel
|
||||
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to $$$$(BLOCKSIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
|
||||
endef
|
||||
|
||||
define Device/askey_rt4230w-rev6
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := Askey
|
||||
DEVICE_MODEL := RT4230W
|
||||
DEVICE_VARIANT := REV6
|
||||
SOC := qcom-ipq8065
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_IN_UBI := 1
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
|
||||
endef
|
||||
TARGET_DEVICES += askey_rt4230w-rev6
|
||||
|
||||
define Device/asrock_g10
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_VENDOR := ASRock
|
||||
DEVICE_MODEL := G10
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_SIZE := 5332k
|
||||
DEVICE_PACKAGES := kmod-i2c-gpio ath10k-firmware-qca99x0-ct
|
||||
IMAGE/nand-factory.bin := append-ubi | edimax-header RN67
|
||||
endef
|
||||
TARGET_DEVICES += asrock_g10
|
||||
|
||||
define Device/buffalo_wxr-2533dhp
|
||||
$(call Device/LegacyImage)
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_VENDOR := Buffalo
|
||||
DEVICE_MODEL := WXR-2533DHP
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 65536k
|
||||
KERNEL_IN_UBI := 1
|
||||
IMAGE/sysupgrade.bin := append-rootfs | buffalo-rootfs-cksum | \
|
||||
sysupgrade-tar rootfs=$$$$@ | append-metadata
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wxr-2533dhp
|
||||
|
||||
define Device/compex_wpq864
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Compex
|
||||
DEVICE_MODEL := WPQ864
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_PACKAGES := kmod-gpio-beeper
|
||||
endef
|
||||
TARGET_DEVICES += compex_wpq864
|
||||
|
||||
define Device/edgecore_ecw5410
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Edgecore
|
||||
DEVICE_MODEL := ECW5410
|
||||
SOC := qcom-ipq8068
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
DEVICE_DTS_CONFIG := config@v2.0-ap160
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-edgecore_ecw5410
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_ecw5410
|
||||
|
||||
define Device/linksys_ea7500-v1
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := EA7500
|
||||
DEVICE_VARIANT := v1
|
||||
SOC := qcom-ipq8064
|
||||
PAGESIZE := 2048
|
||||
BLOCKSIZE := 128k
|
||||
KERNEL_SIZE := 3072k
|
||||
KERNEL = kernel-bin | append-dtb | uImage none | append-uImage-fakehdr filesystem
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGES := factory.bin sysupgrade.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | pad-to $$$$(PAGESIZE)
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea7500-v1
|
||||
|
||||
define Device/linksys_ea8500
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := EA8500
|
||||
SOC := qcom-ipq8064
|
||||
PAGESIZE := 2048
|
||||
BLOCKSIZE := 128k
|
||||
KERNEL_SIZE := 3072k
|
||||
KERNEL = kernel-bin | append-dtb | uImage none | append-uImage-fakehdr filesystem
|
||||
BOARD_NAME := ea8500
|
||||
SUPPORTED_DEVICES += ea8500
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea8500
|
||||
|
||||
define Device/meraki_mr42
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := Cisco Meraki
|
||||
DEVICE_MODEL := MR42
|
||||
SOC := qcom-ipq8068
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_LOADADDR = 0x44208000
|
||||
DEVICE_PACKAGES := -swconfig -kmod-ata-ahci -kmod-ata-ahci-platform \
|
||||
-kmod-usb-ohci -kmod-usb2 -kmod-usb-ledtrig-usbport \
|
||||
-kmod-phy-qcom-ipq806x-usb -kmod-usb3 -kmod-usb-dwc3-qcom \
|
||||
-uboot-envtools ath10k-firmware-qca9887-ct \
|
||||
ath10k-firmware-qca99x0-ct kmod-eeprom-at24 kmod-hwmon-ina2xx \
|
||||
kmod-leds-tlc591xx
|
||||
endef
|
||||
TARGET_DEVICES += meraki_mr42
|
||||
|
||||
define Device/meraki_mr52
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := Cisco Meraki
|
||||
DEVICE_MODEL := MR52
|
||||
SOC := qcom-ipq8068
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_LOADADDR = 0x44208000
|
||||
DEVICE_DTS_CONFIG := config@2
|
||||
DEVICE_PACKAGES := -swconfig -kmod-ata-ahci -kmod-ata-ahci-platform \
|
||||
-kmod-usb-ohci -kmod-usb2 -kmod-usb-ledtrig-usbport \
|
||||
-kmod-phy-qcom-ipq806x-usb -kmod-usb3 -kmod-usb-dwc3-qcom \
|
||||
-uboot-envtools ath10k-firmware-qca9887-ct \
|
||||
ath10k-firmware-qca9984-ct kmod-eeprom-at24 kmod-hwmon-ina2xx \
|
||||
kmod-leds-tlc591xx
|
||||
endef
|
||||
TARGET_DEVICES += meraki_mr52
|
||||
|
||||
define Device/nec_wg2600hp
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := NEC
|
||||
DEVICE_MODEL := Aterm WG2600HP
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 64k
|
||||
BOARD_NAME := wg2600hp
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += nec_wg2600hp
|
||||
|
||||
define Device/nec_wg2600hp3
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := NEC Platforms
|
||||
DEVICE_MODEL := Aterm WG2600HP3
|
||||
SOC := qcom-ipq8062
|
||||
BLOCKSIZE := 64k
|
||||
IMAGES := sysupgrade.bin
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
|
||||
DEVICE_PACKAGES := -kmod-ata-ahci -kmod-ata-ahci-platform -kmod-usb-ohci -kmod-usb2 \
|
||||
-kmod-usb-ledtrig-usbport -kmod-usb-phy-qcom-dwc3 -kmod-usb3 -kmod-usb-dwc3-qcom \
|
||||
ath10k-firmware-qca9984-ct ipq-wifi-nec_wg2600hp3
|
||||
endef
|
||||
TARGET_DEVICES += nec_wg2600hp3
|
||||
|
||||
define Device/netgear_d7800
|
||||
$(call Device/DniImage)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := Nighthawk X4 D7800
|
||||
SOC := qcom-ipq8064
|
||||
KERNEL_SIZE := 4096k
|
||||
NETGEAR_BOARD_ID := D7800
|
||||
NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := d7800
|
||||
SUPPORTED_DEVICES += d7800
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += netgear_d7800
|
||||
|
||||
define Device/netgear_r7500
|
||||
$(call Device/DniImage)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := Nighthawk X4 R7500
|
||||
DEVICE_VARIANT := v1
|
||||
SOC := qcom-ipq8064
|
||||
KERNEL_SIZE := 4096k
|
||||
NETGEAR_BOARD_ID := R7500
|
||||
NETGEAR_HW_ID := 29764841+0+128+256+3x3+4x4
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := r7500
|
||||
SUPPORTED_DEVICES += r7500
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct
|
||||
endef
|
||||
TARGET_DEVICES += netgear_r7500
|
||||
|
||||
define Device/netgear_r7500v2
|
||||
$(call Device/DniImage)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := Nighthawk X4 R7500
|
||||
DEVICE_VARIANT := v2
|
||||
SOC := qcom-ipq8064
|
||||
KERNEL_SIZE := 4096k
|
||||
NETGEAR_BOARD_ID := R7500v2
|
||||
NETGEAR_HW_ID := 29764958+0+128+512+3x3+4x4
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := r7500v2
|
||||
SUPPORTED_DEVICES += r7500v2
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct ath10k-firmware-qca988x-ct
|
||||
endef
|
||||
TARGET_DEVICES += netgear_r7500v2
|
||||
|
||||
define Device/netgear_r7800
|
||||
$(call Device/DniImage)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := Nighthawk X4S R7800
|
||||
SOC := qcom-ipq8065
|
||||
KERNEL_SIZE := 4096k
|
||||
NETGEAR_BOARD_ID := R7800
|
||||
NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4+cascade
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := r7800
|
||||
SUPPORTED_DEVICES += r7800
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
|
||||
endef
|
||||
TARGET_DEVICES += netgear_r7800
|
||||
|
||||
define Device/netgear_xr500
|
||||
$(call Device/DniImage)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := Nighthawk XR500
|
||||
SOC := qcom-ipq8065
|
||||
KERNEL_SIZE := 4096k
|
||||
NETGEAR_BOARD_ID := XR500
|
||||
NETGEAR_HW_ID := 29764958+0+256+512+4x4+4x4+cascade
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
|
||||
endef
|
||||
TARGET_DEVICES += netgear_xr500
|
||||
|
||||
define Device/qcom_ipq8064-ap148
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Qualcomm
|
||||
DEVICE_MODEL := AP148
|
||||
DEVICE_VARIANT := standard
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_DTS := qcom-ipq8064-ap148
|
||||
KERNEL_INSTALL := 1
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := ap148
|
||||
SUPPORTED_DEVICES += ap148
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += qcom_ipq8064-ap148
|
||||
|
||||
define Device/qcom_ipq8064-ap148-legacy
|
||||
$(call Device/LegacyImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Qualcomm
|
||||
DEVICE_MODEL := AP148
|
||||
DEVICE_VARIANT := legacy
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_DTS := qcom-ipq8064-ap148
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := ap148
|
||||
SUPPORTED_DEVICES := qcom,ipq8064-ap148 ap148
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += qcom_ipq8064-ap148-legacy
|
||||
|
||||
define Device/qcom_ipq8064-ap161
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Qualcomm
|
||||
DEVICE_MODEL := AP161
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_DTS := qcom-ipq8064-ap161
|
||||
KERNEL_INSTALL := 1
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := ap161
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += qcom_ipq8064-ap161
|
||||
|
||||
define Device/qcom_ipq8064-db149
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := Qualcomm
|
||||
DEVICE_MODEL := DB149
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_DTS := qcom-ipq8064-db149
|
||||
KERNEL_INSTALL := 1
|
||||
BOARD_NAME := db149
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += qcom_ipq8064-db149
|
||||
|
||||
define Device/tplink_ad7200
|
||||
$(call Device/TpSafeImage)
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_MODEL := AD7200
|
||||
DEVICE_VARIANT := v1/v2
|
||||
DEVICE_ALT0_VENDOR := TP-Link
|
||||
DEVICE_ALT0_MODEL := Talon AD7200
|
||||
DEVICE_ALT0_VARIANT := v1/v2
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
TPLINK_BOARD_ID := AD7200
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct kmod-wil6210
|
||||
endef
|
||||
TARGET_DEVICES += tplink_ad7200
|
||||
|
||||
define Device/tplink_c2600
|
||||
$(call Device/TpSafeImage)
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_MODEL := Archer C2600
|
||||
DEVICE_VARIANT := v1
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := c2600
|
||||
SUPPORTED_DEVICES += c2600
|
||||
TPLINK_BOARD_ID := C2600
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += tplink_c2600
|
||||
|
||||
define Device/tplink_vr2600v
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_MODEL := Archer VR2600v
|
||||
DEVICE_VARIANT := v1
|
||||
KERNEL_SUFFIX := -uImage
|
||||
KERNEL = kernel-bin | append-dtb | uImage none
|
||||
KERNEL_NAME := zImage
|
||||
KERNEL_SIZE := 3072k
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := vr2600v
|
||||
SUPPORTED_DEVICES += vr2600v
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
IMAGE/sysupgrade.bin := pad-extra 512 | append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | append-metadata
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += tplink_vr2600v
|
||||
|
||||
define Device/ubnt_unifi-ac-hd
|
||||
$(call Device/FitImageLzma)
|
||||
DEVICE_VENDOR := Ubiquiti
|
||||
DEVICE_MODEL := UniFi AC HD
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := 14784k
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += ubnt_unifi-ac-hd
|
||||
|
||||
define Device/zyxel_nbg6817
|
||||
DEVICE_VENDOR := ZyXEL
|
||||
DEVICE_MODEL := NBG6817
|
||||
SOC := qcom-ipq8065
|
||||
KERNEL_SIZE := 4096k
|
||||
BLOCKSIZE := 64k
|
||||
BOARD_NAME := nbg6817
|
||||
RAS_BOARD := NBG6817
|
||||
RAS_ROOTFS_SIZE := 20934k
|
||||
RAS_VERSION := "V1.99(OWRT.9999)C0"
|
||||
SUPPORTED_DEVICES += nbg6817
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct e2fsprogs kmod-fs-ext4 losetup
|
||||
$(call Device/ZyXELImage)
|
||||
endef
|
||||
TARGET_DEVICES += zyxel_nbg6817
|
||||
include $(SUBTARGET).mk
|
||||
|
||||
$(eval $(call BuildImage))
|
||||
|
||||
452
target/linux/ipq806x/image/generic.mk
Normal file
452
target/linux/ipq806x/image/generic.mk
Normal file
@@ -0,0 +1,452 @@
|
||||
DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
|
||||
DEVICE_VARS += TPLINK_BOARD_ID
|
||||
|
||||
define Build/buffalo-rootfs-cksum
|
||||
( \
|
||||
echo -ne "\x$$(od -A n -t u1 $@ | tr -s ' ' '\n' | \
|
||||
$(STAGING_DIR_HOST)/bin/awk '{s+=$$0}END{printf "%x", 255-s%256}')"; \
|
||||
) >> $@
|
||||
endef
|
||||
|
||||
define Build/edimax-header
|
||||
$(eval edimax_model=$(word 1,$(1)))
|
||||
|
||||
$(STAGING_DIR_HOST)/bin/mkedimaximg \
|
||||
-b -s CSYS -m $(edimax_model) \
|
||||
-f 0x70000 -S 0x1200000 \
|
||||
-i $@ -o $@.new
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Device/DniImage
|
||||
KERNEL_SUFFIX := -uImage
|
||||
KERNEL = kernel-bin | append-dtb | uImage none
|
||||
KERNEL_NAME := zImage
|
||||
NETGEAR_BOARD_ID :=
|
||||
NETGEAR_HW_ID :=
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGES += factory.img
|
||||
IMAGE/factory.img := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
|
||||
append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | \
|
||||
append-ubi | netgear-dni
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
|
||||
append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | \
|
||||
append-metadata
|
||||
endef
|
||||
|
||||
define Device/TpSafeImage
|
||||
KERNEL_SUFFIX := -uImage
|
||||
KERNEL = kernel-bin | append-dtb | uImage none
|
||||
KERNEL_NAME := zImage
|
||||
TPLINK_BOARD_ID :=
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
|
||||
IMAGE/sysupgrade.bin := append-rootfs | \
|
||||
tplink-safeloader sysupgrade | append-metadata
|
||||
endef
|
||||
|
||||
define Device/ZyXELImage
|
||||
KERNEL_SUFFIX := -uImage
|
||||
KERNEL = kernel-bin | append-dtb | uImage none | \
|
||||
pad-to $$(KERNEL_SIZE)
|
||||
KERNEL_NAME := zImage
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-rootfs | pad-rootfs | \
|
||||
pad-to $$$$(BLOCKSIZE) | zyxel-ras-image separate-kernel
|
||||
IMAGE/sysupgrade.bin/squashfs := append-rootfs | \
|
||||
pad-to $$$$(BLOCKSIZE) | sysupgrade-tar rootfs=$$$$@ | \
|
||||
append-metadata
|
||||
endef
|
||||
|
||||
define Device/askey_rt4230w-rev6
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := Askey
|
||||
DEVICE_MODEL := RT4230W
|
||||
DEVICE_VARIANT := REV6
|
||||
SOC := qcom-ipq8065
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
|
||||
KERNEL_IN_UBI := 1
|
||||
endef
|
||||
TARGET_DEVICES += askey_rt4230w-rev6
|
||||
|
||||
define Device/asrock_g10
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_VENDOR := ASRock
|
||||
DEVICE_MODEL := G10
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_SIZE := 5332k
|
||||
DEVICE_PACKAGES := kmod-i2c-gpio ath10k-firmware-qca99x0-ct
|
||||
IMAGE/nand-factory.bin := append-ubi | edimax-header RN67
|
||||
endef
|
||||
TARGET_DEVICES += asrock_g10
|
||||
|
||||
define Device/buffalo_wxr-2533dhp
|
||||
$(call Device/LegacyImage)
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_VENDOR := Buffalo
|
||||
DEVICE_MODEL := WXR-2533DHP
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 65536k
|
||||
KERNEL_IN_UBI := 1
|
||||
IMAGE/sysupgrade.bin := append-rootfs | buffalo-rootfs-cksum | \
|
||||
sysupgrade-tar rootfs=$$$$@ | append-metadata
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wxr-2533dhp
|
||||
|
||||
define Device/compex_wpq864
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Compex
|
||||
DEVICE_MODEL := WPQ864
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_PACKAGES := kmod-gpio-beeper
|
||||
endef
|
||||
TARGET_DEVICES += compex_wpq864
|
||||
|
||||
define Device/edgecore_ecw5410
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Edgecore
|
||||
DEVICE_MODEL := ECW5410
|
||||
SOC := qcom-ipq8068
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
DEVICE_DTS_CONFIG := config@v2.0-ap160
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct \
|
||||
ipq-wifi-edgecore_ecw5410
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_ecw5410
|
||||
|
||||
define Device/linksys_ea7500-v1
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := EA7500
|
||||
DEVICE_VARIANT := v1
|
||||
SOC := qcom-ipq8064
|
||||
PAGESIZE := 2048
|
||||
BLOCKSIZE := 128k
|
||||
KERNEL_SIZE := 3072k
|
||||
KERNEL = kernel-bin | append-dtb | uImage none | \
|
||||
append-uImage-fakehdr filesystem
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGES := factory.bin sysupgrade.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
|
||||
append-ubi | pad-to $$$$(PAGESIZE)
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea7500-v1
|
||||
|
||||
define Device/linksys_ea8500
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := EA8500
|
||||
SOC := qcom-ipq8064
|
||||
PAGESIZE := 2048
|
||||
BLOCKSIZE := 128k
|
||||
KERNEL_SIZE := 3072k
|
||||
KERNEL = kernel-bin | append-dtb | uImage none | \
|
||||
append-uImage-fakehdr filesystem
|
||||
BOARD_NAME := ea8500
|
||||
SUPPORTED_DEVICES += ea8500
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
|
||||
append-ubi
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea8500
|
||||
|
||||
define Device/meraki_mr42
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := Cisco Meraki
|
||||
DEVICE_MODEL := MR42
|
||||
SOC := qcom-ipq8068
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_LOADADDR = 0x44208000
|
||||
DEVICE_PACKAGES := -swconfig -kmod-ata-ahci -kmod-ata-ahci-platform \
|
||||
-kmod-usb-ohci -kmod-usb2 -kmod-usb-ledtrig-usbport \
|
||||
-kmod-phy-qcom-ipq806x-usb -kmod-usb3 -kmod-usb-dwc3-qcom \
|
||||
-uboot-envtools ath10k-firmware-qca9887-ct \
|
||||
ath10k-firmware-qca99x0-ct kmod-eeprom-at24 kmod-hwmon-ina2xx \
|
||||
kmod-leds-tlc591xx
|
||||
endef
|
||||
TARGET_DEVICES += meraki_mr42
|
||||
|
||||
define Device/meraki_mr52
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := Cisco Meraki
|
||||
DEVICE_MODEL := MR52
|
||||
SOC := qcom-ipq8068
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_LOADADDR = 0x44208000
|
||||
DEVICE_DTS_CONFIG := config@2
|
||||
DEVICE_PACKAGES := -swconfig -kmod-ata-ahci -kmod-ata-ahci-platform \
|
||||
-kmod-usb-ohci -kmod-usb2 -kmod-usb-ledtrig-usbport \
|
||||
-kmod-phy-qcom-ipq806x-usb -kmod-usb3 -kmod-usb-dwc3-qcom \
|
||||
-uboot-envtools ath10k-firmware-qca9887-ct \
|
||||
ath10k-firmware-qca9984-ct kmod-eeprom-at24 kmod-hwmon-ina2xx \
|
||||
kmod-leds-tlc591xx
|
||||
endef
|
||||
TARGET_DEVICES += meraki_mr52
|
||||
|
||||
define Device/nec_wg2600hp
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := NEC
|
||||
DEVICE_MODEL := Aterm WG2600HP
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 64k
|
||||
BOARD_NAME := wg2600hp
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
|
||||
pad-rootfs | append-metadata
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += nec_wg2600hp
|
||||
|
||||
define Device/nec_wg2600hp3
|
||||
$(call Device/LegacyImage)
|
||||
DEVICE_VENDOR := NEC Platforms
|
||||
DEVICE_MODEL := Aterm WG2600HP3
|
||||
SOC := qcom-ipq8062
|
||||
BLOCKSIZE := 64k
|
||||
IMAGES := sysupgrade.bin
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
|
||||
pad-rootfs | append-metadata
|
||||
DEVICE_PACKAGES := -kmod-ata-ahci -kmod-ata-ahci-platform \
|
||||
-kmod-usb-ohci -kmod-usb2 -kmod-usb-ledtrig-usbport \
|
||||
-kmod-usb-phy-qcom-dwc3 -kmod-usb3 -kmod-usb-dwc3-qcom \
|
||||
ath10k-firmware-qca9984-ct ipq-wifi-nec_wg2600hp3
|
||||
endef
|
||||
TARGET_DEVICES += nec_wg2600hp3
|
||||
|
||||
define Device/netgear_d7800
|
||||
$(call Device/DniImage)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := Nighthawk X4 D7800
|
||||
SOC := qcom-ipq8064
|
||||
KERNEL_SIZE := 4096k
|
||||
NETGEAR_BOARD_ID := D7800
|
||||
NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := d7800
|
||||
SUPPORTED_DEVICES += d7800
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += netgear_d7800
|
||||
|
||||
define Device/netgear_r7500
|
||||
$(call Device/DniImage)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := Nighthawk X4 R7500
|
||||
DEVICE_VARIANT := v1
|
||||
SOC := qcom-ipq8064
|
||||
KERNEL_SIZE := 4096k
|
||||
NETGEAR_BOARD_ID := R7500
|
||||
NETGEAR_HW_ID := 29764841+0+128+256+3x3+4x4
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := r7500
|
||||
SUPPORTED_DEVICES += r7500
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct
|
||||
endef
|
||||
TARGET_DEVICES += netgear_r7500
|
||||
|
||||
define Device/netgear_r7500v2
|
||||
$(call Device/DniImage)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := Nighthawk X4 R7500
|
||||
DEVICE_VARIANT := v2
|
||||
SOC := qcom-ipq8064
|
||||
KERNEL_SIZE := 4096k
|
||||
NETGEAR_BOARD_ID := R7500v2
|
||||
NETGEAR_HW_ID := 29764958+0+128+512+3x3+4x4
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := r7500v2
|
||||
SUPPORTED_DEVICES += r7500v2
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct \
|
||||
ath10k-firmware-qca988x-ct
|
||||
endef
|
||||
TARGET_DEVICES += netgear_r7500v2
|
||||
|
||||
define Device/netgear_r7800
|
||||
$(call Device/DniImage)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := Nighthawk X4S R7800
|
||||
SOC := qcom-ipq8065
|
||||
KERNEL_SIZE := 4096k
|
||||
NETGEAR_BOARD_ID := R7800
|
||||
NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4+cascade
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := r7800
|
||||
SUPPORTED_DEVICES += r7800
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
|
||||
endef
|
||||
TARGET_DEVICES += netgear_r7800
|
||||
|
||||
define Device/netgear_xr500
|
||||
$(call Device/DniImage)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := Nighthawk XR500
|
||||
SOC := qcom-ipq8065
|
||||
KERNEL_SIZE := 4096k
|
||||
NETGEAR_BOARD_ID := XR500
|
||||
NETGEAR_HW_ID := 29764958+0+256+512+4x4+4x4+cascade
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
|
||||
endef
|
||||
TARGET_DEVICES += netgear_xr500
|
||||
|
||||
define Device/qcom_ipq8064-ap148
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Qualcomm
|
||||
DEVICE_MODEL := AP148
|
||||
DEVICE_VARIANT := standard
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_DTS := qcom-ipq8064-ap148
|
||||
KERNEL_INSTALL := 1
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := ap148
|
||||
SUPPORTED_DEVICES += ap148
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += qcom_ipq8064-ap148
|
||||
|
||||
define Device/qcom_ipq8064-ap148-legacy
|
||||
$(call Device/LegacyImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Qualcomm
|
||||
DEVICE_MODEL := AP148
|
||||
DEVICE_VARIANT := legacy
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_DTS := qcom-ipq8064-ap148
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := ap148
|
||||
SUPPORTED_DEVICES := qcom,ipq8064-ap148 ap148
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += qcom_ipq8064-ap148-legacy
|
||||
|
||||
define Device/qcom_ipq8064-ap161
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
DEVICE_VENDOR := Qualcomm
|
||||
DEVICE_MODEL := AP161
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_DTS := qcom-ipq8064-ap161
|
||||
KERNEL_INSTALL := 1
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := ap161
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += qcom_ipq8064-ap161
|
||||
|
||||
define Device/qcom_ipq8064-db149
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := Qualcomm
|
||||
DEVICE_MODEL := DB149
|
||||
SOC := qcom-ipq8064
|
||||
DEVICE_DTS := qcom-ipq8064-db149
|
||||
KERNEL_INSTALL := 1
|
||||
BOARD_NAME := db149
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += qcom_ipq8064-db149
|
||||
|
||||
define Device/tplink_ad7200
|
||||
$(call Device/TpSafeImage)
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_MODEL := AD7200
|
||||
DEVICE_VARIANT := v1/v2
|
||||
DEVICE_ALT0_VENDOR := TP-Link
|
||||
DEVICE_ALT0_MODEL := Talon AD7200
|
||||
DEVICE_ALT0_VARIANT := v1/v2
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
TPLINK_BOARD_ID := AD7200
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct kmod-wil6210
|
||||
endef
|
||||
TARGET_DEVICES += tplink_ad7200
|
||||
|
||||
define Device/tplink_c2600
|
||||
$(call Device/TpSafeImage)
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_MODEL := Archer C2600
|
||||
DEVICE_VARIANT := v1
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := c2600
|
||||
SUPPORTED_DEVICES += c2600
|
||||
TPLINK_BOARD_ID := C2600
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
endef
|
||||
TARGET_DEVICES += tplink_c2600
|
||||
|
||||
define Device/tplink_vr2600v
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_MODEL := Archer VR2600v
|
||||
DEVICE_VARIANT := v1
|
||||
KERNEL_SUFFIX := -uImage
|
||||
KERNEL = kernel-bin | append-dtb | uImage none
|
||||
KERNEL_NAME := zImage
|
||||
KERNEL_SIZE := 3072k
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
BOARD_NAME := vr2600v
|
||||
SUPPORTED_DEVICES += vr2600v
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
|
||||
IMAGE/sysupgrade.bin := pad-extra 512 | append-kernel | \
|
||||
pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | \
|
||||
append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += tplink_vr2600v
|
||||
|
||||
define Device/ubnt_unifi-ac-hd
|
||||
$(call Device/FitImageLzma)
|
||||
DEVICE_VENDOR := Ubiquiti
|
||||
DEVICE_MODEL := UniFi AC HD
|
||||
SOC := qcom-ipq8064
|
||||
BLOCKSIZE := 64k
|
||||
IMAGE_SIZE := 14784k
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
|
||||
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
|
||||
append-rootfs | pad-rootfs | check-size | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += ubnt_unifi-ac-hd
|
||||
|
||||
define Device/zyxel_nbg6817
|
||||
DEVICE_VENDOR := ZyXEL
|
||||
DEVICE_MODEL := NBG6817
|
||||
SOC := qcom-ipq8065
|
||||
KERNEL_SIZE := 4096k
|
||||
BLOCKSIZE := 64k
|
||||
BOARD_NAME := nbg6817
|
||||
RAS_BOARD := NBG6817
|
||||
RAS_ROOTFS_SIZE := 20934k
|
||||
RAS_VERSION := "V1.99(OWRT.9999)C0"
|
||||
SUPPORTED_DEVICES += nbg6817
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9984-ct e2fsprogs \
|
||||
kmod-fs-ext4 losetup
|
||||
$(call Device/ZyXELImage)
|
||||
endef
|
||||
TARGET_DEVICES += zyxel_nbg6817
|
||||
@@ -1,14 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
ARCH:=aarch64
|
||||
BOARD:=ipq807x
|
||||
BOARDNAME:=Qualcomm Atheros IPQ807x
|
||||
FEATURES:=squashfs ramdisk source-only
|
||||
KERNELNAME:=Image dtbs
|
||||
CPU_TYPE:=cortex-a53
|
||||
|
||||
KERNEL_PATCHVER:=5.4
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
@@ -1,643 +0,0 @@
|
||||
CONFIG_64BIT=y
|
||||
# CONFIG_ACPI is not set
|
||||
# CONFIG_ALLOW_DEV_COREDUMP is not set
|
||||
# CONFIG_APQ_GCC_8084 is not set
|
||||
# CONFIG_APQ_MMCC_8084 is not set
|
||||
CONFIG_AQUANTIA_PHY=y
|
||||
CONFIG_ARCH_CLOCKSOURCE_DATA=y
|
||||
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
|
||||
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
|
||||
CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
|
||||
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
|
||||
CONFIG_ARCH_HAS_FAST_MULTIPLIER=y
|
||||
CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
|
||||
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
|
||||
CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y
|
||||
CONFIG_ARCH_HAS_KCOV=y
|
||||
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
|
||||
CONFIG_ARCH_HAS_PTE_SPECIAL=y
|
||||
CONFIG_ARCH_HAS_SET_MEMORY=y
|
||||
CONFIG_ARCH_HAS_SG_CHAIN=y
|
||||
CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
|
||||
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
|
||||
CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y
|
||||
CONFIG_ARCH_HAS_TICK_BROADCAST=y
|
||||
CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS=18
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=24
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MIN=18
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
|
||||
CONFIG_ARCH_PROC_KCORE_TEXT=y
|
||||
CONFIG_ARCH_QCOM=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_SUPPORTS_ACPI=y
|
||||
CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
|
||||
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
|
||||
CONFIG_ARCH_SUPPORTS_INT128=y
|
||||
CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
|
||||
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
|
||||
CONFIG_ARCH_SUPPORTS_UPROBES=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
|
||||
CONFIG_ARCH_USE_QUEUED_RWLOCKS=y
|
||||
CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y
|
||||
CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y
|
||||
CONFIG_ARCH_WANT_FRAME_POINTERS=y
|
||||
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
|
||||
CONFIG_ARM64=y
|
||||
# CONFIG_ARM64_16K_PAGES is not set
|
||||
CONFIG_ARM64_4K_PAGES=y
|
||||
# CONFIG_ARM64_64K_PAGES is not set
|
||||
CONFIG_ARM64_CONT_SHIFT=4
|
||||
# CONFIG_ARM64_CRYPTO is not set
|
||||
CONFIG_ARM64_ERRATUM_819472=y
|
||||
CONFIG_ARM64_ERRATUM_824069=y
|
||||
CONFIG_ARM64_ERRATUM_826319=y
|
||||
CONFIG_ARM64_ERRATUM_827319=y
|
||||
CONFIG_ARM64_ERRATUM_832075=y
|
||||
CONFIG_ARM64_ERRATUM_843419=y
|
||||
CONFIG_ARM64_ERRATUM_845719=y
|
||||
CONFIG_ARM64_HW_AFDBM=y
|
||||
# CONFIG_ARM64_LSE_ATOMICS is not set
|
||||
CONFIG_ARM64_MODULE_PLTS=y
|
||||
CONFIG_ARM64_PAGE_SHIFT=12
|
||||
CONFIG_ARM64_PAN=y
|
||||
CONFIG_ARM64_PA_BITS=48
|
||||
CONFIG_ARM64_PA_BITS_48=y
|
||||
# CONFIG_ARM64_PMEM is not set
|
||||
# CONFIG_ARM64_PTDUMP_DEBUGFS is not set
|
||||
# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set
|
||||
CONFIG_ARM64_SSBD=y
|
||||
CONFIG_ARM64_SVE=y
|
||||
CONFIG_ARM64_UAO=y
|
||||
CONFIG_ARM64_VA_BITS=39
|
||||
CONFIG_ARM64_VA_BITS_39=y
|
||||
# CONFIG_ARM64_VA_BITS_48 is not set
|
||||
CONFIG_ARM64_VHE=y
|
||||
# CONFIG_ARMV8_DEPRECATED is not set
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
CONFIG_ARM_CCI=y
|
||||
CONFIG_ARM_CCI400_COMMON=y
|
||||
CONFIG_ARM_CCI400_PMU=y
|
||||
CONFIG_ARM_CCI_PMU=y
|
||||
CONFIG_ARM_CPUIDLE=y
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_GIC_V2M=y
|
||||
CONFIG_ARM_GIC_V3=y
|
||||
CONFIG_ARM_GIC_V3_ITS=y
|
||||
CONFIG_ARM_GIC_V3_ITS_PCI=y
|
||||
CONFIG_ARM_PMU=y
|
||||
CONFIG_ARM_PSCI_FW=y
|
||||
# CONFIG_ARM_QCOM_CPUFREQ_KRYO is not set
|
||||
# CONFIG_ARM_SCMI_PROTOCOL is not set
|
||||
# CONFIG_ARM_SP805_WATCHDOG is not set
|
||||
CONFIG_ASN1=y
|
||||
CONFIG_ASSOCIATIVE_ARRAY=y
|
||||
CONFIG_ASYMMETRIC_KEY_TYPE=y
|
||||
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
|
||||
CONFIG_AT803X_PHY=y
|
||||
CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_COUNT=16
|
||||
CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_MQ_VIRTIO=y
|
||||
CONFIG_BLOCK_COMPAT=y
|
||||
CONFIG_BUILD_BIN2C=y
|
||||
# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_CLEANCACHE=y
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_CLZ_TAB=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_QCOM=y
|
||||
CONFIG_COMMON_CLK_XGENE=y
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_COMPAT_BINFMT_ELF=y
|
||||
CONFIG_COMPAT_NETLINK_MESSAGES=y
|
||||
CONFIG_COMPAT_OLD_SIGACTION=y
|
||||
CONFIG_CONFIGFS_FS=y
|
||||
CONFIG_COREDUMP=y
|
||||
CONFIG_CORESIGHT=y
|
||||
# CONFIG_CORESIGHT_CATU is not set
|
||||
# CONFIG_CORESIGHT_CPU_DEBUG is not set
|
||||
# CONFIG_CORESIGHT_DYNAMIC_REPLICATOR is not set
|
||||
CONFIG_CORESIGHT_LINKS_AND_SINKS=y
|
||||
CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y
|
||||
# CONFIG_CORESIGHT_SINK_ETBV10 is not set
|
||||
CONFIG_CORESIGHT_SINK_TPIU=y
|
||||
CONFIG_CORESIGHT_SOURCE_ETM4X=y
|
||||
CONFIG_CORESIGHT_STM=y
|
||||
CONFIG_CPUFREQ_DT=y
|
||||
CONFIG_CPUFREQ_DT_PLATDEV=y
|
||||
# CONFIG_CPU_BIG_ENDIAN is not set
|
||||
CONFIG_CPU_FREQ=y
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
|
||||
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
|
||||
CONFIG_CPU_FREQ_GOV_COMMON=y
|
||||
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
|
||||
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
||||
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_LADDER=y
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
# CONFIG_CPU_THERMAL is not set
|
||||
CONFIG_CRC16=y
|
||||
# CONFIG_CRC32_SARWATE is not set
|
||||
CONFIG_CRC32_SLICEBY8=y
|
||||
CONFIG_CROSS_MEMORY_ATTACH=y
|
||||
CONFIG_CRYPTO_ACOMP2=y
|
||||
CONFIG_CRYPTO_AEAD=y
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_AKCIPHER=y
|
||||
CONFIG_CRYPTO_AKCIPHER2=y
|
||||
CONFIG_CRYPTO_ARC4=y
|
||||
CONFIG_CRYPTO_CCM=y
|
||||
CONFIG_CRYPTO_CMAC=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_CTR=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
# CONFIG_CRYPTO_DEV_QCOM_RNG is not set
|
||||
CONFIG_CRYPTO_DRBG=y
|
||||
CONFIG_CRYPTO_DRBG_HMAC=y
|
||||
CONFIG_CRYPTO_DRBG_MENU=y
|
||||
CONFIG_CRYPTO_ECHAINIV=y
|
||||
CONFIG_CRYPTO_GCM=y
|
||||
CONFIG_CRYPTO_GF128MUL=y
|
||||
CONFIG_CRYPTO_GHASH=y
|
||||
CONFIG_CRYPTO_HASH=y
|
||||
CONFIG_CRYPTO_HASH2=y
|
||||
CONFIG_CRYPTO_HASH_INFO=y
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
||||
CONFIG_CRYPTO_KPP2=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
CONFIG_CRYPTO_MANAGER2=y
|
||||
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
|
||||
CONFIG_CRYPTO_NULL=y
|
||||
CONFIG_CRYPTO_NULL2=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_WORKQUEUE=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_DEBUG_GPIO=y
|
||||
CONFIG_DECOMPRESS_GZIP=y
|
||||
CONFIG_DEVMEM=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_DIRECT_OPS=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_DMI=y
|
||||
CONFIG_DMIID=y
|
||||
# CONFIG_DMI_SYSFS is not set
|
||||
CONFIG_DTC=y
|
||||
CONFIG_DT_IDLE_STATES=y
|
||||
CONFIG_DYNAMIC_DEBUG=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EFI=y
|
||||
CONFIG_EFIVAR_FS=m
|
||||
CONFIG_EFI_ARMSTUB=y
|
||||
CONFIG_EFI_ARMSTUB_DTB_LOADER=y
|
||||
# CONFIG_EFI_CAPSULE_LOADER is not set
|
||||
CONFIG_EFI_ESRT=y
|
||||
CONFIG_EFI_PARAMS_FROM_FDT=y
|
||||
CONFIG_EFI_RUNTIME_WRAPPERS=y
|
||||
CONFIG_EFI_STUB=y
|
||||
# CONFIG_EFI_TEST is not set
|
||||
# CONFIG_EFI_VARS is not set
|
||||
CONFIG_EXT4_FS=y
|
||||
# CONFIG_EXT4_USE_FOR_EXT2 is not set
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_CMDLINE=y
|
||||
# CONFIG_FB_EFI is not set
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
# CONFIG_FLATMEM_MANUAL is not set
|
||||
CONFIG_FRAME_POINTER=y
|
||||
CONFIG_FRAME_WARN=2048
|
||||
CONFIG_FREEZER=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_CSUM=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_MIGRATION=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_MSI_IRQ=y
|
||||
CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
|
||||
CONFIG_HAVE_ARCH_AUDITSYSCALL=y
|
||||
CONFIG_HAVE_ARCH_BITREVERSE=y
|
||||
CONFIG_HAVE_ARCH_HUGE_VMAP=y
|
||||
CONFIG_HAVE_ARCH_JUMP_LABEL=y
|
||||
CONFIG_HAVE_ARCH_KASAN=y
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y
|
||||
CONFIG_HAVE_ARCH_PFN_VALID=y
|
||||
CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y
|
||||
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
|
||||
CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
|
||||
CONFIG_HAVE_ARCH_TRACEHOOK=y
|
||||
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_HAVE_ARCH_VMAP_STACK=y
|
||||
CONFIG_HAVE_ARM_SMCCC=y
|
||||
CONFIG_HAVE_CLK=y
|
||||
CONFIG_HAVE_CLK_PREPARE=y
|
||||
CONFIG_HAVE_CMPXCHG_DOUBLE=y
|
||||
CONFIG_HAVE_CMPXCHG_LOCAL=y
|
||||
CONFIG_HAVE_CONTEXT_TRACKING=y
|
||||
CONFIG_HAVE_C_RECORDMCOUNT=y
|
||||
CONFIG_HAVE_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_HAVE_DEBUG_KMEMLEAK=y
|
||||
CONFIG_HAVE_DMA_CONTIGUOUS=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE=y
|
||||
CONFIG_HAVE_EBPF_JIT=y
|
||||
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
|
||||
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
|
||||
CONFIG_HAVE_GENERIC_GUP=y
|
||||
CONFIG_HAVE_HW_BREAKPOINT=y
|
||||
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
|
||||
CONFIG_HAVE_MEMBLOCK=y
|
||||
CONFIG_HAVE_MEMORY_PRESENT=y
|
||||
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
CONFIG_HAVE_PATA_PLATFORM=y
|
||||
CONFIG_HAVE_PERF_EVENTS=y
|
||||
CONFIG_HAVE_PERF_REGS=y
|
||||
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
|
||||
CONFIG_HAVE_RCU_TABLE_FREE=y
|
||||
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
|
||||
CONFIG_HAVE_RSEQ=y
|
||||
CONFIG_HAVE_SCHED_AVG_IRQ=y
|
||||
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
|
||||
CONFIG_HAVE_UID16=y
|
||||
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
|
||||
CONFIG_HOLES_IN_ZONE=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
# CONFIG_HUGETLBFS is not set
|
||||
CONFIG_HWSPINLOCK=y
|
||||
CONFIG_HWSPINLOCK_QCOM=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_COMPAT=y
|
||||
CONFIG_I2C_HELPER_AUTO=y
|
||||
CONFIG_I2C_QUP=y
|
||||
CONFIG_IIO=y
|
||||
# CONFIG_IIO_BUFFER is not set
|
||||
# CONFIG_IIO_TRIGGER is not set
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
# CONFIG_IPQ_GCC_4019 is not set
|
||||
# CONFIG_IPQ_GCC_806X is not set
|
||||
CONFIG_IPQ_GCC_8074=y
|
||||
# CONFIG_IPQ_LCC_806X is not set
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_TIME_ACCOUNTING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_JBD2=y
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_KEYS_COMPAT=y
|
||||
# CONFIG_KVM is not set
|
||||
CONFIG_LEDS_TLC591XX=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MAILBOX=y
|
||||
# CONFIG_MAILBOX_TEST is not set
|
||||
CONFIG_MDIO_BITBANG=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_GPIO=y
|
||||
# CONFIG_MDM_GCC_9615 is not set
|
||||
# CONFIG_MDM_LCC_9615 is not set
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MFD_QCOM_RPM=y
|
||||
CONFIG_MFD_SPMI_PMIC=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_ARMMMCI=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_BLOCK_MINORS=32
|
||||
CONFIG_MMC_QCOM_DML=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
|
||||
CONFIG_MMC_SDHCI_MSM=y
|
||||
# CONFIG_MMC_SDHCI_PCI is not set
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MODULES_TREE_LOOKUP=y
|
||||
CONFIG_MODULES_USE_ELF_RELA=y
|
||||
CONFIG_MPILIB=y
|
||||
# CONFIG_MSM_GCC_8660 is not set
|
||||
# CONFIG_MSM_GCC_8916 is not set
|
||||
# CONFIG_MSM_GCC_8960 is not set
|
||||
# CONFIG_MSM_GCC_8974 is not set
|
||||
# CONFIG_MSM_GCC_8994 is not set
|
||||
# CONFIG_MSM_GCC_8996 is not set
|
||||
# CONFIG_MSM_GCC_8998 is not set
|
||||
# CONFIG_MSM_LCC_8960 is not set
|
||||
# CONFIG_MSM_MMCC_8960 is not set
|
||||
# CONFIG_MSM_MMCC_8974 is not set
|
||||
# CONFIG_MSM_MMCC_8996 is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_M25P80=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_NAND_QCOM=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_FIRMWARE=y
|
||||
CONFIG_MTD_SPLIT_FIT_FW=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_MTD_UBI_GLUEBI=y
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_SG_DMA_LENGTH=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_PTP_CLASSIFY=y
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
# CONFIG_NET_VENDOR_CAVIUM is not set
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NO_BOOTMEM=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=4
|
||||
# CONFIG_NUMA is not set
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVME_CORE=y
|
||||
# CONFIG_NVME_MULTIPATH is not set
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_NET=y
|
||||
CONFIG_OF_RESERVED_MEM=y
|
||||
CONFIG_OID_REGISTRY=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PANIC_TIMEOUT=5
|
||||
CONFIG_PARTITION_PERCPU=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIE_DW=y
|
||||
CONFIG_PCIE_DW_HOST=y
|
||||
CONFIG_PCIE_QCOM=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PCI_LABEL=y
|
||||
CONFIG_PCI_MSI=y
|
||||
CONFIG_PCI_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_PGTABLE_LEVELS=3
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYS_ADDR_T_64BIT=y
|
||||
# CONFIG_PHY_QCOM_APQ8064_SATA is not set
|
||||
# CONFIG_PHY_QCOM_IPQ806X_SATA is not set
|
||||
# CONFIG_PHY_QCOM_QMP is not set
|
||||
# CONFIG_PHY_QCOM_QUSB2 is not set
|
||||
# CONFIG_PHY_QCOM_UFS is not set
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_APQ8064 is not set
|
||||
# CONFIG_PINCTRL_APQ8084 is not set
|
||||
# CONFIG_PINCTRL_IPQ4019 is not set
|
||||
# CONFIG_PINCTRL_IPQ8064 is not set
|
||||
CONFIG_PINCTRL_IPQ8074=y
|
||||
# CONFIG_PINCTRL_MDM9615 is not set
|
||||
CONFIG_PINCTRL_MSM=y
|
||||
# CONFIG_PINCTRL_MSM8660 is not set
|
||||
# CONFIG_PINCTRL_MSM8916 is not set
|
||||
# CONFIG_PINCTRL_MSM8960 is not set
|
||||
# CONFIG_PINCTRL_MSM8994 is not set
|
||||
# CONFIG_PINCTRL_MSM8996 is not set
|
||||
# CONFIG_PINCTRL_MSM8998 is not set
|
||||
CONFIG_PINCTRL_QCOM_SPMI_PMIC=y
|
||||
# CONFIG_PINCTRL_QCOM_SSBI_PMIC is not set
|
||||
# CONFIG_PINCTRL_SDM845 is not set
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
# CONFIG_PM_DEBUG is not set
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_PM_SLEEP=y
|
||||
CONFIG_PM_SLEEP_SMP=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_MSM=y
|
||||
# CONFIG_POWER_RESET_QCOM_PON is not set
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PPS=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_PREEMPT_COUNT=y
|
||||
# CONFIG_PREEMPT_NONE is not set
|
||||
CONFIG_PREEMPT_RCU=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PROC_PAGE_MONITOR=y
|
||||
CONFIG_PTP_1588_CLOCK=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_SYSFS=y
|
||||
CONFIG_QCOM_A53PLL=y
|
||||
# CONFIG_QCOM_APCS_IPC is not set
|
||||
CONFIG_QCOM_BAM_DMA=y
|
||||
# CONFIG_QCOM_CLK_RPM is not set
|
||||
# CONFIG_QCOM_COINCELL is not set
|
||||
# CONFIG_QCOM_COMMAND_DB is not set
|
||||
CONFIG_QCOM_EBI2=y
|
||||
# CONFIG_QCOM_GENI_SE is not set
|
||||
CONFIG_QCOM_GSBI=y
|
||||
# CONFIG_QCOM_LLCC is not set
|
||||
# CONFIG_QCOM_PDC is not set
|
||||
CONFIG_QCOM_QFPROM=y
|
||||
# CONFIG_QCOM_RMTFS_MEM is not set
|
||||
# CONFIG_QCOM_RPMH is not set
|
||||
CONFIG_QCOM_SMEM=y
|
||||
CONFIG_QCOM_SMEM_STATE=y
|
||||
CONFIG_QCOM_SMP2P=y
|
||||
# CONFIG_QCOM_SMSM is not set
|
||||
CONFIG_QCOM_SPMI_VADC=y
|
||||
CONFIG_QCOM_TSENS=y
|
||||
CONFIG_QCOM_VADC_COMMON=y
|
||||
CONFIG_QCOM_WDT=y
|
||||
# CONFIG_QRTR is not set
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
# CONFIG_RANDOMIZE_BASE is not set
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_RD_GZIP=y
|
||||
CONFIG_REFCOUNT_FULL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGMAP_SPI=y
|
||||
CONFIG_REGMAP_SPMI=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_GPIO=y
|
||||
CONFIG_REGULATOR_QCOM_RPM=y
|
||||
CONFIG_REGULATOR_QCOM_SPMI=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_REMOTEPROC=y
|
||||
# CONFIG_RESET_ATTACK_MITIGATION is not set
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
# CONFIG_RESET_QCOM_AOSS is not set
|
||||
CONFIG_RFS_ACCEL=y
|
||||
# CONFIG_RPMSG_QCOM_GLINK_SMEM is not set
|
||||
# CONFIG_RPMSG_QCOM_SMD is not set
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
# CONFIG_RTC_DRV_EFI is not set
|
||||
# CONFIG_RTC_DRV_PM8XXX is not set
|
||||
CONFIG_RTC_I2C_AND_SPI=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||
# CONFIG_SDM_DISPCC_845 is not set
|
||||
# CONFIG_SDM_GCC_845 is not set
|
||||
# CONFIG_SDM_VIDEOCC_845 is not set
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
# CONFIG_SERIAL_AMBA_PL011 is not set
|
||||
CONFIG_SERIAL_MSM=y
|
||||
CONFIG_SERIAL_MSM_CONSOLE=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SND=y
|
||||
# CONFIG_SND_COMPRESS_OFFLOAD is not set
|
||||
CONFIG_SND_JACK=y
|
||||
CONFIG_SND_PCM=y
|
||||
CONFIG_SND_SOC=y
|
||||
# CONFIG_SND_SOC_APQ8016_SBC is not set
|
||||
CONFIG_SND_SOC_I2C_AND_SPI=y
|
||||
CONFIG_SND_SOC_QCOM=y
|
||||
# CONFIG_SND_SOC_STORM is not set
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SOUND_OSS_CORE=y
|
||||
CONFIG_SOUND_OSS_CORE_PRECLAIM=y
|
||||
CONFIG_SPARSEMEM=y
|
||||
CONFIG_SPARSEMEM_EXTREME=y
|
||||
CONFIG_SPARSEMEM_MANUAL=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SPI_QUP=y
|
||||
CONFIG_SPI_SPIDEV=y
|
||||
CONFIG_SPMI=y
|
||||
CONFIG_SPMI_MSM_PMIC_ARB=y
|
||||
# CONFIG_SPMI_PMIC_CLKDIV is not set
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_STM=y
|
||||
# CONFIG_STM_SOURCE_HEARTBEAT is not set
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_SUSPEND=y
|
||||
CONFIG_SUSPEND_FREEZER=y
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SWCONFIG=y
|
||||
CONFIG_SWIOTLB=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_SYSVIPC_COMPAT=y
|
||||
CONFIG_SYS_SUPPORTS_HUGETLBFS=y
|
||||
CONFIG_TASKS_RCU=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_GOV_USER_SPACE=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
CONFIG_THERMAL_WRITABLE_TRIPS=y
|
||||
CONFIG_THREAD_INFO_IN_TASK=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_UCS2_STRING=y
|
||||
CONFIG_UEVENT_HELPER_PATH=""
|
||||
CONFIG_UNINLINE_SPIN_UNLOCK=y
|
||||
CONFIG_UNMAP_KERNEL_AT_EL0=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_VIRTIO=y
|
||||
# CONFIG_VIRTIO_BLK is not set
|
||||
# CONFIG_VIRTIO_CONSOLE is not set
|
||||
# CONFIG_VIRTIO_NET is not set
|
||||
CONFIG_VIRTUALIZATION=y
|
||||
CONFIG_VMAP_STACK=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_WANT_DEV_COREDUMP=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
|
||||
CONFIG_X509_CERTIFICATE_PARSER=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZONE_DMA32=y
|
||||
@@ -1,40 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
IPQ807X_KERNEL_LOADADDR = 0x41080000
|
||||
DEVICE_DTS_CONFIG = "config@hk01"
|
||||
|
||||
define Image/BuildKernel/FIT
|
||||
gzip -9 -c $(KDIR)/Image > $(KDIR)/Image.gz
|
||||
$(call CompressLzma,$(KDIR)/Image,$(KDIR)/Image.gz)
|
||||
$(call Image/BuildKernel/MkFIT,$(1), $(KDIR)/Image.gz, $(DTS_DIR)/qcom/$(1).dtb,gzip,$(2),$(2))
|
||||
$(CP) $(KDIR)/fit-$(1).itb $(BIN_DIR)/$(IMG_PREFIX)-$(1)-fit-uImage.itb
|
||||
mkdir -p $(BIN_DIR)/dtbs/
|
||||
$(CP) $(DTS_DIR)/qcom/ipq*.dtb $(BIN_DIR)/dtbs/
|
||||
$(CP) $(KDIR)/Image $(BIN_DIR)/dtbs/
|
||||
endef
|
||||
|
||||
define Image/BuildKernel/FITInitramfs
|
||||
$(CP) $(KDIR)/Image-initramfs $(BIN_DIR)/dtbs/
|
||||
$(CP) $(KDIR)/Image-initramfs $(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs.bin
|
||||
$(call Image/BuildKernel/MkFIT,$(1), $(KDIR)/Image-initramfs, $(DTS_DIR)/qcom/$(1).dtb, none,$(2),$(2),-initramfs)
|
||||
$(CP) $(KDIR)/fit-$(1)-initramfs.itb $(BIN_DIR)/$(IMG_PREFIX)-$(1)-fit-uImage-initramfs.itb
|
||||
endef
|
||||
|
||||
define Image/Build/squashfs
|
||||
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
|
||||
endef
|
||||
|
||||
define Image/BuildKernel
|
||||
$(call Image/BuildKernel/FIT,ipq8074-hk01,$(IPQ807X_KERNEL_LOADADDR))
|
||||
endef
|
||||
|
||||
define Image/BuildKernel/Initramfs
|
||||
$(call Image/BuildKernel/FITInitramfs,ipq8074-hk01,$(IPQ807X_KERNEL_LOADADDR))
|
||||
endef
|
||||
|
||||
define Image/Build
|
||||
$(call Image/Build/$(1),$(1))
|
||||
endef
|
||||
|
||||
$(eval $(call BuildImage))
|
||||
@@ -1,8 +0,0 @@
|
||||
define Profile/Default
|
||||
NAME:=Default Profile (minimum package set)
|
||||
endef
|
||||
|
||||
define Profile/Default/Description
|
||||
Default package set compatible with most boards.
|
||||
endef
|
||||
$(eval $(call Profile,Default))
|
||||
@@ -15,8 +15,6 @@ Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
drivers/power/reset/linkstation-poweroff.c | 35 ++++++++++++++++++----
|
||||
1 file changed, 29 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/drivers/power/reset/linkstation-poweroff.c b/drivers/power/reset/linkstation-poweroff.c
|
||||
index f1e843df0e16..8691cf98600d 100644
|
||||
--- a/drivers/power/reset/linkstation-poweroff.c
|
||||
+++ b/drivers/power/reset/linkstation-poweroff.c
|
||||
@@ -29,11 +29,21 @@
|
||||
@@ -42,7 +40,7 @@ index f1e843df0e16..8691cf98600d 100644
|
||||
|
||||
saved_page = phy_select_page(phydev, MII_MARVELL_LED_PAGE);
|
||||
if (saved_page < 0)
|
||||
@@ -66,11 +76,16 @@ static void mvphy_reg_intn(u16 data)
|
||||
@@ -66,11 +76,16 @@ err:
|
||||
dev_err(&phydev->mdio.dev, "Write register failed, %d\n", rc);
|
||||
}
|
||||
|
||||
@@ -60,7 +58,7 @@ index f1e843df0e16..8691cf98600d 100644
|
||||
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
@@ -82,14 +97,18 @@ static struct notifier_block linkstation_reboot_nb = {
|
||||
@@ -82,14 +97,18 @@ static struct notifier_block linkstation
|
||||
static void linkstation_poweroff(void)
|
||||
{
|
||||
unregister_reboot_notifier(&linkstation_reboot_nb);
|
||||
@@ -82,7 +80,7 @@ index f1e843df0e16..8691cf98600d 100644
|
||||
{ },
|
||||
};
|
||||
|
||||
@@ -97,13 +116,17 @@ static int __init linkstation_poweroff_init(void)
|
||||
@@ -97,13 +116,17 @@ static int __init linkstation_poweroff_i
|
||||
{
|
||||
struct mii_bus *bus;
|
||||
struct device_node *dn;
|
||||
@@ -101,6 +99,3 @@ index f1e843df0e16..8691cf98600d 100644
|
||||
if (!dn)
|
||||
return -ENODEV;
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@ Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
drivers/power/reset/linkstation-poweroff.c | 43 ++++++++++++++++++++++
|
||||
1 file changed, 43 insertions(+)
|
||||
|
||||
diff --git a/drivers/power/reset/linkstation-poweroff.c b/drivers/power/reset/linkstation-poweroff.c
|
||||
index 8691cf98600d..2a92b6052cac 100644
|
||||
--- a/drivers/power/reset/linkstation-poweroff.c
|
||||
+++ b/drivers/power/reset/linkstation-poweroff.c
|
||||
@@ -19,6 +19,7 @@
|
||||
@@ -38,7 +36,7 @@ index 8691cf98600d..2a92b6052cac 100644
|
||||
struct power_off_cfg {
|
||||
char *mdio_node_name;
|
||||
void (*phy_set_reg)(bool restart);
|
||||
@@ -76,11 +79,48 @@ static void linkstation_mvphy_reg_intn(bool restart)
|
||||
@@ -76,11 +79,48 @@ err:
|
||||
dev_err(&phydev->mdio.dev, "Write register failed, %d\n", rc);
|
||||
}
|
||||
|
||||
@@ -87,7 +85,7 @@ index 8691cf98600d..2a92b6052cac 100644
|
||||
static int linkstation_reboot_notifier(struct notifier_block *nb,
|
||||
unsigned long action, void *unused)
|
||||
{
|
||||
@@ -109,6 +149,9 @@ static const struct of_device_id ls_poweroff_of_match[] = {
|
||||
@@ -109,6 +149,9 @@ static const struct of_device_id ls_powe
|
||||
{ .compatible = "buffalo,ls421de",
|
||||
.data = &linkstation_power_off_cfg,
|
||||
},
|
||||
@@ -97,6 +95,3 @@ index 8691cf98600d..2a92b6052cac 100644
|
||||
{ },
|
||||
};
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
@@ -15,8 +15,6 @@ Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
drivers/power/reset/linkstation-poweroff.c | 35 ++++++++++++++++++----
|
||||
1 file changed, 29 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/drivers/power/reset/linkstation-poweroff.c b/drivers/power/reset/linkstation-poweroff.c
|
||||
index f1e843df0e16..8691cf98600d 100644
|
||||
--- a/drivers/power/reset/linkstation-poweroff.c
|
||||
+++ b/drivers/power/reset/linkstation-poweroff.c
|
||||
@@ -29,11 +29,21 @@
|
||||
@@ -42,7 +40,7 @@ index f1e843df0e16..8691cf98600d 100644
|
||||
|
||||
saved_page = phy_select_page(phydev, MII_MARVELL_LED_PAGE);
|
||||
if (saved_page < 0)
|
||||
@@ -66,11 +76,16 @@ static void mvphy_reg_intn(u16 data)
|
||||
@@ -66,11 +76,16 @@ err:
|
||||
dev_err(&phydev->mdio.dev, "Write register failed, %d\n", rc);
|
||||
}
|
||||
|
||||
@@ -60,7 +58,7 @@ index f1e843df0e16..8691cf98600d 100644
|
||||
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
@@ -82,14 +97,18 @@ static struct notifier_block linkstation_reboot_nb = {
|
||||
@@ -82,14 +97,18 @@ static struct notifier_block linkstation
|
||||
static void linkstation_poweroff(void)
|
||||
{
|
||||
unregister_reboot_notifier(&linkstation_reboot_nb);
|
||||
@@ -82,7 +80,7 @@ index f1e843df0e16..8691cf98600d 100644
|
||||
{ },
|
||||
};
|
||||
|
||||
@@ -97,13 +116,17 @@ static int __init linkstation_poweroff_init(void)
|
||||
@@ -97,13 +116,17 @@ static int __init linkstation_poweroff_i
|
||||
{
|
||||
struct mii_bus *bus;
|
||||
struct device_node *dn;
|
||||
@@ -101,6 +99,3 @@ index f1e843df0e16..8691cf98600d 100644
|
||||
if (!dn)
|
||||
return -ENODEV;
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@ Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
drivers/power/reset/linkstation-poweroff.c | 43 ++++++++++++++++++++++
|
||||
1 file changed, 43 insertions(+)
|
||||
|
||||
diff --git a/drivers/power/reset/linkstation-poweroff.c b/drivers/power/reset/linkstation-poweroff.c
|
||||
index 8691cf98600d..2a92b6052cac 100644
|
||||
--- a/drivers/power/reset/linkstation-poweroff.c
|
||||
+++ b/drivers/power/reset/linkstation-poweroff.c
|
||||
@@ -19,6 +19,7 @@
|
||||
@@ -38,7 +36,7 @@ index 8691cf98600d..2a92b6052cac 100644
|
||||
struct power_off_cfg {
|
||||
char *mdio_node_name;
|
||||
void (*phy_set_reg)(bool restart);
|
||||
@@ -76,11 +79,48 @@ static void linkstation_mvphy_reg_intn(bool restart)
|
||||
@@ -76,11 +79,48 @@ err:
|
||||
dev_err(&phydev->mdio.dev, "Write register failed, %d\n", rc);
|
||||
}
|
||||
|
||||
@@ -87,7 +85,7 @@ index 8691cf98600d..2a92b6052cac 100644
|
||||
static int linkstation_reboot_notifier(struct notifier_block *nb,
|
||||
unsigned long action, void *unused)
|
||||
{
|
||||
@@ -109,6 +149,9 @@ static const struct of_device_id ls_poweroff_of_match[] = {
|
||||
@@ -109,6 +149,9 @@ static const struct of_device_id ls_powe
|
||||
{ .compatible = "buffalo,ls421de",
|
||||
.data = &linkstation_power_off_cfg,
|
||||
},
|
||||
@@ -97,6 +95,3 @@ index 8691cf98600d..2a92b6052cac 100644
|
||||
{ },
|
||||
};
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
@@ -488,8 +488,6 @@
|
||||
interrupt-names = "tx", "rx";
|
||||
resets = <&reset0 21 16>, <&reset0 8 8>, <&reset0 3 3>;
|
||||
reset-names = "switch", "ppe", "ppe_dsp";
|
||||
lantiq,tx-burst-length = <8>;
|
||||
lantiq,rx-burst-length = <8>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
From 6615eeb39f7a110a196f20acbfb3a017da4d75d2 Mon Sep 17 00:00:00 2001
|
||||
From 49293bbc50cb7d44223eb49e0f7cb38e7dac2361 Mon Sep 17 00:00:00 2001
|
||||
From: Aleksander Jan Bajkowski <olek2@wp.pl>
|
||||
Date: Fri, 14 May 2021 21:25:08 +0200
|
||||
Subject: [PATCH 4/5] MIPS: lantiq: dma: make a burst length configurable in
|
||||
drivers
|
||||
Date: Tue, 14 Sep 2021 23:21:01 +0200
|
||||
Subject: [PATCH 4/5] MIPS: lantiq: dma: make the burst length configurable by
|
||||
the drivers
|
||||
|
||||
Make a burst length configurable in drivers.
|
||||
Make the burst length configurable by the drivers.
|
||||
|
||||
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
|
||||
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
.../include/asm/mach-lantiq/xway/xway_dma.h | 2 +-
|
||||
arch/mips/lantiq/xway/dma.c | 38 ++++++++++++++++---
|
||||
@@ -1,11 +1,12 @@
|
||||
From ec1a17a11aced3cd756e59d91ad6f50b7a2fabfb Mon Sep 17 00:00:00 2001
|
||||
From 14d4e308e0aa0b78dc7a059716861a4380de3535 Mon Sep 17 00:00:00 2001
|
||||
From: Aleksander Jan Bajkowski <olek2@wp.pl>
|
||||
Date: Sun, 16 May 2021 15:52:06 +0200
|
||||
Subject: [PATCH 5/5] net: lantiq: configure burst length for ethernet
|
||||
Date: Tue, 14 Sep 2021 23:21:02 +0200
|
||||
Subject: [PATCH 5/5] net: lantiq: configure the burst length in ethernet
|
||||
drivers
|
||||
|
||||
Configure the burst length for Ethernet. This improves Ethernet
|
||||
performance by 58%. According to the vendor BSP, 8W burst length
|
||||
is supported by ar9 and newer SoCs.
|
||||
Configure the burst length in Ethernet drivers. This improves
|
||||
Ethernet performance by 58%. According to the vendor BSP,
|
||||
8W burst length is supported by ar9 and newer SoCs.
|
||||
|
||||
The NAT benchmark results on xRX200 (Down/Up):
|
||||
* 2W: 330 Mb/s
|
||||
@@ -15,6 +16,7 @@ The NAT benchmark results on xRX200 (Down/Up):
|
||||
Tested on xRX200 and xRX330.
|
||||
|
||||
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/lantiq_etop.c | 21 ++++++++++++++++++---
|
||||
drivers/net/ethernet/lantiq_xrx200.c | 21 ++++++++++++++++++---
|
||||
@@ -37,7 +39,7 @@ Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
|
||||
int err;
|
||||
|
||||
- ltq_dma_init_port(DMA_PORT_ETOP);
|
||||
+ ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, priv->rx_burst_len);
|
||||
+ ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, rx_burst_len);
|
||||
|
||||
priv->txch.dma.nr = tx;
|
||||
priv->txch.dma.dev = &priv->pdev->dev;
|
||||
@@ -99,7 +101,7 @@ Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
|
||||
int i;
|
||||
|
||||
- ltq_dma_init_port(DMA_PORT_ETOP);
|
||||
+ ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, priv->rx_burst_len);
|
||||
+ ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, rx_burst_len);
|
||||
|
||||
ch_rx->dma.nr = XRX200_DMA_RX;
|
||||
ch_rx->dma.dev = priv->dev;
|
||||
@@ -0,0 +1,73 @@
|
||||
From 7e553c44f09a8f536090904c6db5b8c9dbafa03b Mon Sep 17 00:00:00 2001
|
||||
From: Aleksander Jan Bajkowski <olek2@wp.pl>
|
||||
Date: Tue, 26 Oct 2021 22:59:01 +0200
|
||||
Subject: [PATCH] net: lantiq_xrx200: Hardcode the burst length value
|
||||
|
||||
All SoCs with this IP core support 8 burst length. Hauke
|
||||
suggested to hardcode this value and simplify the driver.
|
||||
|
||||
Link: https://lkml.org/lkml/2021/9/14/1533
|
||||
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/lantiq_xrx200.c | 21 ++++-----------------
|
||||
1 file changed, 4 insertions(+), 17 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/lantiq_xrx200.c
|
||||
+++ b/drivers/net/ethernet/lantiq_xrx200.c
|
||||
@@ -23,6 +23,7 @@
|
||||
#define XRX200_DMA_DATA_LEN 0x600
|
||||
#define XRX200_DMA_RX 0
|
||||
#define XRX200_DMA_TX 1
|
||||
+#define XRX200_DMA_BURST_LEN 8
|
||||
|
||||
/* cpu port mac */
|
||||
#define PMAC_RX_IPG 0x0024
|
||||
@@ -71,9 +72,6 @@ struct xrx200_priv {
|
||||
struct net_device *net_dev;
|
||||
struct device *dev;
|
||||
|
||||
- int tx_burst_len;
|
||||
- int rx_burst_len;
|
||||
-
|
||||
__iomem void *pmac_reg;
|
||||
};
|
||||
|
||||
@@ -320,7 +318,7 @@ static netdev_tx_t xrx200_start_xmit(str
|
||||
goto err_drop;
|
||||
|
||||
/* dma needs to start on a burst length value aligned address */
|
||||
- byte_offset = mapping % (priv->tx_burst_len * 4);
|
||||
+ byte_offset = mapping % (XRX200_DMA_BURST_LEN * 4);
|
||||
|
||||
desc->addr = mapping - byte_offset;
|
||||
/* Make sure the address is written before we give it to HW */
|
||||
@@ -372,7 +370,8 @@ static int xrx200_dma_init(struct xrx200
|
||||
int ret = 0;
|
||||
int i;
|
||||
|
||||
- ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, rx_burst_len);
|
||||
+ ltq_dma_init_port(DMA_PORT_ETOP, XRX200_DMA_BURST_LEN,
|
||||
+ XRX200_DMA_BURST_LEN);
|
||||
|
||||
ch_rx->dma.nr = XRX200_DMA_RX;
|
||||
ch_rx->dma.dev = priv->dev;
|
||||
@@ -490,18 +489,6 @@ static int xrx200_probe(struct platform_
|
||||
if (err)
|
||||
eth_hw_addr_random(net_dev);
|
||||
|
||||
- err = device_property_read_u32(dev, "lantiq,tx-burst-length", &priv->tx_burst_len);
|
||||
- if (err < 0) {
|
||||
- dev_err(dev, "unable to read tx-burst-length property\n");
|
||||
- return err;
|
||||
- }
|
||||
-
|
||||
- err = device_property_read_u32(dev, "lantiq,rx-burst-length", &priv->rx_burst_len);
|
||||
- if (err < 0) {
|
||||
- dev_err(dev, "unable to read rx-burst-length property\n");
|
||||
- return err;
|
||||
- }
|
||||
-
|
||||
/* bring up the dma engine and IP core */
|
||||
err = xrx200_dma_init(priv);
|
||||
if (err)
|
||||
@@ -0,0 +1,26 @@
|
||||
From 68eabc348148ae051631e8dab13c3b1a85c82896 Mon Sep 17 00:00:00 2001
|
||||
From: Aleksander Jan Bajkowski <olek2@wp.pl>
|
||||
Date: Tue, 9 Nov 2021 23:23:54 +0100
|
||||
Subject: [PATCH] net: ethernet: lantiq_etop: Fix compilation error
|
||||
|
||||
This fixes the error detected when compiling the driver.
|
||||
|
||||
Fixes: 14d4e308e0aa ("net: lantiq: configure the burst length in ethernet drivers")
|
||||
Reported-by: kernel test robot <lkp@intel.com>
|
||||
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/lantiq_etop.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/ethernet/lantiq_etop.c
|
||||
+++ b/drivers/net/ethernet/lantiq_etop.c
|
||||
@@ -402,7 +402,7 @@ ltq_etop_dma_init(struct net_device *dev
|
||||
int rx = priv->rx_irq - LTQ_DMA_ETOP;
|
||||
int err;
|
||||
|
||||
- ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, rx_burst_len);
|
||||
+ ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, priv->rx_burst_len);
|
||||
|
||||
priv->txch.dma.nr = tx;
|
||||
priv->txch.dma.dev = &priv->pdev->dev;
|
||||
@@ -298,6 +298,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
&mt6323keys {
|
||||
mediatek,long-press-mode = <0>;
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart2_pins_b>;
|
||||
|
||||
@@ -260,6 +260,7 @@ CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAVE_ARM_ARCH_TIMER=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HDMI=y
|
||||
CONFIG_HID=y
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
From patchwork Mon Dec 27 18:31:09 2021
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
|
||||
X-Patchwork-Id: 12699993
|
||||
X-Patchwork-Delegate: kuba@kernel.org
|
||||
Return-Path: <netdev-owner@kernel.org>
|
||||
Date: Mon, 27 Dec 2021 18:31:09 +0000
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
To: linux-mediatek@lists.infradead.org, netdev@vger.kernel.org,
|
||||
linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
|
||||
Cc: Felix Fietkau <nbd@nbd.name>, John Crispin <john@phrozen.org>,
|
||||
Sean Wang <sean.wang@mediatek.com>,
|
||||
Mark Lee <Mark-MC.Lee@mediatek.com>,
|
||||
"David S. Miller" <davem@davemloft.net>,
|
||||
Jakub Kicinski <kuba@kernel.org>,
|
||||
Matthias Brugger <matthias.bgg@gmail.com>,
|
||||
Russell King <linux@armlinux.org.uk>,
|
||||
Andrew Lunn <andrew@lunn.ch>
|
||||
Subject: [PATCH v5 1/2] net: ethernet: mtk_eth_soc: fix return value of MDIO
|
||||
ops
|
||||
Message-ID: <YcoGbf/klFzaJhGE@makrotopia.org>
|
||||
References: <YcnoAscVe+2YILT8@shell.armlinux.org.uk>
|
||||
<YcnlMtninjjjPhjI@makrotopia.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Disposition: inline
|
||||
In-Reply-To: <YcnoAscVe+2YILT8@shell.armlinux.org.uk>
|
||||
<YcnlMtninjjjPhjI@makrotopia.org>
|
||||
Precedence: bulk
|
||||
List-ID: <netdev.vger.kernel.org>
|
||||
X-Mailing-List: netdev@vger.kernel.org
|
||||
X-Patchwork-Delegate: kuba@kernel.org
|
||||
|
||||
Instead of returning -1 (-EPERM) when MDIO bus is stuck busy
|
||||
while writing or 0xffff if it happens while reading, return the
|
||||
appropriate -EBUSY. Also fix return type to int instead of u32.
|
||||
|
||||
Fixes: 656e705243fd0 ("net-next: mediatek: add support for MT7623 ethernet")
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
v5: fix incomplete unification of variable names phy_reg vs. phy_register
|
||||
v4: clean-up return values and types, split into two commits
|
||||
|
||||
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -95,31 +95,31 @@ static int mtk_mdio_busy_wait(struct mtk
|
||||
return -1;
|
||||
}
|
||||
|
||||
-static u32 _mtk_mdio_write(struct mtk_eth *eth, u32 phy_addr,
|
||||
- u32 phy_register, u32 write_data)
|
||||
+static int _mtk_mdio_write(struct mtk_eth *eth, u32 phy_addr, u32 phy_reg,
|
||||
+ u32 write_data)
|
||||
{
|
||||
if (mtk_mdio_busy_wait(eth))
|
||||
- return -1;
|
||||
+ return -EBUSY;
|
||||
|
||||
write_data &= 0xffff;
|
||||
|
||||
mtk_w32(eth, PHY_IAC_ACCESS | PHY_IAC_START | PHY_IAC_WRITE |
|
||||
- (phy_register << PHY_IAC_REG_SHIFT) |
|
||||
+ (phy_reg << PHY_IAC_REG_SHIFT) |
|
||||
(phy_addr << PHY_IAC_ADDR_SHIFT) | write_data,
|
||||
MTK_PHY_IAC);
|
||||
|
||||
if (mtk_mdio_busy_wait(eth))
|
||||
- return -1;
|
||||
+ return -EBUSY;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static u32 _mtk_mdio_read(struct mtk_eth *eth, int phy_addr, int phy_reg)
|
||||
+static int _mtk_mdio_read(struct mtk_eth *eth, int phy_addr, int phy_reg)
|
||||
{
|
||||
u32 d;
|
||||
|
||||
if (mtk_mdio_busy_wait(eth))
|
||||
- return 0xffff;
|
||||
+ return -EBUSY;
|
||||
|
||||
mtk_w32(eth, PHY_IAC_ACCESS | PHY_IAC_START | PHY_IAC_READ |
|
||||
(phy_reg << PHY_IAC_REG_SHIFT) |
|
||||
@@ -127,7 +127,7 @@ static u32 _mtk_mdio_read(struct mtk_eth
|
||||
MTK_PHY_IAC);
|
||||
|
||||
if (mtk_mdio_busy_wait(eth))
|
||||
- return 0xffff;
|
||||
+ return -EBUSY;
|
||||
|
||||
d = mtk_r32(eth, MTK_PHY_IAC) & 0xffff;
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
From eda80b249df7bbc7b3dd13907343a3e59bfc57fd Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
Date: Tue, 4 Jan 2022 12:06:22 +0000
|
||||
Subject: [PATCH 1/3] net: ethernet: mtk_eth_soc: fix return values and
|
||||
refactor MDIO ops
|
||||
|
||||
Instead of returning -1 (-EPERM) when MDIO bus is stuck busy
|
||||
while writing or 0xffff if it happens while reading, return the
|
||||
appropriate -ETIMEDOUT. Also fix return type to int instead of u32.
|
||||
Refactor functions to use bitfield helpers instead of having various
|
||||
masking and shifting constants in the code, which also results in the
|
||||
register definitions in the header file being more obviously related
|
||||
to what is stated in the MediaTek's Reference Manual.
|
||||
|
||||
Fixes: 656e705243fd0 ("net-next: mediatek: add support for MT7623 ethernet")
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 53 ++++++++++++---------
|
||||
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 16 +++++--
|
||||
2 files changed, 41 insertions(+), 28 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -92,46 +92,53 @@ static int mtk_mdio_busy_wait(struct mtk
|
||||
}
|
||||
|
||||
dev_err(eth->dev, "mdio: MDIO timeout\n");
|
||||
- return -1;
|
||||
+ return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
-static u32 _mtk_mdio_write(struct mtk_eth *eth, u32 phy_addr,
|
||||
- u32 phy_register, u32 write_data)
|
||||
+static int _mtk_mdio_write(struct mtk_eth *eth, u32 phy_addr, u32 phy_reg,
|
||||
+ u32 write_data)
|
||||
{
|
||||
- if (mtk_mdio_busy_wait(eth))
|
||||
- return -1;
|
||||
+ int ret;
|
||||
|
||||
- write_data &= 0xffff;
|
||||
-
|
||||
- mtk_w32(eth, PHY_IAC_ACCESS | PHY_IAC_START | PHY_IAC_WRITE |
|
||||
- (phy_register << PHY_IAC_REG_SHIFT) |
|
||||
- (phy_addr << PHY_IAC_ADDR_SHIFT) | write_data,
|
||||
+ ret = mtk_mdio_busy_wait(eth);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ mtk_w32(eth, PHY_IAC_ACCESS |
|
||||
+ PHY_IAC_START_C22 |
|
||||
+ PHY_IAC_CMD_WRITE |
|
||||
+ PHY_IAC_REG(phy_reg) |
|
||||
+ PHY_IAC_ADDR(phy_addr) |
|
||||
+ PHY_IAC_DATA(write_data),
|
||||
MTK_PHY_IAC);
|
||||
|
||||
- if (mtk_mdio_busy_wait(eth))
|
||||
- return -1;
|
||||
+ ret = mtk_mdio_busy_wait(eth);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static u32 _mtk_mdio_read(struct mtk_eth *eth, int phy_addr, int phy_reg)
|
||||
+static int _mtk_mdio_read(struct mtk_eth *eth, u32 phy_addr, u32 phy_reg)
|
||||
{
|
||||
- u32 d;
|
||||
-
|
||||
- if (mtk_mdio_busy_wait(eth))
|
||||
- return 0xffff;
|
||||
+ int ret;
|
||||
|
||||
- mtk_w32(eth, PHY_IAC_ACCESS | PHY_IAC_START | PHY_IAC_READ |
|
||||
- (phy_reg << PHY_IAC_REG_SHIFT) |
|
||||
- (phy_addr << PHY_IAC_ADDR_SHIFT),
|
||||
+ ret = mtk_mdio_busy_wait(eth);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ mtk_w32(eth, PHY_IAC_ACCESS |
|
||||
+ PHY_IAC_START_C22 |
|
||||
+ PHY_IAC_CMD_C22_READ |
|
||||
+ PHY_IAC_REG(phy_reg) |
|
||||
+ PHY_IAC_ADDR(phy_addr),
|
||||
MTK_PHY_IAC);
|
||||
|
||||
- if (mtk_mdio_busy_wait(eth))
|
||||
- return 0xffff;
|
||||
-
|
||||
- d = mtk_r32(eth, MTK_PHY_IAC) & 0xffff;
|
||||
+ ret = mtk_mdio_busy_wait(eth);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
|
||||
- return d;
|
||||
+ return mtk_r32(eth, MTK_PHY_IAC) & PHY_IAC_DATA_MASK;
|
||||
}
|
||||
|
||||
static int mtk_mdio_write(struct mii_bus *bus, int phy_addr,
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
@@ -340,11 +340,17 @@
|
||||
/* PHY Indirect Access Control registers */
|
||||
#define MTK_PHY_IAC 0x10004
|
||||
#define PHY_IAC_ACCESS BIT(31)
|
||||
-#define PHY_IAC_READ BIT(19)
|
||||
-#define PHY_IAC_WRITE BIT(18)
|
||||
-#define PHY_IAC_START BIT(16)
|
||||
-#define PHY_IAC_ADDR_SHIFT 20
|
||||
-#define PHY_IAC_REG_SHIFT 25
|
||||
+#define PHY_IAC_REG_MASK GENMASK(29, 25)
|
||||
+#define PHY_IAC_REG(x) FIELD_PREP(PHY_IAC_REG_MASK, (x))
|
||||
+#define PHY_IAC_ADDR_MASK GENMASK(24, 20)
|
||||
+#define PHY_IAC_ADDR(x) FIELD_PREP(PHY_IAC_ADDR_MASK, (x))
|
||||
+#define PHY_IAC_CMD_MASK GENMASK(19, 18)
|
||||
+#define PHY_IAC_CMD_WRITE FIELD_PREP(PHY_IAC_CMD_MASK, 1)
|
||||
+#define PHY_IAC_CMD_C22_READ FIELD_PREP(PHY_IAC_CMD_MASK, 2)
|
||||
+#define PHY_IAC_START_MASK GENMASK(17, 16)
|
||||
+#define PHY_IAC_START_C22 FIELD_PREP(PHY_IAC_START_MASK, 1)
|
||||
+#define PHY_IAC_DATA_MASK GENMASK(15, 0)
|
||||
+#define PHY_IAC_DATA(x) FIELD_PREP(PHY_IAC_DATA_MASK, (x))
|
||||
#define PHY_IAC_TIMEOUT HZ
|
||||
|
||||
#define MTK_MAC_MISC 0x1000c
|
||||
@@ -1,157 +0,0 @@
|
||||
From patchwork Mon Dec 27 18:31:43 2021
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
|
||||
X-Patchwork-Id: 12699994
|
||||
X-Patchwork-Delegate: kuba@kernel.org
|
||||
Return-Path: <netdev-owner@kernel.org>
|
||||
Date: Mon, 27 Dec 2021 18:31:43 +0000
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
To: linux-mediatek@lists.infradead.org, netdev@vger.kernel.org,
|
||||
linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
|
||||
Cc: Felix Fietkau <nbd@nbd.name>, John Crispin <john@phrozen.org>,
|
||||
Sean Wang <sean.wang@mediatek.com>,
|
||||
Mark Lee <Mark-MC.Lee@mediatek.com>,
|
||||
"David S. Miller" <davem@davemloft.net>,
|
||||
Jakub Kicinski <kuba@kernel.org>,
|
||||
Matthias Brugger <matthias.bgg@gmail.com>,
|
||||
Russell King <linux@armlinux.org.uk>,
|
||||
Andrew Lunn <andrew@lunn.ch>
|
||||
Subject: [PATCH v5 2/2] net: ethernet: mtk_eth_soc: implement Clause 45 MDIO
|
||||
access
|
||||
Message-ID: <YcoGj4Rj5mJlXz4D@makrotopia.org>
|
||||
References: <YcnoAscVe+2YILT8@shell.armlinux.org.uk>
|
||||
<YcnlMtninjjjPhjI@makrotopia.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Disposition: inline
|
||||
In-Reply-To: <YcnoAscVe+2YILT8@shell.armlinux.org.uk>
|
||||
<YcnlMtninjjjPhjI@makrotopia.org>
|
||||
Precedence: bulk
|
||||
List-ID: <netdev.vger.kernel.org>
|
||||
X-Mailing-List: netdev@vger.kernel.org
|
||||
X-Patchwork-Delegate: kuba@kernel.org
|
||||
|
||||
Implement read and write access to IEEE 802.3 Clause 45 Ethernet
|
||||
phy registers.
|
||||
Tested on the Ubiquiti UniFi 6 LR access point featuring
|
||||
MediaTek MT7622BV WiSoC with Aquantia AQR112C.
|
||||
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
v5: unchanged
|
||||
v4: clean-up return values and types, split into two commits
|
||||
v3: return -1 instead of 0xffff on error in _mtk_mdio_write
|
||||
v2: use MII_DEVADDR_C45_SHIFT and MII_REGADDR_C45_MASK to extract
|
||||
device id and register address. Unify read and write functions to
|
||||
have identical types and parameter names where possible as we are
|
||||
anyway already replacing both function bodies.
|
||||
|
||||
|
||||
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 60 +++++++++++++++++----
|
||||
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 3 ++
|
||||
2 files changed, 53 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -103,10 +103,30 @@ static int _mtk_mdio_write(struct mtk_et
|
||||
|
||||
write_data &= 0xffff;
|
||||
|
||||
- mtk_w32(eth, PHY_IAC_ACCESS | PHY_IAC_START | PHY_IAC_WRITE |
|
||||
- (phy_reg << PHY_IAC_REG_SHIFT) |
|
||||
- (phy_addr << PHY_IAC_ADDR_SHIFT) | write_data,
|
||||
- MTK_PHY_IAC);
|
||||
+ if (phy_reg & MII_ADDR_C45) {
|
||||
+ u8 dev_num = (phy_reg >> MII_DEVADDR_C45_SHIFT) & GENMASK(4, 0);
|
||||
+ u16 reg = (u16)(phy_reg & MII_REGADDR_C45_MASK);
|
||||
+
|
||||
+ mtk_w32(eth, PHY_IAC_ACCESS | PHY_IAC_START_C45 | PHY_IAC_SET_ADDR |
|
||||
+ (phy_addr << PHY_IAC_ADDR_SHIFT) |
|
||||
+ (dev_num << PHY_IAC_REG_SHIFT) |
|
||||
+ reg,
|
||||
+ MTK_PHY_IAC);
|
||||
+
|
||||
+ if (mtk_mdio_busy_wait(eth))
|
||||
+ return -EBUSY;
|
||||
+
|
||||
+ mtk_w32(eth, PHY_IAC_ACCESS | PHY_IAC_START_C45 | PHY_IAC_WRITE |
|
||||
+ (phy_addr << PHY_IAC_ADDR_SHIFT) |
|
||||
+ (dev_num << PHY_IAC_REG_SHIFT) |
|
||||
+ write_data,
|
||||
+ MTK_PHY_IAC);
|
||||
+ } else {
|
||||
+ mtk_w32(eth, PHY_IAC_ACCESS | PHY_IAC_START | PHY_IAC_WRITE |
|
||||
+ (phy_reg << PHY_IAC_REG_SHIFT) |
|
||||
+ (phy_addr << PHY_IAC_ADDR_SHIFT) | write_data,
|
||||
+ MTK_PHY_IAC);
|
||||
+ }
|
||||
|
||||
if (mtk_mdio_busy_wait(eth))
|
||||
return -EBUSY;
|
||||
@@ -114,17 +134,36 @@ static int _mtk_mdio_write(struct mtk_et
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int _mtk_mdio_read(struct mtk_eth *eth, int phy_addr, int phy_reg)
|
||||
+static int _mtk_mdio_read(struct mtk_eth *eth, u32 phy_addr, u32 phy_reg)
|
||||
{
|
||||
- u32 d;
|
||||
+ int d;
|
||||
|
||||
if (mtk_mdio_busy_wait(eth))
|
||||
return -EBUSY;
|
||||
|
||||
- mtk_w32(eth, PHY_IAC_ACCESS | PHY_IAC_START | PHY_IAC_READ |
|
||||
- (phy_reg << PHY_IAC_REG_SHIFT) |
|
||||
- (phy_addr << PHY_IAC_ADDR_SHIFT),
|
||||
- MTK_PHY_IAC);
|
||||
+ if (phy_reg & MII_ADDR_C45) {
|
||||
+ u8 dev_num = (phy_reg >> MII_DEVADDR_C45_SHIFT) & GENMASK(4, 0);
|
||||
+ u16 reg = (u16)(phy_reg & MII_REGADDR_C45_MASK);
|
||||
+
|
||||
+ mtk_w32(eth, PHY_IAC_ACCESS | PHY_IAC_START_C45 | PHY_IAC_SET_ADDR |
|
||||
+ (phy_addr << PHY_IAC_ADDR_SHIFT) |
|
||||
+ (dev_num << PHY_IAC_REG_SHIFT) |
|
||||
+ reg,
|
||||
+ MTK_PHY_IAC);
|
||||
+
|
||||
+ if (mtk_mdio_busy_wait(eth))
|
||||
+ return -EBUSY;
|
||||
+
|
||||
+ mtk_w32(eth, PHY_IAC_ACCESS | PHY_IAC_START_C45 | PHY_IAC_READ_C45 |
|
||||
+ (phy_addr << PHY_IAC_ADDR_SHIFT) |
|
||||
+ (dev_num << PHY_IAC_REG_SHIFT),
|
||||
+ MTK_PHY_IAC);
|
||||
+ } else {
|
||||
+ mtk_w32(eth, PHY_IAC_ACCESS | PHY_IAC_START | PHY_IAC_READ |
|
||||
+ (phy_reg << PHY_IAC_REG_SHIFT) |
|
||||
+ (phy_addr << PHY_IAC_ADDR_SHIFT),
|
||||
+ MTK_PHY_IAC);
|
||||
+ }
|
||||
|
||||
if (mtk_mdio_busy_wait(eth))
|
||||
return -EBUSY;
|
||||
@@ -584,6 +623,7 @@ static int mtk_mdio_init(struct mtk_eth
|
||||
eth->mii_bus->name = "mdio";
|
||||
eth->mii_bus->read = mtk_mdio_read;
|
||||
eth->mii_bus->write = mtk_mdio_write;
|
||||
+ eth->mii_bus->probe_capabilities = MDIOBUS_C22_C45;
|
||||
eth->mii_bus->priv = eth;
|
||||
eth->mii_bus->parent = eth->dev;
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
@@ -340,9 +340,12 @@
|
||||
/* PHY Indirect Access Control registers */
|
||||
#define MTK_PHY_IAC 0x10004
|
||||
#define PHY_IAC_ACCESS BIT(31)
|
||||
+#define PHY_IAC_SET_ADDR 0
|
||||
#define PHY_IAC_READ BIT(19)
|
||||
+#define PHY_IAC_READ_C45 (BIT(18) | BIT(19))
|
||||
#define PHY_IAC_WRITE BIT(18)
|
||||
#define PHY_IAC_START BIT(16)
|
||||
+#define PHY_IAC_START_C45 0
|
||||
#define PHY_IAC_ADDR_SHIFT 20
|
||||
#define PHY_IAC_REG_SHIFT 25
|
||||
#define PHY_IAC_TIMEOUT HZ
|
||||
@@ -0,0 +1,53 @@
|
||||
From c6af53f038aa32cec12e8a305ba07c7ef168f1b0 Mon Sep 17 00:00:00 2001
|
||||
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
||||
Date: Tue, 4 Jan 2022 12:07:00 +0000
|
||||
Subject: [PATCH 2/3] net: mdio: add helpers to extract clause 45 regad and
|
||||
devad fields
|
||||
|
||||
Add a couple of helpers and definitions to extract the clause 45 regad
|
||||
and devad fields from the regnum passed into MDIO drivers.
|
||||
|
||||
Tested-by: Daniel Golle <daniel@makrotopia.org>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
include/linux/mdio.h | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
--- a/include/linux/mdio.h
|
||||
+++ b/include/linux/mdio.h
|
||||
@@ -7,6 +7,7 @@
|
||||
#define __LINUX_MDIO_H__
|
||||
|
||||
#include <uapi/linux/mdio.h>
|
||||
+#include <linux/bitfield.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
|
||||
/* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit
|
||||
@@ -14,6 +15,7 @@
|
||||
*/
|
||||
#define MII_ADDR_C45 (1<<30)
|
||||
#define MII_DEVADDR_C45_SHIFT 16
|
||||
+#define MII_DEVADDR_C45_MASK GENMASK(20, 16)
|
||||
#define MII_REGADDR_C45_MASK GENMASK(15, 0)
|
||||
|
||||
struct gpio_desc;
|
||||
@@ -342,6 +344,16 @@ static inline u32 mdiobus_c45_addr(int d
|
||||
return MII_ADDR_C45 | devad << MII_DEVADDR_C45_SHIFT | regnum;
|
||||
}
|
||||
|
||||
+static inline u16 mdiobus_c45_regad(u32 regnum)
|
||||
+{
|
||||
+ return FIELD_GET(MII_REGADDR_C45_MASK, regnum);
|
||||
+}
|
||||
+
|
||||
+static inline u16 mdiobus_c45_devad(u32 regnum)
|
||||
+{
|
||||
+ return FIELD_GET(MII_DEVADDR_C45_MASK, regnum);
|
||||
+}
|
||||
+
|
||||
static inline int __mdiobus_c45_read(struct mii_bus *bus, int prtad, int devad,
|
||||
u16 regnum)
|
||||
{
|
||||
@@ -0,0 +1,128 @@
|
||||
From e2e7f6e29c99a1c6afc0e0aa4b9ea80302d28720 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
Date: Tue, 4 Jan 2022 12:07:46 +0000
|
||||
Subject: [PATCH 3/3] net: ethernet: mtk_eth_soc: implement Clause 45 MDIO
|
||||
access
|
||||
|
||||
Implement read and write access to IEEE 802.3 Clause 45 Ethernet
|
||||
phy registers while making use of new mdiobus_c45_regad and
|
||||
mdiobus_c45_devad helpers.
|
||||
|
||||
Tested on the Ubiquiti UniFi 6 LR access point featuring
|
||||
MediaTek MT7622BV WiSoC with Aquantia AQR112C.
|
||||
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 70 +++++++++++++++++----
|
||||
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 3 +
|
||||
2 files changed, 60 insertions(+), 13 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -104,13 +104,35 @@ static int _mtk_mdio_write(struct mtk_et
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
- mtk_w32(eth, PHY_IAC_ACCESS |
|
||||
- PHY_IAC_START_C22 |
|
||||
- PHY_IAC_CMD_WRITE |
|
||||
- PHY_IAC_REG(phy_reg) |
|
||||
- PHY_IAC_ADDR(phy_addr) |
|
||||
- PHY_IAC_DATA(write_data),
|
||||
- MTK_PHY_IAC);
|
||||
+ if (phy_reg & MII_ADDR_C45) {
|
||||
+ mtk_w32(eth, PHY_IAC_ACCESS |
|
||||
+ PHY_IAC_START_C45 |
|
||||
+ PHY_IAC_CMD_C45_ADDR |
|
||||
+ PHY_IAC_REG(mdiobus_c45_devad(phy_reg)) |
|
||||
+ PHY_IAC_ADDR(phy_addr) |
|
||||
+ PHY_IAC_DATA(mdiobus_c45_regad(phy_reg)),
|
||||
+ MTK_PHY_IAC);
|
||||
+
|
||||
+ ret = mtk_mdio_busy_wait(eth);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ mtk_w32(eth, PHY_IAC_ACCESS |
|
||||
+ PHY_IAC_START_C45 |
|
||||
+ PHY_IAC_CMD_WRITE |
|
||||
+ PHY_IAC_REG(mdiobus_c45_devad(phy_reg)) |
|
||||
+ PHY_IAC_ADDR(phy_addr) |
|
||||
+ PHY_IAC_DATA(write_data),
|
||||
+ MTK_PHY_IAC);
|
||||
+ } else {
|
||||
+ mtk_w32(eth, PHY_IAC_ACCESS |
|
||||
+ PHY_IAC_START_C22 |
|
||||
+ PHY_IAC_CMD_WRITE |
|
||||
+ PHY_IAC_REG(phy_reg) |
|
||||
+ PHY_IAC_ADDR(phy_addr) |
|
||||
+ PHY_IAC_DATA(write_data),
|
||||
+ MTK_PHY_IAC);
|
||||
+ }
|
||||
|
||||
ret = mtk_mdio_busy_wait(eth);
|
||||
if (ret < 0)
|
||||
@@ -127,12 +149,33 @@ static int _mtk_mdio_read(struct mtk_eth
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
- mtk_w32(eth, PHY_IAC_ACCESS |
|
||||
- PHY_IAC_START_C22 |
|
||||
- PHY_IAC_CMD_C22_READ |
|
||||
- PHY_IAC_REG(phy_reg) |
|
||||
- PHY_IAC_ADDR(phy_addr),
|
||||
- MTK_PHY_IAC);
|
||||
+ if (phy_reg & MII_ADDR_C45) {
|
||||
+ mtk_w32(eth, PHY_IAC_ACCESS |
|
||||
+ PHY_IAC_START_C45 |
|
||||
+ PHY_IAC_CMD_C45_ADDR |
|
||||
+ PHY_IAC_REG(mdiobus_c45_devad(phy_reg)) |
|
||||
+ PHY_IAC_ADDR(phy_addr) |
|
||||
+ PHY_IAC_DATA(mdiobus_c45_regad(phy_reg)),
|
||||
+ MTK_PHY_IAC);
|
||||
+
|
||||
+ ret = mtk_mdio_busy_wait(eth);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ mtk_w32(eth, PHY_IAC_ACCESS |
|
||||
+ PHY_IAC_START_C45 |
|
||||
+ PHY_IAC_CMD_C45_READ |
|
||||
+ PHY_IAC_REG(mdiobus_c45_devad(phy_reg)) |
|
||||
+ PHY_IAC_ADDR(phy_addr),
|
||||
+ MTK_PHY_IAC);
|
||||
+ } else {
|
||||
+ mtk_w32(eth, PHY_IAC_ACCESS |
|
||||
+ PHY_IAC_START_C22 |
|
||||
+ PHY_IAC_CMD_C22_READ |
|
||||
+ PHY_IAC_REG(phy_reg) |
|
||||
+ PHY_IAC_ADDR(phy_addr),
|
||||
+ MTK_PHY_IAC);
|
||||
+ }
|
||||
|
||||
ret = mtk_mdio_busy_wait(eth);
|
||||
if (ret < 0)
|
||||
@@ -591,6 +634,7 @@ static int mtk_mdio_init(struct mtk_eth
|
||||
eth->mii_bus->name = "mdio";
|
||||
eth->mii_bus->read = mtk_mdio_read;
|
||||
eth->mii_bus->write = mtk_mdio_write;
|
||||
+ eth->mii_bus->probe_capabilities = MDIOBUS_C22_C45;
|
||||
eth->mii_bus->priv = eth;
|
||||
eth->mii_bus->parent = eth->dev;
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
@@ -345,9 +345,12 @@
|
||||
#define PHY_IAC_ADDR_MASK GENMASK(24, 20)
|
||||
#define PHY_IAC_ADDR(x) FIELD_PREP(PHY_IAC_ADDR_MASK, (x))
|
||||
#define PHY_IAC_CMD_MASK GENMASK(19, 18)
|
||||
+#define PHY_IAC_CMD_C45_ADDR FIELD_PREP(PHY_IAC_CMD_MASK, 0)
|
||||
#define PHY_IAC_CMD_WRITE FIELD_PREP(PHY_IAC_CMD_MASK, 1)
|
||||
#define PHY_IAC_CMD_C22_READ FIELD_PREP(PHY_IAC_CMD_MASK, 2)
|
||||
+#define PHY_IAC_CMD_C45_READ FIELD_PREP(PHY_IAC_CMD_MASK, 3)
|
||||
#define PHY_IAC_START_MASK GENMASK(17, 16)
|
||||
+#define PHY_IAC_START_C45 FIELD_PREP(PHY_IAC_START_MASK, 0)
|
||||
#define PHY_IAC_START_C22 FIELD_PREP(PHY_IAC_START_MASK, 1)
|
||||
#define PHY_IAC_DATA_MASK GENMASK(15, 0)
|
||||
#define PHY_IAC_DATA(x) FIELD_PREP(PHY_IAC_DATA_MASK, (x))
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -575,6 +575,7 @@ static void mtk_validate(struct phylink_
|
||||
if (MTK_HAS_CAPS(mac->hw->soc->caps, MTK_SGMII)) {
|
||||
phylink_set(mask, 1000baseT_Full);
|
||||
phylink_set(mask, 1000baseX_Full);
|
||||
+ phylink_set(mask, 2500baseT_Full);
|
||||
phylink_set(mask, 2500baseX_Full);
|
||||
}
|
||||
if (MTK_HAS_CAPS(mac->hw->soc->caps, MTK_RGMII)) {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user