[OpenWrt-Devel] /usr/lib/os-release

2018-06-25 Thread Naresh Kumar Mehta
Can someone change package/base-files/files/usr/lib/os-release to OpenWrt
branding? Currently it has LEDE* entries.

 

Thanks,

Naresh

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


Re: [OpenWrt-Devel] /etc/board.json

2018-06-25 Thread Alexandru Ardelean
On Mon, Jun 25, 2018 at 6:41 PM, Levente  wrote:
> Hi,
>
>
> Could you tell me how is /etc/board.json generated? There might be a
> bug in this file, I'd like to fix.
>

It's the config_generate script that creates it:
https://github.com/openwrt/openwrt/blob/master/package/base-files/files/bin/config_generate

Alex

>
> Thanks,
> Levente
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/listinfo/openwrt-devel

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


Re: [OpenWrt-Devel] [PATCH] staging: mt7621-dts: correct various clock frequencies.

2018-06-25 Thread John Crispin



On 23/06/18 22:49, Rosen Penev wrote:

From: NeilBrown 

The MT7621 documentation says that the sys clock - also known
as OCP clock for the Open Core Protocol - can be configured to
1/3 or 1/4 of the CPU clock.
Testing on my hardware, using the fact that the SPI clock is
based on the OCP clock and measuring transfer rates, shows
a clock of a little over 200MHz with a CPU clock of 900MHz.
So assume 1/4 is the default.

Also, the nor-flash in the gbpc1 is documented as accepting 50MHz
for request requests, and higher for other requests.  So set
maximum to 50MHz.

Signed-off-by: NeilBrown 
Signed-off-by: Greg Kroah-Hartman 


NAK, these backports caused too many regressions already, we will get 
the whole lot and test it when we bump the target.

    John

---
  target/linux/ramips/dts/GB-PC1.dts  | 8 +++-
  target/linux/ramips/dts/mt7621.dtsi | 4 ++--
  2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/target/linux/ramips/dts/GB-PC1.dts 
b/target/linux/ramips/dts/GB-PC1.dts
index 3b29d335b9..db6c3a86b0 100644
--- a/target/linux/ramips/dts/GB-PC1.dts
+++ b/target/linux/ramips/dts/GB-PC1.dts
@@ -71,7 +71,7 @@
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
-   spi-max-frequency = <1000>;
+   spi-max-frequency = <5000>;
m25p,chunked-io = <32>;
  
  		partition@0 {

@@ -99,6 +99,12 @@
};
  };
  
+&sysclock {

+   compatible = "fixed-clock";
+   /* This is normally 1/4 of cpuclock */
+   clock-frequency = <22500>;
+};
+
  &cpuclock {
compatible = "fixed-clock";
clock-frequency = <9>;
diff --git a/target/linux/ramips/dts/mt7621.dtsi 
b/target/linux/ramips/dts/mt7621.dtsi
index 0655e35301..dd8e87f7ce 100644
--- a/target/linux/ramips/dts/mt7621.dtsi
+++ b/target/linux/ramips/dts/mt7621.dtsi
@@ -45,8 +45,8 @@
#clock-cells = <0>;
compatible = "fixed-clock";
  
-		/* FIXME: there should be way to detect this */

-   clock-frequency = <5000>;
+   /* This is normally 1/4 of cpuclock */
+   clock-frequency = <22000>;
};
  
  



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


[OpenWrt-Devel] [PATCH] build: download code from github using archive API

2018-06-25 Thread Yousong Zhou
A new python script scripts/download.py is added to fetch tarballs using
GitHub archive API [1], then repack in a reproducible way same as the
current DownloadMethod/git

The missing piece in the GitHub API is that it cannot provide in the
tarball dependent submodules's source code.  In that case, the
implementation will fallback to using DownloadMethod/git

 [1] Get archive link, 
https://developer.github.com/v3/repos/contents/#get-archive-link

Signed-off-by: Yousong Zhou 
---
 include/download.mk |  75 +++-
 scripts/download.py | 324 
 2 files changed, 368 insertions(+), 31 deletions(-)
 create mode 100755 scripts/download.py

diff --git a/include/download.mk b/include/download.mk
index 2ba8a7bdf4..13952b3dfc 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -21,23 +21,7 @@ DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED)
 
 # Try to guess the download method from the URL
 define dl_method
