Re: [OpenWrt-Devel] [LEDE-DEV] owrt landing page

2018-01-10 Thread John Crispin



On 10/01/18 22:56, Thomas Endt wrote:

Hi John,

First results on a private demowiki, see: 
https://lede-project.org/_media/wiki/ledewiki-owrtstyling.jpg

looking pretty cool !! thanks for the effort.


1) red marking: What are we going to do with the sidebar (raw, untouched 
styling; could be beautified)? Keep or remove?

no idea


2) blue marking: I remember there was some discussion about a new, fresh logo.
I think now with the move to the LEDE codebase is the right time to refresh 
the wiki a bit too.
Does anybody remember where that discussion happened and what the outcome 
was?
we had a few proposals but nothing final. lets use the existing logo for 
now until we have a new one ?



3) I changed my mind regarding hard cut. The OpenWrt wiki is still rw, and we 
should keep it that way until we have a plan on how to accomplish the actual 
merge of the wikis.


Ok, your call really.

    John


Thomas


-Ursprüngliche Nachricht-
Von: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] Im
Auftrag von Thomas Endt
Gesendet: Samstag, 6. Januar 2018 18:06
An: 'John Crispin'; 'LEDE Development List'; 'LEDE Project
Administration'; 'OpenWrt Development List'
Betreff: Re: [OpenWrt-Devel] [LEDE-DEV] owrt landing page

Hi John,

Since the styling is based on CSS, we would need the OpenWrt wiki's CSS
for that. Once we have that, it will be relatively easy.
But instead of doing the merge of the wikis step by step, I would
suggest a hard cut.

1.) Make OpenWrt wiki read only -> I can do that or Imre
2.) Create .tgz of OpenWrt wiki and hand it over to LEDE wiki admins ->
Imre
3.) Move LEDE wiki to OpenWrt styling (apply OpenWrt theme and CSS to
LEDE
wiki) -> I can do that. Some help of CSS experienced guys could be
necessary for hard cases.
4.) Move content of old OpenWrt wiki to new OpenWrt wiki (former LEDE)
 -> I can take the toh part (devicepages); dataentries will be taken
from LEDE since they are way more up to date and contain more
datafields.
 -> Rest of the wiki: A plan needs to be worked out what will be
carried over from old to new OpenWrt wiki -> Community discussion

I'm in the starting blocks since weeks, waiting only for the GO and the
OpenWrt wiki sources, and I'm sure, we will have some helping heands
ready to start the wiki merge.

Thomas


-Ursprüngliche Nachricht-
Von: Lede-dev [mailto:lede-dev-boun...@lists.infradead.org] Im

Auftrag

von John Crispin
Gesendet: Freitag, 5. Januar 2018 18:54
An: LEDE Development List; LEDE Project Administration; OpenWrt
Development List
Betreff: [LEDE-DEV] owrt landing page

Hi,

could someone please help us with rebranding the lede landing page to
an openwrt colour/theme ? i would like to see this swithced over
within the next 7 days.

John

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


Re: [OpenWrt-Devel] [PATCH 2/3] ipq-wifi: select board-2.bin at runtime

2018-01-10 Thread Mathias Kresin

11.01.2018 07:23, Mathias Kresin:

10.01.2018 11:15, Thomas Hebb:

Currently, we solve the problem of different IPQ4019 boards needing
different sets of Wi-Fi calibration data (board-2.bin) by using an
ipq-wifi-* package to overwrite board-2.bin in the filesystem. This
presents a problem when we need the same image to support multiple
boards, as we do for the upcoming Netgear EX6100v2 and EX6150v2
support.


I don't get what kind of issue do you have with this approach. Why not 
just add ipq-wifi-ex6100v2 to the DEVICE_PACKAGES of your EX6150v2.


I'm quite sure I miss here something. Which either means it is to early 
for me or the commit message doesn't provide the whole picture.


After reviewing your Netgear EX6100v2/EX6150v2 support patch I got your 
issue. One image for two boards where the distinction of the board is 
done in userspace and each board requires a different board-2.bin.


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


Re: [OpenWrt-Devel] [PATCH 3/3] ipq806x: add Netgear EX6100v2/EX6150v2 support

2018-01-10 Thread Mathias Kresin

Hey Thomas,

I only had a brief look at the patch. Might be there is more stuff to 
change. Find my comments inline.


10.01.2018 11:15, Thomas Hebb:

This patch adds support for the Netgear EX6100v2 and EX6150v2 Wi-Fi
range extenders.

Hardware:

SoC:Qualcomm IPQ4018
RAM:256 MiB
FLASH:  16 MiB Winbond W25Q128
ETH:Qualcomm IPQ4018 Gigabit PHY, 1 port
WLAN1:  Qualcomm Atheros QCA4018 2.4GHz 802.11b/g/n 2x2
WLAN2:  Qualcomm Atheros QCA4018 5GHz 802.11n/ac 1x1 (EX6100v2)
WLAN2:  Qualcomm Atheros QCA4018 5GHz 802.11n/ac 2x2 (EX6150v2)
INPUT:  Power, WPS, factory reset buttons, AP/extender mode toggle switch
LEDS:   Power, router, client (dual color red/green)
 Router activity, client activity (blue)
 WPS (green)
SERIAL: 3.3V unpopulated serial header connected to ttyMSM0. 11520n8.
 Serial access is not required to install OpenWRT on the device.

 To access, unscrew the four Torx T10 screws on the back of the
 unit and unclip the faceplate. Then, unclip the power supply
 board (to which the logic board is mounted using four large
 standoffs) from the large clips on the top and bottom that hold
 it in place. Flip over the boards so the power supply board is
 on top, making sure not to damage the Wi-Fi antenna wires.
 Unscrew the four Phillips #1 screws connecting the power supply
 board to the standoffs and carefully lift it off, unplugging the
 eight-pin connector that supplies power to the logic board. Then
 unscrew the four hexagonal standoffs from the logic board, flip
 the board over again, and lift off the metal shield (watch out
 for thermal compound). The unpopulated header is located at the
 bottom edge of the logic board, with pins 1 (square pad), 2, 3,
 and 4 carrying VDD (3.3V), TX, RX, and GND respectively.

To install, upload openwrt-ipq806x-EX61x0v2-squashfs-factory.img to the
Netgear web interface as a firmware update and ensure that the listed
update version matches that of the OpenWRT image you're trying to
install. Note that OpenWRT will not bring up the wireless interfaces by
default, so you must be able to connect to Ethernet for initial
configuration.

Features, tested and working:
  - Serial
  - Flash
  - Ethernet
  - Wi-Fi, 2.4GHz and 5GHz
  - Buttons (WPS and factory reset, which acts as restart)
  - LEDs (most of which are driven by a shift register connected to SoC GPIOs)
  - Factory OpenWRT install from Netgear firmware
  - OpenWRT sysupgrade

Features, untested but should work:
  - All above on the EX6150v2. I only own an EX6100v2 and so could not
verify the other device.

Features, not planned:
  - AP/extender toggle switch

These two boards are unusual in that they both run the same stock image
and share the same official update binaries. As far as I can tell, the
only difference between the two units is the 5GHz MIMO configuration:
1x1 for the EX6100v2 and 2x2 for the EX6150v2. Since the boards are so
similar, both are supported by a single OpenWRT image, which determines
the board it's running on at runtime by reading the flash. The only
runtime differences between the two boards are the board name, the model
name, and the Wi-Fi calibration data that gets loaded.

U-Boot on this device is device-tree aware, and the stock firmware
provides the kernel and device tree in a FIT image. We do the same
because, even though this version of U-Boot ought to be able to boot a
uImage with appended DTB, I was unable to make that configuration work
for unknown reasons.

The Wi-Fi calibration data (board-2.dat) for both boards was taken from
an official Netgear firmware update.

Signed-off-by: Thomas Hebb 
---
  package/firmware/ipq-wifi/Makefile |   4 +-
  package/firmware/ipq-wifi/board-ex6100v2.bin   | Bin 0 -> 24276 bytes
  package/firmware/ipq-wifi/board-ex6150v2.bin   | Bin 0 -> 24276 bytes
  .../ipq806x/base-files/etc/board.d/02_network  |   4 +
  .../etc/hotplug.d/firmware/11-ath10k-caldata   |   8 +-
  .../etc/hotplug.d/ieee80211/10_fix_wifi_mac|  13 ++
  target/linux/ipq806x/base-files/lib/ipq806x.sh |  24 +++
  target/linux/ipq806x/config-4.9|   2 +
  .../arch/arm/boot/dts/qcom-ipq4019-ex61x0v2.dts| 211 +
  target/linux/ipq806x/image/Makefile|  41 +++-
  .../patches-4.9/0069-arm-boot-add-dts-files.patch  |   3 +-
  11 files changed, 300 insertions(+), 10 deletions(-)
  create mode 100644 package/firmware/ipq-wifi/board-ex6100v2.bin
  create mode 100644 package/firmware/ipq-wifi/board-ex6150v2.bin
  create mode 100644 
target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq4019-ex61x0v2.dts

diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh 
b/target/linux/ipq806x/base-files/lib/ipq806x.sh
index c4d2c8f258..1e011292eb 100644
--- a/target/linux/ipq806x/base-files/lib/ipq806x.sh
+++ 

Re: [OpenWrt-Devel] [PATCH 2/3] ipq-wifi: select board-2.bin at runtime

2018-01-10 Thread Mathias Kresin

10.01.2018 11:15, Thomas Hebb:

Currently, we solve the problem of different IPQ4019 boards needing
different sets of Wi-Fi calibration data (board-2.bin) by using an
ipq-wifi-* package to overwrite board-2.bin in the filesystem. This
presents a problem when we need the same image to support multiple
boards, as we do for the upcoming Netgear EX6100v2 and EX6150v2
support.


I don't get what kind of issue do you have with this approach. Why not 
just add ipq-wifi-ex6100v2 to the DEVICE_PACKAGES of your EX6150v2.


I'm quite sure I miss here something. Which either means it is to early 
for me or the commit message doesn't provide the whole picture.


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


[OpenWrt-Devel] [PATCH] ar71xx: disable devicetree support

2018-01-10 Thread Matthias Schiffer
While we'd like to convert ar71xx to DT-based configuration
eventually, we aren't quite there yet, and shipping half-baked DT support
that is not used at all wastes precious space.

Saves ~120KB before LZMA, ~33KB after LZMA.

Run-tested on TP-Link CPE510 and TL-WR841 v7.

Signed-off-by: Matthias Schiffer 
---
 target/linux/ar71xx/config-4.9 | 21 +--
 .../ar71xx/patches-4.9/604-MIPS-ath79-no-of.patch  | 70 ++
 ...20-MIPS-ath79-add-support-for-QCA953x-SoC.patch |  4 +-
 ...21-MIPS-ath79-add-support-for-QCA956x-SoC.patch |  4 +-
 4 files changed, 75 insertions(+), 24 deletions(-)
 create mode 100644 target/linux/ar71xx/patches-4.9/604-MIPS-ath79-no-of.patch

diff --git a/target/linux/ar71xx/config-4.9 b/target/linux/ar71xx/config-4.9
index 4334d25b80..1b9b971688 100644
--- a/target/linux/ar71xx/config-4.9
+++ b/target/linux/ar71xx/config-4.9
@@ -284,7 +284,6 @@ CONFIG_CRYPTO_RNG2=y
 CONFIG_CRYPTO_WORKQUEUE=y
 CONFIG_CSRC_R4K=y
 CONFIG_DMA_NONCOHERENT=y
-CONFIG_DTC=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_ETHERNET_PACKET_MANGLE=y
 CONFIG_FIXED_PHY=y
@@ -360,14 +359,12 @@ CONFIG_INITRAMFS_ROOT_UID=0
 CONFIG_INITRAMFS_SOURCE="../../root"
 CONFIG_INTEL_XWAY_PHY=y
 CONFIG_IP17XX_PHY=y
-CONFIG_IRQCHIP=y
 CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_MIPS_CPU=y
 CONFIG_IRQ_WORK=y
 CONFIG_LEDS_GPIO=y
 # CONFIG_LEDS_WNDR3700_USB is not set
-CONFIG_LIBFDT=y
 CONFIG_MARVELL_PHY=y
 CONFIG_MDIO_BITBANG=y
 CONFIG_MDIO_BOARDINFO=y
@@ -378,15 +375,10 @@ CONFIG_MIPS_ASID_BITS=8
 CONFIG_MIPS_ASID_SHIFT=0
 CONFIG_MIPS_CLOCK_VSYSCALL=y
 # CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
-# CONFIG_MIPS_CMDLINE_DTB_EXTEND is not set
 CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y
-# CONFIG_MIPS_CMDLINE_FROM_DTB is not set
-# CONFIG_MIPS_ELF_APPENDED_DTB is not set
 # CONFIG_MIPS_HUGE_TLB_SUPPORT is not set
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 CONFIG_MIPS_MACHINE=y
-CONFIG_MIPS_NO_APPENDED_DTB=y
-# CONFIG_MIPS_RAW_APPENDED_DTB is not set
 CONFIG_MIPS_SPRAM=y
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MTD_CFI_ADV_OPTIONS=y
@@ -422,17 +414,7 @@ CONFIG_NET_DSA_TAG_TRAILER=y
 CONFIG_NET_SWITCHDEV=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 # CONFIG_NO_IOPORT_MAP is not set
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_ADDRESS_PCI=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_GPIO=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_MDIO=y
-CONFIG_OF_NET=y
-CONFIG_OF_PCI=y
-CONFIG_OF_PCI_IRQ=y
+# CONFIG_OF is not set
 CONFIG_PCI=y
 CONFIG_PCI_AR724X=y
 CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
@@ -486,4 +468,3 @@ CONFIG_SYS_SUPPORTS_ZBOOT=y
 CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM=y
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_USB_SUPPORT=y
-CONFIG_USE_OF=y
diff --git a/target/linux/ar71xx/patches-4.9/604-MIPS-ath79-no-of.patch 
b/target/linux/ar71xx/patches-4.9/604-MIPS-ath79-no-of.patch
new file mode 100644
index 00..c0b5459e45
--- /dev/null
+++ b/target/linux/ar71xx/patches-4.9/604-MIPS-ath79-no-of.patch
@@ -0,0 +1,70 @@
+--- a/arch/mips/Kconfig
 b/arch/mips/Kconfig
+@@ -195,7 +195,6 @@ config ATH79
+   select SYS_SUPPORTS_BIG_ENDIAN
+   select SYS_SUPPORTS_MIPS16
+   select SYS_SUPPORTS_ZBOOT_UART_PROM
+-  select USE_OF
+   help
+ Support for the Atheros AR71XX/AR724X/AR913X SoCs.
+ 
+--- a/arch/mips/ath79/setup.c
 b/arch/mips/ath79/setup.c
+@@ -196,16 +196,20 @@ unsigned int get_c0_compare_int(void)
+ 
+ void __init plat_mem_setup(void)
+ {
++#ifdef CONFIG_OF
+   unsigned long fdt_start;
++#endif
+ 
+   set_io_port_base(KSEG1);
+ 
++#ifdef CONFIG_OF
+   /* Get the position of the FDT passed by the bootloader */
+   fdt_start = fw_getenvl("fdt_start");
+   if (fdt_start)
+   __dt_setup_arch((void *)KSEG0ADDR(fdt_start));
+   else if (fw_passed_dtb)
+   __dt_setup_arch((void *)KSEG0ADDR(fw_passed_dtb));
++#endif
+ 
+   if (mips_machtype != ATH79_MACH_GENERIC_OF) {
+   ath79_reset_base = ioremap_nocache(AR71XX_RESET_BASE,
+@@ -301,17 +305,21 @@ static int __init ath79_setup(void)
+ 
+ arch_initcall(ath79_setup);
+ 
++#ifdef CONFIG_OF
+ void __init device_tree_init(void)
+ {
+   unflatten_and_copy_device_tree();
+ }
++#endif
+ 
+ MIPS_MACHINE(ATH79_MACH_GENERIC,
+"Generic",
+"Generic AR71XX/AR724X/AR913X based board",
+NULL);
+ 
++#ifdef CONFIG_OF
+ MIPS_MACHINE(ATH79_MACH_GENERIC_OF,
+"DTB",
+"Generic AR71XX/AR724X/AR913X based board (DT)",
+NULL);
++#endif
+--- a/arch/mips/ath79/clock.c
 b/arch/mips/ath79/clock.c
+@@ -33,10 +33,12 @@
+ #define AR724X_BASE_FREQ  4000
+ 
+ static struct clk *clks[ATH79_CLK_END];
++#ifdef CONFIG_OF
+ static struct clk_onecell_data clk_data = {
+   .clks = clks,
+   .clk_num = ARRAY_SIZE(clks),
+ };
++#endif
+ 
+ static struct clk *__init ath79_add_sys_clkdev(
+   const char *id, unsigned long rate)
diff --git 

Re: [OpenWrt-Devel] [LEDE-DEV] owrt landing page

2018-01-10 Thread Thomas Endt
Hi John,

First results on a private demowiki, see: 
https://lede-project.org/_media/wiki/ledewiki-owrtstyling.jpg

1) red marking: What are we going to do with the sidebar (raw, untouched 
styling; could be beautified)? Keep or remove?
2) blue marking: I remember there was some discussion about a new, fresh logo.
   I think now with the move to the LEDE codebase is the right time to refresh 
the wiki a bit too.
   Does anybody remember where that discussion happened and what the outcome 
was?
3) I changed my mind regarding hard cut. The OpenWrt wiki is still rw, and we 
should keep it that way until we have a plan on how to accomplish the actual 
merge of the wikis.


Thomas

> -Ursprüngliche Nachricht-
> Von: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] Im
> Auftrag von Thomas Endt
> Gesendet: Samstag, 6. Januar 2018 18:06
> An: 'John Crispin'; 'LEDE Development List'; 'LEDE Project
> Administration'; 'OpenWrt Development List'
> Betreff: Re: [OpenWrt-Devel] [LEDE-DEV] owrt landing page
> 
> Hi John,
> 
> Since the styling is based on CSS, we would need the OpenWrt wiki's CSS
> for that. Once we have that, it will be relatively easy.
> But instead of doing the merge of the wikis step by step, I would
> suggest a hard cut.
> 
> 1.) Make OpenWrt wiki read only -> I can do that or Imre
> 2.) Create .tgz of OpenWrt wiki and hand it over to LEDE wiki admins ->
> Imre
> 3.) Move LEDE wiki to OpenWrt styling (apply OpenWrt theme and CSS to
> LEDE
> wiki) -> I can do that. Some help of CSS experienced guys could be
> necessary for hard cases.
> 4.) Move content of old OpenWrt wiki to new OpenWrt wiki (former LEDE)
> -> I can take the toh part (devicepages); dataentries will be taken
> from LEDE since they are way more up to date and contain more
> datafields.
> -> Rest of the wiki: A plan needs to be worked out what will be
> carried over from old to new OpenWrt wiki -> Community discussion
> 
> I'm in the starting blocks since weeks, waiting only for the GO and the
> OpenWrt wiki sources, and I'm sure, we will have some helping heands
> ready to start the wiki merge.
> 
> Thomas
> 
> > -Ursprüngliche Nachricht-
> > Von: Lede-dev [mailto:lede-dev-boun...@lists.infradead.org] Im
> Auftrag
> > von John Crispin
> > Gesendet: Freitag, 5. Januar 2018 18:54
> > An: LEDE Development List; LEDE Project Administration; OpenWrt
> > Development List
> > Betreff: [LEDE-DEV] owrt landing page
> >
> > Hi,
> >
> > could someone please help us with rebranding the lede landing page to
> > an openwrt colour/theme ? i would like to see this swithced over
> > within the next 7 days.
> >
> > John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] ipq806x: add Netgear EX6100v2/EX6150v2 support

2018-01-10 Thread Thomas Hebb
This patch adds support for the Netgear EX6100v2 and EX6150v2 Wi-Fi
range extenders.

Hardware:

SoC:Qualcomm IPQ4018
RAM:256 MiB
FLASH:  16 MiB Winbond W25Q128
ETH:Qualcomm IPQ4018 Gigabit PHY, 1 port
WLAN1:  Qualcomm Atheros QCA4018 2.4GHz 802.11b/g/n 2x2
WLAN2:  Qualcomm Atheros QCA4018 5GHz 802.11n/ac 1x1 (EX6100v2)
WLAN2:  Qualcomm Atheros QCA4018 5GHz 802.11n/ac 2x2 (EX6150v2)
INPUT:  Power, WPS, factory reset buttons, AP/extender mode toggle switch
LEDS:   Power, router, client (dual color red/green)
Router activity, client activity (blue)
WPS (green)
SERIAL: 3.3V unpopulated serial header connected to ttyMSM0. 11520n8.
Serial access is not required to install OpenWRT on the device.

To access, unscrew the four Torx T10 screws on the back of the
unit and unclip the faceplate. Then, unclip the power supply
board (to which the logic board is mounted using four large
standoffs) from the large clips on the top and bottom that hold
it in place. Flip over the boards so the power supply board is
on top, making sure not to damage the Wi-Fi antenna wires.
Unscrew the four Phillips #1 screws connecting the power supply
board to the standoffs and carefully lift it off, unplugging the
eight-pin connector that supplies power to the logic board. Then
unscrew the four hexagonal standoffs from the logic board, flip
the board over again, and lift off the metal shield (watch out
for thermal compound). The unpopulated header is located at the
bottom edge of the logic board, with pins 1 (square pad), 2, 3,
and 4 carrying VDD (3.3V), TX, RX, and GND respectively.

To install, upload openwrt-ipq806x-EX61x0v2-squashfs-factory.img to the
Netgear web interface as a firmware update and ensure that the listed
update version matches that of the OpenWRT image you're trying to
install. Note that OpenWRT will not bring up the wireless interfaces by
default, so you must be able to connect to Ethernet for initial
configuration.

Features, tested and working:
 - Serial
 - Flash
 - Ethernet
 - Wi-Fi, 2.4GHz and 5GHz
 - Buttons (WPS and factory reset, which acts as restart)
 - LEDs (most of which are driven by a shift register connected to SoC GPIOs)
 - Factory OpenWRT install from Netgear firmware
 - OpenWRT sysupgrade

Features, untested but should work:
 - All above on the EX6150v2. I only own an EX6100v2 and so could not
   verify the other device.

Features, not planned:
 - AP/extender toggle switch

These two boards are unusual in that they both run the same stock image
and share the same official update binaries. As far as I can tell, the
only difference between the two units is the 5GHz MIMO configuration:
1x1 for the EX6100v2 and 2x2 for the EX6150v2. Since the boards are so
similar, both are supported by a single OpenWRT image, which determines
the board it's running on at runtime by reading the flash. The only
runtime differences between the two boards are the board name, the model
name, and the Wi-Fi calibration data that gets loaded.

U-Boot on this device is device-tree aware, and the stock firmware
provides the kernel and device tree in a FIT image. We do the same
because, even though this version of U-Boot ought to be able to boot a
uImage with appended DTB, I was unable to make that configuration work
for unknown reasons.

The Wi-Fi calibration data (board-2.dat) for both boards was taken from
an official Netgear firmware update.

Signed-off-by: Thomas Hebb 
---
 package/firmware/ipq-wifi/Makefile |   4 +-
 package/firmware/ipq-wifi/board-ex6100v2.bin   | Bin 0 -> 24276 bytes
 package/firmware/ipq-wifi/board-ex6150v2.bin   | Bin 0 -> 24276 bytes
 .../ipq806x/base-files/etc/board.d/02_network  |   4 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |   8 +-
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac|  13 ++
 target/linux/ipq806x/base-files/lib/ipq806x.sh |  24 +++
 target/linux/ipq806x/config-4.9|   2 +
 .../arch/arm/boot/dts/qcom-ipq4019-ex61x0v2.dts| 211 +
 target/linux/ipq806x/image/Makefile|  41 +++-
 .../patches-4.9/0069-arm-boot-add-dts-files.patch  |   3 +-
 11 files changed, 300 insertions(+), 10 deletions(-)
 create mode 100644 package/firmware/ipq-wifi/board-ex6100v2.bin
 create mode 100644 package/firmware/ipq-wifi/board-ex6150v2.bin
 create mode 100644 
target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq4019-ex61x0v2.dts

diff --git a/package/firmware/ipq-wifi/Makefile 
b/package/firmware/ipq-wifi/Makefile
index f2b705e13a..7d26938e97 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -13,7 +13,7 @@ endef
 define Build/Compile
 endef
 
-ALLWIFIBOARDS:=rt-ac58u fritz4040 nbg6617
+ALLWIFIBOARDS:=rt-ac58u fritz4040 nbg6617 ex6100v2 ex6150v2
 ALLWIFIPACKAGES:=$(foreach 

[OpenWrt-Devel] [PATCH 02/15] metadata: make srcpackage extensible

2018-01-10 Thread Matthias Schiffer
Turn the srcpackage values into hashes to allow storing more information
than just binary package names.

Signed-off-by: Matthias Schiffer 
---
 scripts/feeds   | 2 +-
 scripts/metadata.pm | 6 --
 scripts/package-metadata.pl | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/scripts/feeds b/scripts/feeds
index 55c294ad0a..42f7b3b116 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -525,7 +525,7 @@ sub install_package {
};
 
# install all dependencies referenced from the source package
-   foreach my $vpkg (@{$feed_src->{$src}}) {
+   foreach my $vpkg (@{$feed_src->{$src}->{packages}}) {
foreach my $dep (@{$vpkg->{depends}}, @{$vpkg->{builddepends}}, 
@{$vpkg->{"builddepends/host"}}) {
next if $dep =~ /@/;
$dep =~ s/^\+//;
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index d446892e2b..297abc9f12 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -212,7 +212,9 @@ sub parse_package_metadata($) {
$src = $3;
$subdir =~ s/^package\///;
$subdir{$src} = $subdir;
-   $srcpackage{$src} = [];
+   $srcpackage{$src} = {
+   packages => [],
+   };
$override = "";
undef $pkg;
};
@@ -237,7 +239,7 @@ sub parse_package_metadata($) {
$pkg->{tristate} = 1;
$pkg->{override} = $override;
$package{$1} = $pkg;
-   push @{$srcpackage{$src}}, $pkg;
+   push @{$srcpackage{$src}->{packages}}, $pkg;
};
/^Feature:\s*(.+?)\s*$/ and do {
undef $pkg;
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index 46446e994b..3a176c8024 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -445,7 +445,7 @@ sub gen_package_mk() {
print "buildtypes-$pkg->{subdir}$pkg->{src} = ".join(' 
', @{$pkg->{buildtypes}})."\n";
}
 
-   foreach my $spkg (@{$srcpackage{$pkg->{src}}}) {
+   foreach my $spkg (@{$srcpackage{$pkg->{src}}->{packages}}) {
foreach my $dep (@{$spkg->{depends}}, 
@{$spkg->{builddepends}}) {
$dep =~ /@/ or do {
$dep =~ s/\+//g;
-- 
2.15.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 11/15] metadata: handle target build depends together with host build depends

2018-01-10 Thread Matthias Schiffer
Target build depends are similar to host build depends in that they refer
to source packages rather than binary packages. Therefore, it makes sense
to handle them together, rather than putting them in a list together with
runtime depends and trying to figure out if the entries refer to source or
to binary packages afterwards.

This does lead to PKG_BUILD_DEPENDS entries referring to binary package
names not working anymore, which requires some fixes in the package
repositories.

Signed-off-by: Matthias Schiffer 
---
 scripts/package-metadata.pl | 60 +
 1 file changed, 28 insertions(+), 32 deletions(-)

diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index 9372191166..e492cc8a09 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -408,6 +408,7 @@ sub gen_package_mk() {
my $src = $srcpackage{$srcname};
my $variant_default;
my @srcdeps;
+   my %deplines = ('' => {});
 
foreach my $pkg (@{$src->{packages}}) {
next if defined $pkg->{vdepends};
@@ -441,19 +442,23 @@ sub gen_package_mk() {
print "buildtypes-$src->{path} = ".join(' ', 
@{$src->{buildtypes}})."\n";
}
 
-   foreach my $dep (@{$src->{builddepends}}, map { 
@{$_->{depends}} } @{$src->{packages}}) {
+   foreach my $dep (map { @{$_->{depends}} } @{$src->{packages}}) {
$dep =~ /@/ or do {
$dep =~ s/\+//g;
push @srcdeps, $dep;
};
}
-   foreach my $type (@{$src->{buildtypes}}) {
-   my @extra_deps;
-   my %deplines;
+   foreach my $type ('', @{$src->{buildtypes}}) {
+   my $suffix = '';
 
-   next unless $src->{"builddepends/$type"};
-   foreach my $dep (@{$src->{"builddepends/$type"}}) {
-   my $suffix = "";
+   $suffix = "/$type" if $type;
+
+   next unless $src->{"builddepends$suffix"};
+
+   defined $deplines{$suffix} or $deplines{$suffix} = {};
+
+   foreach my $dep (@{$src->{"builddepends$suffix"}}) {
+   my $depsuffix = "";
my $deptype = "";
my $condition;
 
@@ -464,37 +469,26 @@ sub gen_package_mk() {
if ($dep =~ /^(.+)\/(.+)/) {
$dep = $1;
$deptype = $2;
-   $suffix = "/$2";
+   $depsuffix = "/$2";
}
 
-   my $idx = "";
-   my $pkg_dep = $package{$dep};
-   if (defined($pkg_dep) && 
defined($pkg_dep->{src})) {
-   unless (!$deptype || grep { $_ eq 
$deptype } @{$pkg_dep->{src}->{buildtypes}}) {
-   warn sprintf "WARNING: Makefile 
'%s' has a %s build dependency on '%s/%s' but '%s' does not implement a '%s' 
build type\n",
-   $src->{makefile}, 
$type, $pkg_dep->{src}->{name}, $deptype, $pkg_dep->{src}->{makefile}, $deptype;
-   next;
-   }
-   $idx = $pkg_dep->{src}->{path};
-   } elsif (defined($srcpackage{$dep})) {
-   $idx = $srcpackage{$dep}->{path};
-   } else {
+   next if $srcname.$suffix eq $dep.$depsuffix;
+
+   my $src_dep = $srcpackage{$dep};
+   unless (defined($src_dep) && (!$deptype || grep 
{ $_ eq $deptype } @{$src_dep->{buildtypes}})) {
+   warn sprintf "WARNING: Makefile '%s' 
has a build dependency on '%s%s', which does not exist\n",
+   $src->{makefile}, $dep, 
$depsuffix;
next;
}
-   my $depstr = "\$(curdir)/$idx$suffix/compile";
+
+   my $depstr = 
"\$(curdir)/$src_dep->{path}$depsuffix/compile";
my $depline = get_conditional_dep($condition, 
$depstr);
if ($depline) {
-   $deplines{$depline}++;
+   $deplines{$suffix}->{$depline}++;

[OpenWrt-Devel] [PATCH 09/15] build: remove package preconfig feature

2018-01-10 Thread Matthias Schiffer
This feature has been unused for years, and its scope is too limited to be
actually useful.

Signed-off-by: Matthias Schiffer 
---
 include/package-dumpinfo.mk | 16 +---
 package/Makefile|  3 ---
 scripts/metadata.pm | 20 +---
 scripts/package-metadata.pl | 36 
 4 files changed, 2 insertions(+), 73 deletions(-)

diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk
index 1be7d958d4..7cc8f3f6dc 100644
--- a/include/package-dumpinfo.mk
+++ b/include/package-dumpinfo.mk
@@ -9,19 +9,6 @@ ifneq ($(DUMP),)
 
 dumpinfo: FORCE
 
-define Config/template
-Preconfig: $(1)
-Preconfig-Type: $(2)
-Preconfig-Default: $(3)
-Preconfig-Label: $(4)
-
-endef
-
-define Config
-  Preconfig/$(1) = $$(call Config/template,$(1),$(2),$(3),$(4))
-  preconfig_$$(1) += $(1)
-endef
-
 define Dumpinfo/Package
 $(info Package: $(1)
 $(if $(MENU),Menu: $(MENU)
@@ -59,8 +46,7 @@ $(if $(URL),$(URL)
 $(if $(Package/$(1)/config),Config:
 $(Package/$(1)/config)
 @@
-)$(foreach pc,$(preconfig_$(1)),
-$(Preconfig/$(pc
+))
 endef
 
 define Feature/Default
diff --git a/package/Makefile b/package/Makefile
index 4fdf415046..0aefbb8023 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -72,7 +72,6 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if 
$(CONFIG_TARGET_PER_DE
$(call opkg,$(TARGET_DIR)) flag $$flag `cat $$file`; \
done; \
done || true
-   @-$(MAKE) package/preconfig
 
$(CP) $(TARGET_DIR) $(TARGET_DIR_ORIG)
 
@@ -96,8 +95,6 @@ ifdef CONFIG_SIGNED_PACKAGES
); done
 endif
 
-$(curdir)/preconfig:
-
 $(curdir)/flags-install:= -j1
 
 $(eval $(call stampfile,$(curdir),package,prereq,.config))
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index 50f91407d6..bb3fa72403 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -2,10 +2,9 @@ package metadata;
 use base 'Exporter';
 use strict;
 use warnings;
-our @EXPORT = qw(%package %srcpackage %category %preconfig %features 
%overrides clear_packages parse_package_metadata parse_target_metadata 
get_multiline @ignore %usernames %groupnames);
+our @EXPORT = qw(%package %srcpackage %category %features %overrides 
clear_packages parse_package_metadata parse_target_metadata get_multiline 
@ignore %usernames %groupnames);
 
 our %package;
-our %preconfig;
 our %srcpackage;
 our %category;
 our %features;
@@ -177,7 +176,6 @@ sub parse_target_metadata($) {
 }
 
 sub clear_packages() {
-   %preconfig = ();
%package = ();
%srcpackage = ();
%category = ();
@@ -191,7 +189,6 @@ sub parse_package_metadata($) {
my $file = shift;
my $pkg;
my $feature;
-   my $preconfig;
my $src;
my $override;
my %ignore = map { $_ => 1 } @ignore;
@@ -299,21 +296,6 @@ sub parse_package_metadata($) {
};
/^Config:\s*(.*)\s*$/ and $pkg->{config} = 
"$1\n".get_multiline(*FILE, "\t");
/^Prereq-Check:/ and $pkg->{prereq} = 1;
-   /^Preconfig:\s*(.+)\s*$/ and do {
-   my $pkgname = $pkg->{name};
-   $preconfig{$pkgname} or $preconfig{$pkgname} = {};
-   if (exists $preconfig{$pkgname}->{$1}) {
-   $preconfig = $preconfig{$pkgname}->{$1};
-   } else {
-   $preconfig = {
-   id => $1
-   };
-   $preconfig{$pkgname}->{$1} = $preconfig unless 
$src->{ignore};
-   }
-   };
-   /^Preconfig-Type:\s*(.*?)\s*$/ and $preconfig->{type} = $1;
-   /^Preconfig-Label:\s*(.*?)\s*$/ and $preconfig->{label} = $1;
-   /^Preconfig-Default:\s*(.*?)\s*$/ and $preconfig->{default} = 
$1;
/^Require-User:\s*(.*?)\s*$/ and do {
my @ugspecs = split /\s+/, $1;
 
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index 233fb0eabf..9372191166 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -372,19 +372,6 @@ sub print_package_overrides() {
 sub gen_package_config() {
parse_package_metadata($ARGV[0]) or exit 1;
print "menuconfig IMAGEOPT\n\tbool \"Image configuration\"\n\tdefault 
n\n";
-   foreach my $preconfig (keys %preconfig) {
-   foreach my $cfg (keys %{$preconfig{$preconfig}}) {
-   my $conf = $preconfig{$preconfig}->{$cfg}->{id};
-   $conf =~ tr/\.-/__/;
-   print <{$cfg}->{label}" if IMAGEOPT
-   depends on PACKAGE_$preconfig
-   default "$preconfig{$preconfig}->{$cfg}->{default}"
-
-EOF
-   }
-   }
print "source \"package/*/image-config.in\"\n";
if (scalar glob 

Re: [OpenWrt-Devel] [LEDE-DEV] [PATCH 00/15] Metadata generator refactoring, cleanup and PROVIDES improvements

2018-01-10 Thread Matthias Schiffer
On 01/08/2018 03:52 PM, Matthias Schiffer wrote:
> When attempting to fix FS#837, I decided to treat our metadata generator to
> a greater refactoring, which resulted in this patchset. FS#837 is fixed in
> patch 13.
> 
> I also removed two seemingly obsolete features, "preconfig" and "package
> features", which are not used by any package in the OpenWrt/LEDE base or
> our default feeds.
> 
> The changes in this patchset also improve dependency diagnostics and
> clearly separate between build depends (on source packages) and runtime
> depends (on binary packages, implying build depends). This requires some
> fixes in package Makefiles with broken dependencies (patch 10, [1], [2]).
> 
> There are also broken runtime depends in many feed packages, which I did
> not fix, but which will be shown more prominently during prepare-tmpinfo
> now. I'm not sure what the best way to handle such broken dependencies is,
> as they might also be caused by missing feeds, e.g. LuCI depending on
> telephony packages.
> - Keep the warning, but try to build the packages as before (current
>   solution in this patchset)?
> - Hide the warning again (old state)?
> - Ignore packages with missing build dependencies altogether (just show a
>   warning in the metadata generators)?
> 
> As hinted in patch 15, I have further refactoring in mind, but let's try to
> get this set reviewed and committed first...
> 
> Regards,
> Matthias

I've pushed an updated branch fixing the mistake Jo pointed out and some
other stylistic improvements to the metadata2 branch of my staging tree [3].


> [1] https://github.com/openwrt/packages/pull/5370
> [2] https://github.com/openwrt-routing/packages/pull/345

[3]
https://git.lede-project.org/?p=openwrt/staging/neoraider.git;a=shortlog;h=refs/heads/metadata2

> 
> 
> Matthias Schiffer (15):
>   metadata: remove 'base-files' special case
>   metadata: make srcpackage extensible
>   metadata: move 'buildtypes' from binary to source packages
>   metadata: move 'builddepends' from binary to source packages
>   metadata: interate over source packages when generating Makefile
>   metadata: change pkg->{src} field to hold a reference
>   metadata: replace %subdir hash with a path field in source packages
>   metadata: remove redundant fields from package hash
>   build: remove package preconfig feature
>   treewide: fix build depends to refer to source package names
>   metadata: handle target build depends together with host build depends
>   metadata: simplify generation of build depends from runtime depends
>   metadata: always resolve dependencies through provides list
>   build: remove obsolete "package feature" feature
>   include/package-dumpinfo.mk: don't duplicate source package
> information for every binary package
> 
>  include/autotools.mk |   4 +-
>  include/nls.mk   |   2 +-
>  include/package-dumpinfo.mk  |  53 +
>  package/Makefile |   3 -
>  package/network/config/ltq-adsl-app/Makefile |   2 +-
>  package/network/config/ltq-vdsl-app/Makefile |   2 +-
>  scripts/feeds|  28 +--
>  scripts/metadata.pm  | 101 +++--
>  scripts/package-metadata.pl  | 299 
> +--
>  9 files changed, 158 insertions(+), 336 deletions(-)
> 




signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 12/15] metadata: simplify generation of build depends from runtime depends

2018-01-10 Thread Matthias Schiffer
Runtime depends cannot have a buildtype suffix, and they never refer to
source package names. In addition, this adds warnings about unsatisfiable
dependencies.

Furthermore, this change fixes the generation of conditional build
dependencies for virtual packages provided by different source packages.

Signed-off-by: Matthias Schiffer 
---
 scripts/package-metadata.pl | 112 
 1 file changed, 41 insertions(+), 71 deletions(-)

diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index e492cc8a09..980ad24dc0 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -399,18 +399,56 @@ sub get_conditional_dep($$) {
 }
 
 sub gen_package_mk() {
-   my %conf;
-   my %dep;
my $line;
 
parse_package_metadata($ARGV[0]) or exit 1;
foreach my $srcname (sort {uc($a) cmp uc($b)} keys %srcpackage) {
my $src = $srcpackage{$srcname};
my $variant_default;
-   my @srcdeps;
my %deplines = ('' => {});
 
foreach my $pkg (@{$src->{packages}}) {
+   foreach my $dep (@{$pkg->{depends}}) {
+   next if ($dep =~ /@/);
+
+   my $condition;
+
+   $dep =~ s/\+//g;
+   if ($dep =~ /^(.+):(.+)/) {
+   $condition = $1;
+   $dep = $2;
+   }
+
+   my $pkg_dep = $package{$dep};
+   unless (defined $pkg_dep) {
+   warn sprintf "WARNING: Makefile '%s' 
has a dependency on '%s', which does not exist\n",
+   $src->{makefile}, $dep;
+   next;
+   }
+
+   unless ($pkg_dep->{vdepends}) {
+   next if $srcname eq 
$pkg_dep->{src}->{name};
+
+   my $depstr = 
"\$(curdir)/$pkg_dep->{src}->{path}/compile";
+   my $depline = 
get_conditional_dep($condition, $depstr);
+   if ($depline) {
+   $deplines{''}->{$depline}++;
+   }
+   next;
+   }
+
+   foreach my $vdep (@{$pkg_dep->{vdepends}}) {
+   my $pkg_vdep = $package{$vdep};
+   next if $srcname eq 
$pkg_vdep->{src}->{name};
+
+   my $depstr = "\$(if 
\$(CONFIG_PACKAGE_$vdep),\$(curdir)/$pkg_vdep->{src}->{path}/compile)";
+   my $depline = 
get_conditional_dep($condition, $depstr);
+   if ($depline) {
+   $deplines{''}->{$depline}++;
+   }
+   }
+   }
+
next if defined $pkg->{vdepends};
 
my $config = '';
@@ -442,12 +480,6 @@ sub gen_package_mk() {
print "buildtypes-$src->{path} = ".join(' ', 
@{$src->{buildtypes}})."\n";
}
 
-   foreach my $dep (map { @{$_->{depends}} } @{$src->{packages}}) {
-   $dep =~ /@/ or do {
-   $dep =~ s/\+//g;
-   push @srcdeps, $dep;
-   };
-   }
foreach my $type ('', @{$src->{buildtypes}}) {
my $suffix = '';
 
@@ -489,68 +521,6 @@ sub gen_package_mk() {
}
}
 
-   foreach my $deps (@srcdeps) {
-   my $idx;
-   my $condition;
-   my $prefix = "";
-   my $suffix = "";
-   my $deptype = "";
-
-   if ($deps =~ /^(.+):(.+)/) {
-   $condition = $1;
-   $deps = $2;
-   }
-   if ($deps =~ /^(.+)\/(.+)/) {
-   $deps = $1;
-   $deptype = $2;
-   $suffix = "/$2";
-   }
-
-   my $pkg_dep = $package{$deps};
-   my @deps;
-
-   if ($pkg_dep->{vdepends}) {
-   @deps = @{$pkg_dep->{vdepends}};
-   } else {
-   @deps = ($deps);
-   }
-
-   

[OpenWrt-Devel] [PATCH 15/15] include/package-dumpinfo.mk: don't duplicate source package information for every binary package

2018-01-10 Thread Matthias Schiffer
Eventually the BUILDONLY package flag could be replaced by simply creating
a package Makefile without any BuildPackage calls. This will fail for now,
as BuildPackage also causes the Makefile's compile target etc. to do
something useful at all.

Signed-off-by: Matthias Schiffer 
---
 include/package-dumpinfo.mk | 20 ++--
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk
index 68a66d0769..8a42be5bd1 100644
--- a/include/package-dumpinfo.mk
+++ b/include/package-dumpinfo.mk
@@ -7,10 +7,17 @@
 
 ifneq ($(DUMP),)
 
-dumpinfo: FORCE
+
+define SOURCE_INFO
+$(if $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS)
+)$(if $(HOST_BUILD_DEPENDS),Build-Depends/host: $(HOST_BUILD_DEPENDS)
+)$(if $(BUILD_TYPES),Build-Types: $(BUILD_TYPES)
+)
+
+endef
 
 define Dumpinfo/Package
-$(info Package: $(1)
+$(info $(SOURCE_INFO)Package: $(1)
 $(if $(MENU),Menu: $(MENU)
 )$(if $(SUBMENU),Submenu: $(SUBMENU)
 )$(if $(SUBMENUDEP),Submenu-Depends: $(SUBMENUDEP)
@@ -23,10 +30,7 @@ Menu-Depends: $(MDEPENDS)
 Provides: $(PROVIDES)
 $(if $(VARIANT),Build-Variant: $(VARIANT)
 $(if $(DEFAULT_VARIANT),Default-Variant: $(VARIANT)
-))$(if $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS)
-)$(if $(HOST_BUILD_DEPENDS),Build-Depends/host: $(HOST_BUILD_DEPENDS)
-)$(if $(BUILD_TYPES),Build-Types: $(BUILD_TYPES)
-)Section: $(SECTION)
+))Section: $(SECTION)
 Category: $(CATEGORY)
 $(if $(filter nonshared,$(PKGFLAGS)),,Repository: $(if $(FEED),$(FEED),base)
 )Title: $(TITLE)
@@ -47,6 +51,10 @@ $(if $(Package/$(1)/config),Config:
 $(Package/$(1)/config)
 @@
 ))
+SOURCE_INFO :=
 endef
 
+dumpinfo: FORCE
+   $(if $(SOURCE_INFO),$(info $(SOURCE_INFO)))
+
 endif
-- 
2.15.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 10/15] treewide: fix build depends to refer to source package names

2018-01-10 Thread Matthias Schiffer
Build depends must refer to source packages rather than binary package
names.

Signed-off-by: Matthias Schiffer 
---
 include/autotools.mk | 4 ++--
 include/nls.mk   | 2 +-
 package/network/config/ltq-adsl-app/Makefile | 2 +-
 package/network/config/ltq-vdsl-app/Makefile | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/autotools.mk b/include/autotools.mk
index 7bd400ab36..aa044aa0b4 100644
--- a/include/autotools.mk
+++ b/include/autotools.mk
@@ -105,14 +105,14 @@ ifneq ($(filter patch-libtool,$(PKG_FIXUP)),)
 endif
 
 ifneq ($(filter libtool,$(PKG_FIXUP)),)
-  PKG_BUILD_DEPENDS += libtool libintl libiconv
+  PKG_BUILD_DEPENDS += libtool gettext libiconv
  ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),)
   Hooks/Configure/Pre += autoreconf_target
  endif
 endif
 
 ifneq ($(filter libtool-ucxx,$(PKG_FIXUP)),)
-  PKG_BUILD_DEPENDS += libtool libintl libiconv
+  PKG_BUILD_DEPENDS += libtool gettext libiconv
  ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),)
   Hooks/Configure/Pre += autoreconf_target
  endif
diff --git a/include/nls.mk b/include/nls.mk
index 51463b9f12..04838821b4 100644
--- a/include/nls.mk
+++ b/include/nls.mk
@@ -23,7 +23,7 @@ else
 endif
 
 PKG_CONFIG_DEPENDS += CONFIG_BUILD_NLS
-PKG_BUILD_DEPENDS += !BUILD_NLS:libiconv !BUILD_NLS:libintl
+PKG_BUILD_DEPENDS += !BUILD_NLS:libiconv !BUILD_NLS:gettext
 
 ICONV_DEPENDS:=+BUILD_NLS:libiconv-full
 ICONV_CFLAGS:=-I$(ICONV_PREFIX)/include
diff --git a/package/network/config/ltq-adsl-app/Makefile 
b/package/network/config/ltq-adsl-app/Makefile
index cf8eaf247d..153cf9a26c 100644
--- a/package/network/config/ltq-adsl-app/Makefile
+++ b/package/network/config/ltq-adsl-app/Makefile
@@ -24,7 +24,7 @@ PKG_CONFIG_DEPENDS:=\
CONFIG_LTQ_DSL_ENABLE_SOAP \
CONFIG_LTQ_DSL_ENABLE_DSL_EVENT_POLLING
 
-PKG_BUILD_DEPENDS:=TARGET_lantiq_xway:kmod-ltq-adsl-danube 
TARGET_lantiq_xway_legacy:kmod-ltq-adsl-danube 
TARGET_lantiq_ase:kmod-ltq-adsl-ase
+PKG_BUILD_DEPENDS:=ltq-adsl
 
 PKG_FLAGS:=nonshared
 
diff --git a/package/network/config/ltq-vdsl-app/Makefile 
b/package/network/config/ltq-vdsl-app/Makefile
index baf63f9d13..71842ce345 100644
--- a/package/network/config/ltq-vdsl-app/Makefile
+++ b/package/network/config/ltq-vdsl-app/Makefile
@@ -17,7 +17,7 @@ 
PKG_HASH:=da8bb929526a61aea0e153ef524331fcd472a1ebbc6d88ca017735a4f82ece02
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_BASE_NAME)-$(PKG_VERSION)
 PKG_LICENSE:=BSD-2-Clause
 
-PKG_BUILD_DEPENDS:=kmod-ltq-vdsl-vr9
+PKG_BUILD_DEPENDS:=ltq-vdsl
 
 PKG_FLAGS:=nonshared
 
-- 
2.15.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [LEDE-DEV] [PATCH 13/15] metadata: always resolve dependencies through provides list

2018-01-10 Thread Jo-Philipp Wich
Hi,

[...]

> diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
> index 980ad24dc0..41e7108322 100755
> --- a/scripts/package-metadata.pl
> +++ b/scripts/package-metadata.pl
> @@ -101,14 +101,16 @@ my %dep_check;
>  sub __find_package_dep($$) {
>   my $pkg = shift;
>   my $name = shift;
> - my $deps = ($pkg->{vdepends} or $pkg->{depends});
> + my $deps = $pkg->{depends};
>  
>   return 0 unless defined $deps;
> - foreach my $dep (@{$deps}) {
> - next if $dep_check{$dep};
> - $dep_check{$dep} = 1;
> - return 1 if $dep eq $name;
> - return 1 if ($package{$dep} and 
> (__find_package_dep($package{$dep},$name) == 1));
> + foreach my $vpkg (@{$deps}) {
> + foreach my $dep (@{$vpackage{$vpkg}}) {
> + next if $dep_check{$dep->{name}};
> + $dep_check{$dep->{name}} = 1;
> + return 1 if $dep->{name} eq $name;
> + return 1 if (__find_package_dep($dep, $name) == 1);
> + }
>   }
>   return 0;
>  }
> @@ -156,7 +158,6 @@ sub mconf_depends {
>   my $m = "depends on";
>   my $flags = "";
>   $depend =~ s/^([@\+]+)// and $flags = $1;
> - my $vdep;
>   my $condition = $parent_condition;
>  
>   next if $condition eq $depend;
> @@ -173,23 +174,21 @@ sub mconf_depends {
>   }
>   $depend = $2;
>   }
> - next if $package{$depend} and $package{$depend}->{buildonly};
>   if ($flags =~ /\+/) {
> - if ($vdep = $package{$depend}->{vdepends}) {
> + my $vdep = $vpackage{$depend};
> + if ($vdep) {
>   my @vdeps;
> - $depend = undef;
>  
>   foreach my $v (@$vdep) {
> - if ($package{$v} && 
> $package{$v}->{variant_default}) {
> - $depend = $v;
> + next if $v->{buildonly};
> + if ($v->{variant_default}) {
> + unshift @vdeps, $v->{name};
>   } else {
> - push @vdeps, $v;
> + push @vdeps, $v->{name};
>   }
>   }
>  
> - if (!$depend) {
> - $depend = shift @vdeps;
> - }
> + $depend = shift @vdeps;
>  
>   if (@vdeps > 1) {
>   $condition = ($condition ? "$condition 
> && " : '') . '!('.join("||", map { "PACKAGE_".$_ } @vdeps).')';
> @@ -209,7 +208,8 @@ sub mconf_depends {
>  
>   $flags =~ /@/ or $depend = "PACKAGE_$depend";
>   } else {
> - if ($vdep = $package{$depend}->{vdepends}) {
> + my $vdep = $vpackage{$depend};
> + if ($vdep) {
>   $depend = join("||", map { "PACKAGE_".$_ } 
> @$vdep);

Use "PACKAGE_".$_->{name} here as "$vdep" now is a reference to an array
of package structures, not package names anymore.


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


[OpenWrt-Devel] [PATCH 14/15] build: remove obsolete "package feature" feature

2018-01-10 Thread Matthias Schiffer
Package "features" seem to be unused for some time. In any case, custom
Config.in snippets and package PROVIDES are a much more flexible way to
express similar options.

Signed-off-by: Matthias Schiffer 
---
 include/package-dumpinfo.mk | 25 -
 scripts/metadata.pm | 23 +--
 scripts/package-metadata.pl | 26 --
 3 files changed, 1 insertion(+), 73 deletions(-)

diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk
index 7cc8f3f6dc..68a66d0769 100644
--- a/include/package-dumpinfo.mk
+++ b/include/package-dumpinfo.mk
@@ -49,29 +49,4 @@ $(Package/$(1)/config)
 ))
 endef
 
-define Feature/Default
-  TARGET_NAME:=
-  TARGET_TITLE:=
-  PRIORITY:=
-  NAME:=
-endef
-
-define Feature
-  $(eval $(Feature/Default))
-  $(eval $(Feature/$(1)))
-  $(if $(DUMP),$(call Dumpinfo/Feature,$(1)))
-endef
-
-define Dumpinfo/Feature
-$(info Feature: $(TARGET_NAME)_$(1)
-Target-Name: $(TARGET_NAME)
-Target-Title: $(TARGET_TITLE)
-Feature-Name: $(NAME)
-$(if $(PRIORITY),Feature-Priority: $(PRIORITY)
-)Feature-Description:
-$(Feature/$(1)/description)
-@@
-)
-endef
-
 endif
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index bf93271749..18d5e5da24 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -2,13 +2,12 @@ package metadata;
 use base 'Exporter';
 use strict;
 use warnings;
-our @EXPORT = qw(%package %vpackage %srcpackage %category %features %overrides 
clear_packages parse_package_metadata parse_target_metadata get_multiline 
@ignore %usernames %groupnames);
+our @EXPORT = qw(%package %vpackage %srcpackage %category %overrides 
clear_packages parse_package_metadata parse_target_metadata get_multiline 
@ignore %usernames %groupnames);
 
 our %package;
 our %vpackage;
 our %srcpackage;
 our %category;
-our %features;
 our %overrides;
 our @ignore;
 
@@ -181,7 +180,6 @@ sub clear_packages() {
%vpackage = ();
%srcpackage = ();
%category = ();
-   %features = ();
%overrides = ();
%usernames = ();
%groupnames = ();
@@ -190,7 +188,6 @@ sub clear_packages() {
 sub parse_package_metadata($) {
my $file = shift;
my $pkg;
-   my $feature;
my $src;
my $override;
my %ignore = map { $_ => 1 } @ignore;
@@ -221,7 +218,6 @@ sub parse_package_metadata($) {
};
next unless $src;
/^Package:\s*(.+?)\s*$/ and do {
-   undef $feature;
$pkg = {};
$pkg->{src} = $src;
$pkg->{name} = $1;
@@ -236,23 +232,6 @@ sub parse_package_metadata($) {
$vpackage{$1} or $vpackage{$1} = [];
unshift @{$vpackage{$1}}, $pkg;
};
-   /^Feature:\s*(.+?)\s*$/ and do {
-   undef $pkg;
-   $feature = {};
-   $feature->{name} = $1;
-   $feature->{priority} = 0;
-   };
-   $feature and do {
-   /^Target-Name:\s*(.+?)\s*$/ and do {
-   $features{$1} or $features{$1} = [];
-   push @{$features{$1}}, $feature unless 
$src->{ignore};
-   };
-   /^Target-Title:\s*(.+?)\s*$/ and 
$feature->{target_title} = $1;
-   /^Feature-Priority:\s*(\d+)\s*$/ and 
$feature->{priority} = $1;
-   /^Feature-Name:\s*(.+?)\s*$/ and $feature->{title} = $1;
-   /^Feature-Description:/ and $feature->{description} = 
get_multiline(\*FILE, "\t\t\t");
-   next;
-   };
/^Build-Depends: \s*(.+)\s*$/ and $src->{builddepends} = [ 
split /\s+/, $1 ];
/^Build-Depends\/(\w+): \s*(.+)\s*$/ and 
$src->{"builddepends/$1"} = [ split /\s+/, $2 ];
/^Build-Types:\s*(.+)\s*$/ and $src->{buildtypes} = [ split 
/\s+/, $1 ];
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index 41e7108322..e601a77e1b 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -337,31 +337,6 @@ sub print_package_config_category($) {
undef $category{$cat};
 }
 
-sub print_package_features() {
-   keys %features > 0 or return;
-   print "menu \"Package features\"\n";
-   foreach my $n (keys %features) {
-   my @features = sort { $b->{priority} <=> $a->{priority} or 
$a->{title} cmp $b->{title} } @{$features{$n}};
-   print <{target_title}"
-   default FEATURE_$features[0]->{name}
-EOF
-
-   foreach my $feature (@features) {
-   print <{name}
-   bool "$feature->{title}"
-EOF
-   $feature->{description} =~ /\w/ and 

[OpenWrt-Devel] [PATCH 08/15] metadata: remove redundant fields from package hash

2018-01-10 Thread Matthias Schiffer
Signed-off-by: Matthias Schiffer 
---
 scripts/metadata.pm | 3 ---
 scripts/package-metadata.pl | 8 
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index e636a45a33..50f91407d6 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -224,9 +224,7 @@ sub parse_package_metadata($) {
/^Package:\s*(.+?)\s*$/ and do {
undef $feature;
$pkg = {};
-   $pkg->{ignore} = $src->{ignore};
$pkg->{src} = $src;
-   $pkg->{makefile} = $src->{makefile};
$pkg->{name} = $1;
$pkg->{title} = "";
$pkg->{depends} = [];
@@ -273,7 +271,6 @@ sub parse_package_metadata($) {
name => $vpkg,
vdepends => [],
src => $src,
-   makefile => $src->{makefile},
};
push @{$package{$vpkg}->{vdepends}}, 
$pkg->{name};
}
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index c98db46d36..233fb0eabf 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -290,7 +290,7 @@ sub print_package_config_category($) {
print "menu \"$menu\"\n";
}
foreach my $pkg (@pkgs) {
-   next if $pkg->{ignore};
+   next if $pkg->{src}->{ignore};
my $title = $pkg->{name};
my $c = (72 - length($pkg->{name}) - 
length($pkg->{title}));
if ($c > 0) {
@@ -485,7 +485,7 @@ sub gen_package_mk() {
if (defined($pkg_dep) && 
defined($pkg_dep->{src})) {
unless (!$deptype || grep { $_ eq 
$deptype } @{$pkg_dep->{src}->{buildtypes}}) {
warn sprintf "WARNING: Makefile 
'%s' has a %s build dependency on '%s/%s' but '%s' does not implement a '%s' 
build type\n",
-   $src->{makefile}, 
$type, $pkg_dep->{src}->{name}, $deptype, $pkg_dep->{makefile}, $deptype;
+   $src->{makefile}, 
$type, $pkg_dep->{src}->{name}, $deptype, $pkg_dep->{src}->{makefile}, $deptype;
next;
}
$idx = $pkg_dep->{src}->{path};
@@ -539,7 +539,7 @@ sub gen_package_mk() {
if (defined $pkg_dep->{src}) {
unless (!$deptype || grep { $_ eq 
$deptype } @{$pkg_dep->{src}->{buildtypes}}) {
warn sprintf "WARNING: Makefile 
'%s' has a build dependency on '%s/%s' but '%s' does not implement a '%s' build 
type\n",
-   $src->{makefile}, 
$pkg_dep->{src}->{name}, $deptype, $pkg_dep->{makefile}, $deptype;
+   $src->{makefile}, 
$pkg_dep->{src}->{name}, $deptype, $pkg_dep->{src}->{makefile}, $deptype;
next;
}
$idx = $pkg_dep->{src}->{path};
@@ -640,7 +640,7 @@ sub gen_package_license($) {
} else {
if ($level == 1) {
print "$pkg->{name}: Missing license! ";
-   print "Please fix $pkg->{makefile}\n";
+   print "Please fix 
$pkg->{src}->{makefile}\n";
}
}
}
-- 
2.15.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 13/15] metadata: always resolve dependencies through provides list

2018-01-10 Thread Matthias Schiffer
Instead of adding virtual packages to the normal package list, keep a
separate list for provides, make each package provide itself, and resolve
all dependencies through this list. This allows to use PROVIDES to replace
existing packages.

Fixes FS#837.

Signed-off-by: Matthias Schiffer 
---
 scripts/feeds   |  4 +--
 scripts/metadata.pm | 15 ++--
 scripts/package-metadata.pl | 60 +++--
 3 files changed, 34 insertions(+), 45 deletions(-)

diff --git a/scripts/feeds b/scripts/feeds
index b531fbac62..626edc6665 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -252,7 +252,6 @@ sub search_feed {
my $substr;
my $pkgmatch = 1;
 
-   next if $pkg->{vdepends};
foreach my $substr (@substr) {
my $match;
foreach my $key (qw(name title description src)) {
@@ -306,7 +305,6 @@ sub list_feed {
get_feed($feed);
foreach my $name (sort { lc($a) cmp lc($b) } keys %$feed_package) {
my $pkg = $feed_package->{$name};
-   next if $pkg->{vdepends};
if($pkg->{name}) {
printf "\%-32s\t\%s\n", $pkg->{name}, $pkg->{title};
}
@@ -530,6 +528,7 @@ sub install_package {
@{$feed_src->{$src}->{"builddepends/host"}},
map { @{$_->{depends}} } @{$feed_src->{$src}->{packages}}
) {
+   # TODO: handle virtual packages and PROVIDES
next if $dep =~ /@/;
$dep =~ s/^\+//;
$dep =~ s/^.+://;
@@ -590,7 +589,6 @@ sub install {
get_feed($f->[1]);
foreach my $name (sort { lc($a) cmp lc($b) } 
keys %$feed_package) {
my $p = $feed_package->{$name};
-   next if $p->{vdepends};
if( $p->{name} ) {
install_package($feed, 
$p->{name}, exists($opts{f})) == 0 or $ret = 1;
get_feed($f->[1]);
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index bb3fa72403..bf93271749 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -2,9 +2,10 @@ package metadata;
 use base 'Exporter';
 use strict;
 use warnings;
-our @EXPORT = qw(%package %srcpackage %category %features %overrides 
clear_packages parse_package_metadata parse_target_metadata get_multiline 
@ignore %usernames %groupnames);
+our @EXPORT = qw(%package %vpackage %srcpackage %category %features %overrides 
clear_packages parse_package_metadata parse_target_metadata get_multiline 
@ignore %usernames %groupnames);
 
 our %package;
+our %vpackage;
 our %srcpackage;
 our %category;
 our %features;
@@ -177,6 +178,7 @@ sub parse_target_metadata($) {
 
 sub clear_packages() {
%package = ();
+   %vpackage = ();
%srcpackage = ();
%category = ();
%features = ();
@@ -230,6 +232,9 @@ sub parse_package_metadata($) {
$pkg->{override} = $override;
$package{$1} = $pkg;
push @{$src->{packages}}, $pkg;
+
+   $vpackage{$1} or $vpackage{$1} = [];
+   unshift @{$vpackage{$1}}, $pkg;
};
/^Feature:\s*(.+?)\s*$/ and do {
undef $pkg;
@@ -264,12 +269,8 @@ sub parse_package_metadata($) {
/^Provides: \s*(.+)\s*$/ and do {
my @vpkg = split /\s+/, $1;
foreach my $vpkg (@vpkg) {
-   $package{$vpkg} or $package{$vpkg} = {
-   name => $vpkg,
-   vdepends => [],
-   src => $src,
-   };
-   push @{$package{$vpkg}->{vdepends}}, 
$pkg->{name};
+   $vpackage{$vpkg} or $vpackage{$vpkg} = [];
+   push @{$vpackage{$vpkg}}, $pkg;
}
};
/^Menu-Depends: \s*(.+)\s*$/ and $pkg->{mdepends} = [ split 
/\s+/, $1 ];
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index 980ad24dc0..41e7108322 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -101,14 +101,16 @@ my %dep_check;
 sub __find_package_dep($$) {
my $pkg = shift;
my $name = shift;
-   my $deps = ($pkg->{vdepends} or $pkg->{depends});
+   my $deps = $pkg->{depends};
 
return 0 unless defined $deps;
-   foreach my $dep (@{$deps}) {
-   next if $dep_check{$dep};
-   $dep_check{$dep} = 1;
-   return 1 if $dep eq $name;
-   return 1 

[OpenWrt-Devel] [PATCH 07/15] metadata: replace %subdir hash with a path field in source packages

2018-01-10 Thread Matthias Schiffer
Every single reference to subdir was concatenated with the source package
name, so it makes sense to store the concatenated value instead.

Signed-off-by: Matthias Schiffer 
---
 scripts/metadata.pm | 12 +++-
 scripts/package-metadata.pl | 25 -
 2 files changed, 15 insertions(+), 22 deletions(-)

diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index 0577390eda..e636a45a33 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -2,13 +2,12 @@ package metadata;
 use base 'Exporter';
 use strict;
 use warnings;
-our @EXPORT = qw(%package %srcpackage %category %subdir %preconfig %features 
%overrides clear_packages parse_package_metadata parse_target_metadata 
get_multiline @ignore %usernames %groupnames);
+our @EXPORT = qw(%package %srcpackage %category %preconfig %features 
%overrides clear_packages parse_package_metadata parse_target_metadata 
get_multiline @ignore %usernames %groupnames);
 
 our %package;
 our %preconfig;
 our %srcpackage;
 our %category;
-our %subdir;
 our %features;
 our %overrides;
 our @ignore;
@@ -178,7 +177,6 @@ sub parse_target_metadata($) {
 }
 
 sub clear_packages() {
-   %subdir = ();
%preconfig = ();
%package = ();
%srcpackage = ();
@@ -204,12 +202,10 @@ sub parse_package_metadata($) {
};
while () {
chomp;
-   /^Source-Makefile: 
\s*(package\/((?:.+\/)?)([^\/]+)\/Makefile)\s*$/ and do {
-   $subdir{$3} = $2;
-
+   /^Source-Makefile: 
\s*(package\/((?:.+\/)?([^\/]+))\/Makefile)\s*$/ and do {
$src = {
makefile => $1,
-   subdir => $2,
+   path => $2,
name => $3,
ignore => $ignore{$3},
packages => [],
@@ -235,7 +231,6 @@ sub parse_package_metadata($) {
$pkg->{title} = "";
$pkg->{depends} = [];
$pkg->{mdepends} = [];
-   $pkg->{subdir} = $src->{subdir};
$pkg->{tristate} = 1;
$pkg->{override} = $override;
$package{$1} = $pkg;
@@ -278,7 +273,6 @@ sub parse_package_metadata($) {
name => $vpkg,
vdepends => [],
src => $src,
-   subdir => $src->{subdir},
makefile => $src->{makefile},
};
push @{$package{$vpkg}->{vdepends}}, 
$pkg->{name};
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index 2369c37e2b..c98db46d36 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -419,7 +419,6 @@ sub gen_package_mk() {
parse_package_metadata($ARGV[0]) or exit 1;
foreach my $srcname (sort {uc($a) cmp uc($b)} keys %srcpackage) {
my $src = $srcpackage{$srcname};
-   my $path = $subdir{$srcname}.$srcname;
my $variant_default;
my @srcdeps;
 
@@ -429,30 +428,30 @@ sub gen_package_mk() {
my $config = '';
$config = "\$(CONFIG_PACKAGE_$pkg->{name})" unless 
$pkg->{buildonly};
 
-   $pkg->{prereq} and print "prereq-$config += $path\n";
+   $pkg->{prereq} and print "prereq-$config += 
$src->{path}\n";
 
next if $pkg->{buildonly};
 
-   print "package-$config += $path\n";
+   print "package-$config += $src->{path}\n";
 
if ($pkg->{variant}) {
if (!defined($variant_default) or 
$pkg->{variant_default}) {
$variant_default = $pkg->{variant};
}
-   print "\$(curdir)/$path/variants += \$(if 
$config,$pkg->{variant})\n";
+   print "\$(curdir)/$src->{path}/variants += 
\$(if $config,$pkg->{variant})\n";
}
}
 
if (defined($variant_default)) {
-   print "\$(curdir)/$path/default-variant := 
$variant_default\n";
+   print "\$(curdir)/$src->{path}/default-variant := 
$variant_default\n";
}
 
unless (grep {!$_->{buildonly}} @{$src->{packages}}) {
-   print "package- += $path\n";
+   print "package- += $src->{path}\n";
}
 
if (@{$src->{buildtypes}} > 0) {
-   print "buildtypes-$path = ".join(' ', 
@{$src->{buildtypes}})."\n";
+   print 

[OpenWrt-Devel] [PATCH 2/3] ipq-wifi: select board-2.bin at runtime

2018-01-10 Thread Thomas Hebb
Currently, we solve the problem of different IPQ4019 boards needing
different sets of Wi-Fi calibration data (board-2.bin) by using an
ipq-wifi-* package to overwrite board-2.bin in the filesystem. This
presents a problem when we need the same image to support multiple
boards, as we do for the upcoming Netgear EX6100v2 and EX6150v2
support.

To solve this, re-architect the board-2.bin selection mechanism:
Instead of overwriting board-2.bin, install each version with a name
that indicates the board it's for: for example, board-2-nbg6617.bin.
Add a hotplug script to select and symlink a board-specific file if
present and otherwise fall back to the QCA-provided file, which is
now installed as board-2-generic.bin.

Signed-off-by: Thomas Hebb 
---
 package/firmware/ath10k-firmware/Makefile  | 42 +-
 .../files/12-ath10k-dynamic-boarddata  | 23 
 package/firmware/ipq-wifi/Makefile | 24 +
 3 files changed, 73 insertions(+), 16 deletions(-)
 create mode 100644 
package/firmware/ath10k-firmware/files/12-ath10k-dynamic-boarddata

diff --git a/package/firmware/ath10k-firmware/Makefile 
b/package/firmware/ath10k-firmware/Makefile
index 1c6f4dfb7f..99e0551a25 100644
--- a/package/firmware/ath10k-firmware/Makefile
+++ b/package/firmware/ath10k-firmware/Makefile
@@ -193,6 +193,7 @@ $(Package/ath10k-firmware-default)
   TITLE:=ath10k firmware for IPQ/QCA4019 devices
   SECTION:=firmware
   CATEGORY:=Firmware
+  DEPENDS:=+ath10k-dynamic-boarddata
 endef
 
 define Package/ath10k-firmware-qca6174
@@ -221,7 +222,7 @@ define Package/ath10k-firmware-qca4019/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \
-   $(1)/lib/firmware/ath10k/QCA4019/hw1.0/
+   $(1)/lib/firmware/ath10k/QCA4019/hw1.0/board-2-generic.bin
$(INSTALL_DATA) \

$(PKG_BUILD_DIR)/QCA4019/hw1.0/3.2.1/firmware-5.bin_10.4-3.2.1-00058 \
$(1)/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin
@@ -341,6 +342,43 @@ define Package/ath10k-firmware-qca9888-ct/install
$(1)/lib/firmware/ath10k/QCA9888/hw2.0/firmware-5.bin
 endef
 
+# We currently only support dynamic selection of board-2.bin for QCA4019.
+# To add support for another chip:
+#
+#  1. Change the relevant ath10k-firmware package to install board-2.bin
+# as board-2-generic.bin.
+#  2. Make that package depend on ath10k-dynamic-boarddata.
+#  3. Add the customized board-2.bin files to the ipq-wifi package, ensuring
+# that they are placed alongside board-2-generic.bin and are named
+# board-2-.bin. On boot, the dynamic boarddata script will
+# select and symlink the correct file.
+
+define Package/ath10k-dynamic-boarddata
+  SECTION:=firmware
+  CATEGORY:=Firmware
+  TITLE:=hotplug script to dynamically select ath10k board-2.bin
+endef
+
+define Package/ath10k-dynamic-boarddata/description
+Several IPQ4019 boards require custom Wi-Fi calibration data but reuse BMI
+IDs that are in QCA's stock calibration data. As such, it's not possible to
+store calibration for all of these boards in a single board-2.bin, as the
+ath10k driver expects. This package provides a hotplug script that
+determines the board we're running on and symlinks board-2.bin to the
+appropriate version at runtime.
+
+Note that this package does not provide any board-specific versions of
+board-2.bin. In order for it to be useful, you must also include one or
+more of the ipq-wifi-* packages.
+endef
+
+define Package/ath10k-dynamic-boarddata/install
+   $(INSTALL_DIR) $(1)/etc/hotplug.d/firmware
+   $(INSTALL_DATA) \
+   ./files/12-ath10k-dynamic-boarddata \
+   $(1)/etc/hotplug.d/firmware/
+endef
+
 $(eval $(call BuildPackage,ath10k-firmware-qca9887))
 $(eval $(call BuildPackage,ath10k-firmware-qca9888))
 $(eval $(call BuildPackage,ath10k-firmware-qca988x))
@@ -354,3 +392,5 @@ $(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
 $(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))
 $(eval $(call BuildPackage,ath10k-firmware-qca9984-ct))
 $(eval $(call BuildPackage,ath10k-firmware-qca9888-ct))
+
+$(eval $(call BuildPackage,ath10k-dynamic-boarddata))
diff --git a/package/firmware/ath10k-firmware/files/12-ath10k-dynamic-boarddata 
b/package/firmware/ath10k-firmware/files/12-ath10k-dynamic-boarddata
new file mode 100644
index 00..f9adedf0fc
--- /dev/null
+++ b/package/firmware/ath10k-firmware/files/12-ath10k-dynamic-boarddata
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+log() {
+   logger -t ath10k-dynamic-boarddata "$@"
+}
+
+dest="/lib/firmware/$FIRMWARE"
+
+[ -e "$dest" ] && exit 0
+echo "$dest" | grep -qx "/lib/firmware/ath10k/.*/board-2.bin" || exit 0
+
+dir="$(dirname "$dest")"
+board="$(board_name)"
+
+if [ -e "$dir/board-2-$board.bin" ] ; then
+   log "Selecting customized board-2.bin for board 

[OpenWrt-Devel] [PATCH 1/3] build: allow custom config names in mkits.sh

2018-01-10 Thread Thomas Hebb
This allows us to support the Netgear EX6100v2 and EX6150v2, whose
bootloaders look for specific config names and refuse to boot if
they're not present.

Signed-off-by: Thomas Hebb 
---
 include/image-commands.mk |  3 ++-
 scripts/mkits.sh  | 12 
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/include/image-commands.mk b/include/image-commands.mk
index 5f0ac6164d..6ad782922a 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -121,7 +121,8 @@ endef
 define Build/fit
$(TOPDIR)/scripts/mkits.sh \
-D $(DEVICE_NAME) -o $@.its -k $@ \
-   $(if $(word 2,$(1)),-d $(word 2,$(1))) -C $(word 1,$(1)) \
+   $(if $(word 2,$(1)),-d $(word 2,$(1))) \
+   $(if $(word 3,$(1)),-c $(word 3,$(1))) -C $(word 1,$(1)) \
-a $(KERNEL_LOADADDR) -e $(if 
$(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index 8857996eba..e74b5866e8 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -16,7 +16,7 @@
 
 usage() {
echo "Usage: `basename $0` -A arch -C comp -a addr -e entry" \
-   "-v version -k kernel [-D name -d dtb] -o its_file"
+   "-v version -k kernel [-D name -d dtb -c cfgname] -o its_file"
echo -e "\t-A ==> set architecture to 'arch'"
echo -e "\t-C ==> set compression type 'comp'"
echo -e "\t-a ==> set load address to 'addr' (hex)"
@@ -25,11 +25,14 @@ usage() {
echo -e "\t-k ==> include kernel image 'kernel'"
echo -e "\t-D ==> human friendly Device Tree Blob 'name'"
echo -e "\t-d ==> include Device Tree Blob 'dtb'"
+   echo -e "\t-c ==> name the default config 'cfgname'"
echo -e "\t-o ==> create output file 'its_file'"
exit 1
 }
 
-while getopts ":A:a:C:D:d:e:k:o:v:" OPTION
+CFGNAME='config@1'
+
+while getopts ":A:a:C:D:d:e:k:c:o:v:" OPTION
 do
case $OPTION in
A ) ARCH=$OPTARG;;
@@ -39,6 +42,7 @@ do
d ) DTB=$OPTARG;;
e ) ENTRY_ADDR=$OPTARG;;
k ) KERNEL=$OPTARG;;
+   c ) CFGNAME=$OPTARG;;
o ) OUTPUT=$OPTARG;;
v ) VERSION=$OPTARG;;
* ) echo "Invalid option passed to '$0' (options:$@)"
@@ -104,8 +108,8 @@ ${FDT}
};
 
configurations {
-   default = \"config@1\";
-   config@1 {
+   default = \"${CFGNAME}\";
+   ${CFGNAME} {
description = \"OpenWrt\";
kernel = \"kernel@1\";
fdt = \"fdt@1\";
-- 
2.15.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 06/15] metadata: change pkg->{src} field to hold a reference

2018-01-10 Thread Matthias Schiffer
We often want to access fields of a source packages through pkg->{src}.
Allow accessing them directly instead of resolving the source hash through
srcpackages.

Signed-off-by: Matthias Schiffer 
---
 scripts/feeds   |  4 ++--
 scripts/metadata.pm | 51 ++---
 scripts/package-metadata.pl | 14 ++---
 3 files changed, 34 insertions(+), 35 deletions(-)

diff --git a/scripts/feeds b/scripts/feeds
index 31481edcb1..b531fbac62 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -494,7 +494,7 @@ sub install_package {
warn "WARNING: Package '$name' is not available in feed 
$feed->[1].\n";
return 0;
};
-   my $src = $pkg->{src};
+   my $src = $pkg->{src}->{name};
my $type = $feed->[0];
$src or $src = $name;
 
@@ -663,7 +663,7 @@ sub uninstall {
warn "WARNING: $name not installed\n";
next;
};
-   $pkg->{src} and $name = $pkg->{src};
+   $pkg->{src} and $name = $pkg->{src}->{name};
warn "Uninstalling package '$name'\n";
system("rm -f ./package/feeds/*/$name");
$uninstall = 1;
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index 404309dc4e..0577390eda 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -193,9 +193,7 @@ sub parse_package_metadata($) {
my $file = shift;
my $pkg;
my $feature;
-   my $makefile;
my $preconfig;
-   my $subdir;
my $src;
my $override;
my %ignore = map { $_ => 1 } @ignore;
@@ -206,41 +204,42 @@ sub parse_package_metadata($) {
};
while () {
chomp;
-   /^Source-Makefile: \s*((.+\/)([^\/]+)\/Makefile)\s*$/ and do {
-   $makefile = $1;
-   $subdir = $2;
-   $src = $3;
-   $subdir =~ s/^package\///;
-   $subdir{$src} = $subdir;
-   $srcpackage{$src} = {
-   makefile => $makefile,
+   /^Source-Makefile: 
\s*(package\/((?:.+\/)?)([^\/]+)\/Makefile)\s*$/ and do {
+   $subdir{$3} = $2;
+
+   $src = {
+   makefile => $1,
+   subdir => $2,
+   name => $3,
+   ignore => $ignore{$3},
packages => [],
buildtypes => [],
builddepends => [],
};
+   $srcpackage{$3} = $src;
$override = "";
undef $pkg;
};
/^Override: \s*(.+?)\s*$/ and do {
$override = $1;
-   $overrides{$src} = 1;
+   $overrides{$src->{name}} = 1;
};
next unless $src;
/^Package:\s*(.+?)\s*$/ and do {
undef $feature;
$pkg = {};
-   $pkg->{ignore} = $ignore{$src};
+   $pkg->{ignore} = $src->{ignore};
$pkg->{src} = $src;
-   $pkg->{makefile} = $makefile;
+   $pkg->{makefile} = $src->{makefile};
$pkg->{name} = $1;
$pkg->{title} = "";
$pkg->{depends} = [];
$pkg->{mdepends} = [];
-   $pkg->{subdir} = $subdir;
+   $pkg->{subdir} = $src->{subdir};
$pkg->{tristate} = 1;
$pkg->{override} = $override;
$package{$1} = $pkg;
-   push @{$srcpackage{$src}->{packages}}, $pkg;
+   push @{$src->{packages}}, $pkg;
};
/^Feature:\s*(.+?)\s*$/ and do {
undef $pkg;
@@ -251,7 +250,7 @@ sub parse_package_metadata($) {
$feature and do {
/^Target-Name:\s*(.+?)\s*$/ and do {
$features{$1} or $features{$1} = [];
-   push @{$features{$1}}, $feature unless 
$ignore{$src};
+   push @{$features{$1}}, $feature unless 
$src->{ignore};
};
/^Target-Title:\s*(.+?)\s*$/ and 
$feature->{target_title} = $1;
/^Feature-Priority:\s*(\d+)\s*$/ and 
$feature->{priority} = $1;
@@ -259,9 +258,9 @@ sub parse_package_metadata($) {
/^Feature-Description:/ and $feature->{description} = 
get_multiline(\*FILE, "\t\t\t");

[OpenWrt-Devel] [PATCH 05/15] metadata: interate over source packages when generating Makefile

2018-01-10 Thread Matthias Schiffer
All build dependencies are between source packages. Interating over source
rather than binary packages simplifies parts of the code and prepares
further improvement.

As a side effect, this changes the implicit default variant of a few
packages (the first defined is used now instead of the lexicographically
first).

Signed-off-by: Matthias Schiffer 
---
 scripts/metadata.pm |  1 +
 scripts/package-metadata.pl | 61 ++---
 2 files changed, 36 insertions(+), 26 deletions(-)

diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index c150b547f1..404309dc4e 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -213,6 +213,7 @@ sub parse_package_metadata($) {
$subdir =~ s/^package\///;
$subdir{$src} = $subdir;
$srcpackage{$src} = {
+   makefile => $makefile,
packages => [],
buildtypes => [],
builddepends => [],
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index a6cff40696..077956e6a1 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -414,36 +414,45 @@ sub get_conditional_dep($$) {
 sub gen_package_mk() {
my %conf;
my %dep;
-   my %done;
my $line;
 
parse_package_metadata($ARGV[0]) or exit 1;
-   foreach my $name (sort {uc($a) cmp uc($b)} keys %package) {
-   my $config;
-   my $pkg = $package{$name};
-   my $src = $srcpackage{$pkg->{src}};
+   foreach my $srcname (sort {uc($a) cmp uc($b)} keys %srcpackage) {
+   my $src = $srcpackage{$srcname};
+   my $path = $subdir{$srcname}.$srcname;
+   my $variant_default;
my @srcdeps;
 
-   next if defined $pkg->{vdepends};
+   foreach my $pkg (@{$src->{packages}}) {
+   next if defined $pkg->{vdepends};
+
+   my $config = '';
+   $config = "\$(CONFIG_PACKAGE_$pkg->{name})" unless 
$pkg->{buildonly};
+
+   $pkg->{prereq} and print "prereq-$config += $path\n";
+
+   next if $pkg->{buildonly};
+
+   print "package-$config += $path\n";
 
-   $config = "\$(CONFIG_PACKAGE_$name)";
-   if ($config) {
-   $pkg->{buildonly} and $config = "";
-   print "package-$config += $pkg->{subdir}$pkg->{src}\n";
if ($pkg->{variant}) {
-   if (!defined($done{$pkg->{src}}) or 
$pkg->{variant_default}) {
-   print 
"\$(curdir)/$pkg->{subdir}$pkg->{src}/default-variant := $pkg->{variant}\n";
+   if (!defined($variant_default) or 
$pkg->{variant_default}) {
+   $variant_default = $pkg->{variant};
}
-   print 
"\$(curdir)/$pkg->{subdir}$pkg->{src}/variants += \$(if 
$config,$pkg->{variant})\n"
+   print "\$(curdir)/$path/variants += \$(if 
$config,$pkg->{variant})\n";
}
-   $pkg->{prereq} and print "prereq-$config += 
$pkg->{subdir}$pkg->{src}\n";
}
 
-   next if $done{$pkg->{src}};
-   $done{$pkg->{src}} = 1;
+   if (defined($variant_default)) {
+   print "\$(curdir)/$path/default-variant := 
$variant_default\n";
+   }
+
+   unless (grep {!$_->{buildonly}} @{$src->{packages}}) {
+   print "package- += $path\n";
+   }
 
if (@{$src->{buildtypes}} > 0) {
-   print "buildtypes-$pkg->{subdir}$pkg->{src} = ".join(' 
', @{$src->{buildtypes}})."\n";
+   print "buildtypes-$path = ".join(' ', 
@{$src->{buildtypes}})."\n";
}
 
foreach my $dep (@{$src->{builddepends}}, map { 
@{$_->{depends}} } @{$src->{packages}}) {
@@ -477,7 +486,7 @@ sub gen_package_mk() {
if (defined($pkg_dep) && 
defined($pkg_dep->{src})) {
unless (!$deptype || grep { $_ eq 
$deptype } @{$srcpackage{$pkg_dep->{src}}->{buildtypes}}) {
warn sprintf "WARNING: Makefile 
'%s' has a %s build dependency on '%s/%s' but '%s' does not implement a '%s' 
build type\n",
-   $pkg->{makefile}, 
$type, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype;
+   $src->{makefile}, 
$type, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype;
 

[OpenWrt-Devel] [PATCH 04/15] metadata: move 'builddepends' from binary to source packages

2018-01-10 Thread Matthias Schiffer
Signed-off-by: Matthias Schiffer 
---
 scripts/feeds   | 20 +++-
 scripts/metadata.pm |  6 +++---
 scripts/package-metadata.pl | 16 +++-
 3 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/scripts/feeds b/scripts/feeds
index 42f7b3b116..31481edcb1 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -525,15 +525,17 @@ sub install_package {
};
 
# install all dependencies referenced from the source package
-   foreach my $vpkg (@{$feed_src->{$src}->{packages}}) {
-   foreach my $dep (@{$vpkg->{depends}}, @{$vpkg->{builddepends}}, 
@{$vpkg->{"builddepends/host"}}) {
-   next if $dep =~ /@/;
-   $dep =~ s/^\+//;
-   $dep =~ s/^.+://;
-   $dep =~ s/\/.+$//;
-   next unless $dep;
-   install_package($feed, $dep, 0) == 0 or $ret = 1;
-   }
+   foreach my $dep (
+   @{$feed_src->{$src}->{builddepends}},
+   @{$feed_src->{$src}->{"builddepends/host"}},
+   map { @{$_->{depends}} } @{$feed_src->{$src}->{packages}}
+   ) {
+   next if $dep =~ /@/;
+   $dep =~ s/^\+//;
+   $dep =~ s/^.+://;
+   $dep =~ s/\/.+$//;
+   next unless $dep;
+   install_package($feed, $dep, 0) == 0 or $ret = 1;
}
 
return $ret;
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index 985e6237a6..c150b547f1 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -215,6 +215,7 @@ sub parse_package_metadata($) {
$srcpackage{$src} = {
packages => [],
buildtypes => [],
+   builddepends => [],
};
$override = "";
undef $pkg;
@@ -234,7 +235,6 @@ sub parse_package_metadata($) {
$pkg->{title} = "";
$pkg->{depends} = [];
$pkg->{mdepends} = [];
-   $pkg->{builddepends} = [];
$pkg->{subdir} = $subdir;
$pkg->{tristate} = 1;
$pkg->{override} = $override;
@@ -258,6 +258,8 @@ sub parse_package_metadata($) {
/^Feature-Description:/ and $feature->{description} = 
get_multiline(\*FILE, "\t\t\t");
next;
};
+   /^Build-Depends: \s*(.+)\s*$/ and 
$srcpackage{$src}->{builddepends} = [ split /\s+/, $1 ];
+   /^Build-Depends\/(\w+): \s*(.+)\s*$/ and 
$srcpackage{$src}->{"builddepends/$1"} = [ split /\s+/, $2 ];
/^Build-Types:\s*(.+)\s*$/ and $srcpackage{$src}->{buildtypes} 
= [ split /\s+/, $1 ];
next unless $pkg;
/^Version: \s*(.+)\s*$/ and $pkg->{version} = $1;
@@ -289,8 +291,6 @@ sub parse_package_metadata($) {
/^Build-Variant: \s*([\w\-]+)\s*/ and $pkg->{variant} = $1;
/^Default-Variant: .*/ and $pkg->{variant_default} = 1;
/^Build-Only: \s*(.+)\s*$/ and $pkg->{buildonly} = 1;
-   /^Build-Depends: \s*(.+)\s*$/ and $pkg->{builddepends} = [ 
split /\s+/, $1 ];
-   /^Build-Depends\/(\w+): \s*(.+)\s*$/ and 
$pkg->{"builddepends/$1"} = [ split /\s+/, $2 ];
/^Repository:\s*(.+?)\s*$/ and $pkg->{repository} = $1;
/^Category: \s*(.+)\s*$/ and do {
$pkg->{category} = $1;
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index 08c2343ade..a6cff40696 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -446,20 +446,18 @@ sub gen_package_mk() {
print "buildtypes-$pkg->{subdir}$pkg->{src} = ".join(' 
', @{$src->{buildtypes}})."\n";
}
 
-   foreach my $spkg (@{$src->{packages}}) {
-   foreach my $dep (@{$spkg->{depends}}, 
@{$spkg->{builddepends}}) {
-   $dep =~ /@/ or do {
-   $dep =~ s/\+//g;
-   push @srcdeps, $dep;
-   };
-   }
+   foreach my $dep (@{$src->{builddepends}}, map { 
@{$_->{depends}} } @{$src->{packages}}) {
+   $dep =~ /@/ or do {
+   $dep =~ s/\+//g;
+   push @srcdeps, $dep;
+   };
}
foreach my $type (@{$src->{buildtypes}}) {
my @extra_deps;
my %deplines;
 
-   next unless $pkg->{"builddepends/$type"};
-   foreach my $dep (@{$pkg->{"builddepends/$type"}}) {
+ 

[OpenWrt-Devel] [PATCH 03/15] metadata: move 'buildtypes' from binary to source packages

2018-01-10 Thread Matthias Schiffer
Build types are a property of source rather than binary packages. This is a
preparation for followup cleanup.

Signed-off-by: Matthias Schiffer 
---
 scripts/metadata.pm |  4 ++--
 scripts/package-metadata.pl | 13 +++--
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index 297abc9f12..985e6237a6 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -214,6 +214,7 @@ sub parse_package_metadata($) {
$subdir{$src} = $subdir;
$srcpackage{$src} = {
packages => [],
+   buildtypes => [],
};
$override = "";
undef $pkg;
@@ -234,7 +235,6 @@ sub parse_package_metadata($) {
$pkg->{depends} = [];
$pkg->{mdepends} = [];
$pkg->{builddepends} = [];
-   $pkg->{buildtypes} = [];
$pkg->{subdir} = $subdir;
$pkg->{tristate} = 1;
$pkg->{override} = $override;
@@ -258,6 +258,7 @@ sub parse_package_metadata($) {
/^Feature-Description:/ and $feature->{description} = 
get_multiline(\*FILE, "\t\t\t");
next;
};
+   /^Build-Types:\s*(.+)\s*$/ and $srcpackage{$src}->{buildtypes} 
= [ split /\s+/, $1 ];
next unless $pkg;
/^Version: \s*(.+)\s*$/ and $pkg->{version} = $1;
/^Title: \s*(.+)\s*$/ and $pkg->{title} = $1;
@@ -290,7 +291,6 @@ sub parse_package_metadata($) {
/^Build-Only: \s*(.+)\s*$/ and $pkg->{buildonly} = 1;
/^Build-Depends: \s*(.+)\s*$/ and $pkg->{builddepends} = [ 
split /\s+/, $1 ];
/^Build-Depends\/(\w+): \s*(.+)\s*$/ and 
$pkg->{"builddepends/$1"} = [ split /\s+/, $2 ];
-   /^Build-Types:\s*(.+)\s*$/ and $pkg->{buildtypes} = [ split 
/\s+/, $1 ];
/^Repository:\s*(.+?)\s*$/ and $pkg->{repository} = $1;
/^Category: \s*(.+)\s*$/ and do {
$pkg->{category} = $1;
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index 3a176c8024..08c2343ade 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -421,6 +421,7 @@ sub gen_package_mk() {
foreach my $name (sort {uc($a) cmp uc($b)} keys %package) {
my $config;
my $pkg = $package{$name};
+   my $src = $srcpackage{$pkg->{src}};
my @srcdeps;
 
next if defined $pkg->{vdepends};
@@ -441,11 +442,11 @@ sub gen_package_mk() {
next if $done{$pkg->{src}};
$done{$pkg->{src}} = 1;
 
-   if (@{$pkg->{buildtypes}} > 0) {
-   print "buildtypes-$pkg->{subdir}$pkg->{src} = ".join(' 
', @{$pkg->{buildtypes}})."\n";
+   if (@{$src->{buildtypes}} > 0) {
+   print "buildtypes-$pkg->{subdir}$pkg->{src} = ".join(' 
', @{$src->{buildtypes}})."\n";
}
 
-   foreach my $spkg (@{$srcpackage{$pkg->{src}}->{packages}}) {
+   foreach my $spkg (@{$src->{packages}}) {
foreach my $dep (@{$spkg->{depends}}, 
@{$spkg->{builddepends}}) {
$dep =~ /@/ or do {
$dep =~ s/\+//g;
@@ -453,7 +454,7 @@ sub gen_package_mk() {
};
}
}
-   foreach my $type (@{$pkg->{buildtypes}}) {
+   foreach my $type (@{$src->{buildtypes}}) {
my @extra_deps;
my %deplines;
 
@@ -476,7 +477,7 @@ sub gen_package_mk() {
my $idx = "";
my $pkg_dep = $package{$dep};
if (defined($pkg_dep) && 
defined($pkg_dep->{src})) {
-   unless (!$deptype || grep { $_ eq 
$deptype } @{$pkg_dep->{buildtypes}}) {
+   unless (!$deptype || grep { $_ eq 
$deptype } @{$srcpackage{$pkg_dep->{src}}->{buildtypes}}) {
warn sprintf "WARNING: Makefile 
'%s' has a %s build dependency on '%s/%s' but '%s' does not implement a '%s' 
build type\n",
$pkg->{makefile}, 
$type, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype;
next;
@@ -530,7 +531,7 @@ sub gen_package_mk() {
foreach my $dep (@deps) {
$pkg_dep = $package{$deps};
if (defined $pkg_dep->{src}) {
-   

[OpenWrt-Devel] [PATCH 01/15] metadata: remove 'base-files' special case

2018-01-10 Thread Matthias Schiffer
Nothing explicitly depends on base-files, and even if it would, it would
not cause any problems. Remove the unused special case.

Signed-off-by: Matthias Schiffer 
---
 scripts/package-metadata.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index fbd458bf2a..46446e994b 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -539,7 +539,7 @@ sub gen_package_mk() {
} elsif (defined($srcpackage{$dep})) {
$idx = $subdir{$dep}.$dep;
}
-   undef $idx if $idx eq 'base-files';
+
if ($idx) {
$idx .= $suffix;
 
-- 
2.15.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 00/15] Metadata generator refactoring, cleanup and PROVIDES improvements

2018-01-10 Thread Matthias Schiffer
When attempting to fix FS#837, I decided to treat our metadata generator to
a greater refactoring, which resulted in this patchset. FS#837 is fixed in
patch 13.

I also removed two seemingly obsolete features, "preconfig" and "package
features", which are not used by any package in the OpenWrt/LEDE base or
our default feeds.

The changes in this patchset also improve dependency diagnostics and
clearly separate between build depends (on source packages) and runtime
depends (on binary packages, implying build depends). This requires some
fixes in package Makefiles with broken dependencies (patch 10, [1], [2]).

There are also broken runtime depends in many feed packages, which I did
not fix, but which will be shown more prominently during prepare-tmpinfo
now. I'm not sure what the best way to handle such broken dependencies is,
as they might also be caused by missing feeds, e.g. LuCI depending on
telephony packages.
- Keep the warning, but try to build the packages as before (current
  solution in this patchset)?
- Hide the warning again (old state)?
- Ignore packages with missing build dependencies altogether (just show a
  warning in the metadata generators)?

As hinted in patch 15, I have further refactoring in mind, but let's try to
get this set reviewed and committed first...

Regards,
Matthias



[1] https://github.com/openwrt/packages/pull/5370
[2] https://github.com/openwrt-routing/packages/pull/345


Matthias Schiffer (15):
  metadata: remove 'base-files' special case
  metadata: make srcpackage extensible
  metadata: move 'buildtypes' from binary to source packages
  metadata: move 'builddepends' from binary to source packages
  metadata: interate over source packages when generating Makefile
  metadata: change pkg->{src} field to hold a reference
  metadata: replace %subdir hash with a path field in source packages
  metadata: remove redundant fields from package hash
  build: remove package preconfig feature
  treewide: fix build depends to refer to source package names
  metadata: handle target build depends together with host build depends
  metadata: simplify generation of build depends from runtime depends
  metadata: always resolve dependencies through provides list
  build: remove obsolete "package feature" feature
  include/package-dumpinfo.mk: don't duplicate source package
information for every binary package

 include/autotools.mk |   4 +-
 include/nls.mk   |   2 +-
 include/package-dumpinfo.mk  |  53 +
 package/Makefile |   3 -
 package/network/config/ltq-adsl-app/Makefile |   2 +-
 package/network/config/ltq-vdsl-app/Makefile |   2 +-
 scripts/feeds|  28 +--
 scripts/metadata.pm  | 101 +++--
 scripts/package-metadata.pl  | 299 +--
 9 files changed, 158 insertions(+), 336 deletions(-)

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


Re: [OpenWrt-Devel] [PATCH RFC] mac80211: Don't check for platform files with external kernel trees

2018-01-10 Thread Felix Fietkau


> On 8. Jan 2018, at 10:31, Florian Fainelli  wrote:
> 
> When building with an external kernel tree, do not check the different
> platform files since this is almost guaranteed they are going to differ.
> 
> Signed-off-by: Florian Fainelli 
But that also means it’s almost always going to break if platform data is 
involved on the external kernel tree.

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


Re: [OpenWrt-Devel] [LEDE-DEV] owrt landing page

2018-01-10 Thread Zoltan HERPAI

Hi Thomas,

The OpenWrt wiki is actually running on my box, so you'll need me for 
that. Let's catch up on IRC how to get the targz to you.


Regards,
Zoltan H

On Sat, 6 Jan 2018, Thomas Endt wrote:


Hi John,

Since the styling is based on CSS, we would need the OpenWrt wiki's CSS for
that. Once we have that, it will be relatively easy.
But instead of doing the merge of the wikis step by step, I would suggest a
hard cut.

1.) Make OpenWrt wiki read only -> I can do that or Imre
2.) Create .tgz of OpenWrt wiki and hand it over to LEDE wiki admins -> Imre
3.) Move LEDE wiki to OpenWrt styling (apply OpenWrt theme and CSS to LEDE
wiki) -> I can do that. Some help of CSS experienced guys could be necessary
for hard cases.
4.) Move content of old OpenWrt wiki to new OpenWrt wiki (former LEDE)
   -> I can take the toh part (devicepages); dataentries will be taken from
LEDE since they are way more up to date and contain more datafields.
   -> Rest of the wiki: A plan needs to be worked out what will be carried
over from old to new OpenWrt wiki -> Community discussion

I'm in the starting blocks since weeks, waiting only for the GO and the
OpenWrt wiki sources, and I'm sure, we will have some helping heands ready
to start the wiki merge.

Thomas


-Ursprüngliche Nachricht-
Von: Lede-dev [mailto:lede-dev-boun...@lists.infradead.org] Im Auftrag
von John Crispin
Gesendet: Freitag, 5. Januar 2018 18:54
An: LEDE Development List; LEDE Project Administration; OpenWrt
Development List
Betreff: [LEDE-DEV] owrt landing page

Hi,

could someone please help us with rebranding the lede landing page to
an openwrt colour/theme ? i would like to see this swithced over within
the next 7 days.

John


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



___
Lede-dev mailing list
lede-...@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH RFC] mac80211: Don't check for platform files with external kernel trees

2018-01-10 Thread Florian Fainelli
When building with an external kernel tree, do not check the different
platform files since this is almost guaranteed they are going to differ.

Signed-off-by: Florian Fainelli 
---
 package/kernel/mac80211/Makefile | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 385bea4d2f5d..1740c956fe9f 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -1751,11 +1751,16 @@ ifneq 
($(CONFIG_PACKAGE_kmod-cfg80211)$(CONFIG_PACKAGE_kmod-lib80211),)
  endef
 endif
 
-define Build/Configure
+ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
+ define Build/Configure
cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h 
$(LINUX_DIR)/include/linux/ath9k_platform.h
cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h 
$(LINUX_DIR)/include/linux/ath5k_platform.h
cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h 
$(LINUX_DIR)/include/linux/rt2x00_platform.h
-endef
+  endef
+else
+  define Build/Configure
+  endef
+endif
 
 define Build/Compile
$(SH_FUNC) var2file "$(call shvar,mac80211_config)" 
$(PKG_BUILD_DIR)/.config
-- 
2.14.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [LEDE-DEV] owrt landing page

2018-01-10 Thread Thomas Endt
Hi John,

Since the styling is based on CSS, we would need the OpenWrt wiki's CSS for
that. Once we have that, it will be relatively easy.
But instead of doing the merge of the wikis step by step, I would suggest a
hard cut.

1.) Make OpenWrt wiki read only -> I can do that or Imre
2.) Create .tgz of OpenWrt wiki and hand it over to LEDE wiki admins -> Imre
3.) Move LEDE wiki to OpenWrt styling (apply OpenWrt theme and CSS to LEDE
wiki) -> I can do that. Some help of CSS experienced guys could be necessary
for hard cases.
4.) Move content of old OpenWrt wiki to new OpenWrt wiki (former LEDE)
-> I can take the toh part (devicepages); dataentries will be taken from
LEDE since they are way more up to date and contain more datafields.
-> Rest of the wiki: A plan needs to be worked out what will be carried
over from old to new OpenWrt wiki -> Community discussion

I'm in the starting blocks since weeks, waiting only for the GO and the
OpenWrt wiki sources, and I'm sure, we will have some helping heands ready
to start the wiki merge.

Thomas

> -Ursprüngliche Nachricht-
> Von: Lede-dev [mailto:lede-dev-boun...@lists.infradead.org] Im Auftrag
> von John Crispin
> Gesendet: Freitag, 5. Januar 2018 18:54
> An: LEDE Development List; LEDE Project Administration; OpenWrt
> Development List
> Betreff: [LEDE-DEV] owrt landing page
> 
> Hi,
> 
> could someone please help us with rebranding the lede landing page to
> an openwrt colour/theme ? i would like to see this swithced over within
> the next 7 days.
> 
> John
> 
> 
> ___
> Lede-dev mailing list
> lede-...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [LEDE-DEV] owrt landing page

2018-01-10 Thread Jo-Philipp Wich
Hi,

I've been preparing some draft for a future landing page at
https://lede-project.org/openwrt.

Note that some of the linked pages are obviously still LEDE branded and
the links to IRC, lists, forum need to be expanded to point to both
OpenWrt and LEDE forums.

Maybe someone can pick up from here; the page should be editable by any
registered wiki user.

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


[OpenWrt-Devel] owrt landing page

2018-01-10 Thread John Crispin

Hi,

could someone please help us with rebranding the lede landing page to an 
openwrt colour/theme ? i would like to see this swithced over within the 
next 7 days.


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


[OpenWrt-Devel] [RFC 1/2] downloads.mk: introduce name-agnostic PROJECT_GIT variable

2018-01-10 Thread Jo-Philipp Wich
Introduce a name-agnostic PROJECT_GIT variable poiting to
https://git.openwrt.org/ and declare LEDE_GIT and OPENWRT_GIT
as aliases to it.

After some transition time we can drop this alias variables.

Signed-off-by: Jo-Philipp Wich 
---
 include/download.mk | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/download.mk b/include/download.mk
index 0a25641738..2ba8a7bdf4 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -6,8 +6,10 @@
 # See /LICENSE for more information.
 #
 
-OPENWRT_GIT = http://git.openwrt.org
-LEDE_GIT = https://git.lede-project.org
+PROJECT_GIT = https://git.openwrt.org
+
+OPENWRT_GIT = $(PROJECT_GIT)
+LEDE_GIT = $(PROJECT_GIT)
 
 ifdef PKG_SOURCE_VERSION
 PKG_VERSION ?= $(if $(PKG_SOURCE_DATE),$(PKG_SOURCE_DATE)-)$(call 
version_abbrev,$(PKG_SOURCE_VERSION))
-- 
2.14.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [RFC 2/2] treewide: replace LEDE_GIT with PROJECT_GIT

2018-01-10 Thread Jo-Philipp Wich
Remove LEDE_GIT references in favor to the new name-agnostic
PROJECT_GIT variable.

Signed-off-by: Jo-Philipp Wich 
---
 package/libs/librpc/Makefile | 2 +-
 package/libs/libubox/Makefile| 2 +-
 package/libs/uclient/Makefile| 2 +-
 package/libs/ustream-ssl/Makefile| 2 +-
 package/network/config/firewall/Makefile | 2 +-
 package/network/config/netifd/Makefile   | 2 +-
 package/network/ipv6/odhcp6c/Makefile| 2 +-
 package/network/services/odhcpd/Makefile | 2 +-
 package/network/services/relayd/Makefile | 2 +-
 package/network/services/uhttpd/Makefile | 2 +-
 package/network/services/umdns/Makefile  | 2 +-
 package/network/utils/iwinfo/Makefile| 2 +-
 package/network/utils/umbim/Makefile | 2 +-
 package/network/utils/uqmi/Makefile  | 2 +-
 package/system/fstools/Makefile  | 2 +-
 package/system/lede-keyring/Makefile | 2 +-
 package/system/procd/Makefile| 2 +-
 package/system/rpcd/Makefile | 2 +-
 package/system/ubox/Makefile | 2 +-
 package/system/ubus/Makefile | 2 +-
 package/system/uci/Makefile  | 2 +-
 package/system/usign/Makefile| 2 +-
 package/utils/jsonfilter/Makefile| 2 +-
 package/utils/ugps/Makefile  | 2 +-
 package/utils/usbmode/Makefile   | 2 +-
 25 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/package/libs/librpc/Makefile b/package/libs/librpc/Makefile
index 0330614c31..e8f51a23f1 100644
--- a/package/libs/librpc/Makefile
+++ b/package/libs/librpc/Makefile
@@ -4,7 +4,7 @@ PKG_NAME:=librpc
 PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL=$(LEDE_GIT)/project/librpc-uclibc.git
+PKG_SOURCE_URL=$(PROJECT_GIT)/project/librpc-uclibc.git
 PKG_SOURCE_DATE:=2015-11-04
 PKG_SOURCE_VERSION:=a921e3ded051746f9f7cd5e5a312fb6771716aac
 
PKG_MIRROR_HASH:=22c8dc55e1c4e8e31635a37708a3ce622a6ca33ebd918a4321b0be6ffce89b21
diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile
index b261430e2d..6121576103 100644
--- a/package/libs/libubox/Makefile
+++ b/package/libs/libubox/Makefile
@@ -4,7 +4,7 @@ PKG_NAME:=libubox
 PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL=$(LEDE_GIT)/project/libubox.git
+PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
 PKG_SOURCE_DATE:=2017-10-06
 PKG_SOURCE_VERSION:=729f47fd5279f902986457682f8f166c324eafb5
 
PKG_MIRROR_HASH:=5ca03294498f347f437236aeb1d55747264229a46a5ddba93caeb6b3fb735e10
diff --git a/package/libs/uclient/Makefile b/package/libs/uclient/Makefile
index 3eefa2e012..f0c08a3233 100644
--- a/package/libs/uclient/Makefile
+++ b/package/libs/uclient/Makefile
@@ -4,7 +4,7 @@ PKG_NAME:=uclient
 PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL=$(LEDE_GIT)/project/uclient.git
+PKG_SOURCE_URL=$(PROJECT_GIT)/project/uclient.git
 PKG_SOURCE_DATE:=2017-11-02
 PKG_SOURCE_VERSION:=4b87d83160fec70d50b7fcd736a8c538c28a016c
 
PKG_MIRROR_HASH:=4bbb4d5f295ebdcd67fec87a6794168bea2176a42cb2907c47d8566fb33dafb3
diff --git a/package/libs/ustream-ssl/Makefile 
b/package/libs/ustream-ssl/Makefile
index 7afbeeba66..b5e773ba7f 100644
--- a/package/libs/ustream-ssl/Makefile
+++ b/package/libs/ustream-ssl/Makefile
@@ -4,7 +4,7 @@ PKG_NAME:=ustream-ssl
 PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL=$(LEDE_GIT)/project/ustream-ssl.git
+PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustream-ssl.git
 PKG_SOURCE_DATE:=2016-07-02
 PKG_SOURCE_VERSION:=ec80adaa1b47f28d426fa19c692011ce60b992d6
 
PKG_MIRROR_HASH:=bfbad6b4e8c1e933f0bfaab43cbdd44a536c08128c3a779e6f2395a6a886aab7
diff --git a/package/network/config/firewall/Makefile 
b/package/network/config/firewall/Makefile
index 06e67543b9..1bc2c4d1fa 100644
--- a/package/network/config/firewall/Makefile
+++ b/package/network/config/firewall/Makefile
@@ -12,7 +12,7 @@ PKG_NAME:=firewall
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL=$(LEDE_GIT)/project/firewall3.git
+PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall3.git
 PKG_SOURCE_DATE:=2017-11-07
 PKG_SOURCE_VERSION:=c4309372acc7e1bef8aa230269f7da1dec790e68
 
PKG_MIRROR_HASH:=1699884d8499d01e433959185f79ff9eb69704de47885b996123374b8015b422
diff --git a/package/network/config/netifd/Makefile 
b/package/network/config/netifd/Makefile
index 4eb4737a3a..ade0061e7a 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -4,7 +4,7 @@ PKG_NAME:=netifd
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL=$(LEDE_GIT)/project/netifd.git
+PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
 PKG_SOURCE_DATE:=2018-01-04
 PKG_SOURCE_VERSION:=fd5c399c01ceb1bbede3ae8b0e1daaa7652a6fa1
 
PKG_MIRROR_HASH:=0040f94d11d0039505328a90b2ff48968db873e9e7967307631bf40ef5679275
diff --git a/package/network/ipv6/odhcp6c/Makefile 
b/package/network/ipv6/odhcp6c/Makefile
index 457a871efb..24cbe0b2cb 100644
--- a/package/network/ipv6/odhcp6c/Makefile
+++ b/package/network/ipv6/odhcp6c/Makefile
@@ -11,7 +11,7 @@ PKG_NAME:=odhcp6c
 PKG_RELEASE:=4
 
 

Re: [OpenWrt-Devel] [LEDE-DEV] [RFC 1/2] downloads.mk: introduce name-agnostic PROJECT_GIT variable

2018-01-10 Thread Jonas Gorski
On 5 January 2018 at 10:53, Jo-Philipp Wich  wrote:
> Introduce a name-agnostic PROJECT_GIT variable poiting to
> https://git.openwrt.org/ and declare LEDE_GIT and OPENWRT_GIT
> as aliases to it.
>
> After some transition time we can drop this alias variables.
>
> Signed-off-by: Jo-Philipp Wich 

Generally looks good, but we should defer it until the old
git.openwrt.org entry got purged from dns caches (which is still like
4 or 5 days or so?)


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


[OpenWrt-Devel] Espressobin mvebu64

2018-01-10 Thread Nishant Sharma

Hi,

First of all, congratulations on re-merge of OpenWrt and LEDE.

Now to the problem being faced. I am trying to build OpenWrt for 
Espressobin (http://espressobin.net) as described in their wiki at 
http://wiki.espressobin.net/tiki-index.php?page=Build+From+Source+-+OpenWrt


It built fine with default options without installing any additional 
packages or enabling other software/kernel modules.


On installing additional packages, it started to fail. So I did the 
following:


./script/feeds -a uninstall
rm .config*
make menuconfig -> select target
make defconfig
make -j1 V=s

But still it fails while building the kernel. Below are the logs:

=
make -C 
/home/devuser/espressobin/openwrt-dd/build_dir/target-aarch64_cortex-a53+neon-vfpv4_musl-1.1.16/linux-mvebu64/linux-4.4.8 
HOSTCFLAGS="-O2 
-I/home/devuser/espressobin/openwrt-dd/staging_dir/host/include 
-I/home/devuser/espressobin/openwrt-dd/staging_dir/host/usr/include 
-Wall -Wmissing-prototypes -Wstrict-prototypes" 
CROSS_COMPILE="aarch64-openwrt-linux-musl-" ARCH="arm64" 
KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" 
CONFIG_SHELL="bash" V=''  CC="aarch64-openwrt-linux-musl-gcc" modules

make[5]: Entering directory '/home/devuser/espressobin/openwrt-kernel'
  CHK include/config/kernel.release
  CHK include/generated/uapi/linux/version.h
  CHK include/generated/utsrelease.h
  CHK include/generated/bounds.h
  CHK include/generated/timeconst.h
  CHK include/generated/asm-offsets.h
  CALLscripts/checksyscalls.sh
usr/Makefile:64: *** multiple target patterns.  Stop.
Makefile:949: recipe for target 'usr' failed
make[5]: *** [usr] Error 2
make[5]: Leaving directory '/home/devuser/espressobin/openwrt-kernel'
Makefile:23: recipe for target 
'/home/devuser/espressobin/openwrt-dd/build_dir/target-aarch64_cortex-a53+neon-vfpv4_musl-1.1.16/linux-mvebu64/linux-4.4.8/.modules' 
failed
make[4]: *** 
[/home/devuser/espressobin/openwrt-dd/build_dir/target-aarch64_cortex-a53+neon-vfpv4_musl-1.1.16/linux-mvebu64/linux-4.4.8/.modules] 
Error 2
make[4]: Leaving directory 
'/home/devuser/espressobin/openwrt-dd/target/linux/mvebu64'

Makefile:13: recipe for target 'compile' failed
make[3]: *** [compile] Error 2
make[3]: Leaving directory 
'/home/devuser/espressobin/openwrt-dd/target/linux'

target/Makefile:21: recipe for target 'target/linux/compile' failed
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory '/home/devuser/espressobin/openwrt-dd'
target/Makefile:16: recipe for target 
'/home/devuser/espressobin/openwrt-dd/staging_dir/target-aarch64_cortex-a53+neon-vfpv4_musl-1.1.16/stamp/.target_compile' 
failed
make[1]: *** 
[/home/devuser/espressobin/openwrt-dd/staging_dir/target-aarch64_cortex-a53+neon-vfpv4_musl-1.1.16/stamp/.target_compile] 
Error 2

make[1]: Leaving directory '/home/devuser/espressobin/openwrt-dd'
/home/devuser/espressobin/openwrt-dd/include/toplevel.mk:192: recipe for 
target 'world' failed

make: *** [world] Error 2


Any pointers on where it is going wrong would be really helpful.

Thanks in advance.

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


[OpenWrt-Devel] OpenWrt LEDE merge

2018-01-10 Thread Hauke Mehrtens
The OpenWrt and the LEDE project are happily announcing the unification
of both projects under the OpenWrt name.

After long and sometimes slowly moving discussions about the specifics
of the re-merge, with multiple similar proposals but little subsequent
action, we're happy to announce that both projects are about to execute
the final steps of the merger.

The new, unified OpenWrt project will be governed under the rules
established by the LEDE project, which can be found at
https://lede-project.org/rules . Active members of both the former LEDE
and OpenWrt projects will continue working on the unified OpenWrt.

LEDE's spinoff and subsequent re-merge into OpenWrt will not alter the
overall technical direction taken by the unified project. We will
continue to work on improving stability and release maintenance while
aiming for frequent minor releases to address critical bugs and security
issues like we did with LEDE 17.01 and its four point releases until now.

Old pre-15.05 OpenWrt CC releases will not be supported by the merged
project anymore, leaving these releases without any future security or
bug fixes. The OpenWrt CC 15.05 release series will receive a limited
amount of security and bug fixes, but is not yet fully integrated in our
release automation, so binary releases are lacking behind for now.

The LEDE 17.01 release will continue to get full security and bug fix
support for both source code and binary releases.
We are planning a new major release under the new name in the next few
months.

The merged project will use the code base of the former LEDE project.
OpenWrt specific patches not present in the LEDE repository but meeting
LEDEs code quality requirements got integrated into the new tree. The
source code is hosted at
https://git.openwrt.org/?p=openwrt/openwrt.git;a=summary with a
continuously synchronized Github mirror hosted at
https://github.com/openwrt/openwrt . We accept patches sent to our
mailing list via open...@lists.infradead.org (is still being setup) or
Github pull requests to https://github.com/openwrt/openwrt .

Yet open pull requests to both the old OpenWrt and LEDE repositories
will be closed after a 30 day grace period. We encourage people to open
new pull requests at the new repository or re-send still unmerged patches.

The remerged OpenWrt project is legally represented by the Software in
the Public Interest (SPI) - an US 501(c)(3) non-profit organization.
(see https://www.spi-inc.org/projects/openwrt/ ) The SPI is managing our
OpenWrt trademark, handling our donations and helping us with legal
problems.

The original OpenWrt codebase has been archived for future reference and
is hosted at https://github.com/openwrt/archive .

The bug tracker is available at https://bugs.openwrt.org with previously
reported LEDE project issues migrated to it.

Old pre-15.05 OpenWrt CC releases, which are not supported any more, can
be found at https://archive.openwrt.org .

Infrastructure currently available under the lede-project.org domain
will be moved to corresponding openwrt.org subdomains and redirects will
be put in place where appropriate.

The old OpenWrt buildbot infrastructure will be shut down and its
compute resources integrated with the existing LEDE infrastructure in
order to maintain build coverage of current and future releases.

The merger of the OpenWrt and LEDE forums and wikis is not yet fully
decided, so all portals will continue to be available under their
respective domains until a definite consensus is reached.

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


Re: [OpenWrt-Devel] [ICVPN] [WLANnews] Ideas wanted for Google Summer of Code 2018

2018-01-10 Thread Andreas Bräu
Hi,

I wish you a happy new year and I have news regarding the projects page.

There's a simpler way to see if your project file is valid:

If you look up your project file in github, the file is rendered. What
you need to see is a table above the main text. It should look like
this:
https://github.com/freifunk/projects.freifunk.net-contents/blob/master/collections/_projects/freifunk_miktorik_metarouter.md

Then your file is most probably valid for merging. You don't need to
install jekyll and so on.

Please add your projects ASAP, as the application period for orgs will
start tomorrow.

If you want to reuse ideas from last year, see this page:
https://wiki.freifunk.net/Ideas_GSoC_2017

Best regards

Andi

On 22.12.2017 07:33, Andreas Bräu wrote:
> Hi there,
> 
> I recently updated the README on our projects content’s repository with
> a description how to test your changes
> locally: https://github.com/freifunk/projects.freifunk.net-contents
> 
> Please add your ideas ASAP as we have to start with our application on
> January 4th.
> 
> If you have any questions, please don’t hesitate to ask!
> 
> Thanks,
> 
> Andi
> 
> 
>> Am 27.11.2017 um 23:14 schrieb Andreas Bräu > >:
>>
>> today I finished the work on the deployment process of the new
>> projects portal. So feel free to add your ideas now. We need them
>> until the beginning of
>> January: https://github.com/freifunk/projects.freifunk.net-contents
>>
>> Thank you,
>>
>> Andi
>>
>>> Am 22.11.2017 um 00:22 schrieb Andreas Bräu >> >:
>>>
>>> Hi there,
>>>
>>> GSoC 2017 is barely over, GSoC 2018 will start soon. Next year the
>>> application period is earlier than the last years. So we need to
>>> start collecting ideas earlier, too.
>>>
>>> To improve the presentation of our ideas, I’d like to use a new
>>> software: https://projects.freifunk.net/ The tool was introduced and
>>> showed at the mentors summit by Coala.
>>> It changes the way of adding ideas, it has to be done via
>>> GitHub: https://github.com/freifunk/projects.freifunk.net-contents
>>>
>>> What do you think about this? Should we use that instead of our wiki
>>> page?
>>>
>>> I’ll add an automatic deployment within the next days, so your ideas
>>> will be deployed after a commit to the repository.
>>>
>>> Best,
>>>
>>> Andi
>>>
>>> —
>>> Andreas Bräu
>>>
>>> XMPP: andibr...@jabber.weimarnetz.de
>>> 
>>> Twitter:@evAltenberga 
>>> Blog:https://blog.andi95.de 
>>> PGP:0xB7E04818
>>>
>>> ___
>>> WLANnews mailing list
>>> wlann...@freifunk.net 
>>> Abonnement abbestellen?
>>> -> http://lists.freifunk.net/mailman/listinfo/wlannews-freifunk.net
>>>
>>> Weitere Infos zu den freifunk.net
>>>  Mailinglisten und zur An- und Abmeldung
>>> unter http://freifunk.net/mailinglisten
>>
>> ___
>> icvpn mailing list
>> ic...@lists.funkfeuer.at 
>> https://lists.funkfeuer.at/mailman/listinfo/icvpn
> 
> 
> 
> ___
> icvpn mailing list
> ic...@lists.funkfeuer.at
> https://lists.funkfeuer.at/mailman/listinfo/icvpn
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] OpenWrt source replaced by former LEDE tree

2018-01-10 Thread Jo-Philipp Wich
Hi,

following the agreed OpenWrt/LEDE re-merge procedure, we've replaced the
OpenWrt Git tree with the LEDE Git tree now and archived the old repository.

If you're working with older branches such as Chaos Calmer or Barrier
Breaker, you do have to update your remotes in order to continue to be
able to fetch from the repository.

You can find the archived OpenWrt repository including all previous
branches and tags at https://github.com/openwrt/archive

From now on, the https://github.com/openwrt/openwrt repository will host
the contents of the former LEDE source tree at
https://github.com/lede-project/source which already has been rebranded
to OpenWrt in preparation for the tree swap.

The synchronisation between https://github.com/openwrt/openwrt,
https://github.com/lede-project/source and
https://git.lede-project.org/?p=source.git will remain active until all
infrastructure changes are fully settled.


Kind regards,
Jo
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel