Re: [LEDE-DEV] merging the layerscape target

2016-09-27 Thread Y.T. Jiang


> -Original Message-
> From: John Crispin [mailto:j...@phrozen.org]
> Sent: Wednesday, September 28, 2016 1:16 PM
> To: Y.T. Jiang
> Cc: LEDE Development List
> Subject: Re: [LEDE-DEV] merging the layerscape target
> 
> 
> 
> On 27/09/2016 13:39, Y.T. Jiang wrote:
> > Hi John,
> >
> > After the survey found, the error are from a old usb2.0(USB_EHCI_FSL)
> driver which is usually used for powerpc arch, not for layerscape
> ls1043ardb(arm64 arch) Soc.
> > The default kernel config and packages not enable the old usb2.0 driver
> in my patch. It should be enabled by:
> > [x] Select all target specific packages by default [x] Select all
> > kernel module packages by default [x] Select all userspace packages by
> >
> > Further investigation found, if remove the kernel patch 8041, can avoid
> USB_EHCI_FSL be compiled. But the patch hint, USB_EHCI_FSL will appear in
> other arch.
> > 8041-usb-kconfig-remove-dependency-FSL_SOC-for-ehci-fsl-d.patch
> > "usb: kconfig: remove dependency FSL_SOC for ehci fsl driver "
> > CONFIG_USB_EHCI_FSL is not dependent on FSL_SOC, it can be built on
> non-PPC platforms.
> > ...
> >  21  config USB_EHCI_FSL
> >  22 tristate "Support for Freescale PPC on-chip EHCI USB
> controller"
> >  23 -   depends on FSL_SOC
> >  24 +   depends on USB_EHCI_HCD
> > ...
> >
> 
> so this patch is indeed added by your series, yet the module does not
> build. i would suggest dropping this patch as it seems totally unrelated
> and in fact makes it not work. does your target use FSL EHCI support ?
> 
>   John
> 
Yes, I double check the patches, it not need indeed. In fact, some patches was 
backported by other colleagues, who not familiar with special IP block and 
mixed with other unnecessary patches. I will drop it and create a new patch, 
after functional validation then submit a new pull request. Thank you John.
[Y.T. Jiang] 