-$(strip \
-  $(if $(2),$(2), \
-$(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% 
@SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
-  $(if $(filter git://%,$(1)),git, \
-$(if $(filter svn://%,$(1)),svn, \
-  $(if $(filter cvs://%,$(1)),cvs, \
-$(if $(filter hg://%,$(1)),hg, \
-  $(if $(filter sftp://%,$(1)),bzr, \
-unknown \
-  ) \
-) \
-  ) \
-) \
-  ) \
-) \
-  ) \
-)
+$(shell $(SCRIPT_DIR)/download.py --action=dl_method --url="$(1)" 
--proto="$(2)")
 endef
 
 # code for creating tarballs from cvs/svn/git/bzr/hg/darcs checkouts - useful 
for mirror support
@@ -56,6 +40,10 @@ ifdef CHECK
 check_escape=$(subst ','\'',$(1))
 #')
 
+# $(1): suffix of the F_, C_ variables, e.g. hash_deprecated, hash_mismatch, 
etc.
+# $(2): filename
+# $(3): expected hash value
+# $(4): hash var name: MD5SUM, HASH
 check_warn_nofix = $(info $(shell printf "$(_R)WARNING: %s$(_N)" '$(call 
check_escape,$(call C_$(1),$(2),$(3),$(4)))'))
 ifndef FIXUP
   check_warn = $(check_warn_nofix)
@@ -71,6 +59,9 @@ F_hash_mismatch = $(F_hash_deprecated)
 F_hash_missing = $(SCRIPT_DIR)/fixup-makefile.pl $(CURDIR)/Makefile add-hash 
$(3) $(call gen_sha256sum,$(1))
 endif
 
+# $(1): filename
+# $(2): expected hash value
+# $(3): hash var name: MD5SUM, HASH
 C_download_missing = $(1) is missing, please run make download before 
re-running this check
 C_hash_mismatch = $(3) does not match $(1) hash $(call gen_sha256sum,$(1))
 C_hash_deprecated = $(3) uses deprecated hash, set to $(call 
gen_sha256sum,$(1))
@@ -116,6 +107,9 @@ define DownloadMethod/default
)
 endef
 
+# $(1): "check"
+# $(2): "PKG_" if  as in Download/ is "default", otherwise 
"Download/:"
+# $(3): shell command sequence to do the download
 define wrap_mirror
 $(if $(if $(MIRROR),$(filter-out x,$(MIRROR_HASH))),$(SCRIPT_DIR)/download.pl 
"$(DL_DIR)" "$(FILE)" "$(MIRROR_HASH)" "" || ( $(3) ),$(3)) \
 $(if $(filter check,$(1)), \
@@ -159,23 +153,42 @@ endef
 
 define DownloadMethod/git
$(call wrap_mirror,$(1),$(2), \
-   echo "Checking out files from the git repository..."; \
-   mkdir -p $(TMP_DIR)/dl && \
-   cd $(TMP_DIR)/dl && \
-   rm -rf $(SUBDIR) && \
-   [ \! -d $(SUBDIR) ] && \
-   git clone $(OPTS) $(URL) $(SUBDIR) && \
-   (cd $(SUBDIR) && git checkout $(VERSION) && \
-   git submodule update --init --recursive) && \
-   echo "Packing checkout..." && \
-   export TAR_TIMESTAMP=`cd $(SUBDIR) && git log -1 
--format='@%ct'` && \
-   rm -rf $(SUBDIR)/.git && \
-   $(call dl_tar_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
-   mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
-   rm -rf $(SUBDIR); \
+   $(call DownloadMethod/git-raw) \
)
 endef
 
+define DownloadMethod/github-tarball
+   $(call wrap_mirror,$(1),$(2), \
+   $(SCRIPT_DIR)/download.py \
+   --action=dl \
+   --dl-dir="$(DL_DIR)" \
+   --url="$(URL)" \
+   --proto="$(PROTO)" \
+   --version="$(VERSION)" \
+   --subdir="$(SUBDIR)" \
+   --source="$(FILE)" \
+   || ( $(call DownloadMethod/git-raw) ); \
+   )
+endef
+
+# Only intends to be called as a submethod from other DownloadMethod
+define DownloadMethod/git-raw
+   echo "Checking out files from the git repository..."; \
+   mkdir -p $(TMP_DIR)/dl && \
+   cd $(TMP_DIR)/dl && \
+   rm -rf $(SUBDIR) && \
+   [ \! -d $(SUBDIR) ] && \
+   git clone $(OPTS) $(URL) $(SUBDIR) && \
+   (cd $(SUBDIR) && git checkout $(VERSION) && \
+   git submodule update --init --recursive) && \
+   echo "Packing checkout..." && \
+   export TAR_TIMESTAMP=`cd $(SUBDIR) && git l

[OpenWrt-Devel] OpenWrt Summit 2018

2018-06-25 Thread Hauke Mehrtens
Hi,

The deadline to submit a proposal for a talk or workshop at the OpenWrt
Summit 2018 in Lisbon, Portugal on October 29th & 30th was extended till
July 11th 2018.

The CFP is open until July 11th https://www.papercall.io/openwrtsummit2018

At least some developers plane to visit the OpenWrt summit this year.
I would appreciate if we could get some talks from the OpenWrt community
at the event.

I have the following ideas, if you would like to give a talk and just
miss the topic.

 * Security features in OpenWrt, e.g. jail in procd, ACLs in ubus and
other ways to secure OpenWrt
 * layer 2 and layer 3 offloading in the Linux kernel and OpenWrt,
swconfig, dsa, flow offloading
 * What happened in OpenWrt in the last year or 2 years.
 * How does the OpenWrt project work:
  * How can I contribute to OpenWrt?
  * How are decisions made in the project?

Hauke

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


[OpenWrt-Devel] /etc/board.json

2018-06-25 Thread Levente
Hi,


Could you tell me how is /etc/board.json generated? There might be a
bug in this file, I'd like to fix.


Thanks,
Levente

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


Re: [OpenWrt-Devel] openwrt-imagebuilder-18.06.0-rc1-ar71xx-generic.Linux-x86_64

2018-06-25 Thread Martin Tippmann
On Mon, Jun 25, 2018 at 3:56 PM, Mikael Bak  wrote:
> Build dependency: Please install GNU 'time' or BusyBox 'time'
>
> Prerequisite check failed. Use FORCE=1 to override.
> make[1]: *** [Makefile:76: staging_dir/host/.prereq-build] Error 1
> make: *** [Makefile:175: image] Error 2
> [mikael@mikael-pc
> openwrt-imagebuilder-18.06.0-rc1-ar71xx-generic.Linux-x86_64]$
>
>
> But I have 'time':
> $ time

This might be internal time command from your shell. This somehow does
not work.

>
> real0m0,000s
> user0m0,000s
> sys 0m0,000s
> $
>
> What am I doing wrong?

You could attempt to install gtime from the repositories:
$ sudo apt install gtime

regards
Martin

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


Re: [OpenWrt-Devel] openwrt-imagebuilder-18.06.0-rc1-ar71xx-generic.Linux-x86_64

2018-06-25 Thread Mathias Kresin
2018-06-25 15:56 GMT+02:00 Mikael Bak :
>
> Build dependency: Please install GNU 'time' or BusyBox 'time'
>
> Prerequisite check failed. Use FORCE=1 to override.
> make[1]: *** [Makefile:76: staging_dir/host/.prereq-build] Error 1
> make: *** [Makefile:175: image] Error 2
> [mikael@mikael-pc
> openwrt-imagebuilder-18.06.0-rc1-ar71xx-generic.Linux-x86_64]$
>
>
> But I have 'time':
> $ time
>
> real0m0,000s
> user0m0,000s
> sys 0m0,000s
> $
>
> What am I doing wrong?

The check in include/prereq-build.mk does the following:

  gtime --version 2>&1 | grep GNU, \
  time --version 2>&1 | grep GNU, \
  busybox time 2>&1 | grep BusyBox

Which obviously all fail for you. Which time do you have installed?

Mathias

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


[OpenWrt-Devel] openwrt-imagebuilder-18.06.0-rc1-ar71xx-generic.Linux-x86_64

2018-06-25 Thread Mikael Bak
Hi list,

Building custom images with image builder for 17.04 works fine.
Unfortunately when I try do to exactly the same with latest (RC1) openwrt
it fails like this:

[mikael@mikael-pc
openwrt-imagebuilder-18.06.0-rc1-ar71xx-generic.Linux-x86_64]$ make image
PROFILE=tl-wr1043nd-v1 PACKAGES="base-files busybox dnsmasq dropbear
firewall fstools fwtool hostapd-common ip6tables iptables iw iwinfo jshn
jsonfilter kernel kmod-ath kmod-ath9k kmod-ath9k-common kmod-cfg80211
kmod-gpio-button-hotplug kmod-ip6tables kmod-ipt-conntrack kmod-ipt-core
kmod-ipt-nat kmod-lib-crc-ccitt kmod-mac80211 kmod-nf-conntrack
kmod-nf-conntrack6 kmod-nf-ipt kmod-nf-ipt6 kmod-nf-nat kmod-nls-base
kmod-ppp kmod-pppoe kmod-pppox kmod-slhc kmod-usb-core
kmod-usb-ledtrig-usbport kmod-usb2 lede-keyring libblobmsg-json libc libgcc
libip4tc libip6tc libiwinfo libiwinfo-lua libjson-c libjson-script liblua
libnl-tiny libpthread libubox libubus libubus-lua libuci libuci-lua
libuclient libxtables logd lua luci luci-app-firewall luci-base luci-lib-ip
luci-lib-jsonc luci-lib-nixio luci-mod-admin-full luci-proto-ipv6
luci-proto-ppp luci-theme-bootstrap mtd netifd odhcp6c odhcpd opkg ppp
ppp-mod-pppoe procd rpcd swconfig uboot-envtools ubox ubus ubusd uci
uclient-fetch uhttpd uhttpd-mod-ubus usign wpad-mini luci-app-ddns
ddns-scripts wget libpcre zlib libopenssl librt"
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'proper-umask'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'perl-thread-queue'... ok.
Checking 'tar'... ok.
Checking 'find'... ok.
Checking 'bash'... ok.
Checking 'patch'... ok.
Checking 'diff'... ok.
Checking 'cp'... ok.
Checking 'seq'... ok.
Checking 'awk'... ok.
Checking 'grep'... ok.
Checking 'getopt'... ok.
Checking 'stat'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'time'... failed.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
Checking 'ldconfig-stub'... ok.

Build dependency: Please install GNU 'time' or BusyBox 'time'

Prerequisite check failed. Use FORCE=1 to override.
make[1]: *** [Makefile:76: staging_dir/host/.prereq-build] Error 1
make: *** [Makefile:175: image] Error 2
[mikael@mikael-pc
openwrt-imagebuilder-18.06.0-rc1-ar71xx-generic.Linux-x86_64]$


But I have 'time':
$ time

real0m0,000s
user0m0,000s
sys 0m0,000s
$

What am I doing wrong?
TIA,
Mikael


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


Re: [OpenWrt-Devel] [PATCH] brcm2708: cosmetic changes

2018-06-25 Thread Karl Palsson

Christo Nedev  wrote:
> bcm2709: rename kernel.img to image7.img
>   kernel8.img boot in 64 bit mode
>   kernel8-32.img boot in 32 bit mode
>   kernel7.img 32 bit mode
>   kernel.img 32 bit mode
> 

Couldyou perhaps elaborate on the _why_ of your change? The what
of your change is visible in the diff itself.

Cheers,
Karl P

> bcm2710: sort order
> 
> Signed-off-by: Christo Nedev 
> ---
>  target/linux/brcm2708/image/Makefile | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/target/linux/brcm2708/image/Makefile
> b/target/linux/brcm2708/image/Makefile index
> 80a019270d..8a94375600 100644
> --- a/target/linux/brcm2708/image/Makefile
> +++ b/target/linux/brcm2708/image/Makefile
> @@ -54,6 +54,7 @@ define Device/Default
>  endef
>  
>  define Device/rpi
> +  KERNEL_IMG := kernel.img
>DEVICE_TITLE := Raspberry Pi B/B+/CM/Zero/ZeroW
>DEVICE_DTS := bcm2708-rpi-b bcm2708-rpi-b-plus bcm2708-rpi-cm 
> bcm2708-rpi-0-w
>SUPPORTED_DEVICES := rpi-b rpi-b-plus rpi-cm rpi-zero rpi-zero-w 
> raspberrypi,model-b raspberrypi,model-b-plus raspberrypi,compute-module-1 
> raspberrypi,model-b-rev2 raspberrypi,model-zero raspberrypi,model-zero-w
> @@ -64,6 +65,7 @@ ifeq ($(SUBTARGET),bcm2708)
>  endif
>  
>  define Device/rpi-2
> +  KERNEL_IMG := kernel7.img
>DEVICE_TITLE := Raspberry Pi 2B/3B/3B+/3CM
>DEVICE_DTS := bcm2709-rpi-2-b bcm2710-rpi-3-b bcm2710-rpi-3-b-plus 
> bcm2710-rpi-cm3
>SUPPORTED_DEVICES := rpi-2-b rpi-3-b rpi-3-b-plus rpi-cm 
> raspberrypi,2-model-b raspberrypi,3-model-b raspberrypi,3-model-b-plus 
> raspberrypi,compute-module-3
> @@ -78,7 +80,7 @@ define Device/rpi-3
>DEVICE_TITLE := Raspberry Pi 3B/3B+
>DEVICE_DTS := broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-3-b-plus
>SUPPORTED_DEVICES := rpi-3-b rpi-3-b-plus raspberrypi,3-model-b 
> raspberrypi,3-model-b-plus
> -  DEVICE_PACKAGES := brcmfmac-firmware-43430-sdio brcmfmac-board-rpi2 
> brcmfmac-firmware-43455-sdio brcmfmac-board-rpi3 kmod-brcmfmac wpad-mini
> +  DEVICE_PACKAGES := brcmfmac-firmware-43430-sdio 
> brcmfmac-firmware-43455-sdio brcmfmac-board-rpi2 brcmfmac-board-rpi3 
> kmod-brcmfmac wpad-mini
>  endef
>  ifeq ($(SUBTARGET),bcm2710)
>TARGET_DEVICES += rpi-3
> -- 
> 2.11.0
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/listinfo/openwrt-devel

signature.html
Description: OpenPGP Digital Signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] iwinfo: add channel survey

2018-06-25 Thread Jo-Philipp Wich
Hi,

yes I'd prefer to see Lua bindings implemented for that.

~ Jo

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


[OpenWrt-Devel] [PATCH v2] netfilter: add bpf match support

2018-06-25 Thread Alin Nastac
From: Alin Nastac 

Add xt_bpf modules to {kmod-ipt,iptables-mod}-filter.

Match using Linux Socket Filter. Expects a BPF program in decimal
format. This is the format generated by the nfbpf_compile utility.

Signed-off-by: Alin Nastac 
---
 include/netfilter.mk  | 1 +
 package/kernel/linux/modules/netfilter.mk | 1 +
 package/network/utils/iptables/Makefile   | 1 +
 3 files changed, 3 insertions(+)

diff --git a/include/netfilter.mk b/include/netfilter.mk
index 5d532ce..510aa18 100644
--- a/include/netfilter.mk
+++ b/include/netfilter.mk
@@ -106,6 +106,7 @@ $(eval $(call 
nf_add,IPT_PHYSDEV,CONFIG_NETFILTER_XT_MATCH_PHYSDEV, $(P_XT)xt_ph
 # filter
 
 $(eval $(call nf_add,IPT_FILTER,CONFIG_NETFILTER_XT_MATCH_STRING, 
$(P_XT)xt_string))
+$(eval $(call nf_add,IPT_FILTER,CONFIG_NETFILTER_XT_MATCH_BPF, $(P_XT)xt_bpf))
 
 
 # ipopt
diff --git a/package/kernel/linux/modules/netfilter.mk 
b/package/kernel/linux/modules/netfilter.mk
index 51f3544..be469fa 100644
--- a/package/kernel/linux/modules/netfilter.mk
+++ b/package/kernel/linux/modules/netfilter.mk
@@ -237,6 +237,7 @@ define KernelPackage/ipt-filter/description
  Netfilter (IPv4) kernel modules for packet content inspection
  Includes:
  - string
+ - bpf
 endef
 
 $(eval $(call KernelPackage,ipt-filter))
diff --git a/package/network/utils/iptables/Makefile 
b/package/network/utils/iptables/Makefile
index 44e24b2..1bc771b 100644
--- a/package/network/utils/iptables/Makefile
+++ b/package/network/utils/iptables/Makefile
@@ -150,6 +150,7 @@ Includes support for:
 
  Matches:
   - string
+  - bpf
 
 endef
 
-- 
2.7.4


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