Re: [LEDE-DEV] [RFC] brcm47xx: bump kernel to 4.4

2016-11-23 Thread Rafał Miłecki
On 22 November 2016 at 18:36,   wrote:
>> On 25 October 2016 at 9:41, Rafał Miłecki  wrote:
>> Anyway I finally debugged this local vs. buildbot difference to the
>> CONFIG_KERNEL_KALLSYMS. Images from buildbot have this symbol enabled
>> which slightly increases kernel size. Enough to stop it from booting
>> on WRT300N v1.
>
> Yesterday, I had the serial console attached to a WRT54GL for other things I 
> had
> to do and tried buildbot's brcm47xx image for this device. It did not boot.
> So I'm again using my local builds without CONFIG_KERNEL_KALLSYMS
>
> Since some kind of release seems to be coming, I think we can't leave it in
> this state. Either disable the image generation for that device, or get the 
> image
> built without KALLSYMS. What do you think about this?

I think building OpenWrt releases without KALLSYMS was always the case
for brcm47xx / legacy or even all the targets. I expect to do the same
for LEDE.

-- 
Rafał

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


Re: [LEDE-DEV] replacing files in base system from a package?

2016-11-23 Thread J Mo


Please revert this patch. This obvious breaks legitimate use cases.



On 10/04/2016 12:59 AM, Russell Senior wrote:

Fwiw, I ran into trouble with things busybox provides by default, but
where I've add packages with fuller versions.  In my case it is
procps-ng from the packages feed.  In order to stop it complaining, I
need to de-select the conflicting busybox options.  What I've done
instead, locally, is just revert this commit:

   021b96d7c5c668fbcb5375c65cee90832bb2854f

Hopefully, nothing significant breaks as a result.



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


Re: [LEDE-DEV] QCA Dakota support

2016-11-23 Thread Christian Lamparter
Hi Christian,

On Wednesday, November 23, 2016 10:13:45 PM CET Christian Mehlis wrote:
> your current staging tree works for me, it generates an itb and a trx 
> file!
> I added some files to support the Compex board I own:
> https://github.com/mehlis/source/commits/compex-wpj428
> 
> Feel free to include some bits in your tree. I had to add dk04-c5 
> support, perhaps you know some other way?
> My commit is compile tested only.
I looked at it. But you need to consider what I previously wrote (in the
second to last mail?):

"the kernel devicetree maintainers frown upon "catch-all" compatible strings 
[0]."

This means that you have to replace all the generic "qcom,*ipq40xx*" with 
"qcom,*ipq4028*" in your dts and dtsi. Next, you have to add the bindings
to the kernel platform and driver code, so the device-tree will find the
driver for hardware definitions in your dtb. (Alternatively, you can
add the appropriate "qcom,*ipq4019*" binding)

> Please be more precise on the flashing steps. I would like to flash from 
> uboot. I never had a board running ubifs. QCA provides a img file, so 
> I'm a bit lost here.
I added an entry on how to boot the initramfs on the ASUS. And since that's
the only IPQ40XX device I have, I can only give "precise informations" for
it.

For the Asus RT-AC58U, it's very simple. During boot, you have this 1-2 Second
window to select the following option:

Please choose the operation: 
   1: Load System code to SDRAM via TFTP.
   2: Load System code then write to Flash via TFTP.
   3: Boot System code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.

And for the initramfs image. you just hit (1). It then continues to ask
about the IP, tftp server ip and tftp image name (obviously that's the
lede-ipq40xx-RT-AC58U-initramfs-fit-uImage.itb file in the tftp's server
directory). and that's it: it automatically boots.

Note: Currently, a working flash image is not implemented. But, you don't
need to flash the image in order to test it. The initramfs image is simply
loaded into the SDRAM and it boots from there. (The rootfs is part
of the initramfs image). Using initramfs is much better for development,
since you don't need to wait it to flash (The SPINAND is very slow and
also you'll burn through the NAND quite quickly)

Regards,
Christian

[0] 

BTW: If you have any questions, you can also find me on google hangouts
(with the same gmail). Note: If you have an "unusual mail/nick"* there,
just let me know beforehand via email as I tend to ignore unknown 
requests :-) )

* not something that resembles your name.

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


[LEDE-DEV] [PATCH] libnl-tiny: Remove GENL_ID_GENERATE

2016-11-23 Thread Florian Fainelli
This constant was always defined to 0, and recently got removed in
upstream commit a07ea4d9941af5a0c6f0be2a71b51ac9c083c5e5 ("genetlink: no
longer support using static family IDs")

Fixes libnl-tiny builds with latest upstream kernels.

Fixes: d723f2573af3 ("libnl-tiny: remove include/linux overrides to fix various 
build issues")
Signed-off-by: Florian Fainelli 
---
 package/libs/libnl-tiny/src/include/netlink/genl/family.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/libs/libnl-tiny/src/include/netlink/genl/family.h 
b/package/libs/libnl-tiny/src/include/netlink/genl/family.h
index b7cf48fb7804..8a1a38ba25d5 100644
--- a/package/libs/libnl-tiny/src/include/netlink/genl/family.h
+++ b/package/libs/libnl-tiny/src/include/netlink/genl/family.h
@@ -62,7 +62,7 @@ static inline unsigned int genl_family_get_id(struct 
genl_family *family)
if (family->ce_mask & FAMILY_ATTR_ID)
return family->gf_id;
else
-   return GENL_ID_GENERATE;
+   return 0;
 }
 
 static inline void genl_family_set_id(struct genl_family *family, unsigned int 
id)
-- 
2.9.3


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


[LEDE-DEV] [PATCH 1/2] build: find_md5: ignore non-existent files or directories

2016-11-23 Thread Yousong Zhou
Targets like malta can have no patches/ directory available and this
commit tries quash "no such file or directory" messages from `find`

Signed-off-by: Yousong Zhou 
---
 include/depends.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/depends.mk b/include/depends.mk
index 53e5b1e..7135e52 100644
--- a/include/depends.mk
+++ b/include/depends.mk
@@ -13,7 +13,7 @@
 
 DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" 
-x "*/.*_check" -x "*/.*.swp"
 
-find_md5=$(SH_FUNC) find $(1) -type f $(patsubst -x,-and -not 
-path,$(DEP_FINDPARAMS) $(2)) | md5s
+find_md5=$(SH_FUNC) find $(wildcard $(1)) -type f $(patsubst -x,-and -not 
-path,$(DEP_FINDPARAMS) $(2)) | md5s
 
 define rdep
   .PRECIOUS: $(2)
-- 
2.6.4


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


[LEDE-DEV] [PATCH 2/2] target: sunxi: enable builtin crypto-hw module sun4i-ss

2016-11-23 Thread Yousong Zhou
CONFIG_CRYPTO_DEV_SUN4I_SS was previously set to y but did not take
effect because of the absence of CONFIG_CRYPTO_HW=y

Signed-off-by: Yousong Zhou 
---
 target/linux/sunxi/config-4.4 | 5 +
 1 file changed, 5 insertions(+)

diff --git a/target/linux/sunxi/config-4.4 b/target/linux/sunxi/config-4.4
index b0a651a..6d5c904 100644
--- a/target/linux/sunxi/config-4.4
+++ b/target/linux/sunxi/config-4.4
@@ -112,9 +112,14 @@ CONFIG_CRC16=y
 CONFIG_CRC_T10DIF=y
 CONFIG_CRYPTO_CRC32C=y
 CONFIG_CRYPTO_CRCT10DIF=y
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_DEV_SUN4I_SS=y
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_HW=y
+CONFIG_CRYPTO_MD5=y
 CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_SHA1=y
 CONFIG_CRYPTO_WORKQUEUE=y
 CONFIG_DCACHE_WORD_ACCESS=y
 CONFIG_DEBUG_BUGVERBOSE=y
-- 
2.6.4


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


Re: [LEDE-DEV] Project proposal: The GNUnet of autonomous Things

2016-11-23 Thread carlo von lynX
On Fri, Nov 18, 2016 at 01:30:37PM +0100, Hauke Mehrtens wrote:
> This sounds interesting.

Yes, Daniel.. keep up that good work you are doing!

> 3. What would be the difference to for example IoTvity, openHAB and
> other existing solutions?

Haven't seen an answer from Daniel and maybe you find
this "answer" from our website interesting anyhow. Our
project is called secushare. We design a distributed
social network on top of GNUnet and see IoT as one of
its potential applications:

IT-Security and the Distributed Social Graph

We currently accept that all Internet appliances need to listen for 
traffic on certain ports, interact using certain protocols and may have code 
vulnerabilities welcoming an attacker to gain control. But why on Earth should 
my printer accept connections from anywhere on the planet if only me and my 
colleagues are supposed to print on it?

The distributed private social graph can be the next generation of 
firewall logic: only the cryptographic keys that my secushare instance gave to 
the printer are enabled to talk to the printer. Other network traffic doesn't 
even get close to it. People who need access are cryptographically 
authenticated without a hassle, because the social graph already provides for 
all the necessary information.

No reason for traditional firewall technology to take wild guesses on 
which traffic may be legitimate to let through. With the social graph in place 
the firewall simply lets traffic of known people pass and blocks strangers.

Who wants an insecure Internet of Things?

No reason for the Internet of Things to be remote controlled from a 
website in the cloud. Like a bluetooth device they could learn the 
cryptographic identity of their owner at the press of a button, and from there, 
be controllable and configurable to offer services to the entire family or 
company staff.

secushare makes people the gatekeepers to their technology. It turns 
them into real owners of the devices they bought.

It's that simple, and it could spell a revolution for the entire 
information technology security business. Maybe IT security will never be the 
same after the introduction of pervasive cryptographic authentication and the 
availability of a distributed social graph. Did we mention that pervasive 
social authentication also removes the need for passwords? Passwords are among 
the biggest vulnerabilities in IT security.

You can find more on the topic at
http://secushare.cheettyiapsyciew.onion
or http://secushare.org
if you can afford to browse the net naked.


-- 
  E-mail is public! Talk to me in private using encryption:
 http://loupsycedyglgamf.onion/LynX/
  irc://loupsycedyglgamf.onion:67/lynX
 https://psyced.org:34443/LynX/

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


Re: [LEDE-DEV] Project proposal: The GNUnet of autonomous Things

2016-11-23 Thread Daniel Golle
Hi Hauke,

On Fri, Nov 18, 2016 at 01:30:37PM +0100, Hauke Mehrtens wrote:
> Hi Daniel,
> 
> This sounds interesting.
> 
> I have some questions regarding phase 1.
> 
> 1. Do you want to have an API to switch for example a smart plug on and
> off and an other call to get the temperature from a temperature sensor?

I want to have a service sitting on ubus for both, low-bandwidth read
and write operations (ie. sensors and actors)

> 
> 2. Should this more focus on local IoT sensors line a temperature sensor
> connected via I2C or more on remote sensors like a smart plug connected
> via ZigBee?

I think both would be cool. I'd start with local stuff (I2C, GPIO) as
that's what I got most experience with. However, the plugin API should
allow to write bindings for 

> 
> 3. What would be the difference to for example IoTvity, openHAB and
> other existing solutions?

It's going to be vendor-neutral, tiny and integrates well with other
stuff we already got on OpenWrt/LEDE (ie. it uses libubox, ubus, ...).
I'm going to write the service in C and expect the core to be only a
few dozens kilobytes in (binary) size.

> 
> It would also be nice to have better 6LoWPAN integration in LEDE /
> OpenWrt to make it easy to configure 6LoWPAN on top of ZigBee or BLE and
> then route the IP traffic to the local network or the Internet like a
> normal network interface in LEDE. This is probably unrelated to your
> proposal.

I'm not really the biggest friend of the idea to have every
microcontroller exposed on the IPv6 ARPA internet, however, if well
firewalled and isolated from the rest of the world, it could still be
more interoperable to have IP rather than using media-specific sockets
for the hub and devices to communicate.


Cheers


Daniel


> 
> Hauke
> 
> On 11/17/2016 12:39 PM, Daniel Golle wrote:
> > Hi!
> > 
> > I want to suggest a project to be (partially) funded by prpl's OpenWrt
> > project grant.
> > 
> > Abstract:
> > Implement a secure autotonomous IoT hub using OpenWrt/LEDE's ubus
> > service and the GNUnet P2P framework.
> > 
> > Introduction:
> > Despite the ongoing hype about the so-called Internet of Things, the
> > current practise is rather chaotic and severe structural flaws of IoT
> > devices became a common occurance, including easy-to-remote-exploit
> > vulnerabilities and brain-dead mistakes such as a hard-coded DNS server
> > address rendering thousands of IoT connected devices unusable now that
> > the server is no longer being operated.
> > Given the continous history of quite predictable security and
> > privacy-related catastrophies in the still quite infantile IoT-sphere,
> > taking a step back, a radical shift of praradigms, away from the
> > patterns of Web/Cloud-based infrastrucure will help providing a much
> > more secure and reliable user experience and thereby increase trust in
> > future networked applications.
> > 
> > Recent examples of typical problems related to the missing security
> > model and centralized control servers:
> > http://metropolitan.fi/entry/ddos-attack-halts-heating-in-finland-amidst-winter
> > 
> > Or hard-coded server addresses:
> > http://www.out-law.com/en/articles/2016/october/singapore-telco-visits-customers-homes-to-secure-devices-after-cyberattack/
> > 
> > Or missing security by default:
> > http://www.bbc.com/news/technology-37750798
> > 
> > From a coders point of view, the lack of a vendor-neutral abstraction
> > of low-bandwidth peripherals makes it hard to develop general purpose
> > applications which do not depend on a specific hardware or middleware.
> > 
> > This projects suggest a from bottom-to-top redesign addressing the
> > diversity of components and local access methods (ranging from
> > in-kernel-only drivers to almost pure userland implementations),
> > connectivity (NAT traversal, discovery, ...) as well as security and
> > privacy-related concerns. As a first measure, a generic integration of
> > low-bandwidth peripherals such as simple sensors and actors using the
> > OpenWrt/LEDE core infrastructure will provide a great improvement to
> > access and manage local IoT features. This may then be used by
> > various higher level applications, such as data-logging/monitoring,
> > WebUI or machine-to-machine communication.
> > 
> > As dependence on centralized services providing remote access has
> > shown to be problematic in terms of security and privacy as well as
> > reliability, direct connectivity or application-agnostic indirect
> > routing using well-known P2P techniques can bring about more
> > interoperatibility and sustainability. GNUnet provides (among with
> > many other things) a modular toolkit for P2P, ranging from a
> > NAT-aware multi-transport, cryptographically addressed general purpose
> > overlay network to pub/sub, filesharing and real-time conversation
> > services. In a second phase of the project, this core infrastructure
> > is going to be used to provide secure, reliable and privacy-aware
> > remote access to IoT 

[LEDE-DEV] [PATCH 0/6] LEDE as KVM host

2016-11-23 Thread Yousong Zhou
This series tries to make KVM support available for x86 and sunxi target.
Together with qemu softmmu emulators provided by pr at [1], now it's possible
to run KVM virtual machines on LEDE.

This series has been runtested on a x86_64 server machine and cubieboard2
single board pc.  Interesting that I have nevered owned a box that is capable
of running KVM before ;)

 [1] qemu: packaging target {x86_64,arm,mips}-softmmu and friends,
 https://github.com/openwrt/packages/pull/3550

Yousong Zhou (6):
  build: scan.mk: remove not used variable SCAN_STAMP
  toolchain: gcc: disable ifunc on *-musl by default
  package: add kernel packages for kvm virtualization
  target: sunxi: enable kvm support
  package: kernel: add module crypto-hw-sunxi
  target: sunxi: add kmod-crypto-hw-sunxi as a default pacakge

 include/scan.mk|   4 +-
 package/kernel/linux/modules/crypto.mk |  17 
 package/kernel/linux/modules/virt.mk   | 105 +
 target/linux/sunxi/Makefile|   2 +-
 target/linux/sunxi/config-4.4  |  64 +
 .../5.4.0/280-musl-disable-ifunc-by-default.patch  |  38 
 .../6.2.0/280-musl-disable-ifunc-by-default.patch  |  38 
 7 files changed, 249 insertions(+), 19 deletions(-)
 create mode 100644 package/kernel/linux/modules/virt.mk
 create mode 100644 
toolchain/gcc/patches/5.4.0/280-musl-disable-ifunc-by-default.patch
 create mode 100644 
toolchain/gcc/patches/6.2.0/280-musl-disable-ifunc-by-default.patch

-- 
2.6.4


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


[LEDE-DEV] [PATCH 4/6] target: sunxi: enable kvm support

2016-11-23 Thread Yousong Zhou
Unlike x86, kvm for arm has to be built into the kernel.  The kernel
config was prepared with the following command

make kernel_menuconfig CONFIG_TARGET=platform

Then enable ARM_LPAE, VIRTUALIZATION, KVM in that order

Other config changes are done by the build system.  The following text
tries to explain some of them, for archive purposes probably...

 - BUILD_BIN2C.  It was dropped probably because the prompt is empty and
   no other config option selects it.  bin2c is a host executable for
   converting binary content to a piece of c code for inclusion
 - CRYPTO_DEV_SUN4I_SS.  It was dropped because the dependency CRYPTO_HW
   was not enabled.  Setting that aside, packaging it as a loadbable
   module in lieu of other sunxi specific modules seems more appropriate
 - PGTABLE_LEVELS.  It was changed from 2 to 3 because 3 is the default
   when ARM_LPAE is enabled
 - HAVE_KERNEL_GZIP, etc..  These are enabled in generic config
 - SCHED_INFO, ZLIB_INFLATE.  These were dropped probably for the same
   reason as for BUILD_BIN2C

Signed-off-by: Yousong Zhou 
---
 target/linux/sunxi/config-4.4 | 64 ---
 1 file changed, 48 insertions(+), 16 deletions(-)

diff --git a/target/linux/sunxi/config-4.4 b/target/linux/sunxi/config-4.4
index b05446c..b0a651a 100644
--- a/target/linux/sunxi/config-4.4
+++ b/target/linux/sunxi/config-4.4
@@ -2,6 +2,7 @@ CONFIG_ADVISE_SYSCALLS=y
 # CONFIG_AHCI_SUNXI is not set
 CONFIG_ALIGNMENT_TRAP=y
 # CONFIG_APM_EMULATION is not set
+# CONFIG_ARCH_AXXIA is not set
 CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
 CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
 CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
@@ -9,18 +10,21 @@ CONFIG_ARCH_HAS_RESET_CONTROLLER=y
 CONFIG_ARCH_HAS_SG_CHAIN=y
 CONFIG_ARCH_HAS_TICK_BROADCAST=y
 CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
 CONFIG_ARCH_MULTIPLATFORM=y
 # CONFIG_ARCH_MULTI_CPU_AUTO is not set
 CONFIG_ARCH_MULTI_V6_V7=y
 CONFIG_ARCH_MULTI_V7=y
 CONFIG_ARCH_NR_GPIO=416
+CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
 CONFIG_ARCH_REQUIRE_GPIOLIB=y
 # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
 # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
 CONFIG_ARCH_SUNXI=y
 CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
 CONFIG_ARCH_SUPPORTS_UPROBES=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARCH_USE_BUILTIN_BSWAP=y
 CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
 CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