> > If have other better ways in dealing with the dependencies in LEDE?
> >
> >
> > Thanks & Best Regards
> > Jiang Yutang
> >
> >> -Original Message-
> >> From: John Crispin [mailto:j...@phrozen.org]
> >> Sent: Tuesday, September 27, 2016 2:34 PM
> >> To: Y.T. Jiang
> >> Cc: LEDE Development List
> >> Subject: Re: [LEDE-DEV] merging the layerscape target
> >>
> >> Hi,
> >>
> >> i just tried V5 and when building the target with all packages
> >> selected i run into some errors
> >>
> >> make[5]: Entering directory
> >> `/home/blogic/source/build_dir/target-aarch64_armv8-a_musl-1.1.15/lin
> >> ux-
> >> layerscape_64b/linux-4.4.21'
> >>   CHK include/config/kernel.release
> >>   CHK include/generated/uapi/linux/version.h
> >>   CHK include/generated/utsrelease.h
> >>   CHK include/generated/bounds.h
> >>   CHK include/generated/timeconst.h
> >>   CHK include/generated/asm-offsets.h
> >>   CALLscripts/checksyscalls.sh
> >>   CC [M]  drivers/usb/host/ehci-fsl.o In file included from
> >> drivers/usb/host/ehci-fsl.c:39:0:
> >> drivers/usb/host/ehci.h: In function 'ehci_readl':
> >> drivers/usb/host/ehci.h:741:9: error: implicit declaration of
> >> function 'readl' [-Werror=implicit-function-declaration]
> >>   return readl(regs);
> >>  ^
> >> drivers/usb/host/ehci.h: In function 'ehci_writel':
> >> drivers/usb/host/ehci.h:768:3: error: implicit declaration of
> >> function 'writel' [-Werror=implicit-function-declaration]
> >>writel(val, regs);
> >>^
> >> drivers/usb/host/ehci-fsl.c: In function 'fsl_ehci_drv_probe':
> >> drivers/usb/host/ehci-fsl.c:130:3: error: implicit declaration of
> >> function 'clrsetbits_be32' [-Werror=implicit-function-declaration]
> >>clrsetbits_be32(hcd->regs + FSL_SOC_USB_CTRL,
> >>^
> >> drivers/usb/host/ehci-fsl.c: In function 'ehci_fsl_setup_phy':
> >> drivers/usb/host/ehci-fsl.c:205:4: error: implicit declaration of
> >> function 'clrbits32' [-Werror=implicit-function-declaration]
> >> clrbits32(non_ehci + FSL_SOC_USB_CTRL,
> >> ^
> >> drivers/usb/host/ehci-fsl.c:244:9: error: implicit declaration of
> >> function 'in_be32' [-Werror=implicit-function-declaration]
> >>if (!(in_be32(non_ehci + FSL_SOC_USB_CTRL) & PHY_CLK_VALID)) {
> >>  ^
> >> drivers/usb/host/ehci-fsl.c: In function 'ehci_fsl_usb_setup':
> >> drivers/usb/host/ehci-fsl.c:276:3: error: implicit declaration of
> >> function 'out_be32' [-Werror=implicit-function-declaration]
> >>out_be32(non_ehci + FSL_SOC_USB_SNOOP1, 0x0 | SNOOP_SIZE_2GB);
> >>^
> >> drivers/usb/host/ehci-fsl.c:293:9: error: implicit declaration of
> >> function 'mfspr' [-Werror=implicit-function-declaration]
> >>svr = mfspr(SPRN_SVR);
> >>  ^
> >> drivers/usb/host/ehci-fsl.c:293:15: error: 'SPRN_SVR' undeclared
> >> (first use in this function)
> >>svr = mfspr(SPRN_SVR);
> >>^
> >> drivers/usb/host/ehci-fsl.c:293:15: note: each undeclared identifier
> >> is reported only once for each function it appears in
> >> cc1: some warnings being treated as errors
> >>
> >> to reproduce this 

Re: [LEDE-DEV] merging the layerscape target

2016-09-27 Thread John Crispin


On 27/09/2016 13:39, Y.T. Jiang wrote:
> Hi John,
> 
> After the survey found, the error are from a old usb2.0(USB_EHCI_FSL) driver 
> which is usually used for powerpc arch, not for layerscape ls1043ardb(arm64 
> arch) Soc.
> The default kernel config and packages not enable the old usb2.0 driver in my 
> patch. It should be enabled by:
> [x] Select all target specific packages by default
> [x] Select all kernel module packages by default
> [x] Select all userspace packages by
> 
> Further investigation found, if remove the kernel patch 8041, can avoid 
> USB_EHCI_FSL be compiled. But the patch hint, USB_EHCI_FSL will appear in 
> other arch.
> 8041-usb-kconfig-remove-dependency-FSL_SOC-for-ehci-fsl-d.patch
> "usb: kconfig: remove dependency FSL_SOC for ehci fsl driver "
> CONFIG_USB_EHCI_FSL is not dependent on FSL_SOC, it can be built on non-PPC 
> platforms.
> ...
>  21  config USB_EHCI_FSL
>  22 tristate "Support for Freescale PPC on-chip EHCI USB controller"
>  23 -   depends on FSL_SOC
>  24 +   depends on USB_EHCI_HCD
> ...
> 

so this patch is indeed added by your series, yet the module does not
build. i would suggest dropping this patch as it seems totally unrelated
and in fact makes it not work. does your target use FSL EHCI support ?

John

> If have other better ways in dealing with the dependencies in LEDE?
> 
> 
> Thanks & Best Regards
> Jiang Yutang
> 
>> -Original Message-
>> From: John Crispin [mailto:j...@phrozen.org]
>> Sent: Tuesday, September 27, 2016 2:34 PM
>> To: Y.T. Jiang
>> Cc: LEDE Development List
>> Subject: Re: [LEDE-DEV] merging the layerscape target
>>
>> Hi,
>>
>> i just tried V5 and when building the target with all packages selected i
>> run into some errors
>>
>> make[5]: Entering directory
>> `/home/blogic/source/build_dir/target-aarch64_armv8-a_musl-1.1.15/linux-
>> layerscape_64b/linux-4.4.21'
>>   CHK include/config/kernel.release
>>   CHK include/generated/uapi/linux/version.h
>>   CHK include/generated/utsrelease.h
>>   CHK include/generated/bounds.h
>>   CHK include/generated/timeconst.h
>>   CHK include/generated/asm-offsets.h
>>   CALLscripts/checksyscalls.sh
>>   CC [M]  drivers/usb/host/ehci-fsl.o
>> In file included from drivers/usb/host/ehci-fsl.c:39:0:
>> drivers/usb/host/ehci.h: In function 'ehci_readl':
>> drivers/usb/host/ehci.h:741:9: error: implicit declaration of function
>> 'readl' [-Werror=implicit-function-declaration]
>>   return readl(regs);
>>  ^
>> drivers/usb/host/ehci.h: In function 'ehci_writel':
>> drivers/usb/host/ehci.h:768:3: error: implicit declaration of function
>> 'writel' [-Werror=implicit-function-declaration]
>>writel(val, regs);
>>^
>> drivers/usb/host/ehci-fsl.c: In function 'fsl_ehci_drv_probe':
>> drivers/usb/host/ehci-fsl.c:130:3: error: implicit declaration of
>> function 'clrsetbits_be32' [-Werror=implicit-function-declaration]
>>clrsetbits_be32(hcd->regs + FSL_SOC_USB_CTRL,
>>^
>> drivers/usb/host/ehci-fsl.c: In function 'ehci_fsl_setup_phy':
>> drivers/usb/host/ehci-fsl.c:205:4: error: implicit declaration of
>> function 'clrbits32' [-Werror=implicit-function-declaration]
>> clrbits32(non_ehci + FSL_SOC_USB_CTRL,
>> ^
>> drivers/usb/host/ehci-fsl.c:244:9: error: implicit declaration of
>> function 'in_be32' [-Werror=implicit-function-declaration]
>>if (!(in_be32(non_ehci + FSL_SOC_USB_CTRL) & PHY_CLK_VALID)) {
>>  ^
>> drivers/usb/host/ehci-fsl.c: In function 'ehci_fsl_usb_setup':
>> drivers/usb/host/ehci-fsl.c:276:3: error: implicit declaration of
>> function 'out_be32' [-Werror=implicit-function-declaration]
>>out_be32(non_ehci + FSL_SOC_USB_SNOOP1, 0x0 | SNOOP_SIZE_2GB);
>>^
>> drivers/usb/host/ehci-fsl.c:293:9: error: implicit declaration of
>> function 'mfspr' [-Werror=implicit-function-declaration]
>>svr = mfspr(SPRN_SVR);
>>  ^
>> drivers/usb/host/ehci-fsl.c:293:15: error: 'SPRN_SVR' undeclared (first
>> use in this function)
>>svr = mfspr(SPRN_SVR);
>>^
>> drivers/usb/host/ehci-fsl.c:293:15: note: each undeclared identifier is
>> reported only once for each function it appears in
>> cc1: some warnings being treated as errors
>>
>> to reproduce this run menuconfig and then Global build settings  --->
>>[x] Select all target specific packages by default
>>[x] Select all kernel module packages by default
>>[x] Select all userspace packages by default
>>
>>  John
>>
>>
>>
>> On 21/09/2016 16:21, Y.T. Jiang wrote:
>>> Hi Rafał and John,
>>>
>>> I update the patch and pull a new requests(329), please check and
>> review, thanks!
>>> https://github.com/lede-project/source/pull/329
>>>
>>> V5 patch update summary:
>>>  1.Copyrights assigned to myself.
>>>  2.Introduce DEVICE_TITLE and DEVICE_PACKAGES.
>>>  3.Rename patches prefix with 1xxx,2xxx...
>>>  4.Refresh patches by "make target/linux/refresh V=s"
>>>  5.Move default packages to DEFAULT_PACKAGES.
>>>  6.Optimize 

Re: [LEDE-DEV] [OpenWrt-Devel] [PATCH packages] pptpd: run service in foreground for procd compatibility

2016-09-27 Thread Luka Perkov
Hi Rafał,

On Wed, Sep 28, 2016 at 12:56:27AM +0200, Rafał Miłecki wrote:
> On 28 September 2016 at 00:37, Luka Perkov  wrote:
> > On Mon, Sep 26, 2016 at 07:59:30AM +0200, Rafał Miłecki wrote:
> >> From: Rafał Miłecki 
> >>
> >> To have service working nicely with procd it should be running in the
> >> foreground. Otherwise it's not possible to e.g. stop it with the init.d
> >> script. Luckily for us pptpd has a simple switch that allows it.
> >>
> >> Signed-off-by: Rafał Miłecki 
> >> Fixes: 15e7f611afb ("pptpd: convert init script to procd")
> >> ---
> >> Hi Luka,
> >>
> >> This pptpd package with broken procd compatibility has been also backported
> >> to the for-15.05 branch. Can you apply this fix to for-15.05 as well, 
> >> please?
> >
> > Thank you for the patch. We are using for quite a while GitHub pull
> > request workflow for all packages in the feeds. Please take a look at
> > the documentation:
> >
> > https://github.com/openwrt/packages/blob/master/CONTRIBUTING.md
> >
> > That said, can you make a pull request?
> 
> I'm not really comfortable using that proprietary service and its
> terrible UI.

Have you maybe changed your mind since the last time [1] you made commit
there?

> Could you consider accepting this e-mail submitted patch?
> You could trivially apply it with a single command:
> curl https://patchwork.ozlabs.org/patch/674965/mbox/ | git am

In any case I am okay with the patch, feel free to add my Acked-by and
push it in the tree.

Acked-by: Luka Perkov 

Thanks,
Luka

[1] 
https://github.com/openwrt/packages/commit/2872ed64cc609f8449de3529f3e6db66151aa164

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH procd] cmake: Fix upgraded CMakeLists.txt

2016-09-27 Thread Florian Fainelli
Fix several things with this CMakeLists.txt file:

* add missing header search for ubox/uloop.h

* append the linker flags, do not override them (since they could contain path
  to the stating directory)

* remove link explicit against libgcc_pic

Verified this still produces a static binary as expected.

Signed-off-by: Florian Fainelli 
---
 upgraded/CMakeLists.txt | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/upgraded/CMakeLists.txt b/upgraded/CMakeLists.txt
index 093dba2f2f92..fc016f4c4ca3 100644
--- a/upgraded/CMakeLists.txt
+++ b/upgraded/CMakeLists.txt
@@ -2,7 +2,11 @@ cmake_minimum_required(VERSION 2.6)
 
 PROJECT(upgraded C)
 ADD_DEFINITIONS(-Os -ggdb -Wall -Werror --std=gnu99 -Wmissing-declarations)
-set(CMAKE_EXE_LINKER_FLAGS "-static -fPIC")
+
+FIND_PATH(ubox_include_dir libubox/uloop.h)
+INCLUDE_DIRECTORIES(${ubox_include_dir})
+
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -fPIC")
 set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
 set(CMAKE_EXE_LINK_DYNAMIC_C_FLAGS)
 set(CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS)
@@ -11,7 +15,7 @@ set(CMAKE_SHARED_LIBRARY_CXX_FLAGS)
 set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
 set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
 ADD_EXECUTABLE(upgraded upgraded.c ../watchdog.c)
-TARGET_LINK_LIBRARIES(upgraded ubox rt -lc -lgcc_pic)
+TARGET_LINK_LIBRARIES(upgraded ubox rt -lc)
 INSTALL(TARGETS upgraded
RUNTIME DESTINATION sbin
 )
-- 
2.9.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Build ar71xx / 4MB with IPv6, Luci, OpenVPN (PolarSSL), Command, Watchcat, relay and printk without debug ?

2016-09-27 Thread Břetislav Kubesa

On 27.9.2016 21:35 Daniel Petre wrote:

On 09/27/2016 09:22 PM, Břetislav Kubesa wrote:

Hi,

sorry if this is not the right place to ask but there is currently no
other as for LEDE and do not want to hijack other forum (of Openwrt).
I'm trying already longer time to build myself a ar71xx variant (MR3020,
WA850RE etc.) with combination of : IPv6, Luci, OpenVPN (PolarSSL),
Command, Watchcat, relay and printk without debug,ppp,usb but I'm still
little over sized by 8000-6000 bytes ;-) Is there some way, can you give
me please some recommendation ? I don't want to get rid of some key
components like mtd, uci, do not want really to touch busybox etc. and I
have the good reasons why to keep the rest eventually.

[mktplinkfw] *** error: images are too big by 6178 bytes


Tried going into make kernel_menuconfig and disabling module unloading 
support?




That did the trick, thank you so much !


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] Second round of OpenWrt/LEDE project funding

2016-09-27 Thread Eric Schultz
I wanted to let folks know that prpl Foundation will be funding another
round of OpenWrt/LEDE projects. Following up on our first round of
projects (https://prpl.works/2016/09/26/openwrt-funding-round-two/), we
want to continue funding the stellar work of community members. A funded
project can relate to core OpenWrt/LEDE, a package, testing or
documentation. While we encourage folks to submit a project based upon
our suggested projects list, we’ll consider any project related to
OpenWrt or LEDE. To find out more, see the suggested projects and to
apply for funding, please visit
https://prpl.works/2016/09/26/openwrt-funding-round-two/ or shoot me
over an email.


Thanks,


Eric



___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] The procd daemon does not handle correctly the instances

2016-09-27 Thread John Crispin


On 27/09/2016 17:34, Lebleu Pierre wrote:
> Hi all,
> 
> I found a bug in the daemon process management. Indeed, when we have several 
> instances of one daemon such as "dnsmasq" and we want to restart only one 
> instance, the other instance is killed by procd. It seems procd updates the 
> second instance and then, kill it.
> 
> Please find the patch :
> diff --git a/service/service.c b/service/service.c
> index 0796adb..9ed07da 100644
> --- a/service/service.c
> +++ b/service/service.c
> @@ -132,8 +132,6 @@ service_update(struct service *s, struct blob_attr **tb, 
> bool add)
> }
> 
> if (tb[SERVICE_SET_INSTANCES]) {
> -   if (!add)
> -   vlist_update(>instances);
> blobmsg_for_each_attr(cur, tb[SERVICE_SET_INSTANCES], rem) {
> service_instance_add(s, cur);
> }

this bit is certainly not correct. it simply deactivates the feature for
all services. the actual problem is that procd stores the instances
inside a vlist. this has an update mechanism triggered inside
service_instance_update().

what you want to do is compare in_o and in_n and only trigger
instance_update() if there really was a change. if there is no change
then simply migrate the pid over to the new instance.


> @@ -238,7 +236,7 @@ service_handle_set(struct ubus_context *ctx, struct 
> ubus_object *obj,
> int ret;
> 
> blobmsg_parse(service_set_attrs, __SERVICE_SET_MAX, tb, 
> blob_data(msg), blob_len(msg));
> -   cur = tb[SERVICE_ATTR_NAME];
> +   cur = tb[SERVICE_SET_NAME];
> if (!cur)
> return UBUS_STATUS_INVALID_ARGUMENT;

this is a copy paste error but luckily does not cause an error as SET
and ATTR both eval to 0. i have merged this part as a fix.

John


> 
> 
> Regards,
> 
> Pierre
> 
> 
> ___
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
> 

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] The procd daemon does not handle correctly the instances

2016-09-27 Thread Lebleu Pierre
Hi all,

I found a bug in the daemon process management. Indeed, when we have several 
instances of one daemon such as "dnsmasq" and we want to restart only one 
instance, the other instance is killed by procd. It seems procd updates the 
second instance and then, kill it.

Please find the patch :
diff --git a/service/service.c b/service/service.c
index 0796adb..9ed07da 100644
--- a/service/service.c
+++ b/service/service.c
@@ -132,8 +132,6 @@ service_update(struct service *s, struct blob_attr **tb, 
bool add)
    }

if (tb[SERVICE_SET_INSTANCES]) {
-   if (!add)
-   vlist_update(>instances);
    blobmsg_for_each_attr(cur, tb[SERVICE_SET_INSTANCES], rem) {
    service_instance_add(s, cur);
    }
@@ -238,7 +236,7 @@ service_handle_set(struct ubus_context *ctx, struct 
ubus_object *obj,
    int ret;

blobmsg_parse(service_set_attrs, __SERVICE_SET_MAX, tb, blob_data(msg), 
blob_len(msg));
-   cur = tb[SERVICE_ATTR_NAME];
+   cur = tb[SERVICE_SET_NAME];
    if (!cur)
    return UBUS_STATUS_INVALID_ARGUMENT;



Regards,

Pierre


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] merging the layerscape target

2016-09-27 Thread John Crispin


On 27/09/2016 13:39, Y.T. Jiang wrote:
> Hi John,
> 
> After the survey found, the error are from a old usb2.0(USB_EHCI_FSL) driver 
> which is usually used for powerpc arch, not for layerscape ls1043ardb(arm64 
> arch) Soc.
> The default kernel config and packages not enable the old usb2.0 driver in my 
> patch. It should be enabled by:
> [x] Select all target specific packages by default
> [x] Select all kernel module packages by default
> [x] Select all userspace packages by
> 
> Further investigation found, if remove the kernel patch 8041, can avoid 
> USB_EHCI_FSL be compiled. But the patch hint, USB_EHCI_FSL will appear in 
> other arch.
> 8041-usb-kconfig-remove-dependency-FSL_SOC-for-ehci-fsl-d.patch
> "usb: kconfig: remove dependency FSL_SOC for ehci fsl driver "
> CONFIG_USB_EHCI_FSL is not dependent on FSL_SOC, it can be built on non-PPC 
> platforms.
> ...
>  21  config USB_EHCI_FSL
>  22 tristate "Support for Freescale PPC on-chip EHCI USB controller"
>  23 -   depends on FSL_SOC
>  24 +   depends on USB_EHCI_HCD
> ...
> 
> If have other better ways in dealing with the dependencies in LEDE?
> 
> 
> Thanks & Best Regards
> Jiang Yutang
> 

Hi,

ok, looks like this is not related to layerscape. i'll try to have a
look at it tonight.

John



>> -Original Message-
>> From: John Crispin [mailto:j...@phrozen.org]
>> Sent: Tuesday, September 27, 2016 2:34 PM
>> To: Y.T. Jiang
>> Cc: LEDE Development List
>> Subject: Re: [LEDE-DEV] merging the layerscape target
>>
>> Hi,
>>
>> i just tried V5 and when building the target with all packages selected i
>> run into some errors
>>
>> make[5]: Entering directory
>> `/home/blogic/source/build_dir/target-aarch64_armv8-a_musl-1.1.15/linux-
>> layerscape_64b/linux-4.4.21'
>>   CHK include/config/kernel.release
>>   CHK include/generated/uapi/linux/version.h
>>   CHK include/generated/utsrelease.h
>>   CHK include/generated/bounds.h
>>   CHK include/generated/timeconst.h
>>   CHK include/generated/asm-offsets.h
>>   CALLscripts/checksyscalls.sh
>>   CC [M]  drivers/usb/host/ehci-fsl.o
>> In file included from drivers/usb/host/ehci-fsl.c:39:0:
>> drivers/usb/host/ehci.h: In function 'ehci_readl':
>> drivers/usb/host/ehci.h:741:9: error: implicit declaration of function
>> 'readl' [-Werror=implicit-function-declaration]
>>   return readl(regs);
>>  ^
>> drivers/usb/host/ehci.h: In function 'ehci_writel':
>> drivers/usb/host/ehci.h:768:3: error: implicit declaration of function
>> 'writel' [-Werror=implicit-function-declaration]
>>writel(val, regs);
>>^
>> drivers/usb/host/ehci-fsl.c: In function 'fsl_ehci_drv_probe':
>> drivers/usb/host/ehci-fsl.c:130:3: error: implicit declaration of
>> function 'clrsetbits_be32' [-Werror=implicit-function-declaration]
>>clrsetbits_be32(hcd->regs + FSL_SOC_USB_CTRL,
>>^
>> drivers/usb/host/ehci-fsl.c: In function 'ehci_fsl_setup_phy':
>> drivers/usb/host/ehci-fsl.c:205:4: error: implicit declaration of
>> function 'clrbits32' [-Werror=implicit-function-declaration]
>> clrbits32(non_ehci + FSL_SOC_USB_CTRL,
>> ^
>> drivers/usb/host/ehci-fsl.c:244:9: error: implicit declaration of
>> function 'in_be32' [-Werror=implicit-function-declaration]
>>if (!(in_be32(non_ehci + FSL_SOC_USB_CTRL) & PHY_CLK_VALID)) {
>>  ^
>> drivers/usb/host/ehci-fsl.c: In function 'ehci_fsl_usb_setup':
>> drivers/usb/host/ehci-fsl.c:276:3: error: implicit declaration of
>> function 'out_be32' [-Werror=implicit-function-declaration]
>>out_be32(non_ehci + FSL_SOC_USB_SNOOP1, 0x0 | SNOOP_SIZE_2GB);
>>^
>> drivers/usb/host/ehci-fsl.c:293:9: error: implicit declaration of
>> function 'mfspr' [-Werror=implicit-function-declaration]
>>svr = mfspr(SPRN_SVR);
>>  ^
>> drivers/usb/host/ehci-fsl.c:293:15: error: 'SPRN_SVR' undeclared (first
>> use in this function)
>>svr = mfspr(SPRN_SVR);
>>^
>> drivers/usb/host/ehci-fsl.c:293:15: note: each undeclared identifier is
>> reported only once for each function it appears in
>> cc1: some warnings being treated as errors
>>
>> to reproduce this run menuconfig and then Global build settings  --->
>>[x] Select all target specific packages by default
>>[x] Select all kernel module packages by default
>>[x] Select all userspace packages by default
>>
>>  John
>>
>>
>>
>> On 21/09/2016 16:21, Y.T. Jiang wrote:
>>> Hi Rafał and John,
>>>
>>> I update the patch and pull a new requests(329), please check and
>> review, thanks!
>>> https://github.com/lede-project/source/pull/329
>>>
>>> V5 patch update summary:
>>>  1.Copyrights assigned to myself.
>>>  2.Introduce DEVICE_TITLE and DEVICE_PACKAGES.
>>>  3.Rename patches prefix with 1xxx,2xxx...
>>>  4.Refresh patches by "make target/linux/refresh V=s"
>>>  5.Move default packages to DEFAULT_PACKAGES.
>>>  6.Optimize Build/mk_firmware.
>>>
>>> Thanks & Best Regards
>>> Jiang Yutang
>>>
 -Original Message-
 From: 

Re: [LEDE-DEV] [PATCH v3] ar71xx: add support for Cisco Meraki Z1 Cloud Managed Teleworker Gateway

2016-09-27 Thread John Crispin
Hi,

comment inline

On 20/09/2016 14:14, Chris Blake wrote:
> This patch adds support for Cisco's Z1.
> Detailed instructions for the flashing the device can
> be found in the OpenWrt wiki:
> 
> 
> Signed-off-by: Chris Blake 
> ---
>  target/linux/ar71xx/base-files/etc/board.d/01_leds |   4 +
>  .../linux/ar71xx/base-files/etc/board.d/02_network |   6 +
>  target/linux/ar71xx/base-files/etc/diag.sh |   3 +
>  .../etc/hotplug.d/firmware/10-ath9k-eeprom |  20 +++
>  .../etc/uci-defaults/03_network-switchX-migration  |   1 +
>  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
>  .../base-files/lib/preinit/05_set_iface_mac_ar71xx |   4 +
>  .../ar71xx/base-files/lib/upgrade/merakinand.sh|  61 ++--
>  .../ar71xx/base-files/lib/upgrade/platform.sh  |   6 +-
>  target/linux/ar71xx/config-4.4 |   1 +
>  .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  12 ++
>  target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
>  .../linux/ar71xx/files/arch/mips/ath79/mach-z1.c   | 164 
> +
>  .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
>  target/linux/ar71xx/image/nand.mk  |  23 +++
>  .../818-MIPS-ath79-add-nu801-led-driver.patch  |   2 +-
>  16 files changed, 293 insertions(+), 19 deletions(-)
>  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-z1.c
> 
> diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
> b/target/linux/ar71xx/base-files/etc/board.d/01_leds
> index cf05859..7551455 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
> +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
> @@ -813,6 +813,10 @@ wzr-hp-g300nh)
>   ucidef_set_led_usbdev "usb" "USB" "buffalo:blue:usb" "1-1"
>   ;;
>  
> +z1)
> + ucidef_set_led_netdev "wlan1" "WLAN1" "z1:blue:tricolor0" "wlan1"
> + ;;
> +
>  zbt-we1526)
>   ucidef_set_led_netdev "wan" "WAN" "zbt-we1526:green:wan" "eth1"
>   ucidef_set_led_switch "lan1" "LAN1" "zbt-we1526:green:lan1" "switch0" 
> "0x10"
> diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
> b/target/linux/ar71xx/base-files/etc/board.d/02_network
> index b637113..2a50c9d 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/02_network
> +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
> @@ -538,6 +538,12 @@ wndr3700)
>   ucidef_add_switch_port_attr "switch0" 5 led 2
>   ;;
>  
> +z1)
> + ucidef_set_interfaces_lan_wan "eth0" "eth1"
> + ucidef_add_switch "switch0" \
> + "0@eth0" "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" "5:wan"
> + ;;
> +
>  *)
>   ucidef_set_interfaces_lan_wan "eth0" "eth1"
>   ;;
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
> b/target/linux/ar71xx/base-files/etc/diag.sh
> index 69ef609..6ce49b0 100644
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -426,6 +426,9 @@ get_status_led() {
>   wrt160nl)
>   status_led="wrt160nl:blue:wps"
>   ;;
> + z1)
> + status_led="z1:green:tricolor0"
> + ;;
>   zbt-we1526)
>   status_led="zbt-we1526:green:status"
>   ;;
> diff --git 
> a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom 
> b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
> index 3b0229d..3141625 100644
> --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
> +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
> @@ -73,6 +73,16 @@ case "$FIRMWARE" in
>   ath9k_eeprom_extract "caldata" 4096 2048
>   ath9k_patch_firmware_mac $(mtd_get_mac_binary caldata 0)
>   ;;
> + z1)
> + . /lib/upgrade/nand.sh
> +
> + if [ -n "$(nand_find_volume ubi0 caldata)" ]; then
> + ath9k_ubi_eeprom_extract "caldata" 4096 2048
> + else
> + ath9k_eeprom_extract "origcaldata" 4096 2048
> + fi
> + ath9k_patch_firmware_mac $(macaddr_add $(mtd_get_mac_binary_ubi 
> board-config 102) +2)
> + ;;

this chunk and the one below look weird. can you explain why there are 2
caldata blocks please ?

John

>   *)
>   ath9k_eeprom_die "board $board is not supported yet"
>   ;;
> @@ -100,6 +110,16 @@ case "$FIRMWARE" in
>   ath9k_eeprom_extract "caldata" 20480 2048
>   ath9k_patch_firmware_mac $(mtd_get_mac_binary caldata 12)
>   ;;
> + z1)
> + . /lib/upgrade/nand.sh
> +
> + if [ -n "$(nand_find_volume ubi0 caldata)" ]; then
> + ath9k_ubi_eeprom_extract "caldata" 86016 4096
> + else
> + ath9k_eeprom_extract "origcaldata" 86016 4096
> + fi
> + 

Re: [LEDE-DEV] merging the layerscape target

2016-09-27 Thread John Crispin
Hi,

i just tried V5 and when building the target with all packages selected
i run into some errors

make[5]: Entering directory
`/home/blogic/source/build_dir/target-aarch64_armv8-a_musl-1.1.15/linux-layerscape_64b/linux-4.4.21'
  CHK include/config/kernel.release
  CHK include/generated/uapi/linux/version.h
  CHK include/generated/utsrelease.h
  CHK include/generated/bounds.h
  CHK include/generated/timeconst.h
  CHK include/generated/asm-offsets.h
  CALLscripts/checksyscalls.sh
  CC [M]  drivers/usb/host/ehci-fsl.o
In file included from drivers/usb/host/ehci-fsl.c:39:0:
drivers/usb/host/ehci.h: In function 'ehci_readl':
drivers/usb/host/ehci.h:741:9: error: implicit declaration of function
'readl' [-Werror=implicit-function-declaration]
  return readl(regs);
 ^
drivers/usb/host/ehci.h: In function 'ehci_writel':
drivers/usb/host/ehci.h:768:3: error: implicit declaration of function
'writel' [-Werror=implicit-function-declaration]
   writel(val, regs);
   ^
drivers/usb/host/ehci-fsl.c: In function 'fsl_ehci_drv_probe':
drivers/usb/host/ehci-fsl.c:130:3: error: implicit declaration of
function 'clrsetbits_be32' [-Werror=implicit-function-declaration]
   clrsetbits_be32(hcd->regs + FSL_SOC_USB_CTRL,
   ^
drivers/usb/host/ehci-fsl.c: In function 'ehci_fsl_setup_phy':
drivers/usb/host/ehci-fsl.c:205:4: error: implicit declaration of
function 'clrbits32' [-Werror=implicit-function-declaration]
clrbits32(non_ehci + FSL_SOC_USB_CTRL,
^
drivers/usb/host/ehci-fsl.c:244:9: error: implicit declaration of
function 'in_be32' [-Werror=implicit-function-declaration]
   if (!(in_be32(non_ehci + FSL_SOC_USB_CTRL) & PHY_CLK_VALID)) {
 ^
drivers/usb/host/ehci-fsl.c: In function 'ehci_fsl_usb_setup':
drivers/usb/host/ehci-fsl.c:276:3: error: implicit declaration of
function 'out_be32' [-Werror=implicit-function-declaration]
   out_be32(non_ehci + FSL_SOC_USB_SNOOP1, 0x0 | SNOOP_SIZE_2GB);
   ^
drivers/usb/host/ehci-fsl.c:293:9: error: implicit declaration of
function 'mfspr' [-Werror=implicit-function-declaration]
   svr = mfspr(SPRN_SVR);
 ^
drivers/usb/host/ehci-fsl.c:293:15: error: 'SPRN_SVR' undeclared (first
use in this function)
   svr = mfspr(SPRN_SVR);
   ^
drivers/usb/host/ehci-fsl.c:293:15: note: each undeclared identifier is
reported only once for each function it appears in
cc1: some warnings being treated as errors

to reproduce this run menuconfig and then
Global build settings  --->
   [x] Select all target specific packages by default
   [x] Select all kernel module packages by default
   [x] Select all userspace packages by default

John



On 21/09/2016 16:21, Y.T. Jiang wrote:
> Hi Rafał and John,
> 
> I update the patch and pull a new requests(329), please check and review, 
> thanks!
> https://github.com/lede-project/source/pull/329
> 
> V5 patch update summary:
>  1.Copyrights assigned to myself.
>  2.Introduce DEVICE_TITLE and DEVICE_PACKAGES.
>  3.Rename patches prefix with 1xxx,2xxx...
>  4.Refresh patches by "make target/linux/refresh V=s"
>  5.Move default packages to DEFAULT_PACKAGES.
>  6.Optimize Build/mk_firmware.
> 
> Thanks & Best Regards
> Jiang Yutang
> 
>> -Original Message-
>> From: Lede-dev [mailto:lede-dev-boun...@lists.infradead.org] On Behalf Of
>> Y.T. Jiang
>> Sent: Tuesday, September 20, 2016 8:28 PM
>> To: Rafa? Mi?ecki
>> Cc: LEDE Development List; John Crispin
>> Subject: Re: [LEDE-DEV] merging the layerscape target
>>
>> Hi Rafał,
>>
>> Thank you for the detailed comment!
>>
>> Update status:
>> prefixed with ">"--done
>> Copyright--done
>> make target/linux/refresh V=s--done
>> Patches prefix with 1xxx,2xxx...refer target/linux/generic/PATCHES
>>  --done
>> usingDEVICE_TITLE DEVICE_PACKAGES...refer
>> target/linux/bcm53xx/image/Makefile  --ongoing
>>
>> After building and features validate, I will submit a new version patch.
>>
>>
>> Thanks & Best Regards
>> Jiang Yutang
>>
>>> -Original Message-
>>> From: Rafał Miłecki [mailto:zaj...@gmail.com]
>>> Sent: Monday, September 19, 2016 7:55 PM
>>> To: Y.T. Jiang
>>> Cc: John Crispin; LEDE Development List
>>> Subject: Re: [LEDE-DEV] merging the layerscape target
>>>
>>> On 19 September 2016 at 12:36, Y.T. Jiang  wrote:
 Thank you for your review and suggestion.
>>>
>>> Sure. One more note: please take a look at your mailer configuration.
>>> It should keep all quotes prefixed with "> " to keep discussion clear.
>>> https://en.wikipedia.org/wiki/Usenet_quoting
>>>
>>>
 -Original Message-
 From: Rafał Miłecki [mailto:zaj...@gmail.com]
 Sent: Monday, September 19, 2016 4:01 PM
 To: John Crispin
 Cc: LEDE Development List; Y.T. Jiang
 Subject: Re: [LEDE-DEV] merging the layerscape target

 On 18 September 2016 at 14:24, John Crispin  wrote:
> i have just spent some time