Re: [OpenWrt-Devel] [PATCH 2/2] arc770: move arc patches to taregt/linux/generic

2016-01-16 Thread Felix Fietkau
On 2016-01-16 11:35, Peter Korsgaard wrote:
>> "Felix" == Felix Fietkau  writes:
> 
>  >>> OpenWrt works just fine without DEVTMPFS - doesn't matter if initramfs
>  >>> is enabled or not.
>  >> 
>  >> The discussion is about adding a patch to up upstream ARC kernel, not 
> specific to
>  >> openwrt.
>  > Right. I belive that the upstream kernel should not arbitrarily force
>  > DEVTMPFS support for some architectures, as long as there are user space
>  > implementations (such as OpenWrt) that can do without it.
> 
> Agreed, only the options absolutely needed should be forced on.
> 
>  >> BTW if openwrt builds for initramfs, it has to enable DEVTMPFS under the 
> hood.
>  >> Perhaps there are dependencies in openwrt build system which take care of 
> that
>  >> already - o/w it just won't work (assuming dynamic dev nodes).
>  > Incorrect. OpenWrt does not use DEVTMPFS, it does not even get compiled
>  > into the image. We would like to keep it that way.
>  > Our user space takes care of creating all required device nodes very
>  > early during boot.
> 
> Out of interest, why is that? Devtmpfs got added 7 years ago (2.6.32) -
> And is easy to backport if really needed, is easier and more flexible
> than a bunch of static mknods, and probably smaller as well.
We don't need to backport anything. Our oldest kernel is 3.18, and we're
going to move everything to 4.4 soon ;)

> We changed to devtmpfs by default in Buildroot quite some time ago, and
> I'm pretty happy with it.
We need to have dynamically created device nodes anyway - for managing
permissions, being able to change names, etc. Because of that, devtmpfs
is not enough to provide a full /dev. Since it's not enough, and
creating the initial device nodes from our custom init is easy, we see
little value in keeping it. So we got rid of the extra bloat :)

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Enable ATIIXP on x64

2016-01-16 Thread Lucian Cristian

On 16.01.2016 04:31, Felix Kaechele wrote:

On 15/01/16 03:25, Lucian Cristian wrote:

Also support ATI PATA on x64 target

Signed-off-by: Lucian Cristian 

Has already been NACKd before:
https://lists.openwrt.org/pipermail/openwrt-devel/2015-September/036155.html

Not entirely sure the situation has changed since then.

Regards,
   Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

it's just that default x86 will not use all 2gb ram

Regards !
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] x64 - crypto-rng drbg.ko missing

2016-01-16 Thread Lucian Cristian

crypto-rng, enable prerequisite for drbg.ko, fixes #21596

Signed-off-by: Lucian Cristian 
---

diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk
index 604be9f..d84c802 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -102,6 +102,7 @@ define KernelPackage/crypto-rng
   TITLE:=CryptoAPI random number generation
   DEPENDS:=+kmod-crypto-hash
   KCONFIG:= \
+   CONFIG_CRYPTO_DRBG_MENU \
CONFIG_CRYPTO_DRBG \
CONFIG_CRYPTO_JITTERENTROPY \
CONFIG_CRYPTO_RNG2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Freifunk & GSoC 2016 - Participation and Ideas List

2016-01-16 Thread Andreas Bräu
Dear all,

Freifunk is again applying as a mentor org for GSoC. If you would
like to participate in the 2016 program under the Freifunk umbrella,
please add your ideas in the wiki before January
22: http://wiki.freifunk.net/Ideas

It is very important, that you add your ideas here as soon as
possible as the ideas page is a key decision factor for Google to
determine if orgs get in again.

Last year we did not get in as they had a hard cut in number of
organizations, but as you remember 2013 we did not get in as our ideas
page was not up to standard.

Thank you,

Andi
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] lantiq: Fixed brnImage signature for the VGV7510KW22BRN images

2016-01-16 Thread Martin Blumenstingl
The old signature only worked because brnboot ignores the leading "5" in
the signature. We can see the correct signature when flashing a brnImage
via recovery web-interface, in this case brnboot reports:
[CGI-Signature Check] buf:[BRNDA6431], sigInFlash:[BRNDA6431]

Thanks to Mathias Kresin for reporting this.

Signed-off-by: Martin Blumenstingl 
---
 target/linux/lantiq/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/lantiq/image/Makefile 
b/target/linux/lantiq/image/Makefile
index 553bdc1..f986d38 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -417,7 +417,7 @@ Image/BuildKernel/Profile/VGV7510KW22NOR=$(call 
Image/BuildKernel/Template,VGV75
 Image/Build/Profile/VGV7510KW22NOR=$(call Image/Build/$(1),$(1),VGV7510KW22NOR)
 
 Image/BuildKernel/Profile/VGV7510KW22BRN=$(call 
Image/BuildKernel/Template,VGV7510KW22BRN,$(1))
-Image/Build/Profile/VGV7510KW22BRN=$(call 
Image/Build/$(1),$(1),VGV7510KW22BRN,5BRNDA6431,0x12345678,0x04c11db7,$(1))
+Image/Build/Profile/VGV7510KW22BRN=$(call 
Image/Build/$(1),$(1),VGV7510KW22BRN,BRNDA6431,0x12345678,0x04c11db7,$(1))
 
 Image/BuildKernel/Profile/VGV7519NOR=$(call 
Image/BuildKernel/Template,VGV7519NOR,$(1))
 Image/Build/Profile/VGV7519NOR=$(call Image/Build/$(1),$(1),VGV7519NOR)
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Patch Fix Ethernet RB591G-2HnD RB951G-2HnD

2016-01-16 Thread Bruno D'Ambrosio

I have request information.
I have Routerboard RB591G-2HND, i load firmware 
"openwrt-ar71xx-mikrotik-vmlinux-initramfs"

but the router once load the firmware does not respond to the ping.

I have also applicate this patch fix: 
http://patchwork.ozlabs.org/patch/419857/


RB591G-2HnD not respond the ping.

"Help" please.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] lantiq: Fixed brnImage signature for the VGV7510KW22BRN images

2016-01-16 Thread Christoph Kottke


Martin Blumenstingl  schrieb:

>The old signatu  re only worked because brnboot ignores the leading "5" in
>the signature. We can see the correct signature when flashing a brnImage
>via recovery web-interface, in this case brnboot reports:
>   [CGI-Signature Check] buf:[BRNDA6431], sigInFlash:[BRNDA6431]
>
>Thanks to Mathias Kresin for reporting this.
>
>Signed-off-by: Martin Blumenstingl 
>---
>target/linux/lantiq/image/Makefile | 2 +-
>1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/target/linux/lantiq/image/Makefile 
>b/target/linux/lantiq/image/Makefile
>index 553bdc1..f986d38 100644
>--- a/target/linux/lantiq/image/Makefile
>+++ b/target/linux/lantiq/image/Makefile
>@@ -417,7 +417,7 @@ Image/BuildKernel/Profile/VGV7510KW22NOR=$(call 
>Image/BuildKernel/Template,VGV75
>Image/Build/Profile/VGV7510KW22NOR=$(call Image/Build/$(1),$(1),VGV7510KW22NOR)
>
>Image/BuildKernel/Profile/VGV7510KW22BRN=$(call 
>Image/BuildKernel/Template,VGV7510KW22BRN,$(1))
>-Image/Build/Profile/VGV7510KW22BRN=$(call 
>Image/Build/$(1),$(1),VGV7510KW22BRN,5BRNDA6431,0x12345678,0x04c11db7,$(1))
>+Image/Build/Profile/VGV7510KW22BRN=$(call 
>Image/Build/$(1),$(1),VGV7510KW22BRN,BRNDA6431,0x12345678,0x04c11db7,$(1))
>
>Image/BuildKernel/Profile/VGV7519NOR=$(call 
>Image/BuildKernel/Template,VGV7519NOR,$(1))
>Image/Build/Profile/VGV7519NOR=$(call Image/Build/$(1),$(1),VGV7519NOR)
>-- 
>2.7.0
>___
>openwrt-devel mailing list
>openwrt-devel@lists.openwrt.org
>https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Patch Fix Ethernet RB591G-2HnD RB951G-2HnD

2016-01-16 Thread Bruno D'Ambrosio

I have request information.
I have Routerboard RB591G-2HND, i load firmware 
"openwrt-ar71xx-mikrotik-vmlinux-initramfs"

but the router once load the firmware does not respond to the ping.

I have also applicate this patch fix: 
http://patchwork.ozlabs.org/patch/419857/


RB591G-2HnD not respond the ping.


how can I do ? Please.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] arc770: move arc patches to taregt/linux/generic

2016-01-16 Thread Felix Fietkau
On 2016-01-16 12:00, Peter Korsgaard wrote:
>  >> We changed to devtmpfs by default in Buildroot quite some time ago, and
>  >> I'm pretty happy with it.
>  > We need to have dynamically created device nodes anyway - for managing
>  > permissions, being able to change names, etc. Because of that, devtmpfs
>  > is not enough to provide a full /dev. Since it's not enough, and
>  > creating the initial device nodes from our custom init is easy, we see
>  > little value in keeping it. So we got rid of the extra bloat :)
> 
> Heh, "bloat":
> 
> arm-none-eabi-size drivers/base/devtmpfs.o
>textdata bss dec hex filename
>1568  64   41636 664 drivers/base/devtmpfs.o
> 
> Compared to the extra inodes and/or the busybox mknod applet + script,
> it isn't too bad.
I know it's not much, but we do like to disable anything that's
completely useless for our purposes. :)
Our code doesn't use busybox mknod. The stuff that creates the device
nodes is written in C.

> In Buildroot we support pure devtmpfs, mdev or udev (both with devtmpfs)
> or static /dev for legacy setups.
Yeah, for Buildroot devtmpfs makes sense. We don't use or support mdev,
udev or static /dev. We also got rid of hotplug2 a while back ;)

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] lantiq: Initial linux 4.4 support (with SPI problems)

2016-01-16 Thread Martin Blumenstingl
Hi Daniel,

On Sat, Jan 16, 2016 at 1:06 AM, Martin Blumenstingl
 wrote:
>> It is a complete rewrite with DT support and runs against the UGW-6.1.1
>> kernel. Unfortunately I hadn't time yet to adapt and test it with
>> OpenWRT. Maybe you want to volunteer for that ;)
> Thanks for this update! I am going to test it on kernel 4.1 in the
> next days and let you know about the results.
I had to make 3 adjustments to get it working on OpenWrt:
- replace INIT_COMPLECTION with reinit_completion (this is due the
newer kernel version in OpenWrt)
- use clk_get_fpi() to obtain the FPI clock (horrible, I am currently
porting the lantiq clock code to the common clk framework, then we can
pass this in correctly)
- remove the " - 1" in "cs - 1" (it seems that your chipselect
indexing in the .dts begins at 1, whereas the previous driver started
at 0)

After that everything is working nicely on linux 4.1 (on my TD-W8970):
[0.926597] spi-lantiq 1e100800.spi: using internal chipselect 3
[0.931499] spi-lantiq 1e100800.spi: spi_clk 12500,
max_speed_hz 3325, brt 2
[0.939351] m25p80 spi0.3: s25fl064k (8192 Kbytes)
[0.943763] 4 ofpart partitions found on MTD device spi0.3
[0.949192] Creating 4 MTD partitions on "spi0.3":
[0.953984] 0x-0x0002 : "u-boot"
[0.960136] 0x0002-0x007c : "firmware"
[0.966720] 0x001cf40c-0x007c : "rootfs"
[0.971380] mtd: device 2 (rootfs) set to be root filesystem
[0.976814] 1 squashfs-split partitions found on MTD device rootfs
[0.982126] 0x0046-0x007c : "rootfs_data"
[1.030051] 0x007c-0x007d : "config"
[1.034667] 0x007d-0x0080 : "boardconfig"
[1.040154] spi-lantiq 1e100800.spi: Lantiq SPI controller (TXFS 8,
RXFS 8, DMA 32)

I have pushed my changes to the OpenWrt tree here: [0]
My plan is to finish them soon (I want to do a little more testing,
and I need to verify that my other dts changes are correct).

Thank you for your help!


Regards,
Martin

[0] https://github.com/xdarklight/openwrt/commits/lantiq-spi-driver-daniel-v2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] lantiq: Initial linux 4.4 support (with SPI problems)

2016-01-16 Thread Daniel Schwierzeck
Am Samstag, den 16.01.2016, 15:39 +0100 schrieb Martin Blumenstingl:
> Hi Daniel,
> 
> On Sat, Jan 16, 2016 at 1:06 AM, Martin Blumenstingl
>  wrote:
> > > It is a complete rewrite with DT support and runs against the UGW
> > > -6.1.1
> > > kernel. Unfortunately I hadn't time yet to adapt and test it with
> > > OpenWRT. Maybe you want to volunteer for that ;)
> > Thanks for this update! I am going to test it on kernel 4.1 in the
> > next days and let you know about the results.
> I had to make 3 adjustments to get it working on OpenWrt:

nice, thanks for testing :)

> - replace INIT_COMPLECTION with reinit_completion (this is due the
> newer kernel version in OpenWrt)
> - use clk_get_fpi() to obtain the FPI clock (horrible, I am currently
> porting the lantiq clock code to the common clk framework, then we
> can
> pass this in correctly)
> - remove the " - 1" in "cs - 1" (it seems that your chipselect
> indexing in the .dts begins at 1, whereas the previous driver started
> at 0)

I fixed that because datasheets and pin descriptions in schematics use
CS1..CS6. I think DT should be in sync to the datasheets.

> 
> After that everything is working nicely on linux 4.1 (on my TD
> -W8970):
> [0.926597] spi-lantiq 1e100800.spi: using internal chipselect 3
> [0.931499] spi-lantiq 1e100800.spi: spi_clk 12500,
> max_speed_hz 3325, brt 2
> [0.939351] m25p80 spi0.3: s25fl064k (8192 Kbytes)
> [0.943763] 4 ofpart partitions found on MTD device spi0.3
> [0.949192] Creating 4 MTD partitions on "spi0.3":
> [0.953984] 0x-0x0002 : "u-boot"
> [0.960136] 0x0002-0x007c : "firmware"
> [0.966720] 0x001cf40c-0x007c : "rootfs"
> [0.971380] mtd: device 2 (rootfs) set to be root filesystem
> [0.976814] 1 squashfs-split partitions found on MTD device rootfs
> [0.982126] 0x0046-0x007c : "rootfs_data"
> [1.030051] 0x007c-0x007d : "config"
> [1.034667] 0x007d-0x0080 : "boardconfig"
> [1.040154] spi-lantiq 1e100800.spi: Lantiq SPI controller (TXFS
> 8,
> RXFS 8, DMA 32)
> 
> I have pushed my changes to the OpenWrt tree here: [0]
> My plan is to finish them soon (I want to do a little more testing,
> and I need to verify that my other dts changes are correct).

linux-4.4 finally has the patch [1] I was referring to. Maybe we should
also add it to 4.1. It is important to be able to setup each SPI pin
separately. You always should explicitely setup spi_clk and spi_do to
"lantiq,output = <1>" and spi_di to "lantiq,input". Depending on the
board, you optionally have to enable internal pull-up's, if there are
no external ones. The current DT pinmux setup with only one spi pin
group relies on the bootloader setup. This only works if the board
boots from SPI and the bootloader have to setup the SPI pins. With
other boot variants the SPI pins are likely not setup.

> 
> Thank you for your help!
> 
> 
> Regards,
> Martin
> 
> [0] https://github.com/xdarklight/openwrt/commits/lantiq-spi-driver-d
> aniel-v2
-- 
- Daniel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Patch Fix Ethernet RB951G-2HnD

2016-01-16 Thread Bruno D'Ambrosio

I have request information.
I have Routerboard RB951G-2HnD, i load firmware 
"openwrt-ar71xx-mikrotik-vmlinux-initramfs"

but the router once load the firmware does not respond to the ping.

I have also applicate this patch fix: 
http://patchwork.ozlabs.org/patch/419857/


RB591G-2HnD not respond the ping.


how can I do ? Please.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Patch Fix Ethernet RB591G-2HnD RB951G-2HnD

2016-01-16 Thread Bruno D'Ambrosio

Hello Gregers Petersen

email -devil list, please

Thanks.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/5] update at91 kernel to 4.1

2016-01-16 Thread Ben Whitten
This patch series adds support for kernel 4.1 to the at91 target.
Patches for legacy boards are dropped as the platform has been converted
to DT in 4.1.
A new package was added to prevent the build from halting, suggestions
welcome on what to do / name.
A typo was fixed in the kernel module makefile.

This has been run tested on a custom board and showed no obvious problems
in boot or operation.
Thanks!

Ben Whitten (5):
  at91: add 4.1 support
  at91: add package for high speed usb device
  at91: remove SAMA5D3 from Default image build.
  at91: move to 4.1 kernel
  at91: fix typo in usb kernel module makefile

 target/linux/at91/Makefile |   4 +-
 target/linux/at91/config-3.18  | 230 ++
 target/linux/at91/config-4.1   | 268 +
 target/linux/at91/config-default   | 230 --
 target/linux/at91/image/Makefile   |   3 +-
 target/linux/at91/modules.mk   |  21 +-
 .../100-ARM-at91-build-dtb-for-LMU5000.patch   |  10 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch |  10 +
 .../200-ARM-at91-udc-clockfix-backport.patch   |  82 +++
 .../201-ARM-at91-usb-determine_rate-backport.patch |  20 ++
 .../patches-3.18/805-free_some_portc_pins.patch|  11 +
 ...-AT91-flexibity-default-leds-to-heartbeat.patch |  60 +
 .../100-ARM-at91-build-dtb-for-LMU5000.patch   |  10 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch |  10 +
 .../100-ARM-at91-build-dtb-for-LMU5000.patch   |  10 -
 .../patches/101-ARM-at91-build-dtb-for-q5xr5.patch |  10 -
 .../200-ARM-at91-udc-clockfix-backport.patch   |  82 ---
 .../201-ARM-at91-usb-determine_rate-backport.patch |  20 --
 .../at91/patches/805-free_some_portc_pins.patch|  11 -
 ...-AT91-flexibity-default-leds-to-heartbeat.patch |  60 -
 20 files changed, 734 insertions(+), 428 deletions(-)
 create mode 100644 target/linux/at91/config-3.18
 create mode 100644 target/linux/at91/config-4.1
 delete mode 100644 target/linux/at91/config-default
 create mode 100644 
target/linux/at91/patches-3.18/100-ARM-at91-build-dtb-for-LMU5000.patch
 create mode 100644 
target/linux/at91/patches-3.18/101-ARM-at91-build-dtb-for-q5xr5.patch
 create mode 100644 
target/linux/at91/patches-3.18/200-ARM-at91-udc-clockfix-backport.patch
 create mode 100644 
target/linux/at91/patches-3.18/201-ARM-at91-usb-determine_rate-backport.patch
 create mode 100644 
target/linux/at91/patches-3.18/805-free_some_portc_pins.patch
 create mode 100644 
target/linux/at91/patches-3.18/901-AT91-flexibity-default-leds-to-heartbeat.patch
 create mode 100644 
target/linux/at91/patches-4.1/100-ARM-at91-build-dtb-for-LMU5000.patch
 create mode 100644 
target/linux/at91/patches-4.1/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 100644 
target/linux/at91/patches/100-ARM-at91-build-dtb-for-LMU5000.patch
 delete mode 100644 
target/linux/at91/patches/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 100644 
target/linux/at91/patches/200-ARM-at91-udc-clockfix-backport.patch
 delete mode 100644 
target/linux/at91/patches/201-ARM-at91-usb-determine_rate-backport.patch
 delete mode 100644 target/linux/at91/patches/805-free_some_portc_pins.patch
 delete mode 100644 
target/linux/at91/patches/901-AT91-flexibity-default-leds-to-heartbeat.patch

-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/5] at91: remove SAMA5D3 from Default image build.

2016-01-16 Thread Ben Whitten
As the Default profile option is a legacy subtarget, the dtb for the
sama5d3_xplained board DTS is not built and image generation fails.

Signed-off-by: Ben Whitten 
---
 target/linux/at91/image/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/at91/image/Makefile b/target/linux/at91/image/Makefile
index 4e472f2..767255c 100644
--- a/target/linux/at91/image/Makefile
+++ b/target/linux/at91/image/Makefile
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2006-2013 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -76,7 +76,6 @@ define Image/Build/Kernel/Default
$(call Image/Build/Kernel/AT91SAM9M10G45EK)
$(call Image/Build/Kernel/AT91SAM9X25EK)
$(call Image/Build/Kernel/AT91SAM9X35EK)
-   $(call Image/Build/Kernel/AT91SAMA5D3XPLAINED)
$(call Image/Build/Kernel/LMU5000)
$(call Image/Build/Kernel/TNYA9260)
$(call Image/Build/Kernel/TNYA9263)
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/5] at91: add 4.1 support

2016-01-16 Thread Ben Whitten
This puts the existing patches and config in a 3.18 folder and introduces
a 4.1 config and patches.
The USB clock fix patch is no longer necessary, and the patches applying
to non DT boards has been dropped as the platform has been converted.
4.1 config was generated by copying 3.18 and running make kernel_menuconfig,
scripts/kconfig.pl filled in the gaps.

Signed-off-by: Ben Whitten 
---
 target/linux/at91/config-3.18  | 230 ++
 target/linux/at91/config-4.1   | 268 +
 target/linux/at91/config-default   | 230 --
 .../100-ARM-at91-build-dtb-for-LMU5000.patch   |  10 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch |  10 +
 .../200-ARM-at91-udc-clockfix-backport.patch   |  82 +++
 .../201-ARM-at91-usb-determine_rate-backport.patch |  20 ++
 .../patches-3.18/805-free_some_portc_pins.patch|  11 +
 ...-AT91-flexibity-default-leds-to-heartbeat.patch |  60 +
 .../100-ARM-at91-build-dtb-for-LMU5000.patch   |  10 +
 .../101-ARM-at91-build-dtb-for-q5xr5.patch |  10 +
 .../100-ARM-at91-build-dtb-for-LMU5000.patch   |  10 -
 .../patches/101-ARM-at91-build-dtb-for-q5xr5.patch |  10 -
 .../200-ARM-at91-udc-clockfix-backport.patch   |  82 ---
 .../201-ARM-at91-usb-determine_rate-backport.patch |  20 --
 .../at91/patches/805-free_some_portc_pins.patch|  11 -
 ...-AT91-flexibity-default-leds-to-heartbeat.patch |  60 -
 17 files changed, 711 insertions(+), 423 deletions(-)
 create mode 100644 target/linux/at91/config-3.18
 create mode 100644 target/linux/at91/config-4.1
 delete mode 100644 target/linux/at91/config-default
 create mode 100644 
target/linux/at91/patches-3.18/100-ARM-at91-build-dtb-for-LMU5000.patch
 create mode 100644 
target/linux/at91/patches-3.18/101-ARM-at91-build-dtb-for-q5xr5.patch
 create mode 100644 
target/linux/at91/patches-3.18/200-ARM-at91-udc-clockfix-backport.patch
 create mode 100644 
target/linux/at91/patches-3.18/201-ARM-at91-usb-determine_rate-backport.patch
 create mode 100644 
target/linux/at91/patches-3.18/805-free_some_portc_pins.patch
 create mode 100644 
target/linux/at91/patches-3.18/901-AT91-flexibity-default-leds-to-heartbeat.patch
 create mode 100644 
target/linux/at91/patches-4.1/100-ARM-at91-build-dtb-for-LMU5000.patch
 create mode 100644 
target/linux/at91/patches-4.1/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 100644 
target/linux/at91/patches/100-ARM-at91-build-dtb-for-LMU5000.patch
 delete mode 100644 
target/linux/at91/patches/101-ARM-at91-build-dtb-for-q5xr5.patch
 delete mode 100644 
target/linux/at91/patches/200-ARM-at91-udc-clockfix-backport.patch
 delete mode 100644 
target/linux/at91/patches/201-ARM-at91-usb-determine_rate-backport.patch
 delete mode 100644 target/linux/at91/patches/805-free_some_portc_pins.patch
 delete mode 100644 
target/linux/at91/patches/901-AT91-flexibity-default-leds-to-heartbeat.patch

diff --git a/target/linux/at91/config-3.18 b/target/linux/at91/config-3.18
new file mode 100644
index 000..8faced7
--- /dev/null
+++ b/target/linux/at91/config-3.18
@@ -0,0 +1,230 @@
+CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ARCH_AT91=y
+CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
+CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
+CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
+CONFIG_ARCH_NR_GPIO=0
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
+CONFIG_ARM=y
+CONFIG_ARM_APPENDED_DTB=y
+# CONFIG_ARM_ATAG_DTB_COMPAT is not set
+# CONFIG_ARM_CPU_SUSPEND is not set
+CONFIG_ARM_NR_BANKS=8
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+CONFIG_ARM_THUMB=y
+CONFIG_AT91SAM9X_WATCHDOG=y
+CONFIG_AT91_PMC_UNIT=y
+CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
+CONFIG_AT91_SAM9G45_RESET=y
+CONFIG_AT91_SAM9_ALT_RESET=y
+CONFIG_AT91_SAM9_TIME=y
+CONFIG_AT91_TIMER_HZ=100
+CONFIG_ATAGS=y
+# CONFIG_ATMEL_TCLIB is not set
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_CACHE_L2X0 is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_CLKDEV_LOOKUP=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CONFIGFS_FS=y
+CONFIG_CPU_USE_DOMAINS=y
+CONFIG_CRC16=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+# CONFIG_DEBUG_PINCTRL is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
+CONFIG_DTC=y
+CONFIG_EXT4_FS=y
+CONFIG_FRAME_POINTER=y
+CONFIG_FS_MBCACHE=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IO=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_DEVRES=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HA

[OpenWrt-Devel] [PATCH 4/5] at91: move to 4.1 kernel

2016-01-16 Thread Ben Whitten
Signed-off-by: Ben Whitten 
---
 target/linux/at91/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/at91/Makefile b/target/linux/at91/Makefile
index e1c771a..595890d 100644
--- a/target/linux/at91/Makefile
+++ b/target/linux/at91/Makefile
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (C) 2006-2013 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -13,7 +13,7 @@ BOARDNAME:=Atmel AT91
 FEATURES:=squashfs targz ext2 usb usbgadget ubifs
 SUBTARGETS:=legacy sama5d3
 
-KERNEL_PATCHVER:=3.18
+KERNEL_PATCHVER:=4.1
 
 include $(INCLUDE_DIR)/target.mk
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/5] at91: fix typo in usb kernel module makefile

2016-01-16 Thread Ben Whitten
Fix a typo with generating the package description

Signed-off-by: Ben Whitten 
---
 target/linux/at91/modules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/at91/modules.mk b/target/linux/at91/modules.mk
index 3969450..0517698 100644
--- a/target/linux/at91/modules.mk
+++ b/target/linux/at91/modules.mk
@@ -63,7 +63,7 @@ endif
   AUTOLOAD:=$(call AutoLoad,51,at91_udc)
 endef
 
-define KernelPackage/at91-adc/description
+define KernelPackage/at91-udc/description
  Kernel module to use the USB Device controller for Atmel AT91
 endef
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/5] at91: add package for high speed usb device

2016-01-16 Thread Ben Whitten
Add a package for a missing module for the at91 high speed device.
Without this the build process pauses asking to build as module.

Signed-off-by: Ben Whitten 
---
 target/linux/at91/modules.mk | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/target/linux/at91/modules.mk b/target/linux/at91/modules.mk
index 6cfc3e4..3969450 100644
--- a/target/linux/at91/modules.mk
+++ b/target/linux/at91/modules.mk
@@ -69,6 +69,25 @@ endef
 
 $(eval $(call KernelPackage,at91-udc))
 
+define KernelPackage/atmel-usba-udc
+  SUBMENU:=$(USB_MENU)
+  TITLE:=High-speed USB Device Controller on atmel SoC
+  DEPENDS:=@TARGET_at91 +kmod-usb-gadget
+  KCONFIG:=CONFIG_USB_ATMEL_USBA
+ifneq ($(wildcard $(LINUX_DIR)/drivers/usb/gadget/udc/atmel_usba_udc.ko),)
+  FILES:=$(LINUX_DIR)/drivers/usb/gadget/udc/atmel_usba_udc.ko
+else
+  FILES:=$(LINUX_DIR)/drivers/usb/gadget/atmel_usba_udc.ko
+endif
+  AUTOLOAD:=$(call AutoLoad,51,atmel_usba_udc)
+endef
+
+define KernelPackage/atmel-usba-udc/description
+ Kernel module to use the High-speed USB Device controller for Atmel AT91
+endef
+
+$(eval $(call KernelPackage,atmel-usba-udc))
+
 I2C_AT91_MODULES:=\
   CONFIG_I2C_AT91:drivers/i2c/busses/i2c-at91
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] lantiq: Initial linux 4.4 support (with SPI problems)

2016-01-16 Thread Martin Blumenstingl
On Sat, Jan 16, 2016 at 4:34 PM, Daniel Schwierzeck
 wrote:
> nice, thanks for testing :)
Thanks for writing nice patches ;-)

>> - replace INIT_COMPLECTION with reinit_completion (this is due the
>> newer kernel version in OpenWrt)
>> - use clk_get_fpi() to obtain the FPI clock (horrible, I am currently
>> porting the lantiq clock code to the common clk framework, then we
>> can
>> pass this in correctly)
>> - remove the " - 1" in "cs - 1" (it seems that your chipselect
>> indexing in the .dts begins at 1, whereas the previous driver started
>> at 0)
>
> I fixed that because datasheets and pin descriptions in schematics use
> CS1..CS6. I think DT should be in sync to the datasheets.
I am not sure if this would work with GPIO chipselects then, see [0].
If I understand it correctly then you would have to change the "reg"
property of each device to "0" if you would use GPIO CS0 and then back
to "1" if you want to use hardware CS0.
Let me know if we should still go with chipselects starting at 1, then
I will simply adjust them in the commit which switches to your new SPI
driver.

> linux-4.4 finally has the patch [1] I was referring to. Maybe we should
> also add it to 4.1. It is important to be able to setup each SPI pin
> separately. You always should explicitely setup spi_clk and spi_do to
> "lantiq,output = <1>" and spi_di to "lantiq,input". Depending on the
> board, you optionally have to enable internal pull-up's, if there are
> no external ones. The current DT pinmux setup with only one spi pin
> group relies on the bootloader setup. This only works if the board
> boots from SPI and the bootloader have to setup the SPI pins. With
> other boot variants the SPI pins are likely not setup.
I am assuming that you are speaking of upstream commit
be14811c03cf20c793fd176a347625335110b0e6.
I went ahead and also backported that to 4.1, you can find the updated
patchset here: [1]

While reviewing my changes I may have found a small problem with your driver:
You don't have a separate "lantiq,spi-xrx100" OF-match. I think you
should add one with the same settings as for the other xrx-SoCs.
If you look at DGN3500.dtsi [2] you'll see that it's an ARX100 board
using spi_cs4.


Martin

[0] https://www.kernel.org/doc/Documentation/devicetree/bindings/spi/spi-bus.txt
[1] https://github.com/xdarklight/openwrt/commits/lantiq-spi-driver-daniel-v3
[2] https://dev.openwrt.org/browser/trunk/target/linux/lantiq/dts/DGN3500.dtsi
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/5] update at91 kernel to 4.1

2016-01-16 Thread Martin Blumenstingl
Hi Ben,

On Sat, Jan 16, 2016 at 6:00 PM, Ben Whitten  wrote:
> This patch series adds support for kernel 4.1 to the at91 target.
> Patches for legacy boards are dropped as the platform has been converted
> to DT in 4.1.
Do you have plans for updating at91 to linux 4.4?
As far as I know the DD (trunk) release will be based on linux 4.4
(which is the latest LTS kernel).
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/5] update at91 kernel to 4.1

2016-01-16 Thread Felix Fietkau
On 2016-01-16 18:00, Ben Whitten wrote:
> This patch series adds support for kernel 4.1 to the at91 target.
> Patches for legacy boards are dropped as the platform has been converted
> to DT in 4.1.
> A new package was added to prevent the build from halting, suggestions
> welcome on what to do / name.
> A typo was fixed in the kernel module makefile.
> 
> This has been run tested on a custom board and showed no obvious problems
> in boot or operation.
> Thanks!
Updating to 4.1 does not make much sense at this point, since we're
planning to use 4.4 for the next release.
Could you please update the target to 4.4 instead?

Thanks,

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/5] update at91 kernel to 4.1

2016-01-16 Thread Ben Whitten
On 16 January 2016 at 17:05, Felix Fietkau  wrote:
> Updating to 4.1 does not make much sense at this point, since we're
> planning to use 4.4 for the next release.
> Could you please update the target to 4.4 instead?

Certainly, upgrading to 4.4 sounds like a good plan. I shall give it a go.

Thanks,
Ben
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] lantiq: Initial linux 4.4 support (with SPI problems)

2016-01-16 Thread Daniel Schwierzeck
Am Samstag, den 16.01.2016, 18:03 +0100 schrieb Martin Blumenstingl:
> On Sat, Jan 16, 2016 at 4:34 PM, Daniel Schwierzeck
>  wrote:
> > nice, thanks for testing :)
> Thanks for writing nice patches ;-)
> 
> > > - replace INIT_COMPLECTION with reinit_completion (this is due
> > > the
> > > newer kernel version in OpenWrt)
> > > - use clk_get_fpi() to obtain the FPI clock (horrible, I am
> > > currently
> > > porting the lantiq clock code to the common clk framework, then
> > > we
> > > can
> > > pass this in correctly)
> > > - remove the " - 1" in "cs - 1" (it seems that your chipselect
> > > indexing in the .dts begins at 1, whereas the previous driver
> > > started
> > > at 0)
> > 
> > I fixed that because datasheets and pin descriptions in schematics
> > use
> > CS1..CS6. I think DT should be in sync to the datasheets.
> I am not sure if this would work with GPIO chipselects then, see [0].
> If I understand it correctly then you would have to change the "reg"
> property of each device to "0" if you would use GPIO CS0 and then
> back
> to "1" if you want to use hardware CS0.
> Let me know if we should still go with chipselects starting at 1,
> then
> I will simply adjust them in the commit which switches to your new
> SPI
> driver.

If you use native CS, you should use the same numbering as in the
datasheet:

&spi {
...
spi-nor@4 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <4>;
spi-max-frequency = <2500>;
};
};

If you use GPIO CS, you can ignore the native CS numbering and choose
your own and you can also start with 0:

&spi {
...
cs-gpios = <&gpio 10 1>;

spi-nor@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <2500>;
};
};

If you use native CS 4, you have to manipulate bits 3 and 11 in the
GPOCON and FGPO registers. Thus you have to keep the (cs - 1)
translation. 

> 
> > linux-4.4 finally has the patch [1] I was referring to. Maybe we
> > should
> > also add it to 4.1. It is important to be able to setup each SPI
> > pin
> > separately. You always should explicitely setup spi_clk and spi_do
> > to
> > "lantiq,output = <1>" and spi_di to "lantiq,input". Depending on
> > the
> > board, you optionally have to enable internal pull-up's, if there
> > are
> > no external ones. The current DT pinmux setup with only one spi pin
> > group relies on the bootloader setup. This only works if the board
> > boots from SPI and the bootloader have to setup the SPI pins. With
> > other boot variants the SPI pins are likely not setup.
> I am assuming that you are speaking of upstream commit
> be14811c03cf20c793fd176a347625335110b0e6.

yes, sorry 

> I went ahead and also backported that to 4.1, you can find the
> updated
> patchset here: [1]
> 
> While reviewing my changes I may have found a small problem with your
> driver:
> You don't have a separate "lantiq,spi-xrx100" OF-match. I think you
> should add one with the same settings as for the other xrx-SoCs.
> If you look at DGN3500.dtsi [2] you'll see that it's an ARX100 board
> using spi_cs4.

that's because I couldn't test it. But according to the datasheet,
xRX100 also supports six native CS lines.

> 
> 
> Martin
> 
> [0] https://www.kernel.org/doc/Documentation/devicetree/bindings/spi/
> spi-bus.txt
> [1] https://github.com/xdarklight/openwrt/commits/lantiq-spi-driver-d
> aniel-v3
> [2] https://dev.openwrt.org/browser/trunk/target/linux/lantiq/dts/DGN
> 3500.dtsi
-- 
- Daniel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Fix sysupgrade overlay saving

2016-01-16 Thread Rob Mosher
A previous change to sysupgrade moved the overlay files into upper/
The -c switch generates a list of files to backup, but the sed
calls did not take this into consideration.

Signed-off-by: Rob Mosher 
---
 package/base-files/files/sbin/sysupgrade | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/base-files/files/sbin/sysupgrade 
b/package/base-files/files/sbin/sysupgrade
index ef83c4b..93f0749 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -115,6 +115,7 @@ add_overlayfiles() {
local overlaydir="/overlay"
fi
find $overlaydir/etc/ -type f -o -type l | sed \
+   -e 's,^/overlay\/upper/,/,' \
-e 's,^/overlay/,/,' \
-e '\,/META_[a-zA-Z0-9]*$,d' \
-e '\,/functions.sh$,d' \
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] lantiq: Initial linux 4.4 support (with SPI problems)

2016-01-16 Thread Martin Blumenstingl
On Sat, Jan 16, 2016 at 7:07 PM, Daniel Schwierzeck
 wrote:
> If you use native CS, you should use the same numbering as in the
> datasheet:
>
> &spi {
> ...
> spi-nor@4 {
> #address-cells = <1>;
> #size-cells = <1>;
> compatible = "jedec,spi-nor";
> reg = <4>;
> spi-max-frequency = <2500>;
> };
> };
>
> If you use GPIO CS, you can ignore the native CS numbering and choose
> your own and you can also start with 0:
>
> &spi {
> ...
> cs-gpios = <&gpio 10 1>;
>
> spi-nor@0 {
> #address-cells = <1>;
> #size-cells = <1>;
> compatible = "jedec,spi-nor";
> reg = <0>;
> spi-max-frequency = <2500>;
> };
> };
>
> If you use native CS 4, you have to manipulate bits 3 and 11 in the
> GPOCON and FGPO registers. Thus you have to keep the (cs - 1)
> translation.
Thanks for the explanation.
I think what confused me is that I thought of mixing GPIO-based CS and
HW CS. But as far as I can see that is not supported: either use GPIOs
or HW for CS.
Thus I went ahead and updated the board .dts to be +1 compared to
their old value and reverted my changes to your patch.

>> While reviewing my changes I may have found a small problem with your
>> driver:
>> You don't have a separate "lantiq,spi-xrx100" OF-match. I think you
>> should add one with the same settings as for the other xrx-SoCs.
>> If you look at DGN3500.dtsi [2] you'll see that it's an ARX100 board
>> using spi_cs4.
>
> that's because I couldn't test it. But according to the datasheet,
> xRX100 also supports six native CS lines.
I added an of_device_id for "lantiq,spi-xrx100". Unfortunately I also
don't have xRX100 hardware which uses any SPI device, thus I can only
compile-test it.

So compared to your patch the final list of changes is:
- INIT_COMPLETION -> reinit_completion
- use clk_get_fpi()
- of_device_id for "lantiq,spi-xrx100"

I only have three small questions left:
- The "spi_frm" interrupt is currently unused - is that on purpose?
- I went ahead and added multiple "compatible" strings to the
soc.dtsi, for example: compatible = "lantiq,spi-ase",
"lantiq,spi-xway"; - do you see any problems with that?

Please let me know if you have more feedback - otherwise I'll do the
final round of tests and send the patches later.

PS: My git tree is contains the latest set of changes: [0]


Martin

[0] https://github.com/xdarklight/openwrt/commits/lantiq-spi-driver-daniel-v3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] lantiq: Initial linux 4.4 support (with SPI problems)

2016-01-16 Thread Daniel Schwierzeck
Am Samstag, den 16.01.2016, 21:17 +0100 schrieb Martin Blumenstingl:

> So compared to your patch the final list of changes is:
> - INIT_COMPLETION -> reinit_completion
> - use clk_get_fpi()
> - of_device_id for "lantiq,spi-xrx100"
> 
> I only have three small questions left:
> - The "spi_frm" interrupt is currently unused - is that on purpose?

yes, this interrupt is only needed for DMA transfers.

> - I went ahead and added multiple "compatible" strings to the
> soc.dtsi, for example: compatible = "lantiq,spi-ase",
> "lantiq,spi-xway"; - do you see any problems with that?

there should be only one compatible string in the DTS. For backward
compatibility the driver could support old and new strings.

> 
> Please let me know if you have more feedback - otherwise I'll do the
> final round of tests and send the patches later.

AFAIK the upstream preference is to have "lantiq,-spi". I forgot
to fix that in the driver. Could you change that? Thanks.

-- 
- Daniel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [build] Support LibreSSL as provider of openssl

2016-01-16 Thread Marek Behun
The build scripts check for openssl by grepping the string "OpenSSL" in
the output of openssl version command. LibreSSL fails this test as it
outputs something like "LibreSSL 2.2.4". This patch fix the
prereq-bulid.mk file so that it accepts LibreSSL as openssl provider as
well.

Signed-off-by: Marek Behun 
---
 include/prereq-build.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index 77fa991..bcb2103 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -161,7 +161,7 @@ $(eval $(call SetupHostCommand,file,Please install
the 'file' package, \ file --version 2>&1 | grep file))
 
 $(eval $(call SetupHostCommand,openssl,Please install the 'openssl'
utility, \
-   openssl version | grep OpenSSL))
+   openssl version | grep '\(OpenSSL\|LibreSSL\)'))
 
 
 # Install ldconfig stub
-- 
2.4.10
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [build] Support LibreSSL as provider of openssl

2016-01-16 Thread Felix Fietkau
On 2016-01-17 00:09, Marek Behun wrote:
> The build scripts check for openssl by grepping the string "OpenSSL" in
> the output of openssl version command. LibreSSL fails this test as it
> outputs something like "LibreSSL 2.2.4". This patch fix the
> prereq-bulid.mk file so that it accepts LibreSSL as openssl provider as
> well.
> 
> Signed-off-by: Marek Behun 
The patch is line wrapped and does not apply, please consider using git
send-email to avoid such issues in the future.

Thanks,

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH][RFC] x86: Save and restore partition table during upgrade

2016-01-16 Thread Rob Mosher
This patch will save the partition table before an upgrade.
If the installed image has not changed the partition structure
the saved table will be restored, ensuring any user created
partitions will be present after the upgrade.

An option is added to sysupgrade to disable this feature.

Signed-off-by: Rob Mosher 
---
 package/base-files/files/lib/upgrade/common.sh |  1 +
 package/base-files/files/sbin/sysupgrade   |  3 ++
 target/linux/x86/Makefile  |  2 +
 .../linux/x86/base-files/lib/upgrade/platform.sh   | 45 ++
 4 files changed, 51 insertions(+)

diff --git a/package/base-files/files/lib/upgrade/common.sh 
b/package/base-files/files/lib/upgrade/common.sh
index 761b4c1..aed7f8e 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -67,6 +67,7 @@ run_ramfs() { #  [...]
install_bin /usr/sbin/ubirsvol
install_bin /usr/sbin/ubirmvol
install_bin /usr/sbin/ubimkvol
+   install_bin /usr/sbin/sfdisk
for file in $RAMFS_COPY_BIN; do
install_bin ${file//:/ }
done
diff --git a/package/base-files/files/sbin/sysupgrade 
b/package/base-files/files/sbin/sysupgrade
index 93f0749..2f441f8 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -10,6 +10,7 @@ export INTERACTIVE=0
 export VERBOSE=1
 export SAVE_CONFIG=1
 export SAVE_OVERLAY=0
+export SAVE_PARTITIONS=1
 export DELAY=
 export CONF_IMAGE=
 export CONF_BACKUP_LIST=0
@@ -29,6 +30,7 @@ while [ -n "$1" ]; do
-q) export VERBOSE="$(($VERBOSE - 1))";;
-n) export SAVE_CONFIG=0;;
-c) export SAVE_OVERLAY=1;;
+   -p) export SAVE_PARTITIONS=0;;
-b|--create-backup) export CONF_BACKUP="$2" NEED_IMAGE=1; 
shift;;
-r|--restore-backup) export CONF_RESTORE="$2" NEED_IMAGE=1; 
shift;;
-l|--list-backup) export CONF_BACKUP_LIST=1; break;;
@@ -62,6 +64,7 @@ upgrade-option:
-i   interactive mode
-c   attempt to preserve all changed files in /etc/
-n   do not save configuration over reflash
+   -p   do not attempt to restore the partition table after flash.
-T | --test
 Verify image and config .tar.gz but do not actually flash.
-F | --force
diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile
index e4bc0d9..e5b4378 100644
--- a/target/linux/x86/Makefile
+++ b/target/linux/x86/Makefile
@@ -13,6 +13,8 @@ FEATURES:=squashfs ext4 vdi vmdk pcmcia targz
 SUBTARGETS=generic xen_domu ep80579 geode kvm_guest 64
 MAINTAINER:=Felix Fietkau 
 
+DEFAULT_PACKAGES += sfdisk
+
 KERNEL_PATCHVER:=4.4
 
 KERNELNAME:=bzImage
diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh 
b/target/linux/x86/base-files/lib/upgrade/platform.sh
index 73ab5ef..7f5a2b1 100644
--- a/target/linux/x86/base-files/lib/upgrade/platform.sh
+++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
@@ -55,12 +55,57 @@ platform_copy_config() {
fi
 }
 
+save_bootparts() {
+   disk=${BOOTPART%[0-9]}
+   if [ -b $disk ]; then
+   echo "Backing up partition table..."
+   sfdisk -d $disk > /tmp/sfdisk.before
+   grep size= /tmp/sfdisk.before | grep -E -v 'size=\s+0,' > 
/tmp/sfdisk.before.nonempty
+   fi
+}
+
+restore_bootparts() {
+   disk=${BOOTPART%[0-9]}
+   if [ -b $disk ]; then
+   sfdisk -d $disk > /tmp/sfdisk.after
+   grep size= /tmp/sfdisk.after | grep -E -v 'size=\s+0,' > 
/tmp/sfdisk.after.nonempty
+   before=$(cat /tmp/sfdisk.before.nonempty)
+   after=$(cat /tmp/sfdisk.after.nonempty)
+
+   #ensure we have both partition tables
+   if [ -z "$before" -o -z "$after" ]; then
+   echo "Could not read partition table"
+   return 1
+   fi
+   
+   #if nothing changed, we do not need to restore
+   if [ "$before" = "$after" ]; then
+   echo "Parition layout unchanged"
+   return 0
+   fi
+
+   diff=$(grep -F -x -v -f /tmp/sfdisk.before.nonempty 
/tmp/sfdisk.after.nonempty)
+
+   #if partition layout changed, do not restore
+   if [ -n "$diff" ]; then
+   echo "Partition layout changed, not restoring."
+   return 1
+   fi
+
+   echo "Restoring partition table..."
+   sfdisk $disk --force < /tmp/sfdisk.before >&/dev/null
+   fi
+}
+
 platform_do_upgrade() {
platform_export_bootpart
 
if [ -b "${BOOTPART%[0-9]}" ]; then
sync
+   [ $SAVE_PARTITIONS = "1" ] && save_bootparts
get_image "$@" | dd of="${BOOTPART%[0-9]}" bs=4096 conv=fsync
   

[OpenWrt-Devel] [PATCH] [build] Support LibreSSL as provider of openssl

2016-01-16 Thread Marek Behún
The build scripts check for openssl by grepping the string "OpenSSL" in
the output of openssl version command. LibreSSL fails this test as it
outputs something like "LibreSSL 2.2.4". This patch fix the
prereq-bulid.mk file so that it accepts LibreSSL as openssl provider as
well.

Signed-off-by: Marek Behun 
---
 include/prereq-build.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index 77fa991..bcb2103 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -161,7 +161,7 @@ $(eval $(call SetupHostCommand,file,Please install the 
'file' package, \
file --version 2>&1 | grep file))
 
 $(eval $(call SetupHostCommand,openssl,Please install the 'openssl' utility, \
-   openssl version | grep OpenSSL))
+   openssl version | grep '\(OpenSSL\|LibreSSL\)'))
 
 
 # Install ldconfig stub
-- 
2.4.10
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH][RFC] x86: Save and restore partition table during upgrade

2016-01-16 Thread Luiz Angelo Daros de Luca
Rob, I'll not judge the merit of keeping the previous position table, but I
guess dd might be enough for saving/restore partitions (I guess only msdos
is used). dd and /proc/partitions might replace sfdisk.

Em sáb, 16 de jan de 2016 23:22, Rob Mosher 
escreveu:

> This patch will save the partition table before an upgrade.
> If the installed image has not changed the partition structure
> the saved table will be restored, ensuring any user created
> partitions will be present after the upgrade.
>
> An option is added to sysupgrade to disable this feature.
>
> Signed-off-by: Rob Mosher 
> ---
>  package/base-files/files/lib/upgrade/common.sh |  1 +
>  package/base-files/files/sbin/sysupgrade   |  3 ++
>  target/linux/x86/Makefile  |  2 +
>  .../linux/x86/base-files/lib/upgrade/platform.sh   | 45
> ++
>  4 files changed, 51 insertions(+)
>
> diff --git a/package/base-files/files/lib/upgrade/common.sh
> b/package/base-files/files/lib/upgrade/common.sh
> index 761b4c1..aed7f8e 100644
> --- a/package/base-files/files/lib/upgrade/common.sh
> +++ b/package/base-files/files/lib/upgrade/common.sh
> @@ -67,6 +67,7 @@ run_ramfs() { #  [...]
> install_bin /usr/sbin/ubirsvol
> install_bin /usr/sbin/ubirmvol
> install_bin /usr/sbin/ubimkvol
> +   install_bin /usr/sbin/sfdisk
> for file in $RAMFS_COPY_BIN; do
> install_bin ${file//:/ }
> done
> diff --git a/package/base-files/files/sbin/sysupgrade
> b/package/base-files/files/sbin/sysupgrade
> index 93f0749..2f441f8 100755
> --- a/package/base-files/files/sbin/sysupgrade
> +++ b/package/base-files/files/sbin/sysupgrade
> @@ -10,6 +10,7 @@ export INTERACTIVE=0
>  export VERBOSE=1
>  export SAVE_CONFIG=1
>  export SAVE_OVERLAY=0
> +export SAVE_PARTITIONS=1
>  export DELAY=
>  export CONF_IMAGE=
>  export CONF_BACKUP_LIST=0
> @@ -29,6 +30,7 @@ while [ -n "$1" ]; do
> -q) export VERBOSE="$(($VERBOSE - 1))";;
> -n) export SAVE_CONFIG=0;;
> -c) export SAVE_OVERLAY=1;;
> +   -p) export SAVE_PARTITIONS=0;;
> -b|--create-backup) export CONF_BACKUP="$2" NEED_IMAGE=1;
> shift;;
> -r|--restore-backup) export CONF_RESTORE="$2"
> NEED_IMAGE=1; shift;;
> -l|--list-backup) export CONF_BACKUP_LIST=1; break;;
> @@ -62,6 +64,7 @@ upgrade-option:
> -i   interactive mode
> -c   attempt to preserve all changed files in /etc/
> -n   do not save configuration over reflash
> +   -p   do not attempt to restore the partition table after
> flash.
> -T | --test
>  Verify image and config .tar.gz but do not actually
> flash.
> -F | --force
> diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile
> index e4bc0d9..e5b4378 100644
> --- a/target/linux/x86/Makefile
> +++ b/target/linux/x86/Makefile
> @@ -13,6 +13,8 @@ FEATURES:=squashfs ext4 vdi vmdk pcmcia targz
>  SUBTARGETS=generic xen_domu ep80579 geode kvm_guest 64
>  MAINTAINER:=Felix Fietkau 
>
> +DEFAULT_PACKAGES += sfdisk
> +
>  KERNEL_PATCHVER:=4.4
>
>  KERNELNAME:=bzImage
> diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh
> b/target/linux/x86/base-files/lib/upgrade/platform.sh
> index 73ab5ef..7f5a2b1 100644
> --- a/target/linux/x86/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
> @@ -55,12 +55,57 @@ platform_copy_config() {
> fi
>  }
>
> +save_bootparts() {
> +   disk=${BOOTPART%[0-9]}
> +   if [ -b $disk ]; then
> +   echo "Backing up partition table..."
> +   sfdisk -d $disk > /tmp/sfdisk.before
> +   grep size= /tmp/sfdisk.before | grep -E -v 'size=\s+0,' >
> /tmp/sfdisk.before.nonempty
> +   fi
> +}
> +
> +restore_bootparts() {
> +   disk=${BOOTPART%[0-9]}
> +   if [ -b $disk ]; then
> +   sfdisk -d $disk > /tmp/sfdisk.after
> +   grep size= /tmp/sfdisk.after | grep -E -v 'size=\s+0,' >
> /tmp/sfdisk.after.nonempty
> +   before=$(cat /tmp/sfdisk.before.nonempty)
> +   after=$(cat /tmp/sfdisk.after.nonempty)
> +
> +   #ensure we have both partition tables
> +   if [ -z "$before" -o -z "$after" ]; then
> +   echo "Could not read partition table"
> +   return 1
> +   fi
> +
> +   #if nothing changed, we do not need to restore
> +   if [ "$before" = "$after" ]; then
> +   echo "Parition layout unchanged"
> +   return 0
> +   fi
> +
> +   diff=$(grep -F -x -v -f /tmp/sfdisk.before.nonempty
> /tmp/sfdisk.after.nonempty)
> +
> +   #if partition layout changed, do not restore
> +   if [ -n "$diff" ]; then
> +   echo "Partition layout changed, n

Re: [OpenWrt-Devel] [PATCH][RFC] x86: Save and restore partition table during upgrade

2016-01-16 Thread Rob Mosher
I considered a simpler approach without sfdisk, however /proc/partitions 
may not update after writing the image directly to the disk with dd, so 
an approach that actually read the partition table from the device was 
used.  Also, /proc/partitions just lists block count, and not partition 
begin/end info.


As for the merit, this is quite useful on x86 systems.  For example, I'm 
booting using a 32gb usb drive and would prefer to keep the other 
partitions I have defined intact after an upgrade.


On 1/16/2016 9:24 PM, Luiz Angelo Daros de Luca wrote:


Rob, I'll not judge the merit of keeping the previous position table, 
but I guess dd might be enough for saving/restore partitions (I guess 
only msdos is used). dd and /proc/partitions might replace sfdisk.



Em sáb, 16 de jan de 2016 23:22, Rob Mosher 
> escreveu:


This patch will save the partition table before an upgrade.
If the installed image has not changed the partition structure
the saved table will be restored, ensuring any user created
partitions will be present after the upgrade.

An option is added to sysupgrade to disable this feature.

Signed-off-by: Rob Mosher mailto:nyt-open...@countercultured.net>>
---
 package/base-files/files/lib/upgrade/common.sh |  1 +
 package/base-files/files/sbin/sysupgrade   |  3 ++
 target/linux/x86/Makefile  |  2 +
 .../linux/x86/base-files/lib/upgrade/platform.sh   | 45
++
 4 files changed, 51 insertions(+)

diff --git a/package/base-files/files/lib/upgrade/common.sh
b/package/base-files/files/lib/upgrade/common.sh
index 761b4c1..aed7f8e 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -67,6 +67,7 @@ run_ramfs() { #  [...]
install_bin /usr/sbin/ubirsvol
install_bin /usr/sbin/ubirmvol
install_bin /usr/sbin/ubimkvol
+   install_bin /usr/sbin/sfdisk
for file in $RAMFS_COPY_BIN; do
install_bin ${file//:/ }
done
diff --git a/package/base-files/files/sbin/sysupgrade
b/package/base-files/files/sbin/sysupgrade
index 93f0749..2f441f8 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -10,6 +10,7 @@ export INTERACTIVE=0
 export VERBOSE=1
 export SAVE_CONFIG=1
 export SAVE_OVERLAY=0
+export SAVE_PARTITIONS=1
 export DELAY=
 export CONF_IMAGE=
 export CONF_BACKUP_LIST=0
@@ -29,6 +30,7 @@ while [ -n "$1" ]; do
-q) export VERBOSE="$(($VERBOSE - 1))";;
-n) export SAVE_CONFIG=0;;
-c) export SAVE_OVERLAY=1;;
+   -p) export SAVE_PARTITIONS=0;;
-b|--create-backup) export CONF_BACKUP="$2"
NEED_IMAGE=1; shift;;
-r|--restore-backup) export CONF_RESTORE="$2"
NEED_IMAGE=1; shift;;
-l|--list-backup) export CONF_BACKUP_LIST=1; break;;
@@ -62,6 +64,7 @@ upgrade-option:
-i   interactive mode
-c   attempt to preserve all changed files in /etc/
-n   do not save configuration over reflash
+   -p   do not attempt to restore the partition table
after flash.
-T | --test
 Verify image and config .tar.gz but do not
actually flash.
-F | --force
diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile
index e4bc0d9..e5b4378 100644
--- a/target/linux/x86/Makefile
+++ b/target/linux/x86/Makefile
@@ -13,6 +13,8 @@ FEATURES:=squashfs ext4 vdi vmdk pcmcia targz
 SUBTARGETS=generic xen_domu ep80579 geode kvm_guest 64
 MAINTAINER:=Felix Fietkau mailto:n...@openwrt.org>>

+DEFAULT_PACKAGES += sfdisk
+
 KERNEL_PATCHVER:=4.4

 KERNELNAME:=bzImage
diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh
b/target/linux/x86/base-files/lib/upgrade/platform.sh
index 73ab5ef..7f5a2b1 100644
--- a/target/linux/x86/base-files/lib/upgrade/platform.sh
+++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
@@ -55,12 +55,57 @@ platform_copy_config() {
fi
 }

+save_bootparts() {
+   disk=${BOOTPART%[0-9]}
+   if [ -b $disk ]; then
+   echo "Backing up partition table..."
+   sfdisk -d $disk > /tmp/sfdisk.before
+   grep size= /tmp/sfdisk.before | grep -E -v
'size=\s+0,' > /tmp/sfdisk.before.nonempty
+   fi
+}
+
+restore_bootparts() {
+   disk=${BOOTPART%[0-9]}
+   if [ -b $disk ]; then
+   sfdisk -d $disk > /tmp/sfdisk.after
+   grep size= /tmp/sfdisk.after | grep -E -v
'size=\s+0,' > /tmp/sfdisk.after.nonempty
+