Re: [OpenWrt-Devel] [PATCH] Make virtualization guests built for pentium4 with SMP

2015-07-12 Thread Hauke Mehrtens
On 07/11/2015 05:37 AM, Daniel Gimpelevich wrote:
 Signed-off-by: Daniel Gimpelevich dan...@gimpelevich.san-francisco.ca.us
 ---
  include/target.mk |  1 +
  target/linux/x86/kvm_guest/config-default | 15 ++-
  target/linux/x86/kvm_guest/target.mk  |  1 +
  target/linux/x86/xen_domu/target.mk   |  1 +
  4 files changed, 17 insertions(+), 1 deletion(-)
 
 diff --git a/include/target.mk b/include/target.mk
 index bfead52..3e7f17d 100644
 --- a/include/target.mk
 +++ b/include/target.mk
 @@ -222,6 +222,7 @@ ifeq ($(DUMP),1)
ifeq ($(ARCH),i386)
  CPU_TYPE ?= i486
  CPU_CFLAGS_i486 = -march=i486
 +CPU_CFLAGS_pentium4 = -march=pentium4

Will this work on most CPUs also the Atoms and so on?
I would rather prefer -march=i686 and -mtune=generic for the x86 virtual
machine images, but I am not an x86 expert. Do I need hardware support
for visualization in my host CPU for all these images? Are all the AMD
CPUs with hardware visualization support when IO build with
-march=pentium4 ?

  CPU_CFLAGS_geode = -march=geode -mmmx -m3dnow
endif
ifneq ($(findstring arm,$(ARCH)),)
 diff --git a/target/linux/x86/kvm_guest/config-default 
 b/target/linux/x86/kvm_guest/config-default
 index f26e268..b54b1df 100644
 --- a/target/linux/x86/kvm_guest/config-default
 +++ b/target/linux/x86/kvm_guest/config-default
 @@ -19,12 +19,14 @@ CONFIG_ACPI_PROCESSOR=y
  # CONFIG_ACPI_THERMAL is not set
  # CONFIG_ACPI_WMI is not set
  CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
 +CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
  # CONFIG_ASUS_LAPTOP is not set
  CONFIG_CPU_IDLE_GOV_MENU=y
  # CONFIG_EEEPC_LAPTOP is not set
  # CONFIG_EFI is not set
  CONFIG_HAVE_ACPI_APEI=y
  CONFIG_HAVE_ACPI_APEI_NMI=y
 +# CONFIG_HIGHMEM64G is not set
  CONFIG_HOTPLUG_PCI=y
  CONFIG_HOTPLUG_PCI_ACPI=y
  # CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
 @@ -45,17 +47,21 @@ CONFIG_HYPERVISOR_GUEST=y
  CONFIG_KVM_GUEST=y
  # CONFIG_LGUEST is not set
  # CONFIG_LGUEST_GUEST is not set
 -CONFIG_NLS=y
  CONFIG_NO_HZ=y
 +# CONFIG_M486 is not set
 +CONFIG_MPENTIUM4=y
 +CONFIG_NR_CPUS=4
  CONFIG_PARAVIRT=y
  CONFIG_PARAVIRT_CLOCK=y
  # CONFIG_PARAVIRT_DEBUG is not set
 +CONFIG_PARAVIRT_SPINLOCKS=y
  CONFIG_PARAVIRT_TIME_ACCOUNTING=y
  CONFIG_PCIEAER=y
  CONFIG_PCIEPORTBUS=y
  CONFIG_PCI_IOAPIC=y
  CONFIG_PCI_LABEL=y
  CONFIG_PCI_MMCONFIG=y
 +CONFIG_PHYS_ADDR_T_64BIT=y
  CONFIG_PNP=y
  CONFIG_PNPACPI=y
  CONFIG_PNP_DEBUG_MESSAGES=y
 @@ -64,6 +70,8 @@ CONFIG_RAS=y
  # CONFIG_SAMSUNG_Q10 is not set
  # CONFIG_SCSI_VIRTIO is not set
  CONFIG_SERIAL_8250_PNP=y
 +CONFIG_SLUB_CPU_PARTIAL=y
 +CONFIG_SMP=y
  # CONFIG_THINKPAD_ACPI is not set
  # CONFIG_TOPSTAR_LAPTOP is not set
  # CONFIG_TOSHIBA_BT_RFKILL is not set
 @@ -76,14 +84,19 @@ CONFIG_VIRTIO_PCI=y
  CONFIG_VIRTUALIZATION=y
  # CONFIG_VMWARE_BALLOON is not set
  # CONFIG_VT_HW_CONSOLE_BINDING is not set
 +CONFIG_X86_32_SMP=y
  # CONFIG_X86_ACPI_CPUFREQ is not set
 +# CONFIG_X86_BIGSMP is not set
  # CONFIG_X86_E_POWERSAVER is not set
  # CONFIG_X86_GENERIC is not set
 +CONFIG_X86_HT=y
  # CONFIG_X86_INTEL_LPSS is not set
  CONFIG_X86_INTERNODE_CACHE_SHIFT=4
  CONFIG_X86_L1_CACHE_SHIFT=4
  # CONFIG_X86_LONGHAUL is not set
 +CONFIG_X86_PAE=y
  # CONFIG_X86_PAT is not set
  # CONFIG_X86_PCC_CPUFREQ is not set
  CONFIG_X86_PM_TIMER=y
  # CONFIG_X86_PPRO_FENCE is not set
 +# CONFIG_XEN is not set
 diff --git a/target/linux/x86/kvm_guest/target.mk 
 b/target/linux/x86/kvm_guest/target.mk
 index d3f950f..4bdfbc6 100644
 --- a/target/linux/x86/kvm_guest/target.mk
 +++ b/target/linux/x86/kvm_guest/target.mk
 @@ -1,3 +1,4 @@
  BOARDNAME:=KVM Guest
  FEATURES:=ext4 pci usb
  DEFAULT_PACKAGES += kmod-virtio-balloon kmod-virtio-net kmod-virtio-random
 +CPU_TYPE := pentium4
 diff --git a/target/linux/x86/xen_domu/target.mk 
 b/target/linux/x86/xen_domu/target.mk
 index f7a69bf..31d110c 100644
 --- a/target/linux/x86/xen_domu/target.mk
 +++ b/target/linux/x86/xen_domu/target.mk
 @@ -1,3 +1,4 @@
  BOARDNAME:=Xen Paravirt Guest
  DEFAULT_PACKAGES += kmod-xen-fs kmod-xen-evtchn kmod-xen-netdev 
 kmod-xen-kbddev
  FEATURES:=display ext4 targz
 +CPU_TYPE := pentium4
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/4] kernel: fix build with CONFIG_MTD unset

2015-07-12 Thread Álvaro Fernández Rojas
Fixed typo in the patch provided by Hauke:
https://lists.openwrt.org/pipermail/openwrt-devel/2015-July/034274.html

Signed-off-by: Hauke Mehrtens ha...@hauke-m.de
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
 .../patches-3.18/681-NET-add-of_get_mac_address_mtd.patch   | 13 +++--
 .../patches-4.0/681-NET-add-of_get_mac_address_mtd.patch| 13 +++--
 .../patches-4.1/681-NET-add-of_get_mac_address_mtd.patch| 13 +++--
 3 files changed, 33 insertions(+), 6 deletions(-)

diff --git 
a/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch 
b/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch
index 8ce17fe..a836eed 100644
--- a/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch
+++ b/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch
@@ -23,11 +23,12 @@ Signed-off-by: John Crispin blo...@openwrt.org
  
  /**
   * of_get_phy_mode - Get phy mode for given device_node
-@@ -75,3 +76,43 @@ const void *of_get_mac_address(struct de
+@@ -75,3 +76,45 @@ const void *of_get_mac_address(struct de
return NULL;
  }
  EXPORT_SYMBOL(of_get_mac_address);
 +
++#ifdef CONFIG_MTD
 +int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac)
 +{
 +  struct device_node *mtd_np = NULL;
@@ -67,13 +68,21 @@ Signed-off-by: John Crispin blo...@openwrt.org
 +  return ret;
 +}
 +EXPORT_SYMBOL_GPL(of_get_mac_address_mtd);
++#endif
 --- a/include/linux/of_net.h
 +++ b/include/linux/of_net.h
-@@ -11,6 +11,7 @@
+@@ -11,6 +11,14 @@
  #include linux/of.h
  extern int of_get_phy_mode(struct device_node *np);
  extern const void *of_get_mac_address(struct device_node *np);
++#ifdef CONFIG_MTD
 +extern int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac);
++#else
++static inline int of_get_mac_address_mtd(struct device_node *np, unsigned 
char *mac)
++{
++  return -ENOENT;
++}
++#endif
  #else
  static inline int of_get_phy_mode(struct device_node *np)
  {
diff --git 
a/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch 
b/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch
index 8ce17fe..a836eed 100644
--- a/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch
+++ b/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch
@@ -23,11 +23,12 @@ Signed-off-by: John Crispin blo...@openwrt.org
  
  /**
   * of_get_phy_mode - Get phy mode for given device_node
-@@ -75,3 +76,43 @@ const void *of_get_mac_address(struct de
+@@ -75,3 +76,45 @@ const void *of_get_mac_address(struct de
return NULL;
  }
  EXPORT_SYMBOL(of_get_mac_address);
 +
++#ifdef CONFIG_MTD
 +int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac)
 +{
 +  struct device_node *mtd_np = NULL;
@@ -67,13 +68,21 @@ Signed-off-by: John Crispin blo...@openwrt.org
 +  return ret;
 +}
 +EXPORT_SYMBOL_GPL(of_get_mac_address_mtd);
++#endif
 --- a/include/linux/of_net.h
 +++ b/include/linux/of_net.h
-@@ -11,6 +11,7 @@
+@@ -11,6 +11,14 @@
  #include linux/of.h
  extern int of_get_phy_mode(struct device_node *np);
  extern const void *of_get_mac_address(struct device_node *np);
++#ifdef CONFIG_MTD
 +extern int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac);
++#else
++static inline int of_get_mac_address_mtd(struct device_node *np, unsigned 
char *mac)
++{
++  return -ENOENT;
++}
++#endif
  #else
  static inline int of_get_phy_mode(struct device_node *np)
  {
diff --git 
a/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch 
b/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch
index 6542898..688cf6e 100644
--- a/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch
+++ b/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch
@@ -23,11 +23,12 @@ Signed-off-by: John Crispin blo...@openwrt.org
  
  /**
   * of_get_phy_mode - Get phy mode for given device_node
-@@ -80,3 +81,43 @@ const void *of_get_mac_address(struct de
+@@ -80,3 +81,45 @@ const void *of_get_mac_address(struct de
return of_get_mac_addr(np, address);
  }
  EXPORT_SYMBOL(of_get_mac_address);
 +
++#ifdef CONFIG_MTD
 +int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac)
 +{
 +  struct device_node *mtd_np = NULL;
@@ -67,13 +68,21 @@ Signed-off-by: John Crispin blo...@openwrt.org
 +  return ret;
 +}
 +EXPORT_SYMBOL_GPL(of_get_mac_address_mtd);
++#endif
 --- a/include/linux/of_net.h
 +++ b/include/linux/of_net.h
-@@ -13,6 +13,7 @@
+@@ -13,6 +13,14 @@
  struct net_device;
  extern int of_get_phy_mode(struct device_node *np);
  extern const void *of_get_mac_address(struct device_node *np);
++#ifdef CONFIG_MTD
 +extern int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac);
++#else
++static inline int of_get_mac_address_mtd(struct device_node *np, unsigned 
char *mac)
++{
++  return -ENOENT;
++}

Re: [OpenWrt-Devel] [PATCH openwrt 1/3] hostapd: Always isolate if brport-multicast_to_unicast is enabled

2015-07-12 Thread Linus Lüssing
On Wed, Jul 08, 2015 at 02:31:03PM +0200, Felix Fietkau wrote:
 I really don't like the use of uci here. I think the information of
 whether ap_isolate needs to be enabled should be passed from netifd to
 this script in the json data.

Could you give me some pointers where in the netifd code that'd need to
be placed?

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


[OpenWrt-Devel] [PATCH 1/4] brcm2708-gpu-fw: update to latest version

2015-07-12 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
 package/kernel/brcm2708-gpu-fw/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/brcm2708-gpu-fw/Makefile 
b/package/kernel/brcm2708-gpu-fw/Makefile
index eee85e0..5484af0 100644
--- a/package/kernel/brcm2708-gpu-fw/Makefile
+++ b/package/kernel/brcm2708-gpu-fw/Makefile
@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=brcm2708-gpu-fw
-PKG_REV:=38aa676b044f8de46aedb4bd972538a7ad6a3ce1
-PKG_VERSION:=20150210
+PKG_REV:=d4945b3b77d29cc5bb334422c048c1f1d003
+PKG_VERSION:=20150712
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_REV).tar.gz
 PKG_SOURCE_URL:=https://github.com/Hexxeh/rpi-firmware/archive/
-PKG_MD5SUM:=f5683c1dcb255714942f7c9fd61b3a0a
+PKG_MD5SUM:=18fe2d11acf9e277f7b3fb2cd18eabfb
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV)
 
-- 
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] [PATCH 2/2] Prevent more gzip timestamps

2015-07-12 Thread Florian Fainelli
2015-07-12 9:41 GMT-07:00 Reiner Herrmann rei...@reiner-h.de:
 To improve reproducibility, prevent the inclusion of timestamps
 in the gzip header.

This looks fine to me, this also unveils a lot of repetition in how we
invoke gzip and its parameters, would you mind factoring this in a
variable such that we control how gzip options are set globally?
Eventually someone will want to be able to turn back on timestamps and
original names in how gzip generates compressed files, and we might as
well have a single location to fix this.

Let's just hope that nobody relies on the original file names (does
not look like it).


 Signed-off-by: Reiner Herrmann rei...@reiner-h.de
 ---
  docs/adding.tex| 2 +-
  include/image.mk   | 2 +-
  package/Makefile   | 2 +-
  target/imagebuilder/files/Makefile | 2 +-
  target/linux/adm5120/image/router_le.mk| 2 +-
  target/linux/adm8668/image/Makefile| 2 +-
  target/linux/ar71xx/image/Makefile | 6 +++---
  target/linux/ath25/image/Makefile  | 2 +-
  target/linux/brcm63xx/image/Makefile   | 2 +-
  target/linux/generic/files/crypto/ocf/Makefile | 2 +-
  target/linux/ipq806x/image/Makefile| 2 +-
  target/linux/malta/image/Makefile  | 2 +-
  target/linux/x86/image/Makefile| 4 ++--
  target/linux/xburst/image/Makefile | 2 +-
  14 files changed, 17 insertions(+), 17 deletions(-)

 diff --git a/docs/adding.tex b/docs/adding.tex
 index 97547ac..7b80c0d 100644
 --- a/docs/adding.tex
 +++ b/docs/adding.tex
 @@ -556,7 +556,7 @@ include $(INCLUDE_DIR)/image.mk

  define Image/BuildKernel
  cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
 -gzip -9 -c $(KDIR)/vmlinux  $(KDIR)/vmlinux.bin.gz
 +gzip -9n -c $(KDIR)/vmlinux  $(KDIR)/vmlinux.bin.gz
  $(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.bin.l7
  dd if=$(KDIR)/vmlinux.bin.l7 
 of=$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma bs=65536 conv=sync
  dd if=$(KDIR)/vmlinux.bin.gz 
 of=$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.gz bs=65536 conv=sync
 diff --git a/include/image.mk b/include/image.mk
 index 814e7dc..6767e76 100644
 --- a/include/image.mk
 +++ b/include/image.mk
 @@ -224,7 +224,7 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
  endif

  define Image/mkfs/cpiogz
 -   ( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9 
 $(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
 +   ( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9n 
 $(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
  endef

  define Image/mkfs/targz
 diff --git a/package/Makefile b/package/Makefile
 index 3ef34b1..cc691b5 100644
 --- a/package/Makefile
 +++ b/package/Makefile
 @@ -149,7 +149,7 @@ $(curdir)/index: FORCE
 mkdir -p $(PACKAGE_DIR)/$$d; \
 cd $(PACKAGE_DIR)/$$d || continue; \
 $(SCRIPT_DIR)/ipkg-make-index.sh . 21  Packages  \
 -   gzip -9c Packages  Packages.gz; \
 +   gzip -9nc Packages  Packages.gz; \
 ); done
  ifdef CONFIG_SIGNED_PACKAGES
 @echo Signing package index...
 diff --git a/target/imagebuilder/files/Makefile 
 b/target/imagebuilder/files/Makefile
 index e28660f..8f25c4a 100644
 --- a/target/imagebuilder/files/Makefile
 +++ b/target/imagebuilder/files/Makefile
 @@ -121,7 +121,7 @@ package_index: FORCE
 @echo Building package index...
 @mkdir -p $(TMP_DIR) $(TARGET_DIR)/tmp
 (cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh .  Packages  \
 -   gzip -9c Packages  Packages.gz \
 +   gzip -9nc Packages  Packages.gz \
 ) /dev/null 2/dev/null
 $(OPKG) update || true

 diff --git a/target/linux/adm5120/image/router_le.mk 
 b/target/linux/adm5120/image/router_le.mk
 index 6df6dcd..1e3d7f7 100644
 --- a/target/linux/adm5120/image/router_le.mk
 +++ b/target/linux/adm5120/image/router_le.mk
 @@ -72,7 +72,7 @@ define Image/Build/Cellvision
 $(call Image/Build/Loader,$(2),bin,0x8050,0x6D8,y,$(3))
 mkdir -p $(BIN_DIR)/tmp
 cp $(KDIR)/loader-$(2).bin $(BIN_DIR)/tmp/vmlinux.bin
 -   gzip -9 $(BIN_DIR)/tmp/vmlinux.bin
 +   gzip -9n $(BIN_DIR)/tmp/vmlinux.bin
 dd if=$(BIN_DIR)/tmp/vmlinux.bin.gz of=$(call 
 imgname,$(1),$(2))-xmodem.bin bs=64k conv=sync
 rm -rf $(BIN_DIR)/tmp
 $(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
 diff --git a/target/linux/adm8668/image/Makefile 
 b/target/linux/adm8668/image/Makefile
 index 9e25224..597b8f7 100644
 --- a/target/linux/adm8668/image/Makefile
 +++ b/target/linux/adm8668/image/Makefile
 @@ -16,7 +16,7 @@ endef


  define CompressGzip
 -   gzip -9 -c $(1)  $(2)
 +   gzip -9n -c $(1)  $(2)
  endef

  define MkImage
 diff --git a/target/linux/ar71xx/image/Makefile 
 b/target/linux/ar71xx/image/Makefile
 index 

[OpenWrt-Devel] [PATCH 2/4] brcm2708: add DT support

2015-07-12 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
 target/linux/brcm2708/bcm2708/config-default |  2 +-
 target/linux/brcm2708/bcm2709/config-default |  2 +-
 target/linux/brcm2708/config-3.18| 11 +++-
 target/linux/brcm2708/image/Makefile | 77 
 target/linux/brcm2708/image/config.txt   | 12 ++---
 5 files changed, 75 insertions(+), 29 deletions(-)

diff --git a/target/linux/brcm2708/bcm2708/config-default 
b/target/linux/brcm2708/bcm2708/config-default
index 858d236..2fdc4e9 100644
--- a/target/linux/brcm2708/bcm2708/config-default
+++ b/target/linux/brcm2708/bcm2708/config-default
@@ -1,4 +1,4 @@
 CONFIG_ARCH_BCM2708=y
-# CONFIG_BCM2708_DT is not set
+CONFIG_BCM2708_DT=y
 CONFIG_MACH_BCM2708=y
 CONFIG_VMSPLIT_3G=y
diff --git a/target/linux/brcm2708/bcm2709/config-default 
b/target/linux/brcm2708/bcm2709/config-default
index 8945c24..9fddfe4 100644
--- a/target/linux/brcm2708/bcm2709/config-default
+++ b/target/linux/brcm2708/bcm2709/config-default
@@ -3,7 +3,7 @@ CONFIG_ARCH_BCM2709=y
 # CONFIG_ARM_THUMBEE is not set
 CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
 CONFIG_BCM2708_NOL2CACHE=y
-# CONFIG_BCM2709_DT is not set
+CONFIG_BCM2709_DT=y
 # CONFIG_CRYPTO_SHA1_ARM_NEON is not set
 # CONFIG_CRYPTO_SHA512_ARM_NEON is not set
 CONFIG_HAVE_ARM_ARCH_TIMER=y
diff --git a/target/linux/brcm2708/config-3.18 
b/target/linux/brcm2708/config-3.18
index e788bb8..33007dd 100644
--- a/target/linux/brcm2708/config-3.18
+++ b/target/linux/brcm2708/config-3.18
@@ -203,6 +203,8 @@ CONFIG_NLS_ASCII=y
 CONFIG_NLS_DEFAULT=utf8
 CONFIG_NO_HZ=y
 CONFIG_OABI_COMPAT=y
+CONFIG_OF=y
+CONFIG_OF_GPIO=y
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_PAGE_OFFSET=0xC000
 # CONFIG_PCI_SYSCALL is not set
@@ -223,10 +225,16 @@ CONFIG_SCSI=y
 # CONFIG_SCSI_LOWLEVEL is not set
 # CONFIG_SCSI_PROC_FS is not set
 # CONFIG_SENSORS_BCM2835 is not set
-# CONFIG_SERIAL_8250 is not set
+CONFIG_SERIAL_8250=y
+# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_DMA is not set
+CONFIG_SERIAL_8250_NR_UARTS=1
+CONFIG_SERIAL_8250_RUNTIME_UARTS=0
 # CONFIG_SERIAL_AMBA_PL010 is not set
 CONFIG_SERIAL_AMBA_PL011=y
 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_OF_PLATFORM=y
 # CONFIG_SND_BCM2708_SOC_I2S is not set
 # CONFIG_SQUASHFS is not set
 # CONFIG_STAGING is not set
@@ -255,6 +263,7 @@ CONFIG_USB_STORAGE=y
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_UAS=y
 CONFIG_USB_USBNET=y
+CONFIG_USE_OF=y
 CONFIG_VECTORS_BASE=0x
 CONFIG_VFP=y
 # CONFIG_VIDEO_BCM2835 is not set
diff --git a/target/linux/brcm2708/image/Makefile 
b/target/linux/brcm2708/image/Makefile
index e70bdd0..10ecfda 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -11,30 +11,67 @@ include $(INCLUDE_DIR)/host.mk
 FAT32_BLOCK_SIZE=1024
 FAT32_BLOCKS=$(shell echo 
$$(($(CONFIG_BRCM2708_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE
 
-define Image/Build/RaspberryPi
-   rm -f $(KDIR)/boot.img
-
-   mkfs.fat -C $(KDIR)/boot.img $(FAT32_BLOCKS)
-   # Raspberry Pi has no bootloader, instead the GPU loads and starts the 
kernel
-   mcopy -i $(KDIR)/boot.img $(KDIR)/bootcode.bin ::
-   mcopy -i $(KDIR)/boot.img $(KDIR)/COPYING.linux ::
-   mcopy -i $(KDIR)/boot.img $(KDIR)/LICENCE.broadcom ::
-   mcopy -i $(KDIR)/boot.img $(KDIR)/start.elf ::
-   mcopy -i $(KDIR)/boot.img $(KDIR)/start_cd.elf ::
-   mcopy -i $(KDIR)/boot.img $(KDIR)/fixup.dat ::
-   mcopy -i $(KDIR)/boot.img $(KDIR)/fixup_cd.dat ::
-   mcopy -i $(KDIR)/boot.img cmdline.txt ::
-   mcopy -i $(KDIR)/boot.img config.txt ::
-   mcopy -i $(KDIR)/boot.img $(KDIR)/Image ::kernel.img  # Copy OpenWrt 
built kernel
-   ./gen_rpi_sdcard_img.sh $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img 
$(KDIR)/boot.img $(KDIR)/root.$(1) \
+### Image scripts ###
+define Build/build-dtb
+   $(LINUX_DIR)/scripts/dtc/dtc -O dtb -o $@.dtb 
$(DTS_DIR)/$(DEVICE_DTS).dts
+endef
+
+define Build/gen-cfg
+   cat config.txt  $@.config
+   echo -e \ndevice_tree=$(DEVICE_DTS).dtb  $@.config
+endef
+
+define Build/boot-img
+   rm -f $@.boot
+   mkfs.fat -C $@.boot $(FAT32_BLOCKS)
+   mcopy -i $@.boot $(KDIR)/bootcode.bin ::
+   mcopy -i $@.boot $(KDIR)/COPYING.linux ::
+   mcopy -i $@.boot $(KDIR)/LICENCE.broadcom ::
+   mcopy -i $@.boot $(KDIR)/start.elf ::
+   mcopy -i $@.boot $(KDIR)/start_cd.elf ::
+   mcopy -i $@.boot $(KDIR)/fixup.dat ::
+   mcopy -i $@.boot $(KDIR)/fixup_cd.dat ::
+   mcopy -i $@.boot cmdline.txt ::
+   mcopy -i $@.boot $@.config ::config.txt
+   mcopy -i $@.boot $(word 1,$^) ::kernel.img
+   mcopy -i $@.boot $@.dtb ::$(DEVICE_DTS).dtb
+endef
+
+define Build/sdcard-img
+   ./gen_rpi_sdcard_img.sh $@ $@.boot $(word 2,$^) \
$(CONFIG_BRCM2708_SD_BOOT_PARTSIZE) 
$(CONFIG_TARGET_ROOTFS_PARTSIZE)
 endef
 
-define Image/Build
-   $(CP) $(KDIR)/root.$(1) 

[OpenWrt-Devel] [PATCH 3/4] generic: add missing symbol

2015-07-12 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
 target/linux/generic/config-3.18 | 1 +
 target/linux/generic/config-4.0  | 1 +
 target/linux/generic/config-4.1  | 1 +
 3 files changed, 3 insertions(+)

diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index 2e2f33f..58bb1d6 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -4587,6 +4587,7 @@ CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
 # CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set
 # CONFIG_X86_PKG_TEMP_THERMAL is not set
 CONFIG_X86_SYSFB=y
+# CONFIG_XEN is not set
 CONFIG_XFRM=y
 # CONFIG_XFRM_IPCOMP is not set
 # CONFIG_XFRM_MIGRATE is not set
diff --git a/target/linux/generic/config-4.0 b/target/linux/generic/config-4.0
index 0545ee5..b555bfe 100644
--- a/target/linux/generic/config-4.0
+++ b/target/linux/generic/config-4.0
@@ -4669,6 +4669,7 @@ CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
 # CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set
 # CONFIG_X86_PKG_TEMP_THERMAL is not set
 CONFIG_X86_SYSFB=y
+# CONFIG_XEN is not set
 CONFIG_XFRM=y
 # CONFIG_XFRM_IPCOMP is not set
 # CONFIG_XFRM_MIGRATE is not set
diff --git a/target/linux/generic/config-4.1 b/target/linux/generic/config-4.1
index d4c9cb5..1691900 100644
--- a/target/linux/generic/config-4.1
+++ b/target/linux/generic/config-4.1
@@ -4700,6 +4700,7 @@ CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
 # CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set
 # CONFIG_X86_PKG_TEMP_THERMAL is not set
 CONFIG_X86_SYSFB=y
+# CONFIG_XEN is not set
 CONFIG_XFRM=y
 # CONFIG_XFRM_IPCOMP is not set
 # CONFIG_XFRM_MIGRATE is not set
-- 
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] [PATCH][libubox] ustream-fd: handle uloop errors

2015-07-12 Thread Philip Craig
On 10/07/15 21:26, Felix Fietkau wrote:
 On 2015-07-10 09:23, Philip Craig wrote:
 Otherwise uloop will delete the fd and the ustream will receive no
 notification of the error.

 Signed-off-by: Philip Craig philipjcr...@gmail.com
 I think this fix is incomplete. When an error occurs, ustream-fd should
 delete the fd after setting the error flags to avoid getting further
 spurious error calls.
 ustream_fd_set_uloop should probably recognize the case of both
 ULOOP_READ and ULOOP_WRITE being unset and should call uloop_fd_delete
 in that case.

uloop_fd_add() already handles that.

 __ustream_fd_poll should probably call ustream_fd_set_uloop when setting
 an error flag.

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


[OpenWrt-Devel] [PATCH v2][libubox] ustream-fd: handle uloop errors

2015-07-12 Thread Philip Craig
The default uloop error handling is to delete the fd. Continue to do
that, but also set the write_error flag and notify the user.

Signed-off-by: Philip Craig philipjcr...@gmail.com
---
 ustream-fd.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/ustream-fd.c b/ustream-fd.c
index 5ffca53..d5abb5a 100644
--- a/ustream-fd.c
+++ b/ustream-fd.c
@@ -25,7 +25,7 @@ static void ustream_fd_set_uloop(struct ustream *s, bool 
write)
 {
struct ustream_fd *sf = container_of(s, struct ustream_fd, stream);
struct ustream_buf *buf;
-   unsigned int flags = ULOOP_EDGE_TRIGGER;
+   unsigned int flags = ULOOP_EDGE_TRIGGER | ULOOP_ERROR_CB;
 
if (!s-read_blocked  !s-eof)
flags |= ULOOP_READ;
@@ -127,6 +127,12 @@ static bool __ustream_fd_poll(struct ustream_fd *sf, 
unsigned int events)
ustream_fd_set_uloop(s, false);
}
 
+   if (sf-fd.error  !s-write_error) {
+   ustream_state_change(s);
+   s-write_error = true;
+   ustream_fd_set_uloop(s, false);
+   }
+
return more;
 }
 
-- 
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] [PATCH V3] cdc_ncm: Add support for moving NDP to end of NCM frame

2015-07-12 Thread Matti Laakso
 Ahoy everyone,

 more on the Telekom Speedstick LTE V (Huawei 3372s) from here:

 http://www.amazon.de/dp/B00NLJE3O6

 I've tested Enricos latest patch on MIPS (3.18.17) and x86_64 (3.18.11)
 and had a little bit of trouble applying it to latest trunk, so here's
 the latest tested patch from a diff against 3.18.17 (openwrt-trunk).

 With that patch applied, a simple AT^NDISDUP=1,1,your.apn.here and
 udhcpc -i wwan0 is online and routing immediately.

 The following config snippet is also working directly with openwrt:

 config interface '4g'
  option proto 'ncm'
  option ifname 'wwan0'
  option device '/dev/ttyUSB1'
  option apn 'internet.eplus.de'

 Again, big thanks go to Enrico for fixing NDP/SKB issues, much obliged.

That's great news! Did you try if option device '/dev/cdc-wdm0' works as
well? I was able to borrow a E3372, and will try the patch soon as well.

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


Re: [OpenWrt-Devel] Build errors when activating the Device Tree flag for Raspberry Pi

2015-07-12 Thread Hauke Mehrtens
On 07/12/2015 06:44 AM, Michael Neurohr wrote:
 Hi,
 
 I'm trying to activate the Device Tree for Raspberry Pi builds.
 
 Therefore I changed the flag
 
 # CONFIG_BCM2709_DT is not set
 to
 CONFIG_BCM2709_DT=y
 
 in
 
 /home/mine/gitrepos/openwrt2/target/linux/brcm2708/bcm2709/config-default
 and
 /home/mine/gitrepos/openwrt2/target/linux/brcm2708/bcm2708/config-default
 
 When building for BRCM2709/08 I'm getting the error
 
 ==
   LD  init/built-in.o
 drivers/built-in.o: In function `of_get_mac_address_mtd':
 /home/mine/gitrepos/openwrt2/build_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/linux-3.18.17/drivers/of/of_net.c:106:
 undefined reference to `get_mtd_device_nm'
 /home/mine/gitrepos/openwrt2/build_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/linux-3.18.17/drivers/of/of_net.c:110:
 undefined reference to `mtd_read'
 /home/mine/gitrepos/openwrt2/build_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/linux-3.18.17/drivers/of/of_net.c:111:
 undefined reference to `put_mtd_device'
 make[5]: *** [vmlinux] Error 1
 make[5]: Leaving directory
 `/home/mine/gitrepos/openwrt2/build_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/linux-3.18.17'
 
 make[4]: ***
 [/home/mine/gitrepos/openwrt2/build_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/linux-3.18.17/.image]
 Error 2
 make[4]: Leaving directory
 `/home/mine/gitrepos/openwrt2/target/linux/brcm2708'
 make[3]: *** [install] Error 2
 make[3]: Leaving directory `/home/mine/gitrepos/openwrt2/target/linux'
 make[2]: *** [target/linux/install] Error 2
 make[2]: Leaving directory `/home/mine/gitrepos/openwrt2'
 make[1]: ***
 [/home/mine/gitrepos/openwrt2/staging_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/stamp/.target_install]
 Error 2
 make[1]: Leaving directory `/home/mine/gitrepos/openwrt2'
 make: *** [world] Error 2
 ==
 
 
 Is it possible at all to activate the Device Tree for Raspberry builds
 at all?
 
 I'm working on the master of git://openwrt.org/openwrt.git
 
 Thanks,
 Michael

Somehow CONFIG_MTD is not activate in your config, please try the
attached patch t make OpenWrt still build in such cases.

Hauke

From f98ce9c7abf1e13443d129aba0e01fe63265445f Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens ha...@hauke-m.de
Date: Sun, 12 Jul 2015 13:39:30 +0200
Subject: [PATCH 2/2] kernel: fix build with CONFIG_MTD unset

of_get_mac_address_mtd() accesses functions behind CONFIG_MTD without
checking if it is available, deactivate this function if
of_get_mac_address_mtd is not available.

Signed-off-by: Hauke Mehrtens ha...@hauke-m.de
---
 .../patches-3.18/681-NET-add-of_get_mac_address_mtd.patch   | 13 +++--
 .../patches-4.0/681-NET-add-of_get_mac_address_mtd.patch| 13 +++--
 .../patches-4.1/681-NET-add-of_get_mac_address_mtd.patch| 13 +++--
 3 files changed, 33 insertions(+), 6 deletions(-)

diff --git a/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch
index 8ce17fe..2603f11 100644
--- a/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch
+++ b/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch
@@ -23,11 +23,12 @@ Signed-off-by: John Crispin blo...@openwrt.org
  
  /**
   * of_get_phy_mode - Get phy mode for given device_node
-@@ -75,3 +76,43 @@ const void *of_get_mac_address(struct de
+@@ -75,3 +76,45 @@ const void *of_get_mac_address(struct de
  	return NULL;
  }
  EXPORT_SYMBOL(of_get_mac_address);
 +
++#ifdef CONFIG_MTD
 +int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac)
 +{
 +	struct device_node *mtd_np = NULL;
@@ -67,13 +68,21 @@ Signed-off-by: John Crispin blo...@openwrt.org
 +	return ret;
 +}
 +EXPORT_SYMBOL_GPL(of_get_mac_address_mtd);
++#endif
 --- a/include/linux/of_net.h
 +++ b/include/linux/of_net.h
-@@ -11,6 +11,7 @@
+@@ -11,6 +11,14 @@
  #include linux/of.h
  extern int of_get_phy_mode(struct device_node *np);
  extern const void *of_get_mac_address(struct device_node *np);
++#ifdef CONFIG_MTD
 +extern int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac);
++#else
++static inline int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac)
++{
++	return -ENOENT;
++}
++endif
  #else
  static inline int of_get_phy_mode(struct device_node *np)
  {
diff --git a/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch
index 8ce17fe..2603f11 100644
--- a/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch
+++ b/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch
@@ -23,11 +23,12 @@ Signed-off-by: John Crispin blo...@openwrt.org
  
  /**
   * 

Re: [OpenWrt-Devel] [PATCH 2/4] gemini: add NAS packages to Raidsonic profile

2015-07-12 Thread Roman Yeryomin
On 9 July 2015 at 15:29, Roman Yeryomin leroi.li...@gmail.com wrote:
 On 9 July 2015 at 08:31, John Crispin blo...@openwrt.org wrote:


 On 08/07/2015 23:00, Roman Yeryomin wrote:
 Signed-off-by: Roman Yeryomin ro...@advem.lv
 ---
  target/linux/gemini/raidsonic/target.mk | 7 +++
  1 file changed, 7 insertions(+)

 diff --git a/target/linux/gemini/raidsonic/target.mk 
 b/target/linux/gemini/raidsonic/target.mk
 index 56eda4e..d158090 100644
 --- a/target/linux/gemini/raidsonic/target.mk
 +++ b/target/linux/gemini/raidsonic/target.mk
 @@ -4,6 +4,13 @@

  SUBTARGET:=raidsonic
  BOARDNAME:=Raidsonic NAS42x0
 +FEATURES+=usb
 +DEFAULT_PACKAGES+=kmod-usb2 kmod-md-mod kmod-md-linear kmod-md-multipath \
 + kmod-md-raid0 kmod-md-raid1 kmod-md-raid10 kmod-md-raid456 \
 + kmod-fs-btrfs kmod-fs-cifs kmod-fs-ext4 kmod-fs-nfs \
 + kmod-fs-nfsd kmod-fs-ntfs kmod-fs-reiserfs kmod-fs-vfat \
 + kmod-nls-utf8 kmod-usb-storage-extras \
 + samba36-server mdadm cfdisk fdisk e2fsprogs badblocks

 some of these are not part of trunk. i think there was a policy that
 DEFAULT_PACKAGES should only point at stuff in trunk. i guess madm and
 badblocks need to be dropped or moved to trunk


 OK, will reconsider the list

Looked through the list - all of them are in trunk!

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


[OpenWrt-Devel] [PATCH ubox] log: allow filtering messages with a regexp pattern

2015-07-12 Thread Rafał Miłecki
This allows printing/streaming/writing messages matching a specified
basic regular expression only.

Signed-off-by: Rafał Miłecki zaj...@gmail.com
---
 log/logread.c | 15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/log/logread.c b/log/logread.c
index 6255408..b616cd5 100644
--- a/log/logread.c
+++ b/log/logread.c
@@ -17,6 +17,7 @@
 
 #include fcntl.h
 #include time.h
+#include regex.h
 #include stdio.h
 #include unistd.h
 #include sys/types.h
@@ -57,7 +58,8 @@ static const struct blobmsg_policy log_policy[] = {
 
 static struct uloop_timeout retry;
 static struct uloop_fd sender;
-static const char *log_file, *log_ip, *log_port, *log_prefix, *pid_file, 
*hostname;
+static regex_t regexp_preg;
+static const char *log_file, *log_ip, *log_port, *log_prefix, *pid_file, 
*hostname, *regexp_pattern;
 static int log_type = LOG_STDOUT;
 static int log_size, log_udp, log_follow, log_trailer_null = 0;
 
@@ -128,6 +130,9 @@ static int log_notify(struct blob_attr *msg)
}
 
m = blobmsg_get_string(tb[LOG_MSG]);
+   if (regexp_pattern 
+   regexec(regexp_preg, m, 0, NULL, 0) == REG_NOMATCH)
+   return 0;
t = blobmsg_get_u64(tb[LOG_TIME]) / 1000;
c = ctime(t);
p = blobmsg_get_u32(tb[LOG_PRIO]);
@@ -186,6 +191,7 @@ static int usage(const char *prog)
Options:\n
-s path  Path to ubus socket\n
-l count Got only the last 'count' messages\n
+   -e pattern   Filter messages (not hostnames, 
facilities, etc.)\n
-r server port Stream message to a server\n
-F file  Log file\n
-S bytes Log size\n
@@ -235,7 +241,7 @@ int main(int argc, char **argv)
 
signal(SIGPIPE, SIG_IGN);
 
-   while ((ch = getopt(argc, argv, u0fcs:l:r:F:p:S:P:h:)) != -1) {
+   while ((ch = getopt(argc, argv, u0fcs:l:r:F:p:S:P:h:e:)) != -1) {
switch (ch) {
case 'u':
log_udp = 1;
@@ -274,6 +280,11 @@ int main(int argc, char **argv)
case 'h':
hostname = optarg;
break;
+   case 'e':
+   if (!regcomp(regexp_preg, optarg, REG_NOSUB)) {
+   regexp_pattern = optarg;
+   }
+   break;
default:
return usage(*argv);
}
-- 
1.8.4.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Hyper-V Support for X86 or X86_64

2015-07-12 Thread Hauke Mehrtens
On 01/21/2015 08:04 PM, Ning Ye wrote:
 This is the latest Hyper-V patch to support Linux 3.14.

Could you rebase it to current trunk.
You should probably create a subtarget like target/linux/x86/kvm_guest/
for Hyper-V and activate there CONFIG_HYPERV=y and CONFIG_HYPERV_STORAGE=y

 
 Signed-off-by: Ning Ye n...@oaklight.us
 
 diff --git a/config/Config-images.in b/config/Config-images.in
 old mode 100644
 new mode 100755
 index 5c2e79e..b8e9d9d
 --- a/config/Config-images.in
 +++ b/config/Config-images.in
 @@ -239,6 +239,16 @@ menu Target Images
   select TARGET_IMAGES_PAD
   select PACKAGE_kmod-e1000
  
 + config VHD_IMAGES
 + bool Build Hyper-V image files (VHD)
 + depends on TARGET_x86 || TARGET_x86_64
 + select GRUB_IMAGES
 + select TARGET_IMAGES_PAD
 + select PACKAGE_kmod-hyperv-balloon
 + select PACKAGE_kmod-hyperv-net-vsc
 + select PACKAGE_kmod-hyperv-util
 + select PACKAGE_kmod-hyperv-storage
 +
   config TARGET_IMAGES_PAD
   bool Pad images to filesystem size (for JFFS2)
   depends on OLPC_BOOTSCRIPT_IMAGES || GRUB_IMAGES
 diff --git a/package/kernel/linux/modules/virtual.mk 
 b/package/kernel/linux/modules/virtual.mk
 old mode 100644
 new mode 100755
 index 190d844..a67d71c
 --- a/package/kernel/linux/modules/virtual.mk
 +++ b/package/kernel/linux/modules/virtual.mk
 @@ -186,3 +186,85 @@ define KernelPackage/xen-pcidev/description
  endef
  
  $(eval $(call KernelPackage,xen-pcidev))
 +
 +#
 +# Hyper-V Drives depends on x86 or x86_64.
 +#
 +define KernelPackage/hyperv-balloon
 +  SUBMENU:=$(VIRTUAL_MENU)
 +  DEPENDS:=@(TARGET_x86||TARGET_x86_64)
 +  TITLE:=Microsoft Hyper-V Balloon Driver
 +  KCONFIG:= \
 +CONFIG_HYPERV_BALLOON \
 +CONFIG_HYPERVISOR_GUEST=y \
 +CONFIG_PARAVIRT=n \
 +CONFIG_HYPERV=y

Why do you build CONFIG_HYPERV into the kernel? This should be build as
a module, because this package will be build on all x86 kernels.

 +  FILES:=$(LINUX_DIR)/drivers/hv/hv_balloon.ko
 +  AUTOLOAD:=$(call AutoLoad,06,hv_balloon)
 +endef
 +
 +define KernelPackage/hyperv-balloon/description
 +  Microsofot Hyper-V balloon driver.
 +endef
 +
 +$(eval $(call KernelPackage,hyperv-balloon))
 +
 +define KernelPackage/hyperv-net-vsc
 +  SUBMENU:=$(VIRTUAL_MENU)
 +  DEPENDS:=@(TARGET_x86||TARGET_x86_64)
 +  TITLE:=Microsoft Hyper-V Network Driver
 +  KCONFIG:= \
 +CONFIG_HYPERV_NET \
 +CONFIG_HYPERVISOR_GUEST=y \
 +CONFIG_PARAVIRT=n \
 +CONFIG_HYPERV=y
 +  FILES:=$(LINUX_DIR)/drivers/net/hyperv/hv_netvsc.ko
 +  AUTOLOAD:=$(call AutoLoad,35,hv_netvsc)
 +endef
 +
 +define KernelPackage/hyperv-net-vsc/description
 +  Microsoft Hyper-V Network Driver
 +endef
 +
 +$(eval $(call KernelPackage,hyperv-net-vsc))
 +
 +define KernelPackage/hyperv-util
 +  SUBMENU:=$(VIRTUAL_MENU)
 +  DEPENDS:=@(TARGET_x86||TARGET_x86_64)
 +  TITLE:=Microsoft Hyper-V Utility Driver
 +  KCONFIG:= \
 +CONFIG_HYPERV_UTILS \
 +CONFIG_HYPERVISOR_GUEST=y \
 +CONFIG_PARAVIRT=n \
 +CONFIG_HYPERV=y
 +  FILES:=$(LINUX_DIR)/drivers/hv/hv_util.ko
 +  AUTOLOAD:=$(call AutoLoad,10,hv_util)
 +endef
 +
 +define KernelPackage/hyperv-util/description
 +  Microsoft Hyper-V Utility Driver
 +endef
 +
 +$(eval $(call KernelPackage,hyperv-util))
 +
 +#
 +# Hyper-V Storage Drive needs to be in kernel rather than module to load the 
 root fs.
 +#
 +define KernelPackage/hyperv-storage
 +  SUBMENU:=$(VIRTUAL_MENU)
 +  DEPENDS:=@(TARGET_x86||TARGET_x86_64) +kmod-scsi-core
 +  TITLE:=Microsoft Hyper-V Storage Driver
 +  KCONFIG:= \
 +CONFIG_HYPERV_STORAGE=y \
 +CONFIG_HYPERVISOR_GUEST=y \
 +CONFIG_PARAVIRT=n \
 +CONFIG_HYPERV=y 
 +  FILES:=$(LINUX_DIR)/drivers/scsi/hv_storvsc.ko
 +  AUTOLOAD:=$(call AutoLoad,40,hv_storvsc)
 +endef

You should not crate a OpenWrt kernel module package which build stuff
into the kernel image.

 +
 +define KernelPackage/hyperv-storage/description
 +  Microsoft Hyper-V Storage Driver
 +endef
 +
 +$(eval $(call KernelPackage,hyperv-storage))
 diff --git a/target/linux/x86/config-3.14 b/target/linux/x86/config-3.14
 old mode 100644
 new mode 100755
 index 591fa17..f3f5456
 --- a/target/linux/x86/config-3.14
 +++ b/target/linux/x86/config-3.14
 @@ -197,6 +197,15 @@ CONFIG_HW_RANDOM=y
  CONFIG_HW_RANDOM_GEODE=y
  CONFIG_HW_RANDOM_VIA=y
  # CONFIG_HYPERVISOR_GUEST is not set
 +# CONFIG_HYPERV is not set
 +# CONFIG_HYPERV_BALLOON is not set
 +# CONFIG_HYPERV_NET is not set
 +# CONFIG_HYPERV_STORAGE is not set
 +# CONFIG_HYPERV_UTILS is not set
 +# CONFIG_HYPERV_KEYBOARD is not set
 +# CONFIG_FB_HYPERV is not set
 +# CONFIG_HID_HYPERV_MOUSE is not set
 +# CONFIG_VMWARE_BALLOON is not set
  CONFIG_HZ_PERIODIC=y
  CONFIG_I8253_LOCK=y
  # CONFIG_I8K is not set
 diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
 old mode 100644
 new mode 100755
 

Re: [OpenWrt-Devel] lantiq DSL drivers / firmware info

2015-07-12 Thread Martin Blumenstingl
Hi,

On Sat, Jul 11, 2015 at 9:39 AM, Sylwester Petela ssc...@gmail.com wrote:
 Where did You get/find v4.16.2.4 packages ?
Someone with access to lantiq's UGW replied last month on the
mailing list and sent me the updated package versions.

Since my latest patches were merged into the OpenWrt repository the
patch which updates the lantiq DSL drivers/application did not apply
anymore.
Here is the updated patch which applies against today's trunk: [0]

Regards,
Martin


[0] https://gist.github.com/xdarklight/3452b26620b28f3bc577
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Make virtualization guests built for pentium4 with SMP

2015-07-12 Thread Daniel Gimpelevich
On Sun, 2015-07-12 at 14:00 +0200, Hauke Mehrtens wrote:
 Will this work on most CPUs also the Atoms and so on?
 I would rather prefer -march=i686 and -mtune=generic for the x86
 virtual
 machine images, but I am not an x86 expert. Do I need hardware support
 for visualization in my host CPU for all these images? Are all the AMD
 CPUs with hardware visualization support when IO build with
 -march=pentium4 ?

It's already used for the Xen guest kernel, just not GCC. The gcc
manpage says that all -march=pentium4 means is enable MMX, SSE, and
SSE2, which I believe the old Atoms support, but even if they don't,
running any VM on such low-spec processors isn't likely to work anyway.
Using -march=i686 is an alias for Pentium Pro, that is, before the
Pentium II.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] Prevent more gzip timestamps

2015-07-12 Thread Reiner Herrmann
To improve reproducibility, prevent the inclusion of timestamps
in the gzip header.

Signed-off-by: Reiner Herrmann rei...@reiner-h.de
---
 docs/adding.tex| 2 +-
 include/image.mk   | 2 +-
 package/Makefile   | 2 +-
 target/imagebuilder/files/Makefile | 2 +-
 target/linux/adm5120/image/router_le.mk| 2 +-
 target/linux/adm8668/image/Makefile| 2 +-
 target/linux/ar71xx/image/Makefile | 6 +++---
 target/linux/ath25/image/Makefile  | 2 +-
 target/linux/brcm63xx/image/Makefile   | 2 +-
 target/linux/generic/files/crypto/ocf/Makefile | 2 +-
 target/linux/ipq806x/image/Makefile| 2 +-
 target/linux/malta/image/Makefile  | 2 +-
 target/linux/x86/image/Makefile| 4 ++--
 target/linux/xburst/image/Makefile | 2 +-
 14 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/docs/adding.tex b/docs/adding.tex
index 97547ac..7b80c0d 100644
--- a/docs/adding.tex
+++ b/docs/adding.tex
@@ -556,7 +556,7 @@ include $(INCLUDE_DIR)/image.mk
 
 define Image/BuildKernel
 cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
-gzip -9 -c $(KDIR)/vmlinux  $(KDIR)/vmlinux.bin.gz
+gzip -9n -c $(KDIR)/vmlinux  $(KDIR)/vmlinux.bin.gz
 $(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.bin.l7
 dd if=$(KDIR)/vmlinux.bin.l7 
of=$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma bs=65536 conv=sync
 dd if=$(KDIR)/vmlinux.bin.gz of=$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.gz 
bs=65536 conv=sync
diff --git a/include/image.mk b/include/image.mk
index 814e7dc..6767e76 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -224,7 +224,7 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
 endif
 
 define Image/mkfs/cpiogz
-   ( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9 
$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
+   ( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9n 
$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
 endef
 
 define Image/mkfs/targz
diff --git a/package/Makefile b/package/Makefile
index 3ef34b1..cc691b5 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -149,7 +149,7 @@ $(curdir)/index: FORCE
mkdir -p $(PACKAGE_DIR)/$$d; \
cd $(PACKAGE_DIR)/$$d || continue; \
$(SCRIPT_DIR)/ipkg-make-index.sh . 21  Packages  \
-   gzip -9c Packages  Packages.gz; \
+   gzip -9nc Packages  Packages.gz; \
); done
 ifdef CONFIG_SIGNED_PACKAGES
@echo Signing package index...
diff --git a/target/imagebuilder/files/Makefile 
b/target/imagebuilder/files/Makefile
index e28660f..8f25c4a 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -121,7 +121,7 @@ package_index: FORCE
@echo Building package index...
@mkdir -p $(TMP_DIR) $(TARGET_DIR)/tmp
(cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh .  Packages  \
-   gzip -9c Packages  Packages.gz \
+   gzip -9nc Packages  Packages.gz \
) /dev/null 2/dev/null
$(OPKG) update || true
 
diff --git a/target/linux/adm5120/image/router_le.mk 
b/target/linux/adm5120/image/router_le.mk
index 6df6dcd..1e3d7f7 100644
--- a/target/linux/adm5120/image/router_le.mk
+++ b/target/linux/adm5120/image/router_le.mk
@@ -72,7 +72,7 @@ define Image/Build/Cellvision
$(call Image/Build/Loader,$(2),bin,0x8050,0x6D8,y,$(3))
mkdir -p $(BIN_DIR)/tmp
cp $(KDIR)/loader-$(2).bin $(BIN_DIR)/tmp/vmlinux.bin
-   gzip -9 $(BIN_DIR)/tmp/vmlinux.bin
+   gzip -9n $(BIN_DIR)/tmp/vmlinux.bin
dd if=$(BIN_DIR)/tmp/vmlinux.bin.gz of=$(call 
imgname,$(1),$(2))-xmodem.bin bs=64k conv=sync
rm -rf $(BIN_DIR)/tmp
$(call Image/Build/TRXNoloader,$(call imgname,$(1),$(2)).trx,$(1))
diff --git a/target/linux/adm8668/image/Makefile 
b/target/linux/adm8668/image/Makefile
index 9e25224..597b8f7 100644
--- a/target/linux/adm8668/image/Makefile
+++ b/target/linux/adm8668/image/Makefile
@@ -16,7 +16,7 @@ endef
 
 
 define CompressGzip
-   gzip -9 -c $(1)  $(2)
+   gzip -9n -c $(1)  $(2)
 endef
 
 define MkImage
diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 0351310..c8cf301 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -985,7 +985,7 @@ endef
 define PatchKernelGzip
cp $(KDIR)/vmlinux$(3) $(KDIR_TMP)/vmlinux$(3)-$(1)
$(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR_TMP)/vmlinux$(3)-$(1) 
$(strip $(2))
-   gzip -9 -c $(KDIR_TMP)/vmlinux$(3)-$(1)  
$(KDIR_TMP)/vmlinux$(3)-$(1).bin.gz
+   gzip -9n -c $(KDIR_TMP)/vmlinux$(3)-$(1)  
$(KDIR_TMP)/vmlinux$(3)-$(1).bin.gz
 endef
 
 ifneq ($(SUBTARGET),mikrotik)
@@ -2224,10 +2224,10 @@ define Image/Build/Initramfs
 endef
 
 define Image/Prepare
-   gzip -9 -c 

[OpenWrt-Devel] [PATCH 1/2] ipkg-build: use deterministic timestamps in ipk tarballs

2015-07-12 Thread Reiner Herrmann
As a follow-up to r46026, this commit sets the modification
times of files inside the tarballs to deterministic values.
It uses the date of the last git or svn commit and falls
back to the old behavior if those are not available.

Signed-off-by: Reiner Herrmann rei...@reiner-h.de
---
 scripts/ipkg-build | 17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/scripts/ipkg-build b/scripts/ipkg-build
index 6787ed4..2d41076 100755
--- a/scripts/ipkg-build
+++ b/scripts/ipkg-build
@@ -13,8 +13,19 @@ version=1.0
 FIND=$(which find)
 FIND=${FIND:-$(which gfind)}
 TAR=${TAR:-$(which tar)}
+SVN=$(which svn)
+GIT=$(which git)
 export GZIP=-n
 
+# look up date of last commit
+if [ -d $TOPDIR/.git ]; then
+   TIMESTAMP=$($GIT log -1 -s --format=%ci)
+elif [ -d $TOPDIR/.svn ]; then
+   TIMESTAMP=$($SVN info $TOPDIR | sed -n s/^Last Changed Date: 
\(.*\)/\1/p)
+else
+   TIMESTAMP=$(date)
+fi
+
 ipkg_extract_value() {
sed -e s/^[^:]*:[[:space:]]*//
 }
@@ -128,20 +139,20 @@ mkdir $tmp_dir
 
 echo $CONTROL  $tmp_dir/tarX
 # Preserve permissions (-p) when creating data.tar.gz as non-root user
-( cd $pkg_dir  $TAR $ogargs -X $tmp_dir/tarX --format=gnu -czpf 
$tmp_dir/data.tar.gz . )
+( cd $pkg_dir  $TAR $ogargs -X $tmp_dir/tarX --format=gnu -czpf 
$tmp_dir/data.tar.gz --mtime=$TIMESTAMP . )
 
 installed_size=`stat -c %s $tmp_dir/data.tar.gz`
 sed -i -e s/^Installed-Size: .*/Installed-Size: $installed_size/ \
$pkg_dir/$CONTROL/control
 
-( cd $pkg_dir/$CONTROL  $TAR $ogargs --format=gnu -czf 
$tmp_dir/control.tar.gz . )
+( cd $pkg_dir/$CONTROL  $TAR $ogargs --format=gnu -czf 
$tmp_dir/control.tar.gz --mtime=$TIMESTAMP . )
 rm $tmp_dir/tarX
 
 echo 2.0  $tmp_dir/debian-binary
 
 pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk
 rm -f $pkg_file
-( cd $tmp_dir  $TAR --format=gnu -zcf $pkg_file ./debian-binary 
./data.tar.gz ./control.tar.gz )
+( cd $tmp_dir  $TAR --format=gnu -zcf $pkg_file --mtime=$TIMESTAMP 
./debian-binary ./data.tar.gz ./control.tar.gz )
 
 rm $tmp_dir/debian-binary $tmp_dir/data.tar.gz $tmp_dir/control.tar.gz
 rmdir $tmp_dir
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel