Re: [OpenWrt-Devel] [PATCH] mpc85xx: revert enabling the crypto acceleration driver in the kernel config instead of packaging it

2018-06-01 Thread Achim Gottinger



Am 01.06.2018 um 09:32 schrieb Achim Gottinger:



Am 01.06.2018 um 08:30 schrieb John Crispin:



On 01/06/18 02:04, Achim Gottinger wrote:



Am 31.05.2018 um 20:12 schrieb Achim Gottinger:



Am 31.05.2018 um 19:12 schrieb Achim Gottinger:

Hello List,

Since the commit 
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=c00e5a4f09115ec976fac7dc380f576ef6a24fab
 strongswan is broken on WDR4900v1.
An bug report can be seen here: 
https://bugs.openwrt.org/index.php?do=details_id=1262.
To get strongswan working again i made an patch which reverts the changes from 
above commit.
Now if the caam modules are loaded strongswan still fails but without the caam 
modules loades it works as expected.
With the caam modules build in caam can not be disabled by the openwrt user.




Hi Achim,
please resend the series adding your Signed-off-by: line right here
    John

Hello John,


Signed-off-by: Achim Gottinger 

diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk
index 2ea2d2c0e7..dbb0d59012 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -271,6 +271,33 @@ endef

 $(eval $(call KernelPackage,crypto-hmac))

+define KernelPackage/crypto-hw-caam
+  TITLE:=Freescale CAAM driver (SEC4)
+  DEPENDS:=@TARGET_mpc85xx +kmod-crypto-aead +kmod-crypto-authenc 
+kmod-crypto-hash +kmod-random-core
+  KCONFIG:= \
+   CONFIG_CRYPTO_HW=y \
+   CONFIG_CRYPTO_DEV_FSL_CAAM \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_JR \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9 \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_IMX=n \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_INTC=n \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG=n
+  FILES:= \
+   $(LINUX_DIR)/drivers/crypto/caam/caam.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caamalg.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caamhash.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caam_pkc.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caam_jr.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caamrng.ko
+  AUTOLOAD:=$(call AutoLoad,09,caam caamalg caamhash caam_jr caam_pkc caamrng)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-hw-caam))

 define KernelPackage/crypto-hw-ccp
   TITLE:=AMD Cryptographic Coprocessor
diff --git a/target/linux/mpc85xx/config-4.9 b/target/linux/mpc85xx/config-4.9
index 68568c4a62..dc2e5a8820 100644
--- a/target/linux/mpc85xx/config-4.9
+++ b/target/linux/mpc85xx/config-4.9
@@ -47,16 +47,16 @@ CONFIG_CRYPTO_AEAD2=y
 CONFIG_CRYPTO_AKCIPHER=y
 CONFIG_CRYPTO_AKCIPHER2=y
 CONFIG_CRYPTO_AUTHENC=y
-CONFIG_CRYPTO_DEV_FSL_CAAM=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
 # CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set
 # CONFIG_CRYPTO_DEV_FSL_CAAM_IMX is not set
 # CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set
-CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
-CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
+#CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
 CONFIG_CRYPTO_HW=y

Implemented the changes as three different patches so this request can be 
ignored.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/3] mpc85xx: update crypto-hw-caam

2018-06-01 Thread Achim Gottinger

Added previous removed crypto-hw-caam module with support for kernel version 
4.9 and 4.14.

Signed-off-by: Achim Gottinger 
---
package/kernel/linux/modules/crypto.mk | 28 
 1 file changed, 28 insertions(+)

diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk
index 2ea2d2c0e7..8ea9282d42 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -271,6 +271,34 @@ endef
 
 $(eval $(call KernelPackage,crypto-hmac))
 
+define KernelPackage/crypto-hw-caam

+  TITLE:=Freescale CAAM driver (SEC4)
+  DEPENDS:=@TARGET_mpc85xx +kmod-crypto-aead +kmod-crypto-authenc 
+kmod-crypto-hash +kmod-random-core
+  KCONFIG:= \
+   CONFIG_CRYPTO_HW=y \
+   CONFIG_CRYPTO_DEV_FSL_CAAM \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_JR \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9 \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_IMX=n \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_INTC=n \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG=n
+  FILES:= \
+   $(LINUX_DIR)/drivers/crypto/caam/caam.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caamalg.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caamalg_desc.ko@ge4.14 \
+   $(LINUX_DIR)/drivers/crypto/caam/caamhash.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caam_pkc.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caam_jr.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caamrng.ko
+  AUTOLOAD:=$(call AutoLoad,09,caam caamalg caamalg_desc@ge4.14 caamhash 
caam_jr caam_pkc caamrng)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-hw-caam))
 
 define KernelPackage/crypto-hw-ccp

   TITLE:=AMD Cryptographic Coprocessor
---

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/3] mpc85xx: kernel 4.14

2018-06-01 Thread Achim Gottinger

Added kernel version 4.14 to mpc85xx.
Rebased all patches
Added new kernel options with default values.
Caam support is not enabled in the kernel.

Signed-off-by: Achim Gottinger 
---
 target/linux/mpc85xx/Makefile  |   2 +-
 target/linux/mpc85xx/config-4.14   | 365 +
 ...erpc-85xx-add-gpio-keys-to-of-match-table.patch |  10 +
 .../100-powerpc-85xx-tl-wdr4900-v1-support.patch   |  80 +
 .../101-powerpc-85xx-hiveap-330-support.patch  |  30 ++
 .../102-powerpc-add-cmdline-override.patch |  37 +++
 6 files changed, 523 insertions(+), 1 deletion(-)

diff --git a/target/linux/mpc85xx/Makefile b/target/linux/mpc85xx/Makefile
index b181e67c0e..32987ebb50 100644
--- a/target/linux/mpc85xx/Makefile
+++ b/target/linux/mpc85xx/Makefile
@@ -14,7 +14,7 @@ FEATURES:=squashfs
 MAINTAINER:=Imre Kaloz 
 SUBTARGETS:=generic p1020
 
-KERNEL_PATCHVER:=4.9

+KERNEL_PATCHVER:=4.4
 
 KERNELNAME:=zImage
 
diff --git a/target/linux/mpc85xx/config-4.14 b/target/linux/mpc85xx/config-4.14

new file mode 100644
index 00..0bdf7aa25d
--- /dev/null
+++ b/target/linux/mpc85xx/config-4.14
@@ -0,0 +1,365 @@
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_ADVANCED_OPTIONS is not set
+CONFIG_AR8216_PHY=y
+CONFIG_AR8216_PHY_LEDS=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
+CONFIG_ARCH_HAS_DMA_SET_COHERENT_MASK=y
+CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
+CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_ARCH_HAS_SG_CHAIN=y
+CONFIG_ARCH_HAS_WALK_MEMORY=y
+CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
+CONFIG_ARCH_MMAP_RND_BITS=11
+# CONFIG_ARCH_RANDOM is not set
+CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
+CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
+CONFIG_ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT=y
+CONFIG_ARCH_SUPPORTS_UPROBES=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_USE_BUILTIN_BSWAP=y
+CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
+CONFIG_ASN1=y
+CONFIG_AUDIT_ARCH=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BOOKE=y
+CONFIG_BOOKE_WDT=y
+CONFIG_BOUNCE=y
+# CONFIG_BSC9131_RDB is not set
+# CONFIG_BSC9132_QDS is not set
+# CONFIG_C293_PCIE is not set
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CLZ_TAB=y
+CONFIG_CMDLINE="console=ttyS0,115200"
+CONFIG_CMDLINE_BOOL=y
+# CONFIG_CMDLINE_OVERRIDE is not set
+# CONFIG_CORENET_GENERIC is not set
+# CONFIG_CPM2 is not set
+CONFIG_CPU_BIG_ENDIAN=y
+CONFIG_CRYPTO_AEAD=y
+CONFIG_CRYPTO_AEAD2=y
+# CONFIG_CRYPTO_AES_PPC_SPE is not set
+CONFIG_CRYPTO_AKCIPHER=y
+CONFIG_CRYPTO_AKCIPHER2=y
+CONFIG_CRYPTO_AUTHENC=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
+# CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set
+# CONFIG_CRYPTO_DEV_FSL_CAAM_IMX is not set
+# CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set
+#CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
+#CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_HW=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+# CONFIG_CRYPTO_MD5_PPC is not set
+CONFIG_CRYPTO_NULL=y
+CONFIG_CRYPTO_NULL2=y
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_RSA=y
+# CONFIG_CRYPTO_SHA1_PPC is not set
+# CONFIG_CRYPTO_SHA1_PPC_SPE is not set
+# CONFIG_CRYPTO_SHA256_PPC_SPE is not set
+CONFIG_CRYPTO_WORKQUEUE=y
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEFAULT_UIMAGE is not set
+CONFIG_DNOTIFY=y
+CONFIG_DTC=y
+# CONFIG_E200 is not set
+CONFIG_E500=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_EPAPR_BOOT is not set
+CONFIG_ETHERNET_PACKET_MANGLE=y
+# CONFIG_FHCI_DEBUG is not set
+CONFIG_FIXED_PHY=y
+CONFIG_FSL_BOOKE=y
+# CONFIG_FSL_DPAA is not set
+CONFIG_FSL_EMB_PERFMON=y
+# CONFIG_FSL_FMAN is not set
+CONFIG_FSL_GTM=y
+CONFIG_FSL_LBC=y
+CONFIG_FSL_PCI=y
+CONFIG_FSL_PQ_MDIO=y
+CONFIG_FSL_SOC=y
+CONFIG_FSL_SOC_BOOKE=y
+# CONFIG_FSL_ULI1575 is not set
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+# CONFIG_GENERIC_CSUM is not set
+CONFIG_GENERIC_IO=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+# CONFIG_GENERIC_TBSYNC is not set
+CONFIG_GENERIC_TIME_VSYSCALL_OLD=y
+CONFIG_GEN_RTC=y
+# CONFIG_GE_FPGA is not set
+# CONFIG_GE_IMP3A is not set
+CONFIG_GIANFAR=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_GENERIC=y
+CONFIG_GPIO_MPC8XXX=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+# CONFIG_HAS_RAPIDIO is not set
+# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
+CONFIG_HAVE_ARCH_AUDITSYSCALL=y

Re: [OpenWrt-Devel] [PATCH 1/3] mpc85xx: revert enabling the crypto acceleration driver in the kernel

2018-06-01 Thread Achim Gottinger
Since the commit 
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=c00e5a4f09115ec976fac7dc380f576ef6a24fab 
strongswan is broken on WDR4900v1.
An bug report can be seen here: 
https://bugs.openwrt.org/index.php?do=details_id=1262.
To get strongswan working again i made an patch which reverts the 
changes from above commit.
According to this thread https://community.nxp.com/thread/338432 there 
is no hardware crypto extension on the  WDR4900, which explains the 
errors i get when i try to load the caamrng module. And why strongswan 
does not work.

So I assume these patches will not break anything on this router.
I also added kernel 4-14 support to mpc85xx (patch 2/3) and updated the 
crypto-hw-caam module to work with kernel versions 4.9 and 4.14 (patch 
3/3).


Signed-off-by: Achim Gottinger 
---
 target/linux/mpc85xx/config-4.9 | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/target/linux/mpc85xx/config-4.9 
b/target/linux/mpc85xx/config-4.9

index 68568c4a62..dc2e5a8820 100644
--- a/target/linux/mpc85xx/config-4.9
+++ b/target/linux/mpc85xx/config-4.9
@@ -47,16 +47,16 @@ CONFIG_CRYPTO_AEAD2=y
 CONFIG_CRYPTO_AKCIPHER=y
 CONFIG_CRYPTO_AKCIPHER2=y
 CONFIG_CRYPTO_AUTHENC=y
-CONFIG_CRYPTO_DEV_FSL_CAAM=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
 # CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set
 # CONFIG_CRYPTO_DEV_FSL_CAAM_IMX is not set
 # CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set
-CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
-CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
+#CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
 CONFIG_CRYPTO_HW=y
---

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] config: extend small_flash feature

2018-06-01 Thread Alex Maclean
On 01/06/18 12:34, Lucian Cristian wrote:

> On 30.05.2018 20:22, Martin Tippmann wrote:
>> find /usr |
>> xargs md5sum
>
> I made the test on tl-wr841n-v9 with luci selected
>
> these are the changes to squashfs
>
> --- a/config/Config-images.in
> +++ b/config/Config-images.in
> @@ -149,8 +149,15 @@ menu "Target Images"
>     int "Block size (in KiB)"
>     depends on TARGET_ROOTFS_SQUASHFS
>     default 64 if LOW_MEMORY_FOOTPRINT
> +   default 1024 if (SMALL_FLASH &&
> !LOW_MEMORY_FOOTPRINT)
>     default 256
>
> +   config SQUASHFS_FRAGMENT_CACHE_SIZE
> +   int "Number of fragments cached"
> +   depends on TARGET_ROOTFS_SQUASHFS
> +   default 1 if (SMALL_FLASH &&
> !LOW_MEMORY_FOOTPRINT)
> +   default 3
> +
>     menuconfig TARGET_ROOTFS_UBIFS
>     bool "ubifs"
>     default y if USES_UBIFS

This won't have actually changed the option - you should use
KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE,
and CONFIG_SQUASHFS_EMBEDDED=y is also needed in the kernel config.
I think this also therefore belongs either in Config-kernel.in or simply
in the subtarget kernel config.

I did a few tests myself:

256K and 3 fragments:
10608K used after boot, 11408K free after reading /usr
24.5 seconds from kernel start to wifi link up

1024K and 3 fragments:
14520K after boot, 15204K after reading
30 seconds to link up

1024K and 2 fragments:
13460K after boot, 14128K after reading
34.7 seconds to link up

1024K and 1 fragment:
11620K after boot, 12364K after reading
46.8 seconds to link up

Certainly quite a lot of memory impact with the larger block size, but
also a quite significant performance impact with the larger reads.

I'm leaning towards compromising on 2 fragments but I'd like input on that.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] brcm2708: Update brcm2708-gpu-fw package

2018-06-01 Thread Christo Nedev
Problem - rapsberry pi 3 b/b+ does not boot with bcm2710 images!

How Raspberry Pi boots Actualy?

When Raspberry is switched on GPU is activated.
1. GPU execute First stage bootloader from ROM.
First stage bootloader mount the FAT boot partition on the SD card
and execute second stage bootloader (bootcode.bin).
2. Second stage bootloader (bootcode.bin) activate SDRAM.
Load the GPU firmware (start.elf).
3. GPU firmware (start.elf)
  a) display Rainbow splash.
  b) read firmware configuration file config.txt and
 split the RAM using fixup.dat.
  c) loads a cmdline.txt
  d) enables the CPU.
  e) loads the kernel image configurable via config.txt

In your target/linux/brcm2708/image/config.txt
 493 ## kernel (string)
 494 ## Alternative name to use when loading kernel.
 495 ##
 496 #kernel=""
it is not configured!

But in your target/linux/brcm2708/image/Makefile
  75   KERNEL_IMG := kernel8.img
  76   DEVICE_TITLE := Raspberry Pi 3B/3B+
you have kernel8.img

GPU Firmware search order by default for a PI 3 is:
kernel8.img if found boot in 64 bit mode
kernel8-32.img if found boot in 32 bit mode
kernel7.img if found boot in 32 bit mode
kernel.img if found boot in 32 bit mode

But a PI 2 will start the search from kernel7.img and
a PI 1 only looks for kernel.img.

Оbviously the kernel has been found.
But something goes wrong and the device is restarted.

In your package/kernel/brcm2708-gpu-fw/Makefile
  11 PKG_NAME:=brcm2708-gpu-fw
  12 PKG_VERSION:=2017-08-08
  13 PKG_RELEASE:=e7ba7ab135f5a68b2c00a919ea9ac8d5528a5d5b
boot loader is 10 monts old.

In conclusion, the best way to solve the problem is
to update the boot loader!

Fixup_cd.dat and start_cd.elf files are not necessary.
These are used when GPU memory is set to 16 MB, which disables
some GPU features.
I did not remove them just in case!

cheers

Signed-off-by: Christo Nedev 
---
 package/kernel/brcm2708-gpu-fw/Makefile | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/package/kernel/brcm2708-gpu-fw/Makefile 
b/package/kernel/brcm2708-gpu-fw/Makefile
index 9f3d7d3092..73aebd7b5f 100644
--- a/package/kernel/brcm2708-gpu-fw/Makefile
+++ b/package/kernel/brcm2708-gpu-fw/Makefile
@@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=brcm2708-gpu-fw
-PKG_VERSION:=2017-08-08
-PKG_RELEASE:=e7ba7ab135f5a68b2c00a919ea9ac8d5528a5d5b
+PKG_VERSION:=2018-05-16
+PKG_RELEASE:=0f5f899ccec1c2ef8bba02aa49700b4ec19b4199
 
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
 
@@ -33,7 +33,7 @@ define Download/bootcode_bin
   FILE:=$(RPI_FIRMWARE_FILE)-bootcode.bin
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=bootcode.bin
-  HASH:=b5928ef5253774362014f9e7de856397a932514fe1bc5d7f7817a73c0e10e863
+  HASH:=c9eb5258766fabf7127e790b257f106e2717f0ccaaed37544b970b0d113956fc
 endef
 $(eval $(call Download,bootcode_bin))
 
@@ -41,7 +41,7 @@ define Download/fixup_dat
   FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=fixup.dat
-  HASH:=d95fcac57de7ab71e863a115fd60444f6099cb2ea100f4a68b2c606f79e775ed
+  HASH:=8a6311e73d0f349be9b8424db0644fd8f48aaf721f3f2f487488c83d7316cbdf
 endef
 $(eval $(call Download,fixup_dat))
 
@@ -49,7 +49,7 @@ define Download/fixup_cd_dat
   FILE:=$(RPI_FIRMWARE_FILE)-fixup_cd.dat
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=fixup_cd.dat
-  HASH:=28f3ec8388df4e0c47489f8370a29ca81dbc536fe7db9978342865b5d093ec36
+  HASH:=973b008aae9711d57ddce4f058354fe5a0b4725dd825673f784a2e2754da1f28
 endef
 $(eval $(call Download,fixup_cd_dat))
 
@@ -57,7 +57,7 @@ define Download/start_elf
   FILE:=$(RPI_FIRMWARE_FILE)-start.elf
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=start.elf
-  HASH:=8712fb4e241a22f7a33de0f1d420e0fdfff237952aa685c907b91e59c8d487fa
+  HASH:=8e77c4cce7e44ced609e5046dd55f19cb7656a8ce4694e733b7eb6ecab915fe1
 endef
 $(eval $(call Download,start_elf))
 
@@ -65,7 +65,7 @@ define Download/start_cd_elf
   FILE:=$(RPI_FIRMWARE_FILE)-start_cd.elf
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=start_cd.elf
-  HASH:=c600ab34bea389da10aac541bf2f9c62e5f774093b7e1f2f72c4637f9cf3a83c
+  HASH:=25223b479b7aca1d74c6f7a1829aba69fd14906ca5b25ae12571fe71ea2c5a4a
 endef
 $(eval $(call Download,start_cd_elf))
 
-- 
2.11.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 01/14] brcm2708: Update brcm2708-gpu-fw package

2018-06-01 Thread Christo Nedev
Fix brcm2710 image boot issues.

Signed-off-by: Christo Nedev 
---
 package/kernel/brcm2708-gpu-fw/Makefile | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/package/kernel/brcm2708-gpu-fw/Makefile 
b/package/kernel/brcm2708-gpu-fw/Makefile
index 9f3d7d3092..73aebd7b5f 100644
--- a/package/kernel/brcm2708-gpu-fw/Makefile
+++ b/package/kernel/brcm2708-gpu-fw/Makefile
@@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=brcm2708-gpu-fw
-PKG_VERSION:=2017-08-08
-PKG_RELEASE:=e7ba7ab135f5a68b2c00a919ea9ac8d5528a5d5b
+PKG_VERSION:=2018-05-16
+PKG_RELEASE:=0f5f899ccec1c2ef8bba02aa49700b4ec19b4199
 
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
 
@@ -33,7 +33,7 @@ define Download/bootcode_bin
   FILE:=$(RPI_FIRMWARE_FILE)-bootcode.bin
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=bootcode.bin
-  HASH:=b5928ef5253774362014f9e7de856397a932514fe1bc5d7f7817a73c0e10e863
+  HASH:=c9eb5258766fabf7127e790b257f106e2717f0ccaaed37544b970b0d113956fc
 endef
 $(eval $(call Download,bootcode_bin))
 
@@ -41,7 +41,7 @@ define Download/fixup_dat
   FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=fixup.dat
-  HASH:=d95fcac57de7ab71e863a115fd60444f6099cb2ea100f4a68b2c606f79e775ed
+  HASH:=8a6311e73d0f349be9b8424db0644fd8f48aaf721f3f2f487488c83d7316cbdf
 endef
 $(eval $(call Download,fixup_dat))
 
@@ -49,7 +49,7 @@ define Download/fixup_cd_dat
   FILE:=$(RPI_FIRMWARE_FILE)-fixup_cd.dat
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=fixup_cd.dat
-  HASH:=28f3ec8388df4e0c47489f8370a29ca81dbc536fe7db9978342865b5d093ec36
+  HASH:=973b008aae9711d57ddce4f058354fe5a0b4725dd825673f784a2e2754da1f28
 endef
 $(eval $(call Download,fixup_cd_dat))
 
@@ -57,7 +57,7 @@ define Download/start_elf
   FILE:=$(RPI_FIRMWARE_FILE)-start.elf
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=start.elf
-  HASH:=8712fb4e241a22f7a33de0f1d420e0fdfff237952aa685c907b91e59c8d487fa
+  HASH:=8e77c4cce7e44ced609e5046dd55f19cb7656a8ce4694e733b7eb6ecab915fe1
 endef
 $(eval $(call Download,start_elf))
 
@@ -65,7 +65,7 @@ define Download/start_cd_elf
   FILE:=$(RPI_FIRMWARE_FILE)-start_cd.elf
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=start_cd.elf
-  HASH:=c600ab34bea389da10aac541bf2f9c62e5f774093b7e1f2f72c4637f9cf3a83c
+  HASH:=25223b479b7aca1d74c6f7a1829aba69fd14906ca5b25ae12571fe71ea2c5a4a
 endef
 $(eval $(call Download,start_cd_elf))
 
-- 
2.11.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ramips: Fix pcie interrupt mapping for ZBT WE1326

2018-06-01 Thread Kristian Evensen
Hi,

On Tue, May 29, 2018 at 9:21 PM, Kristian Evensen
 wrote:
> +   interrupt-map = <0x1 0 0 1  GIC_SHARED 24 
> IRQ_TYPE_LEVEL_HIGH>,
> +   <0x2 0 0 1  GIC_SHARED 25 
> IRQ_TYPE_LEVEL_HIGH>;
> +

Now that the offending commit has been reverted, this patch can be
ignored. However, I thought I should provide some context on this
change, as the recent discussions on the forum triggered me to do a
more thorough investigation of what actually went wrong. Any feedback,
or plain "YOU ARE WRONG", are very much welcome as I am not very
experience with dts, setting up pci and interrupts, etc.

Before commit 5f7396ebef09, the IRQ was set inside a large if-clause
(removed by the mentioned commit). The wifi radios on the 1326 are on
PCIe bus 1, slot 0 (mt76x2) and bus 2, slot 1 (mt7603). When PCIe is
about to be enabled, pcie_link_status is six for both radios. The
RALINK_INT_PCIE-values map directly to interrupts specified for PCIe
in the dtsi-file. I.e., RALINK_INT_PCIE0 is GIC_SHARED 4, PCIE1 is 24
and PCIE2 is 25. Before 5f7396ebef09, the IRQ for mt76x2 was always
set to PCIE1 (24) and mt7603 to PCIE2 (25). /proc/interrupts looks as
follows on a working WE1326:

24: 2792 0 0 0 MIPS GIC 31 mt76x2e
25: 13123 0 0 0 MIPS GIC 32 mt7603e

The hardware interrupt numbers are calculated by doing
GIC_SHARED_HWIRQ_BASE + x (where X is either 4, 24 or 25).
GIC_SHARED_HWIRQ_BASE is defined as GIC_NUM_LOCAL_INTRS, which is
seven. This is why we see GIC 31 and 32. See
/drivers/irqchip/irq-mips-gic.c and /arch/mips/include/asm/mips-gic.h
in the kernel sources for more details about the calculations, values,
etc..

After commit 5f7396ebef09, the static IRQ assigned for the given
bus/slot combos are removed and the IRQ values from the DTS are used
directly. A consequence of this is that the first pci device (mt76x2)
in the 1326 is incorrectly assigned IRQ 11. /proc/interrupts after
5f7396ebef09 looks as follows:

24: 0 0 0 0 MIPS GIC 11 mt76x2e

The correct interrupts should be as above. I.e, mt76x2 should have IRQ
31 (GIC_SHARED 24) and mt7603 IRQ 32 (GIC_SHARED 25). By applying my
patch and thus update the interrupt map, the correct interrupt mapping
was restored. /proc/interrupts looks as follows:

23: 23 0 0 0 MIPS GIC 32 mt7603e
24: 3010 0 0 0 MIPS GIC 31 mt76x2e

In order to confirm that the IRQ-mapping on the WE1326 are different
from (some) other mt7621-devices, I checked the interrupt mapping on
the ZBT WG3526 (which worked before and after commit). It looks as
follows:

23: 84765 0 0 0 MIPS GIC 11 mt7603e
24: 27389 0 0 0 MIPS GIC 31 mt76x2e

I.e., mt7603 (first pci device) is GIC_SHARED 4 and mt76x2 GIC_SHARED
24. The paths to the pci-devices are the same on both WE1326 and
WG3526 (:01:00.0 and :02:00.0).

BR,
Kristian

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] config: extend small_flash feature

2018-06-01 Thread Lucian Cristian

On 30.05.2018 20:22, Martin Tippmann wrote:

find /usr |
xargs md5sum


I made the test on tl-wr841n-v9 with luci selected

these are the changes to squashfs

--- a/config/Config-images.in
+++ b/config/Config-images.in
@@ -149,8 +149,15 @@ menu "Target Images"
    int "Block size (in KiB)"
    depends on TARGET_ROOTFS_SQUASHFS
    default 64 if LOW_MEMORY_FOOTPRINT
+   default 1024 if (SMALL_FLASH && 
!LOW_MEMORY_FOOTPRINT)

    default 256

+   config SQUASHFS_FRAGMENT_CACHE_SIZE
+   int "Number of fragments cached"
+   depends on TARGET_ROOTFS_SQUASHFS
+   default 1 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
+   default 3
+
    menuconfig TARGET_ROOTFS_UBIFS
    bool "ubifs"
    default y if USES_UBIFS

the results:


after boot

root@OpenWrt:/# df -h
Filesystem    Size  Used Available Use% Mounted on
/dev/root 3.0M  3.0M 0 100% /rom
tmpfs    13.4M 76.0K 13.4M   1% /tmp
tmpfs    13.4M 48.0K 13.4M   0% /tmp/root
tmpfs   512.0K 0    512.0K   0% /dev
/dev/mtdblock4  320.0K    220.0K    100.0K  69% /overlay
overlayfs:/overlay  320.0K    220.0K    100.0K  69% /
root@OpenWrt:/# free

 total   used   free shared buffers cached
Mem: 27520  23920   3600    124 2112   5748
-/+ buffers/cache:  16060  11460
Swap:    0  0  0
root@OpenWrt:/# cat /proc/meminfo
MemTotal:  27520 kB
MemFree:    3536 kB
MemAvailable:   9064 kB
Buffers:    2112 kB
Cached: 5748 kB
SwapCached:    0 kB
Active: 5892 kB
Inactive:   3120 kB
Active(anon):   1252 kB
Inactive(anon):   24 kB
Active(file):   4640 kB
Inactive(file): 3096 kB
Unevictable:   0 kB
Mlocked:   0 kB
SwapTotal: 0 kB
SwapFree:  0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages:  1160 kB
Mapped: 1784 kB
Shmem:   124 kB
Slab:   8876 kB
SReclaimable:   1216 kB
SUnreclaim: 7660 kB
KernelStack: 304 kB
PageTables:  208 kB
NFS_Unstable:  0 kB
Bounce:    0 kB
WritebackTmp:  0 kB
CommitLimit:   13760 kB
Committed_AS:   3916 kB
VmallocTotal:    1048372 kB
VmallocUsed:   0 kB
VmallocChunk:  0 kB


after, ran 3 times


MemTotal:  27520 kB
MemFree:    1548 kB
MemAvailable:   8880 kB
Buffers:    2112 kB
Cached: 7268 kB
SwapCached:    0 kB
Active: 9612 kB
Inactive:    832 kB
Active(anon):   1164 kB
Inactive(anon):   24 kB
Active(file):   8448 kB
Inactive(file):  808 kB
Unevictable:   0 kB
Mlocked:   0 kB
SwapTotal: 0 kB
SwapFree:  0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages:  1072 kB
Mapped: 1688 kB
Shmem:   124 kB
Slab:   9508 kB
SReclaimable:   1784 kB
SUnreclaim: 7724 kB
KernelStack: 288 kB
PageTables:  184 kB
NFS_Unstable:  0 kB
Bounce:    0 kB
WritebackTmp:  0 kB
CommitLimit:   13760 kB
Committed_AS:   3572 kB
VmallocTotal:    1048372 kB
VmallocUsed:   0 kB
VmallocChunk:  0 kB

root@OpenWrt:/# free
 total   used   free shared    buffers cached
Mem: 27520  25940   1580    124 2112   7268
-/+ buffers/cache:  16560  10960
Swap:    0  0  0


Regards


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [hostapd] AP+STA mode support in Upstream Hostapd

2018-06-01 Thread Sathishkumar Muruganandam

On 2018-05-30 15:49, Daniel Golle wrote:
On Wed, May 30, 2018 at 03:19:52PM +0530, Sathishkumar Muruganandam 
wrote:

On 2018-05-30 11:44, John Crispin wrote:
> > ...
> Hi,
>
> the original commit was
>
> commit 35cdc5d722883cac8b524ea803ee7eedca844087
> Author: Felix Fietkau 
> Date:   Sat Oct 23 23:39:54 2010 +
>
>     hostapd/mac80211: implement support for AP+STA
>
>     SVN-Revision: 23602
>
> for future reference, you can use one of gits less known features to
> track these down ...
> git log --follow
> package/network/services/hostapd/patches/340-reload_freq_change.patch
>
>     John

Thanks for your reply, John !

We want to go beyond and find more details about the commit message of

each

patch. Is there any way to access "SVN-Revision: 23602" info ?


I guess back at the days of subversion nobody really left more than
one line of a commit message. So what you see above is all there is.



Also whether these patches were already sent for upstream review ? We

were

planning to upstream these patches to hostapd.


No and at least I believe it would be quite difficult to do so.


Thanks for your response Daniel !

Can we have these patches in upstream for supporting the AP +STA mode as
the way present in OpenWrt ? ( only wpa_s on STA interface and hostapd 
on AP

interface )


The direction of the hostap project seems to be to cover most AP
functionality in wpa_supplicant and have a single process for all
virtual interfaces (or even all radios in a system).
This is how it is done on Android or how NetworkManager creates
a tethering AP.


I understand that this can't be generic solution for devices running 
single process
and wpa_s doing AP stuff. Our intention was to make these patches 
available in
upstream at least for repeater use case where (AP+STA) mode will be 
following their

associated root AP channel switch events.

Your thoughts please !


On OpenWrt we do things differently and run hostapd for all AP
interfaces and wpa_supplicant for all client and mesh interfaces of
an individual radio. Only this makes signalling between hostapd and
wpa_supplicant necessary.



Any thoughts ?





--
Thanks,
Sathishkumar

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


--
Thanks,
Sathishkumar

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [RFC 0/3] ath25: move Fonera 2.0g to subtarget

2018-06-01 Thread David Woodhouse
On Fri, 2018-06-01 at 03:36 +0300, Sergey Ryazanov wrote:
> This series adds a new ath25 subtarget for the Fonera 2.0g (FON2202)
> router. This router is unique since it have a USB port and uses PCI
> controller of AR2315 SoC. AFAIK, there are no other AR231x based routers
> which at least uses SoC's PCI controller.

Hm, I have one of these, still running the ancient unmaintained Fonera
firmware. I've resisted 'fixing' it so far because I don't actually
want to lose the Fon functionality. Is there a way to get that working
again if I upgrade to a modern OpenWRT (with 802.11r etc.)?



smime.p7s
Description: S/MIME cryptographic signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] mpc85xx: revert enabling the crypto acceleration driver in the kernel config instead of packaging it

2018-06-01 Thread Achim Gottinger



Am 01.06.2018 um 08:30 schrieb John Crispin:



On 01/06/18 02:04, Achim Gottinger wrote:



Am 31.05.2018 um 20:12 schrieb Achim Gottinger:



Am 31.05.2018 um 19:12 schrieb Achim Gottinger:

Hello List,

Since the commit 
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=c00e5a4f09115ec976fac7dc380f576ef6a24fab 
strongswan is broken on WDR4900v1.
An bug report can be seen here: 
https://bugs.openwrt.org/index.php?do=details_id=1262.
To get strongswan working again i made an patch which reverts the 
changes from above commit.
Now if the caam modules are loaded strongswan still fails but 
without the caam modules loades it works as expected.
With the caam modules build in caam can not be disabled by the 
openwrt user.





Hi Achim,
please resend the series adding your Signed-off-by: line right here
    John

Hello John,


Signed-off-by: Achim Gottinger 

diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk

index 2ea2d2c0e7..dbb0d59012 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -271,6 +271,33 @@ endef

 $(eval $(call KernelPackage,crypto-hmac))

+define KernelPackage/crypto-hw-caam
+  TITLE:=Freescale CAAM driver (SEC4)
+  DEPENDS:=@TARGET_mpc85xx +kmod-crypto-aead +kmod-crypto-authenc 
+kmod-crypto-hash +kmod-random-core

+  KCONFIG:= \
+   CONFIG_CRYPTO_HW=y \
+   CONFIG_CRYPTO_DEV_FSL_CAAM \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_JR \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9 \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_IMX=n \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_INTC=n \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG=n
+  FILES:= \
+   $(LINUX_DIR)/drivers/crypto/caam/caam.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caamalg.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caamhash.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caam_pkc.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caam_jr.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caamrng.ko
+  AUTOLOAD:=$(call AutoLoad,09,caam caamalg caamhash caam_jr caam_pkc 
caamrng)

+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-hw-caam))

 define KernelPackage/crypto-hw-ccp
   TITLE:=AMD Cryptographic Coprocessor
diff --git a/target/linux/mpc85xx/config-4.9 
b/target/linux/mpc85xx/config-4.9

index 68568c4a62..dc2e5a8820 100644
--- a/target/linux/mpc85xx/config-4.9
+++ b/target/linux/mpc85xx/config-4.9
@@ -47,16 +47,16 @@ CONFIG_CRYPTO_AEAD2=y
 CONFIG_CRYPTO_AKCIPHER=y
 CONFIG_CRYPTO_AKCIPHER2=y
 CONFIG_CRYPTO_AUTHENC=y
-CONFIG_CRYPTO_DEV_FSL_CAAM=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
 # CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set
 # CONFIG_CRYPTO_DEV_FSL_CAAM_IMX is not set
 # CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set
-CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
-CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
+#CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
 CONFIG_CRYPTO_HW=y


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] mvebu: fix broken console on WRT32X (venom)

2018-06-01 Thread Michael Gray
On Fri, Jun 1, 2018 at 4:37 PM, John Crispin  wrote:
>
>
>
> On 29/05/18 11:43, michael.g...@lantisproject.com wrote:
>>
>> From: Michael Gray 
>>
>> The console bootarg is being corrupted on boot, causing various issues
>> including broken sysupgrade.
>> Utilising the bootargs mangle patch from other targets, hardcode the console
>> arguments and fetch the rootfs from the bootloader.
>>
>> Kernel command line: console=ttyS0,115200 root=/dev/mtdblock8
>>
>> Bootloader command line (ignored): console= root=/dev/mtdblock8
>>
>> Please cherry pick to 18.06 too
>>
>> Signed-off-by: Michael Gray 
>
>
> Hi,
> did you verify if this break other boards ? also there are a lot of code 
> style errors like missing orthographic spacing, c++ style comments and so on. 
> can you link the original patch please ?
> John
>
Hi John,
I was able to personally test WRT1900ACv1, WRT3200ACM and WRT32X
(board in patch). Another forum user was able to test WRT1200AC and
confirm ok.
I was not able to test anything other than Cortexa9.

Original patch:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ipq806x/patches-4.14/0067-generic-Mangle-bootloader-s-kernel-arguments.patch;h=c7123eac52c8fa87e5d24f48e6ccb4e51402ec5b;hb=HEAD

Michael
>
>
>> ---
>>
>> changes since v1:
>> - Modified patch 006 to be mvebu specific. Now passes the bootloader cmdline
>> on if no append-rootblock stanza is found
>> ---
>>   target/linux/mvebu/config-4.14|   1 +
>>   .../arm/boot/dts/armada-385-linksys-venom.dts |   6 +
>>   ...Mangle-bootloader-s-kernel-arguments.patch | 201 ++
>>   3 files changed, 208 insertions(+)
>>   create mode 100644 
>> target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch
>>
>> diff --git a/target/linux/mvebu/config-4.14 b/target/linux/mvebu/config-4.14
>> index a48a3c8c5e..694ecdfb82 100644
>> --- a/target/linux/mvebu/config-4.14
>> +++ b/target/linux/mvebu/config-4.14
>> @@ -42,6 +42,7 @@ CONFIG_ARM_APPENDED_DTB=y
>>   CONFIG_ARM_ATAG_DTB_COMPAT=y
>>   # CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set
>>   CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
>> +CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE=y
>>   CONFIG_ARM_CPU_SUSPEND=y
>>   CONFIG_ARM_CRYPTO=y
>>   CONFIG_ARM_ERRATA_720789=y
>> diff --git 
>> a/target/linux/mvebu/files-4.14/arch/arm/boot/dts/armada-385-linksys-venom.dts
>>  
>> b/target/linux/mvebu/files-4.14/arch/arm/boot/dts/armada-385-linksys-venom.dts
>> index ea44c8f0d2..00a4ee9f39 100644
>> --- 
>> a/target/linux/mvebu/files-4.14/arch/arm/boot/dts/armada-385-linksys-venom.dts
>> +++ 
>> b/target/linux/mvebu/files-4.14/arch/arm/boot/dts/armada-385-linksys-venom.dts
>> @@ -46,7 +46,13 @@
>> model = "Linksys WRT32X";
>> compatible = "linksys,venom", "linksys,armada385", 
>> "marvell,armada385",
>>  "marvell,armada380";
>> +
>> +   chosen {
>> +   bootargs = "console=ttyS0,115200";
>> +   stdout-path = "serial0:115200n8";
>> +   append-rootblock = "root=/dev/mtdblock";
>> };
>> +};
>>  {
>> wan_amber@0 {
>> diff --git 
>> a/target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch
>>  
>> b/target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch
>> new file mode 100644
>> index 00..53275607e0
>> --- /dev/null
>> +++ 
>> b/target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch
>> @@ -0,0 +1,201 @@
>> +From 71270226b14733a4b1f2cde58ea9265caa50b38d Mon Sep 17 00:00:00 2001
>> +From: Adrian Panella 
>> +Date: Thu, 9 Mar 2017 09:37:17 +0100
>> +Subject: [PATCH 67/69] generic: Mangle bootloader's kernel arguments
>> +
>> +The command-line arguments provided by the boot loader will be
>> +appended to a new device tree property: bootloader-args.
>> +If there is a property "append-rootblock" in DT under /chosen
>> +and a root= option in bootloaders command line it will be parsed
>> +and added to DT bootargs with the form: XX.
>> +Only command line ATAG will be processed, the rest of the ATAGs
>> +sent by bootloader will be ignored.
>> +This is usefull in dual boot systems, to get the current root partition
>> +without afecting the rest of the system.
>> +
>> +Signed-off-by: Adrian Panella 
>> +
>> +This patch has been modified to be mvebu specific. The original patch
>> +did not pass the bootloader cmdline on if no append-rootblock stanza
>> +was found, resulting in blank cmdline and failure to boot.
>> +
>> +Signed-off-by: Michael Gray 
>> +---
>> + arch/arm/Kconfig| 11 +
>> + arch/arm/boot/compressed/atags_to_fdt.c | 72 
>> -
>> + init/main.c | 16 
>> + 3 files changed, 98 insertions(+), 1 deletion(-)
>> +
>> +--- a/arch/arm/Kconfig
>>  b/arch/arm/Kconfig
>> +@@ -1948,6 +1948,17 @@ config 

Re: [OpenWrt-Devel] [PATCH v2] mvebu: fix broken console on WRT32X (venom)

2018-06-01 Thread John Crispin



On 29/05/18 11:43, michael.g...@lantisproject.com wrote:

From: Michael Gray 

The console bootarg is being corrupted on boot, causing various issues
including broken sysupgrade.
Utilising the bootargs mangle patch from other targets, hardcode the console
arguments and fetch the rootfs from the bootloader.

Kernel command line: console=ttyS0,115200 root=/dev/mtdblock8

Bootloader command line (ignored): console= root=/dev/mtdblock8

Please cherry pick to 18.06 too

Signed-off-by: Michael Gray 


Hi,
did you verify if this break other boards ? also there are a lot of code 
style errors like missing orthographic spacing, c++ style comments and 
so on. can you link the original patch please ?

    John



---

changes since v1:
- Modified patch 006 to be mvebu specific. Now passes the bootloader cmdline
on if no append-rootblock stanza is found
---
  target/linux/mvebu/config-4.14|   1 +
  .../arm/boot/dts/armada-385-linksys-venom.dts |   6 +
  ...Mangle-bootloader-s-kernel-arguments.patch | 201 ++
  3 files changed, 208 insertions(+)
  create mode 100644 
target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch

diff --git a/target/linux/mvebu/config-4.14 b/target/linux/mvebu/config-4.14
index a48a3c8c5e..694ecdfb82 100644
--- a/target/linux/mvebu/config-4.14
+++ b/target/linux/mvebu/config-4.14
@@ -42,6 +42,7 @@ CONFIG_ARM_APPENDED_DTB=y
  CONFIG_ARM_ATAG_DTB_COMPAT=y
  # CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set
  CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
+CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE=y
  CONFIG_ARM_CPU_SUSPEND=y
  CONFIG_ARM_CRYPTO=y
  CONFIG_ARM_ERRATA_720789=y
diff --git 
a/target/linux/mvebu/files-4.14/arch/arm/boot/dts/armada-385-linksys-venom.dts 
b/target/linux/mvebu/files-4.14/arch/arm/boot/dts/armada-385-linksys-venom.dts
index ea44c8f0d2..00a4ee9f39 100644
--- 
a/target/linux/mvebu/files-4.14/arch/arm/boot/dts/armada-385-linksys-venom.dts
+++ 
b/target/linux/mvebu/files-4.14/arch/arm/boot/dts/armada-385-linksys-venom.dts
@@ -46,7 +46,13 @@
model = "Linksys WRT32X";
compatible = "linksys,venom", "linksys,armada385", "marvell,armada385",
 "marvell,armada380";
+
+   chosen {
+   bootargs = "console=ttyS0,115200";
+   stdout-path = "serial0:115200n8";
+   append-rootblock = "root=/dev/mtdblock";
};
+};
  
  	 {

wan_amber@0 {
diff --git 
a/target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch
 
b/target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch
new file mode 100644
index 00..53275607e0
--- /dev/null
+++ 
b/target/linux/mvebu/patches-4.14/006-mvebu-Mangle-bootloader-s-kernel-arguments.patch
@@ -0,0 +1,201 @@
+From 71270226b14733a4b1f2cde58ea9265caa50b38d Mon Sep 17 00:00:00 2001
+From: Adrian Panella 
+Date: Thu, 9 Mar 2017 09:37:17 +0100
+Subject: [PATCH 67/69] generic: Mangle bootloader's kernel arguments
+
+The command-line arguments provided by the boot loader will be
+appended to a new device tree property: bootloader-args.
+If there is a property "append-rootblock" in DT under /chosen
+and a root= option in bootloaders command line it will be parsed
+and added to DT bootargs with the form: XX.
+Only command line ATAG will be processed, the rest of the ATAGs
+sent by bootloader will be ignored.
+This is usefull in dual boot systems, to get the current root partition
+without afecting the rest of the system.
+
+Signed-off-by: Adrian Panella 
+
+This patch has been modified to be mvebu specific. The original patch
+did not pass the bootloader cmdline on if no append-rootblock stanza
+was found, resulting in blank cmdline and failure to boot.
+
+Signed-off-by: Michael Gray 
+---
+ arch/arm/Kconfig| 11 +
+ arch/arm/boot/compressed/atags_to_fdt.c | 72 -
+ init/main.c | 16 
+ 3 files changed, 98 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/Kconfig
 b/arch/arm/Kconfig
+@@ -1948,6 +1948,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
+ The command-line arguments provided by the boot loader will be
+ appended to the the device tree bootargs property.
+
++config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE
++  bool "Append rootblock parsing bootloader's kernel arguments"
++  help
++The command-line arguments provided by the boot loader will be
++appended to a new device tree property: bootloader-args.
++If there is a property "append-rootblock" in DT under /chosen
++and a root= option in bootloaders command line it will be parsed
++and added to DT bootargs with the form: XX.
++Only command line ATAG will be processed, the rest of the ATAGs
++sent by bootloader will be ignored.
++
+ endchoice
+
+ config CMDLINE
+--- a/arch/arm/boot/compressed/atags_to_fdt.c
 

Re: [OpenWrt-Devel] [PATCH] brcm2708: Add support for CYW43455

2018-06-01 Thread John Crispin



On 28/05/18 00:23, Christo Nedev wrote:

New package brcmfmac-firmware-43455-sdio.

Content:
brcmfmac43455-sdio.bin
brcmfmac43455-sdio.clm_blob
brcmfmac43455-sdio.txt

Source:
https://github.com/RPi-Distro/firmware-nonfree.git

Bit newer from CYPRESS here:
https://community.cypress.com/servlet/JiveServlet/download/14837-1-34881/cypress-fmac-v4.14-2018_0321.zip

Signed-off-by: Christo Nedev 
---
  package/firmware/firmware-nonfree/Makefile| 28 +++
  package/firmware/firmware-nonfree/broadcom.mk | 10 ++

Hi
firmware-nonfree is a bit of a weird name. Either use a proper upstream 
repo or call the package brcmfmac-firmware-nonfree

    John


  target/linux/brcm2708/Makefile|  2 +-
  3 files changed, 39 insertions(+), 1 deletion(-)
  create mode 100644 package/firmware/firmware-nonfree/Makefile
  create mode 100644 package/firmware/firmware-nonfree/broadcom.mk

diff --git a/package/firmware/firmware-nonfree/Makefile 
b/package/firmware/firmware-nonfree/Makefile
new file mode 100644
index 00..86c9f7600b
--- /dev/null
+++ b/package/firmware/firmware-nonfree/Makefile
@@ -0,0 +1,28 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=firmware-nonfree
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/RPi-Distro/firmware-nonfree.git
+PKG_SOURCE_DATE:=2018-05-27
+PKG_SOURCE_VERSION:=86e88fbf0345da49555d0ec34c80b4fbae7d0cd3
+PKG_MIRROR_HASH:=bef9efe173b87e7afc37bb856f9727c4ff64a1ee1cbe6640d22bae79601553bb
+
+SCAN_DEPS = *.mk
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/firmware-default
+  SECTION:=firmware
+  CATEGORY:=Firmware
+  URL:=https://github.com/RPi-Distro/firmware-nonfree.git
+  TITLE:=$(1)
+endef
+
+define Build/Compile
+
+endef
+
+include $(wildcard ./*.mk)
+#$(eval $(call BuildPackage,firmware-nonfree))
diff --git a/package/firmware/firmware-nonfree/broadcom.mk 
b/package/firmware/firmware-nonfree/broadcom.mk
new file mode 100644
index 00..ef6bbbed2d
--- /dev/null
+++ b/package/firmware/firmware-nonfree/broadcom.mk
@@ -0,0 +1,10 @@
+Package/brcmfmac-firmware-43455-sdio = $(call 
Package/firmware-default,Broadcom BCM43455 FullMac SDIO firmware)
+define Package/brcmfmac-firmware-43455-sdio/install
+   $(INSTALL_DIR) $(1)/lib/firmware/brcm
+   $(INSTALL_DATA) \
+   $(PKG_BUILD_DIR)/brcm/brcmfmac43455-sdio.bin \
+   $(PKG_BUILD_DIR)/brcm/brcmfmac43455-sdio.clm_blob \
+   $(PKG_BUILD_DIR)/brcm/brcmfmac43455-sdio.txt \
+   $(1)/lib/firmware/brcm/
+endef
+$(eval $(call BuildPackage,brcmfmac-firmware-43455-sdio))
diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile
index 870029c4c8..274e101823 100644
--- a/target/linux/brcm2708/Makefile
+++ b/target/linux/brcm2708/Makefile
@@ -27,7 +27,7 @@ DEFAULT_PACKAGES += \
kmod-usb-hid \
kmod-sound-core kmod-sound-arm-bcm2835 \
kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
-   brcmfmac-firmware-43430-sdio kmod-brcmfmac wpad-mini \
+   brcmfmac-firmware-43430-sdio brcmfmac-firmware-43455-sdio kmod-brcmfmac 
wpad-mini \
partx-utils mkf2fs e2fsprogs
  
  KERNELNAME:=Image dtbs



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] mpc85xx: revert enabling the crypto acceleration driver in the kernel config instead of packaging it

2018-06-01 Thread John Crispin



On 01/06/18 02:04, Achim Gottinger wrote:



Am 31.05.2018 um 20:12 schrieb Achim Gottinger:



Am 31.05.2018 um 19:12 schrieb Achim Gottinger:

Hello List,

Since the commit 
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=c00e5a4f09115ec976fac7dc380f576ef6a24fab 
strongswan is broken on WDR4900v1.
An bug report can be seen here: 
https://bugs.openwrt.org/index.php?do=details_id=1262.
To get strongswan working again i made an patch which reverts the 
changes from above commit.
Now if the caam modules are loaded strongswan still fails but 
without the caam modules loades it works as expected.
With the caam modules build in caam can not be disabled by the 
openwrt user.





Hi Achim,
please resend the series adding your Signed-off-by: line right here
    John


---
diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk

index 2ea2d2c0e7..4074e2679a 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -271,6 +271,31 @@ endef

 $(eval $(call KernelPackage,crypto-hmac))

+define KernelPackage/crypto-hw-caam
+  TITLE:=Freescale CAAM driver (SEC4)
+  DEPENDS:=@TARGET_mpc85xx +kmod-crypto-aead +kmod-crypto-authenc 
+kmod-crypto-hash +kmod-random-core

+  KCONFIG:= \
+   CONFIG_CRYPTO_HW=y \
+   CONFIG_CRYPTO_DEV_FSL_CAAM \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_JR \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9 \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_IMX=n \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_INTC=n \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG=n
+  FILES:= \
+   $(LINUX_DIR)/drivers/crypto/caam/caam.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caamalg.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caamhash.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caam_jr.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caamrng.ko
+  AUTOLOAD:=$(call AutoLoad,09,caam caamalg caamhash caam_jr caamrng)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-hw-caam))

 define KernelPackage/crypto-hw-ccp
   TITLE:=AMD Cryptographic Coprocessor
diff --git a/target/linux/mpc85xx/config-4.9 
b/target/linux/mpc85xx/config-4.9

index 68568c4a62..dc2e5a8820 100644
--- a/target/linux/mpc85xx/config-4.9
+++ b/target/linux/mpc85xx/config-4.9
@@ -47,16 +47,16 @@ CONFIG_CRYPTO_AEAD2=y
 CONFIG_CRYPTO_AKCIPHER=y
 CONFIG_CRYPTO_AKCIPHER2=y
 CONFIG_CRYPTO_AUTHENC=y
-CONFIG_CRYPTO_DEV_FSL_CAAM=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
 # CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set
 # CONFIG_CRYPTO_DEV_FSL_CAAM_IMX is not set
 # CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set
-CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
-CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
+#CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
 CONFIG_CRYPTO_HW=y
---

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Had to modify the patch to include the caam_pkc.ko module. I also 
found that the caamrng.ko module does not load. In case this breaks 
things would it make sense to use two targets one with and one 
without build in caam support. I mainly use openwrt  for vpn routers 
so I rely on working strongswan packages.


-
diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk

index 2ea2d2c0e7..dbb0d59012 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -271,6 +271,33 @@ endef

 $(eval $(call KernelPackage,crypto-hmac))

+define KernelPackage/crypto-hw-caam
+  TITLE:=Freescale CAAM driver (SEC4)
+  DEPENDS:=@TARGET_mpc85xx +kmod-crypto-aead +kmod-crypto-authenc 
+kmod-crypto-hash +kmod-random-core

+  KCONFIG:= \
+   CONFIG_CRYPTO_HW=y \
+   CONFIG_CRYPTO_DEV_FSL_CAAM \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_JR \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9 \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_IMX=n \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_INTC=n \
+   CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG=n
+  FILES:= \
+   $(LINUX_DIR)/drivers/crypto/caam/caam.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caamalg.ko \
+   $(LINUX_DIR)/drivers/crypto/caam/caamhash.ko \
+