@@ -40,7 +44,7 @@ CONFIG_ARM_HAS_SG_CHAIN=y
 CONFIG_ARM_HEAVY_MB=y
 CONFIG_ARM_L1_CACHE_SHIFT=6
 CONFIG_ARM_L1_CACHE_SHIFT_6=y
-# CONFIG_ARM_LPAE is not set
+CONFIG_ARM_LPAE=y
 CONFIG_ARM_PATCH_PHYS_VIRT=y
 CONFIG_ARM_PMU=y
 CONFIG_ARM_PSCI=y
@@ -57,18 +61,12 @@ CONFIG_AUDIT=y
 CONFIG_AUDIT_GENERIC=y
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_AXP20X_POWER=y
-CONFIG_SWCONFIG_B53=y
-# CONFIG_SWCONFIG_B53_MMAP_DRIVER is not set
-CONFIG_SWCONFIG_B53_PHY_DRIVER=y
-CONFIG_SWCONFIG_B53_PHY_FIXUP=y
-# CONFIG_SWCONFIG_B53_SRAB_DRIVER is not set
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_BACKLIGHT_PWM=y
 CONFIG_BINFMT_MISC=y
 CONFIG_BOUNCE=y
 # CONFIG_BPF_SYSCALL is not set
-CONFIG_BUILD_BIN2C=y
 CONFIG_CACHE_L2X0=y
 CONFIG_CAN=y
 CONFIG_CLKDEV_LOOKUP=y
@@ -114,7 +112,6 @@ CONFIG_CRC16=y
 CONFIG_CRC_T10DIF=y
 CONFIG_CRYPTO_CRC32C=y
 CONFIG_CRYPTO_CRCT10DIF=y
-CONFIG_CRYPTO_DEV_SUN4I_SS=y
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
 CONFIG_CRYPTO_RNG2=y
@@ -205,6 +202,7 @@ CONFIG_HAVE_ARCH_KGDB=y
 CONFIG_HAVE_ARCH_PFN_VALID=y
 CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
 CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
 CONFIG_HAVE_ARM_ARCH_TIMER=y
 # CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
 CONFIG_HAVE_BPF_JIT=y
@@ -223,13 +221,13 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
 CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
 CONFIG_HAVE_FUNCTION_TRACER=y
 CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_HAVE_GENERIC_RCU_GUP=y
 CONFIG_HAVE_HW_BREAKPOINT=y
 CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
-CONFIG_HAVE_KERNEL_GZIP=y
-CONFIG_HAVE_KERNEL_LZ4=y
-CONFIG_HAVE_KERNEL_LZMA=y
-CONFIG_HAVE_KERNEL_LZO=y
-CONFIG_HAVE_KERNEL_XZ=y
+CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL=y
+CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y
+CONFIG_HAVE_KVM_EVENTFD=y
+CONFIG_HAVE_KVM_IRQFD=y
 CONFIG_HAVE_MEMBLOCK=y
 CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
 CONFIG_HAVE_NET_DSA=y
@@ -239,6 +237,7 @@ CONFIG_HAVE_PERF_EVENTS=y
 CONFIG_HAVE_PERF_REGS=y
 CONFIG_HAVE_PERF_USER_STACK_DUMP=y
 CONFIG_HAVE_PROC_CPU=y
+CONFIG_HAVE_RCU_TABLE_FREE=y
 CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
 CONFIG_HAVE_SMP=y
 CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
@@ -247,6 +246,7 @@ CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
 CONFIG_HIGHMEM=y
 CONFIG_HIGHPTE=y
 CONFIG_HOTPLUG_CPU=y
+# CONFIG_HUGETLBFS is not set
 CONFIG_HWMON=y
 CONFIG_HW_CONSOLE=y
 CONFIG_HW_RANDOM=y
@@ -280,6 +280,11 @@ CONFIG_KALLSYMS=y
 # CONFIG_KERNEL_MODE_NEON is not set
 CONFIG_KEYBOARD_SUN4I_LRADC=y
 CONFIG_KSM=y
+CONFIG_KVM=y
+CONFIG_KVM_ARM_HOST=y
+CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
+CONFIG_KVM_MMIO=y
+CONFIG_KVM_VFIO=y
 

[LEDE-DEV] [PATCH 2/6] toolchain: gcc: disable ifunc on *-musl by default

2016-11-23 Thread Yousong Zhou
Otherwise the built binaries may fail with

Error relocating /usr/bin/qemu-system-x86_64: unsupported relocation type 37

Signed-off-by: Yousong Zhou 
---
 .../5.4.0/280-musl-disable-ifunc-by-default.patch  | 38 ++
 .../6.2.0/280-musl-disable-ifunc-by-default.patch  | 38 ++
 2 files changed, 76 insertions(+)
 create mode 100644 
toolchain/gcc/patches/5.4.0/280-musl-disable-ifunc-by-default.patch
 create mode 100644 
toolchain/gcc/patches/6.2.0/280-musl-disable-ifunc-by-default.patch

diff --git 
a/toolchain/gcc/patches/5.4.0/280-musl-disable-ifunc-by-default.patch 
b/toolchain/gcc/patches/5.4.0/280-musl-disable-ifunc-by-default.patch
new file mode 100644
index 000..af5acf8
--- /dev/null
+++ b/toolchain/gcc/patches/5.4.0/280-musl-disable-ifunc-by-default.patch
@@ -0,0 +1,38 @@
+From 450fb05e2a7510d37744f044009f8237d902f65c Mon Sep 17 00:00:00 2001
+From: nsz 
+Date: Tue, 30 Aug 2016 10:26:22 +
+Subject: [PATCH] disable ifunc on *-musl by default
+
+gcc/
+   * config.gcc (*-*-*musl*): Disable gnu-indirect-function.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239859 
138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog  | 4 
+ gcc/config.gcc | 4 ++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 8827dc8..e544d76 100644
+--- a/gcc/config.gcc
 b/gcc/config.gcc
+@@ -1465,7 +1465,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | 
i[34567]86-*-gnu* | i[34567]8
+   extra_options="${extra_options} linux-android.opt"
+   # Assume modern glibc if not targeting Android nor uclibc.
+   case ${target} in
+-  *-*-*android*|*-*-*uclibc*)
++  *-*-*android*|*-*-*uclibc*|*-*-*musl*)
+ ;;
+   *)
+ default_gnu_indirect_function=yes
+@@ -1531,7 +1531,7 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu)
+   extra_options="${extra_options} linux-android.opt"
+   # Assume modern glibc if not targeting Android nor uclibc.
+   case ${target} in
+-  *-*-*android*|*-*-*uclibc*)
++  *-*-*android*|*-*-*uclibc*|*-*-*musl*)
+ ;;
+   *)
+ default_gnu_indirect_function=yes
diff --git 
a/toolchain/gcc/patches/6.2.0/280-musl-disable-ifunc-by-default.patch 
b/toolchain/gcc/patches/6.2.0/280-musl-disable-ifunc-by-default.patch
new file mode 100644
index 000..af5acf8
--- /dev/null
+++ b/toolchain/gcc/patches/6.2.0/280-musl-disable-ifunc-by-default.patch
@@ -0,0 +1,38 @@
+From 450fb05e2a7510d37744f044009f8237d902f65c Mon Sep 17 00:00:00 2001
+From: nsz 
+Date: Tue, 30 Aug 2016 10:26:22 +
+Subject: [PATCH] disable ifunc on *-musl by default
+
+gcc/
+   * config.gcc (*-*-*musl*): Disable gnu-indirect-function.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239859 
138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog  | 4 
+ gcc/config.gcc | 4 ++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 8827dc8..e544d76 100644
+--- a/gcc/config.gcc
 b/gcc/config.gcc
+@@ -1465,7 +1465,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | 
i[34567]86-*-gnu* | i[34567]8
+   extra_options="${extra_options} linux-android.opt"
+   # Assume modern glibc if not targeting Android nor uclibc.
+   case ${target} in
+-  *-*-*android*|*-*-*uclibc*)
++  *-*-*android*|*-*-*uclibc*|*-*-*musl*)
+ ;;
+   *)
+ default_gnu_indirect_function=yes
+@@ -1531,7 +1531,7 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu)
+   extra_options="${extra_options} linux-android.opt"
+   # Assume modern glibc if not targeting Android nor uclibc.
+   case ${target} in
+-  *-*-*android*|*-*-*uclibc*)
++  *-*-*android*|*-*-*uclibc*|*-*-*musl*)
+ ;;
+   *)
+ default_gnu_indirect_function=yes
-- 
2.6.4


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


[LEDE-DEV] [PATCH 6/6] target: sunxi: add kmod-crypto-hw-sunxi as a default pacakge

2016-11-23 Thread Yousong Zhou
It was previously selected as builtin module in kernel config.

Signed-off-by: Yousong Zhou 
---
 target/linux/sunxi/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/sunxi/Makefile b/target/linux/sunxi/Makefile
index cca3a14..b2ffcd8 100644
--- a/target/linux/sunxi/Makefile
+++ b/target/linux/sunxi/Makefile
@@ -27,6 +27,6 @@ KERNELNAME:=zImage dtbs
 
 include $(INCLUDE_DIR)/target.mk
 
-DEFAULT_PACKAGES += uboot-envtools kmod-eeprom-sunxi kmod-wdt-sunxi
+DEFAULT_PACKAGES += uboot-envtools kmod-eeprom-sunxi kmod-wdt-sunxi 
kmod-crypto-hw-sunxi
 
 $(eval $(call BuildTarget))
-- 
2.6.4


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


[LEDE-DEV] [PATCH 3/6] package: add kernel packages for kvm virtualization

2016-11-23 Thread Yousong Zhou
Signed-off-by: Yousong Zhou 
---
 package/kernel/linux/modules/virt.mk | 105 +++
 1 file changed, 105 insertions(+)
 create mode 100644 package/kernel/linux/modules/virt.mk

diff --git a/package/kernel/linux/modules/virt.mk 
b/package/kernel/linux/modules/virt.mk
new file mode 100644
index 000..e98c65a
--- /dev/null
+++ b/package/kernel/linux/modules/virt.mk
@@ -0,0 +1,105 @@
+#
+# Copyright (C) 2016 Yousong Zhou 
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+define KernelPackage/vhost_net
+  SUBMENU:=Virtualization
+  TITLE:=Host kernel accelerator for virtio net
+  DEPENDS:=
+  KCONFIG:=CONFIG_VHOST_NET
+  FILES:= $(LINUX_DIR)/drivers/vhost/vhost_net.ko
+  AUTOLOAD:=$(call AutoProbe,vhost_net.ko)
+endef
+
+define KernelPackage/vhost_net/description
+  This kernel module can be loaded in host kernel to accelerate
+  guest networking with virtio_net. Not to be confused with virtio_net
+  module itself which needs to be loaded in guest kernel.
+endef
+
+$(eval $(call KernelPackage,vhost_net))
+
+
+define KernelPackage/irqbypass
+  SUBMENU:=Virtualization
+  TITLE:=IRQ offload/bypass manager
+  KCONFIG:=CONFIG_IRQ_BYPASS_MANAGER
+  FILES:= $(LINUX_DIR)/virt/lib/irqbypass.ko
+  AUTOLOAD:=$(call AutoProbe,irqbypass.ko)
+endef
+
+define KernelPackage/irqbypass/description
+  Various virtualization hardware acceleration techniques allow bypassing or
+  offloading interrupts received from devices around the host kernel.  Posted
+  Interrupts on Intel VT-d systems can allow interrupts to be received
+  directly by a virtual machine.  ARM IRQ Forwarding allows forwarded physical
+  interrupts to be directly deactivated by the guest.  This manager allows
+  interrupt producers and consumers to find each other to enable this sort of
+  bypass.
+endef
+
+$(eval $(call KernelPackage,irqbypass))
+
+
+define KernelPackage/kvm-x86
+  SUBMENU:=Virtualization
+  TITLE:=Kernel-based Virtual Machine (KVM) support
+  DEPENDS:=@TARGET_x86 +kmod-irqbypass
+  KCONFIG:=\
+ CONFIG_VIRTUALIZATION=y \
+ CONFIG_KVM \
+ CONFIG_VHOST_NET=n \
+ CONFIG_VHOST_CROSS_ENDIAN_LEGACY=n \
+ CONFIG_TASK_XACCT=n \
+
+  FILES:= $(LINUX_DIR)/arch/$(LINUX_KARCH)/kvm/kvm.ko
+  AUTOLOAD:=$(call AutoProbe,kvm.ko)
+endef
+
+define KernelPackage/kvm-x86/description
+  Support hosting fully virtualized guest machines using hardware
+  virtualization extensions.  You will need a fairly recent
+  processor equipped with virtualization extensions. You will also
+  need to select one or more of the processor modules.
+
+  This module provides access to the hardware capabilities through
+  a character device node named /dev/kvm.
+endef
+
+$(eval $(call KernelPackage,kvm-x86))
+
+
+define KernelPackage/kvm-intel
+  SUBMENU:=Virtualization
+  TITLE:=KVM for Intel processors support
+  DEPENDS:=@TARGET_x86 +kmod-kvm-x86
+  KCONFIG:=CONFIG_KVM_INTEL CONFIG_KVM_AMD=n
+  FILES:= $(LINUX_DIR)/arch/$(LINUX_KARCH)/kvm/kvm-intel.ko
+  AUTOLOAD:=$(call AutoProbe,kvm-intel.ko)
+endef
+
+define KernelPackage/kvm-intel/description
+  Provides support for KVM on Intel processors equipped with the VT
+  extensions.
+endef
+
+$(eval $(call KernelPackage,kvm-intel))
+
+
+define KernelPackage/kvm-amd
+  SUBMENU:=Virtualization
+  TITLE:=KVM for AMD processors support
+  DEPENDS:=@TARGET_x86 +kmod-kvm-x86
+  KCONFIG:=CONFIG_KVM_INTEL=n CONFIG_KVM_AMD
+  FILES:= $(LINUX_DIR)/arch/$(LINUX_KARCH)/kvm/kvm-amd.ko
+  AUTOLOAD:=$(call AutoProbe,kvm-amd.ko)
+endef
+
+define KernelPackage/kvm-amd/description
+  Provides support for KVM on AMD processors equipped with the AMD-V
+  (SVM) extensions.
+endef
+
+$(eval $(call KernelPackage,kvm-amd))
-- 
2.6.4


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


[LEDE-DEV] [PATCH 1/6] build: scan.mk: remove not used variable SCAN_STAMP

2016-11-23 Thread Yousong Zhou
It was left behind since rewrite of metadata scanning done with commit
bdc9419 in July 2007

Signed-off-by: Yousong Zhou 
---
 include/scan.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/scan.mk b/include/scan.mk
index 5bb263d..e6bc068 100644
--- a/include/scan.mk
+++ b/include/scan.mk
@@ -28,7 +28,7 @@ endef
 
 define PackageDir
   $(TMP_DIR)/.$(SCAN_TARGET): $(TMP_DIR)/info/.$(SCAN_TARGET)-$(1)
-  $(TMP_DIR)/info/.$(SCAN_TARGET)-$(1): $(SCAN_DIR)/$(2)/Makefile 
$(SCAN_STAMP) $(foreach DEP,$(DEPS_$(SCAN_DIR)/$(2)/Makefile) 
$(SCAN_DEPS),$(wildcard $(if $(filter 
/%,$(DEP)),$(DEP),$(SCAN_DIR)/$(2)/$(DEP
+  $(TMP_DIR)/info/.$(SCAN_TARGET)-$(1): $(SCAN_DIR)/$(2)/Makefile $(foreach 
DEP,$(DEPS_$(SCAN_DIR)/$(2)/Makefile) $(SCAN_DEPS),$(wildcard $(if $(filter 
/%,$(DEP)),$(DEP),$(SCAN_DIR)/$(2)/$(DEP
{ \
$$(call progress,Collecting $(SCAN_NAME) info: 
$(SCAN_DIR)/$(2)) \
echo Source-Makefile: $(SCAN_DIR)/$(2)/Makefile; \
@@ -93,7 +93,7 @@ $(TARGET_STAMP)::
} \
)
 
-$(TMP_DIR)/.$(SCAN_TARGET): $(TARGET_STAMP) $(SCAN_STAMP)
+$(TMP_DIR)/.$(SCAN_TARGET): $(TARGET_STAMP)
$(call progress,Collecting $(SCAN_NAME) info: merging...)
-cat $(FILELIST) | awk '{gsub(/\//, "_", $$0);print 
"$(TMP_DIR)/info/.$(SCAN_TARGET)-" $$0}' | xargs cat > $@ 2>/dev/null
$(call progress,Collecting $(SCAN_NAME) info: done)
-- 
2.6.4


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


[LEDE-DEV] [PATCH] apm821xx: make it possible to update the dtb partition on the WNDR4700

2016-11-23 Thread Christian Lamparter
Currently, the device-tree partition is marked as read-only.
Hence, userspace tools like mtd can't write into the partition.
This however will be necessary in case the DTB needs to be
updated.

This patch also adds the kernel.dtb image, so the compiled
DTB is exported as a file and available in the binary
directory along the firmware images.

Note: the u-boot does expects the dtb to be a uimage.

To update the dtb manually:
 1. copy the generated dtb to the router.
 2. mtd erase /dev/mtd2
 3. mtd write wndr4700.dtb /dev/mtd2

Signed-off-by: Christian Lamparter 
---
 target/linux/apm821xx/dts/wndr4700.dts |  1 -
 target/linux/apm821xx/image/Makefile   | 11 ++-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/apm821xx/dts/wndr4700.dts 
b/target/linux/apm821xx/dts/wndr4700.dts
index e0fb4e3..d1a65f3 100644
--- a/target/linux/apm821xx/dts/wndr4700.dts
+++ b/target/linux/apm821xx/dts/wndr4700.dts
@@ -171,7 +171,6 @@
partition0,2@0x0018 {
label = "device-tree";
reg = <0x0018 0x0002>;
-   read-only;
};
 
partition0,3@0x001a {
diff --git a/target/linux/apm821xx/image/Makefile 
b/target/linux/apm821xx/image/Makefile
index 48eef64..0ee9cdc 100644
--- a/target/linux/apm821xx/image/Makefile
+++ b/target/linux/apm821xx/image/Makefile
@@ -22,6 +22,10 @@ define Build/dtb
$(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb,,--space 
$(DTB_SIZE))
 endef
 
+define Build/export-dtb
+   cp $(IMAGE_KERNEL).dtb $@
+endef
+
 ifeq ($(SUBTARGET),nand)
 
 define Image/cpiogz
@@ -186,13 +190,14 @@ define Device/WNDR4700
   BLOCKSIZE := 128k
   DTB_SIZE := 131008
   IMAGE_SIZE := 24960k
-  IMAGES := factory.img sysupgrade.tar
+  IMAGES := factory.img sysupgrade.tar kernel.dtb
   KERNEL_SIZE := 1920k
   KERNEL := dtb | kernel-bin | lzma | uImage lzma | pad-offset $$(BLOCKSIZE) 
64 | append-fakerootfs
   KERNEL_INITRAMFS := kernel-bin | gzip | dtb | wndr4700-specialImage gzip
   IMAGE/factory.img := create-uImage-dtb | append-kernel | pad-to 2M | 
append-ubi | \
   netgear-dni | check-size (IMAGE_SIZE)
   IMAGE/sysupgrade.tar := sysupgrade-tar
+  IMAGE/kernel.dtb := export-dtb | uImage none
   NETGEAR_BOARD_ID := WNDR4700
   NETGEAR_HW_ID := 29763875+128+256
   UBINIZE_OPTS := -E 5
@@ -230,10 +235,6 @@ define Build/hdd-img
$(if $(CONFIG_TARGET_IMAGES_GZIP),gzip -9n -c $@ > $(BIN_DIR)/$(notdir 
$@).gz)
 endef
 
-define Build/export-dtb
-   cp $(IMAGE_KERNEL).dtb $@
-endef
-
 define Device/MyBookLiveDefault
   IMAGE_SIZE := 48m
   BLOCKSIZE := 1k
-- 
2.10.2


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


[LEDE-DEV] [PATCH 5/6] package: kernel: add module crypto-hw-sunxi

2016-11-23 Thread Yousong Zhou
Signed-off-by: Yousong Zhou 
---
 package/kernel/linux/modules/crypto.mk | 17 +
 1 file changed, 17 insertions(+)

diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk
index 0a88c3b..a351609 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -314,6 +314,23 @@ endef
 $(eval $(call KernelPackage,crypto-hw-omap))
 
 
+define KernelPackage/crypto-hw-sunxi
+  TITLE:=Support for Allwinner Security System cryptographic accelerator
+  KCONFIG:= @TARGET_sunxi \
+   CONFIG_CRYPTO_HW=y \
+   CONFIG_CRYPTO_DEV_SUN4I_SS
+  FILES:=$(LINUX_DIR)/drivers/crypto/sunxi-ss/sun4i-ss.ko
+  AUTOLOAD:=$(call AutoLoad,65,crypto-hw-sunxi)
+  $(call AddDepends/crypto,+kmod-crypto-des)
+endef
+
+define KernelPackage/crypto-hw-sunxi/description
+  Kernel support for AllWinner built-in SoC audio
+endef
+
+$(eval $(call KernelPackage,crypto-hw-sunxi))
+
+
 define KernelPackage/crypto-authenc
   TITLE:=Combined mode wrapper for IPsec
   DEPENDS:=+kmod-crypto-manager +LINUX_4_4:kmod-crypto-null
-- 
2.6.4


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


[LEDE-DEV] enabling 3G interface in DLink DWR-512

2016-11-23 Thread Giuseppe Lippolis
Dear All,
my preliminary board porting for the dwr-512 has been accepted in the
mainstream.
The dwr-512 have an embedded pcie 3G modem (see
https://wiki.openwrt.org/inbox/d-link/d-link_dwr-512_b )

Currently all the kernel module and package needed to enable the connection
are embedded in the image.

But in order to start-up the 3G interface the following modification need to
be manually added:

in config/network:
config interface 'wan3g'
option proto3g  
option service  'umts'  
option 'device' '/dev/ttyUSB0'  
option apn  'web.vodafone.de'
option pincode  ''

in config/firewall:
config zone
option name wan
list   network  'wan'
+   list   network  'wan3g'
list   network  'wan6'
option inputREJECT
option output   ACCEPT
option forward  REJECT
option masq 1
option mtu_fix  1

in /etc/gcom/setpin.gcom adding (before to set the pin) :
send "AT+CFUN=1^m"
 waitfor 20 "OK","ERR"

and manually send the following command:
echo '2001 7d04 ff' > /sys/bus/usb-serial/drivers/option1/new_id

and finally if-up wan3g

Is clear that at the end is responsibility of the user set the  apn and the
pincode in config/network, but how I would like to "prepare" the 3G setup,
keeping disabled the wan3g interface (option enabled 0), but adding all the
described step in the image.

Therefore, currently, my question is how shall I modify (as described) the
config/network and config/firewall file?
And where to put the "echo '2001 7d04 ff' >
/sys/bus/usb-serial/drivers/option1/new_id" command to attach the driver to
the modem?

Thanks.




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


[LEDE-DEV] [PATCH] firmware-utils: Fix build failure in mkmerakifw.c FS#298

2016-11-23 Thread Florian Fainelli
Earlier compilers such as GCC 4 do not like anynomous unions, make it a named
union "u", and update the code where relevant.

Fixes FS#298
Fixes: a72e1692b8b3 ("firmware-utils: Add support for the Cisco Meraki 
MX60/MX60W")
Signed-off-by: Florian Fainelli 
---
 tools/firmware-utils/src/mkmerakifw.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/tools/firmware-utils/src/mkmerakifw.c 
b/tools/firmware-utils/src/mkmerakifw.c
index 6394cba5235e..1a50f1658f7f 100644
--- a/tools/firmware-utils/src/mkmerakifw.c
+++ b/tools/firmware-utils/src/mkmerakifw.c
@@ -52,7 +52,7 @@ struct board_info {
uint32_t fdt_offset;
uint32_t unknown_offset;
} mx60;
-   };
+   } u;
char *id;
char *description;
 };
@@ -72,7 +72,7 @@ static const struct board_info boards[] = {
.magic1 = 0x8e73ed8a,
.magic2 = 0x8e73ed8a,
.imagelen   = 0x0080,
-   .statichash = {0xda, 0x39, 0xa3, 0xee, 0x5e,
+   .u.statichash   = {0xda, 0x39, 0xa3, 0xee, 0x5e,
   0x6b, 0x4b, 0x0d, 0x32, 0x55,
   0xbf, 0xef, 0x95, 0x60, 0x18,
   0x90, 0xaf, 0xd8, 0x07, 0x09},
@@ -82,7 +82,7 @@ static const struct board_info boards[] = {
.magic1 = 0x8e73ed8a,
.magic2 = 0x8e73ed8a,
.imagelen   = 0x0080,
-   .statichash = {0xff, 0xff, 0xff, 0xff, 0xff,
+   .u.statichash   = {0xff, 0xff, 0xff, 0xff, 0xff,
   0xff, 0xff, 0xff, 0xff, 0xff,
   0xff, 0xff, 0xff, 0xff, 0xff,
   0xff, 0xff, 0xff, 0xff, 0xff},
@@ -100,7 +100,7 @@ static const struct board_info boards[] = {
 * 4th Row: ? Unused/Unknown ?
 * 5th Row: ? Unused/Unknown ?
 */
-   .mx60   = {
+   .u.mx60 = {
.kernel_offset  = 0x1,
.ramdisk_offset = 0x3FFC00,
.fdt_offset = 0x0400,
@@ -286,14 +286,14 @@ int main(int argc, char *argv[])
 
switch (board->magic2) {
case 0xa1f0beef:
-   writel(buf, HDR_OFF_KERNEL_OFFSET, board->mx60.kernel_offset);
-   writel(buf, HDR_OFF_RAMDISK_OFFSET, board->mx60.ramdisk_offset);
-   writel(buf, HDR_OFF_FDT_OFFSET, board->mx60.fdt_offset),
-   writel(buf, HDR_OFF_UNKNOWN_OFFSET, board->mx60.unknown_offset);
+   writel(buf, HDR_OFF_KERNEL_OFFSET, board->u.mx60.kernel_offset);
+   writel(buf, HDR_OFF_RAMDISK_OFFSET, 
board->u.mx60.ramdisk_offset);
+   writel(buf, HDR_OFF_FDT_OFFSET, board->u.mx60.fdt_offset),
+   writel(buf, HDR_OFF_UNKNOWN_OFFSET, 
board->u.mx60.unknown_offset);
break;
 
case 0x8e73ed8a:
-   memcpy(buf + HDR_OFF_STATICHASH, board->statichash, 20);
+   memcpy(buf + HDR_OFF_STATICHASH, board->u.statichash, 20);
break;
}
 
-- 
2.10.2


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


[LEDE-DEV] [PATCH] tools: upslug2: Utilize existing bz2 archive

2016-11-23 Thread Florian Fainelli
http://downloads.openwrt.org/sources has a copy of the sources, but under
tar.bz2 file format, so utilize this one since the SVN server is down.

This showed up with attempting an orion target build.

Signed-off-by: Florian Fainelli 
---
 tools/upslug2/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/upslug2/Makefile b/tools/upslug2/Makefile
index b28f9efab95f..33b1ff5a42bb 100644
--- a/tools/upslug2/Makefile
+++ b/tools/upslug2/Makefile
@@ -13,7 +13,7 @@ 
PKG_SOURCE_URL:=http://svn.nslu2-linux.org/svnroot/upslug2/trunk
 PKG_SOURCE_PROTO:=svn
 PKG_SOURCE_SUBDIR:=upslug2-$(PKG_VERSION)
 PKG_SOURCE_VERSION:=41
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 
 include $(INCLUDE_DIR)/host-build.mk
 
-- 
2.10.2


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


Re: [LEDE-DEV] QCA Dakota support

2016-11-23 Thread Christian Mehlis

Hi Christian,

your current staging tree works for me, it generates an itb and a trx 
file!

I added some files to support the Compex board I own:
https://github.com/mehlis/source/commits/compex-wpj428

Feel free to include some bits in your tree. I had to add dk04-c5 
support, perhaps you know some other way?

My commit is compile tested only.

Please be more precise on the flashing steps. I would like to flash from 
uboot. I never had a board running ubifs. QCA provides a img file, so 
I'm a bit lost here.


Regards,
Christian

Am 2016-11-23 00:58, schrieb Christian Lamparter:

Hello Christian,

On Tuesday, November 22, 2016 11:54:44 PM CET Christian Mehlis wrote:

I updated to your current staging branch 947e53a1 (which includes the
musl update). Now compile stops in a problem with the backports 
package,

which does not match the "new" kernel?!

/home/c/source/build_dir/target-arm_cortex-a7+neon-vfpv4_musl-1.1.16_eabi/linux-ipq40xx/compat-wireless-2016-10-08/backport-include/linux/cred.h:7:44:
error: 'struct nsproxy' has no member named 'user_ns'
  #define current_user_ns() (current->nsproxy->user_ns)

Ah, the quick fix is to "Enable kernel namespaces" and
"User namespaces" in the Global build setting of LEDE's
config. Just check that the following options are present in
the .config file:

CONFIG_KERNEL_NAMESPACES=y
CONFIG_KERNEL_USER_NS=y

This error is caused by the #ifdef in the compat code. As of
commit "cred/userns: define current_user_ns() as a function" [0]
the current_user_ns is no longer a macro in the !CONFIG_USER_NS
case, so the code tries to define it (but this is not needed as
there's a static inline function for it).

Anyway, I put a crude ifdef guard around it for now. Let's see
what else breaks.

We are getting closer:) I hope to add the Compex WPJ428 and the AVM
Fritz!Box 4040 support after the basics are working!

Did someone on the list requested the gpl sources for the Fritz!Box 
4040

so far?

Not that I know, but if you are going on a buying spree, you could
also look into the Zyxel NBG6617 (has no public sources either).
Netgear has published sources for their RBR50 / RBS50 (Orbi) right
here[1].

Regards,
Christian

[0] 
[1]



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


Re: [LEDE-DEV] [PATCH 5/6] package: kernel: add module crypto-hw-sunxi

2016-11-23 Thread Felix Fietkau
On 2016-11-23 17:03, Yousong Zhou wrote:
> Signed-off-by: Yousong Zhou 
> ---
>  package/kernel/linux/modules/crypto.mk | 17 +
>  1 file changed, 17 insertions(+)
> 
> diff --git a/package/kernel/linux/modules/crypto.mk 
> b/package/kernel/linux/modules/crypto.mk
> index 0a88c3b..a351609 100644
> --- a/package/kernel/linux/modules/crypto.mk
> +++ b/package/kernel/linux/modules/crypto.mk
> @@ -314,6 +314,23 @@ endef
>  $(eval $(call KernelPackage,crypto-hw-omap))
>  
>  
> +define KernelPackage/crypto-hw-sunxi
> +  TITLE:=Support for Allwinner Security System cryptographic accelerator
> +  KCONFIG:= @TARGET_sunxi \
> + CONFIG_CRYPTO_HW=y \
> + CONFIG_CRYPTO_DEV_SUN4I_SS
> +  FILES:=$(LINUX_DIR)/drivers/crypto/sunxi-ss/sun4i-ss.ko
> +  AUTOLOAD:=$(call AutoLoad,65,crypto-hw-sunxi)
> +  $(call AddDepends/crypto,+kmod-crypto-des)
> +endef
> +
> +define KernelPackage/crypto-hw-sunxi/description
> +  Kernel support for AllWinner built-in SoC audio
> +endef
> +
> +$(eval $(call KernelPackage,crypto-hw-sunxi))
Since sunxi is not exactly space constrained, I think it would be a good
idea to enable this in the kernel config instead of packaging it.

- Felix


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