[PATCH v2] treewide: unify OpenWrt hosted source via @OPENWRT

2021-01-31 Thread Paul Spooren
Multiple sources are hosted on OpenWrts source server only. The source
URLs to point to the server vary based on different epochs in OpenWrts
history.

Replace all by @OPENWRT which is an "empty" mirror, therefore using the
fallback servers sources.cdn.openwrt.org and sources.openwrt.org.

Signed-off-by: Paul Spooren 
---
 include/download.mk   | 2 +-
 package/boot/fconfig/Makefile | 2 +-
 package/firmware/b43legacy-firmware/Makefile  | 2 +-
 package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile | 2 +-
 package/kernel/broadcom-wl/Makefile   | 2 +-
 package/kernel/lantiq/ltq-adsl/Makefile   | 2 +-
 package/kernel/lantiq/ltq-tapi/Makefile   | 2 +-
 package/kernel/lantiq/ltq-vdsl-mei/Makefile   | 2 +-
 package/kernel/lantiq/ltq-vdsl/Makefile   | 2 +-
 package/kernel/lantiq/ltq-vmmc/Makefile   | 2 +-
 package/kernel/mac80211/broadcom.mk   | 6 +++---
 package/network/config/ltq-adsl-app/Makefile  | 2 +-
 package/network/config/ltq-vdsl-app/Makefile  | 2 +-
 scripts/download.pl   | 2 ++
 tools/lzma-old/Makefile   | 2 +-
 tools/lzma/Makefile   | 2 +-
 16 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/include/download.mk b/include/download.mk
index d393bf3907..25707130cf 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -30,7 +30,7 @@ define dl_method
 $(strip \
   $(if $(filter git,$(2)),$(call dl_method_git,$(1),$(2)),
 $(if $(2),$(2), \
-  $(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% 
@SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
+  $(if $(filter @OPENWRT @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% 
@SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \
 $(if $(filter git://%,$(1)),$(call dl_method_git,$(1),$(2)), \
   $(if $(filter svn://%,$(1)),svn, \
 $(if $(filter cvs://%,$(1)),cvs, \
diff --git a/package/boot/fconfig/Makefile b/package/boot/fconfig/Makefile
index 9b806fe97c..5784477bf4 100644
--- a/package/boot/fconfig/Makefile
+++ b/package/boot/fconfig/Makefile
@@ -12,7 +12,7 @@ PKG_VERSION:=20080329
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://downloads.openwrt.org/sources
+PKG_SOURCE_URL:=@OPENWRT
 PKG_HASH:=4ff0e8f07e35e46b705c0dbe9d9544ede01ea092a69e3f7db03e55a3f2bb8eb7
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
diff --git a/package/firmware/b43legacy-firmware/Makefile 
b/package/firmware/b43legacy-firmware/Makefile
index 9b9c0070b2..ecbfc32293 100644
--- a/package/firmware/b43legacy-firmware/Makefile
+++ b/package/firmware/b43legacy-firmware/Makefile
@@ -12,7 +12,7 @@ PKG_VERSION:=3.130.20.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=wl_apsta-$(PKG_VERSION).o
-PKG_SOURCE_URL:=https://downloads.openwrt.org/sources
+PKG_SOURCE_URL:=@OPENWRT
 PKG_HASH:=7dba610b1d96dd14e901bcbce14cd6ecd1b1ac6f5c0035b0d6b6dc46a7c3ef90
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile 
b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile
index a076fe2596..649325601c 100644
--- a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile
+++ b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile
@@ -10,7 +10,7 @@ PKG_NAME:=dsl_vr9_firmware_xdsl
 PKG_VERSION:=05.08.01.08.01.06_05.08.00.0B.01.01_osc
 PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
+PKG_SOURCE_URL:=@OPENWRT
 PKG_HASH:=44cd94130571fe42dfa8f0f9d44597d104e9e77962617fe38646b7a0b4184a2b
 PKG_BUILD_DEPENDS:=bsdiff/host
 
diff --git a/package/kernel/broadcom-wl/Makefile 
b/package/kernel/broadcom-wl/Makefile
index 661c7f0589..7188c4900e 100644
--- a/package/kernel/broadcom-wl/Makefile
+++ b/package/kernel/broadcom-wl/Makefile
@@ -13,7 +13,7 @@ PKG_VERSION:=5.10.56.27.3
 PKG_RELEASE:=10
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(ARCH).tar.bz2
-PKG_SOURCE_URL:=https://downloads.openwrt.org/sources
+PKG_SOURCE_URL:=@OPENWRT
 
 ifeq ($(ARCH),mipsel)
 PKG_HASH:=26a8c370f48fc129d0731cfd751c36cae1419b0bc8ca35781126744e60eae009
diff --git a/package/kernel/lantiq/ltq-adsl/Makefile 
b/package/kernel/lantiq/ltq-adsl/Makefile
index 1a9128fc58..b2e1ccb640 100644
--- a/package/kernel/lantiq/ltq-adsl/Makefile
+++ b/package/kernel/lantiq/ltq-adsl/Makefile
@@ -13,7 +13,7 @@ PKG_VERSION:=3.24.4.4
 PKG_RELEASE:=3
 PKG_SOURCE:=drv_dsl_cpe_api_danube-$(PKG_VERSION).tar.gz
 
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-dsl-$(BUILD_VARIANT)/drv_dsl_cpe_api-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://mirror2.openwrt.org/sources/
+PKG_SOURCE_URL:=@OPENWRT
 PKG_HASH:=eb2ed59715d3bf4e8a1460bbbe2f1660039e0a9f9d72afb1b2b16590094eb33c
 PKG_MAINTAINER:=John Crispin 
 
diff --git 

Re: [PATCHv3 1/3] base-files: use hwclock --systz

2021-01-31 Thread Rosen Penev
On Sun, Jan 31, 2021 at 3:46 PM Hauke Mehrtens  wrote:
>
> Hi Rosen,
>
> Are you planning to send a new version soon?
Sent.
>
> Hauke

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


[PATCHv3 2/3] busybox: update to 1.33

2021-01-31 Thread Rosen Penev
Remove stime backport.

Remove static libgcc patch as upstream fixed it with
BUSYBOX_DEFAULT_STATIC_LIBGCC which defauls to off.

Remove date -k patch as it no longer applies. It's also pointless as
busybox' hwclock utility can do the same thing.

Remove ntpd patch as that seems to have been applied upstream.

Add smalll patch fixing compilation with SELinux. Upstream commit
2496616b0a8d1c80cd1416b73a4847b59b9f969a renamed the variable without
renaming it in the SELinux path.

Refresh config and patches.

Signed-off-by: Rosen Penev 
---
 v2: refreshed config and slight rewording.
 package/utils/busybox/Config-defaults.in  |  48 ++-
 package/utils/busybox/Makefile|   6 +-
 package/utils/busybox/config/Config.in|  38 --
 .../utils/busybox/config/archival/Config.in   |   2 +-
 .../busybox/config/console-tools/Config.in|  13 --
 .../utils/busybox/config/coreutils/Config.in  |  10 +-
 .../utils/busybox/config/e2fsprogs/Config.in  |   1 -
 .../utils/busybox/config/findutils/Config.in  |   8 ++
 .../busybox/config/klibc-utils/Config.in  |   1 -
 package/utils/busybox/config/libbb/Config.in  |   2 -
 .../utils/busybox/config/miscutils/Config.in  |  36 +
 .../utils/busybox/config/modutils/Config.in   |   6 -
 .../utils/busybox/config/networking/Config.in |  68 ++
 .../busybox/config/networking/udhcp/Config.in |   2 -
 package/utils/busybox/config/procps/Config.in |   3 -
 package/utils/busybox/config/shell/Config.in  | 124 ++
 .../utils/busybox/config/sysklogd/Config.in   |  10 +-
 .../utils/busybox/config/util-linux/Config.in |  62 ++---
 .../config/util-linux/volume_id/Config.in |   6 +
 .../001-remove-stime-function-calls.patch |  84 
 .../patches/010-fix-wrong-variable.patch  |  11 ++
 .../patches/110-no_static_libgcc.patch|  11 --
 .../busybox/patches/120-lto-jobserver.patch   |   6 +-
 .../patches/200-udhcpc_reduce_msgs.patch  |   4 +-
 .../patches/201-udhcpc_changed_ifindex.patch  |   2 +-
 .../203-udhcpc_renew_no_deconfig.patch|   2 +-
 .../patches/230-add_nslookup_lede.patch   |   6 +-
 .../busybox/patches/250-date-k-flag.patch |  92 -
 .../500-move-traceroute-applets-to-bin.patch  |   2 +-
 ...520-loginutils-handle-crypt-failures.patch |   6 +-
 .../patches/600-allow-ntpd-non-root.patch |  12 --
 31 files changed, 255 insertions(+), 429 deletions(-)
 delete mode 100644 
package/utils/busybox/patches/001-remove-stime-function-calls.patch
 create mode 100644 package/utils/busybox/patches/010-fix-wrong-variable.patch
 delete mode 100644 package/utils/busybox/patches/110-no_static_libgcc.patch
 delete mode 100644 package/utils/busybox/patches/250-date-k-flag.patch
 delete mode 100644 package/utils/busybox/patches/600-allow-ntpd-non-root.patch

diff --git a/package/utils/busybox/Config-defaults.in 
b/package/utils/busybox/Config-defaults.in
index 8d237ad181..04148df267 100644
--- a/package/utils/busybox/Config-defaults.in
+++ b/package/utils/busybox/Config-defaults.in
@@ -85,9 +85,6 @@ config BUSYBOX_DEFAULT_FEATURE_SYSLOG_INFO
 config BUSYBOX_DEFAULT_FEATURE_SYSLOG
bool
default y
-config BUSYBOX_DEFAULT_PLATFORM_LINUX
-   bool
-   default y
 config BUSYBOX_DEFAULT_STATIC
bool
default n
@@ -130,6 +127,9 @@ config BUSYBOX_DEFAULT_USE_PORTABLE_CODE
 config BUSYBOX_DEFAULT_STACK_OPTIMIZATION_386
bool
default n
+config BUSYBOX_DEFAULT_STATIC_LIBGCC
+   bool
+   default n
 config BUSYBOX_DEFAULT_INSTALL_APPLET_SYMLINKS
bool
default y
@@ -169,6 +169,9 @@ config BUSYBOX_DEFAULT_UNIT_TEST
 config BUSYBOX_DEFAULT_WERROR
bool
default n
+config BUSYBOX_DEFAULT_WARN_SIMPLE_MSG
+   bool
+   default n
 config BUSYBOX_DEFAULT_NO_DEBUG_LIB
bool
default y
@@ -872,6 +875,9 @@ config BUSYBOX_DEFAULT_USLEEP
 config BUSYBOX_DEFAULT_UUDECODE
bool
default n
+config BUSYBOX_DEFAULT_BASE32
+   bool
+   default n
 config BUSYBOX_DEFAULT_BASE64
bool
default n
@@ -1160,6 +1166,9 @@ config BUSYBOX_DEFAULT_FEATURE_FIND_QUIT
 config BUSYBOX_DEFAULT_FEATURE_FIND_DELETE
bool
default n
+config BUSYBOX_DEFAULT_FEATURE_FIND_EMPTY
+   bool
+   default n
 config BUSYBOX_DEFAULT_FEATURE_FIND_PATH
bool
default y
@@ -1565,9 +1574,6 @@ config BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG
 config BUSYBOX_DEFAULT_HEXDUMP
bool
default y
-config BUSYBOX_DEFAULT_FEATURE_HEXDUMP_REVERSE
-   bool
-   default n
 config BUSYBOX_DEFAULT_HD
bool
default n
@@ -1778,6 +1784,9 @@ config BUSYBOX_DEFAULT_TASKSET
 config BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY
bool
default n
+config BUSYBOX_DEFAULT_FEATURE_TASKSET_CPULIST
+   bool
+   default n
 config BUSYBOX_DEFAULT_UEVENT
bool
default n
@@ -1814,6 +1823,9 @@ config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_BTRFS
 

[PATCHv3 3/3] busybox: remove useless busybox patches

2021-01-31 Thread Rosen Penev
The first two are useless as /bin/sh can execute those scripts just
fine. Shellcheck reports no problems.

Telnet patch is useless as telnet is no longer used in OpenWrt.

Signed-off-by: Rosen Penev 
---
 package/utils/busybox/patches/100-trylink_bash.patch   |  8 
 .../busybox/patches/101-gen_build_files_bash.patch |  8 
 package/utils/busybox/patches/240-telnetd_intr.patch   | 10 --
 3 files changed, 26 deletions(-)
 delete mode 100644 package/utils/busybox/patches/100-trylink_bash.patch
 delete mode 100644 package/utils/busybox/patches/101-gen_build_files_bash.patch
 delete mode 100644 package/utils/busybox/patches/240-telnetd_intr.patch

diff --git a/package/utils/busybox/patches/100-trylink_bash.patch 
b/package/utils/busybox/patches/100-trylink_bash.patch
deleted file mode 100644
index f9571fcbc8..00
--- a/package/utils/busybox/patches/100-trylink_bash.patch
+++ /dev/null
@@ -1,8 +0,0 @@
 a/scripts/trylink
-+++ b/scripts/trylink
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/usr/bin/env bash
- 
- debug=false
- 
diff --git a/package/utils/busybox/patches/101-gen_build_files_bash.patch 
b/package/utils/busybox/patches/101-gen_build_files_bash.patch
deleted file mode 100644
index d258fb8bc4..00
--- a/package/utils/busybox/patches/101-gen_build_files_bash.patch
+++ /dev/null
@@ -1,8 +0,0 @@
 a/scripts/gen_build_files.sh
-+++ b/scripts/gen_build_files.sh
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/usr/bin/env bash
- 
- # Note: was using sed OPTS CMD -- FILES
- # but users complain that many sed implementations
diff --git a/package/utils/busybox/patches/240-telnetd_intr.patch 
b/package/utils/busybox/patches/240-telnetd_intr.patch
deleted file mode 100644
index 773ba44db5..00
--- a/package/utils/busybox/patches/240-telnetd_intr.patch
+++ /dev/null
@@ -1,10 +0,0 @@
 a/networking/telnetd.c
-+++ b/networking/telnetd.c
-@@ -509,6 +509,7 @@ make_new_session(
- 
-   /* Restore default signal handling ASAP */
-   bb_signals((1 << SIGCHLD) + (1 << SIGPIPE), SIG_DFL);
-+  signal(SIGINT, SIG_DFL);
- 
-   pid = getpid();
- 
-- 
2.29.2


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


[PATCHv3 1/3] base-files: use hwclock --systz

2021-01-31 Thread Rosen Penev
The date -k patch is non standard and will be removed in the next
commit.

Tested behavior to be identical with a simple C program:

 #define _GNU_SOURCE
 #include 
 #include 
 #include 
 #include 

int main()
{
struct timezone tt;
struct timezone tz;

int a = syscall(SYS_gettimeofday, NULL, );
int b = gettimeofday(NULL, );
printf("%d - %d, %d\n", a, tt.tz_minuteswest, tt.tz_dsttime);
printf("%d - %d, %d\n", b, tz.tz_minuteswest, tz.tz_dsttime);
}

Signed-off-by: Rosen Penev 
---
 v3: add -u to fix early log time
 v2: moved patch to the front for easier git bisect
 package/base-files/files/etc/init.d/system | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/base-files/files/etc/init.d/system 
b/package/base-files/files/etc/init.d/system
index 0e33c522b4..585f7e 100755
--- a/package/base-files/files/etc/init.d/system
+++ b/package/base-files/files/etc/init.d/system
@@ -27,7 +27,7 @@ system_config() {
ln -sf "/usr/share/zoneinfo/$zonename" /tmp/localtime && rm -f 
/tmp/TZ
 
# apply timezone to kernel
-   busybox date -k
+   hwclock -u --systz
 }
 
 reload_service() {
-- 
2.29.2


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


Re: [PATCHv3 1/3] base-files: use hwclock --systz

2021-01-31 Thread Hauke Mehrtens

Hi Rosen,

Are you planning to send a new version soon?

Hauke

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


[PATCH 2/2] uboot-envtools: Update to version 2021.01

2021-01-31 Thread Hauke Mehrtens
Signed-off-by: Hauke Mehrtens 
---
 package/boot/uboot-envtools/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/boot/uboot-envtools/Makefile 
b/package/boot/uboot-envtools/Makefile
index 5014b71ef67e..a9eccec0cec9 100644
--- a/package/boot/uboot-envtools/Makefile
+++ b/package/boot/uboot-envtools/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=uboot-envtools
 PKG_DISTNAME:=u-boot
-PKG_VERSION:=2020.04
+PKG_VERSION:=2021.01
 PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:= \
 https://ftp.denx.de/pub/u-boot \
 https://mirror.cyberbits.eu/u-boot \
 ftp://ftp.denx.de/pub/u-boot
-PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
+PKG_HASH:=b407e1510a74e863b8b5cb42a24625344f0e0c2fc7582d8c866bd899367d0454
 PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
 
-- 
2.20.1


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


[PATCH 1/2] tools: mkimage: Update U-Boot to version 2021.01

2021-01-31 Thread Hauke Mehrtens
* The fit image is now created with 0666 permission in upstream U-Boot
  remove our patch switch creates it with 0744
* The generated/autoconf.h file is created now as an empty file, it is
  not needed to remove this include any more.
* Upstream lib/rsa/rsa-sign.c now includes stdlib.h instead of malloc.h
* ALIGN_MASK was moved to imagetool.h, own patch should not be needed
  any more.

Signed-off-by: Hauke Mehrtens 
---

Could someone test this on MacOS please.

 tools/mkimage/Makefile|  6 +++--
 .../patches/020-fix-file-creation-perms.patch | 11 
 .../030-allow-to-use-different-magic.patch| 14 +-
 ...d-compatibility-with-non-Linux-hosts.patch | 26 ---
 .../070-remove_generated_autoconf.patch   | 10 ---
 .../patches/210-link-libcrypto-static.patch   |  4 +--
 6 files changed, 13 insertions(+), 58 deletions(-)
 delete mode 100644 tools/mkimage/patches/020-fix-file-creation-perms.patch
 delete mode 100644 tools/mkimage/patches/070-remove_generated_autoconf.patch

diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile
index 90ecdaaa6e57..6901d921cfc6 100644
--- a/tools/mkimage/Makefile
+++ b/tools/mkimage/Makefile
@@ -7,14 +7,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mkimage
-PKG_VERSION:=2020.04
+PKG_VERSION:=2021.01
 
 PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
https://mirror.cyberbits.eu/u-boot \
https://ftp.denx.de/pub/u-boot \
ftp://ftp.denx.de/pub/u-boot
-PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
+PKG_HASH:=b407e1510a74e863b8b5cb42a24625344f0e0c2fc7582d8c866bd899367d0454
 
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
 
@@ -24,6 +24,8 @@ define Host/Prepare
$(Host/Prepare/Default)
mkdir -p $(HOST_BUILD_DIR)/include/config
touch $(HOST_BUILD_DIR)/include/config/auto.conf
+   mkdir -p $(HOST_BUILD_DIR)/include/generated/
+   touch $(HOST_BUILD_DIR)/include/generated/autoconf.h
 endef
 
 define Host/Compile
diff --git a/tools/mkimage/patches/020-fix-file-creation-perms.patch 
b/tools/mkimage/patches/020-fix-file-creation-perms.patch
deleted file mode 100644
index 80cda288ab3d..
--- a/tools/mkimage/patches/020-fix-file-creation-perms.patch
+++ /dev/null
@@ -1,11 +0,0 @@
 a/tools/fit_image.c
-+++ b/tools/fit_image.c
-@@ -642,7 +642,7 @@ static int copyfile(const char *src, con
-   goto out;
-   }
- 
--  fd_dst = open(dst, O_WRONLY | O_CREAT, 0700);
-+  fd_dst = open(dst, O_WRONLY | O_CREAT, 0744);
-   if (fd_dst < 0) {
-   printf("Can't open file %s (%s)\n", dst, strerror(errno));
-   goto out;
diff --git a/tools/mkimage/patches/030-allow-to-use-different-magic.patch 
b/tools/mkimage/patches/030-allow-to-use-different-magic.patch
index 8d79de29921a..3a1677d54ddb 100644
--- a/tools/mkimage/patches/030-allow-to-use-different-magic.patch
+++ b/tools/mkimage/patches/030-allow-to-use-different-magic.patch
@@ -2,7 +2,7 @@ This patch makes it possible to set a custom image magic.
 
 --- a/tools/mkimage.c
 +++ b/tools/mkimage.c
-@@ -20,6 +20,7 @@ static struct image_tool_params params =
+@@ -21,6 +21,7 @@ static struct image_tool_params params =
.arch = IH_ARCH_PPC,
.type = IH_TYPE_KERNEL,
.comp = IH_COMP_GZIP,
@@ -10,7 +10,7 @@ This patch makes it possible to set a custom image magic.
.dtc = MKIMAGE_DEFAULT_DTC_OPTIONS,
.imagename = "",
.imagename2 = "",
-@@ -76,11 +77,12 @@ static void usage(const char *msg)
+@@ -82,11 +83,12 @@ static void usage(const char *msg)
 "  -l ==> list image header information\n",
params.cmdname);
fprintf(stderr,
@@ -24,16 +24,16 @@ This patch makes it possible to set a custom image magic.
"  -a ==> set load address to 'addr' (hex)\n"
"  -e ==> set entry point to 'ep' (hex)\n"
"  -n ==> set image name to 'name'\n"
-@@ -143,7 +145,7 @@ static void process_args(int argc, char
+@@ -150,7 +152,7 @@ static void process_args(int argc, char
int opt;
  
while ((opt = getopt(argc, argv,
--   "a:A:b:c:C:d:D:e:Ef:Fk:i:K:ln:N:p:O:rR:qsT:vVx")) 
!= -1) {
-+   
"a:A:b:c:C:d:D:e:Ef:Fk:i:K:lM:n:N:p:O:rR:qsT:vVx")) != -1) {
+- "a:A:b:B:c:C:d:D:e:Ef:Fk:i:K:ln:N:p:O:rR:qstT:vVx")) != -1) {
++ "a:A:b:B:c:C:d:D:e:Ef:Fk:i:K:lM:n:N:p:O:rR:qstT:vVx")) != 
-1) {
switch (opt) {
case 'a':
params.addr = strtoull(optarg, , 16);
-@@ -221,6 +223,14 @@ static void process_args(int argc, char
+@@ -237,6 +239,14 @@ static void process_args(int argc, char
case 'l':
params.lflag = 1;
break;
@@ -61,7 +61,7 @@ This patch makes it possible to set a custom image magic.

Re: Deprecate snort in favor of snort3

2021-01-31 Thread Eneas U de Queiroz
On Sun, Jan 31, 2021 at 3:45 PM W. Michael Petullo  wrote:
>
> OpenWrt provides two snort packages: snort and snort3. Now that snort3 is
> out of beta, I would like to consider deprecating the snort package. One
> difficulty of maintaining both packages is that a different version of
> the libdaq package is required for each. The two versions cannot coexist,
> and this make build-server builds fail.
>
> I do not know how popular the snort package is. I use snort3.
>
> Is dropping snort advisable? If so, what is the procedure?
>
> --
> Mike

I was about to open a PR to have each version of libdaq installed into
its own directory, which would take care of the build failure.
However, I think removing the snort3 package, then bumping the stable
snort to the latest version is the best way to go.  I would not leave
the version number as part of the package name.  If you want to keep
this status quo a little longer, tell me and I'll open the PR.
BTW, I don't use the packages, I was just going to fix the build failure.

Cheers,

Eneas

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


OpenWrt add dependency to swig for U-Boot builds

2021-01-31 Thread Hauke Mehrtens
The U-Boot build for more and more SoCs is using binman by default to 
combine the images (SPL, U-Boot, ...). Binman is build from the U-Boot 
project and it needs swig to build. We have multiple patches in OpenWrt 
to remove this dependency from U-Boot, but it costs more and more time 
to revert back to the old code. We have them in sunxi and rockchip 
U-Boot, the Mediatek U-Boot build failed some time ago because of 
missing swig in build bots.


I was just trying to update sunxi U-Boot to 2021.01 and the binman usage 
changed again, so it needs more adaptations.


Building swig in OpenWrt tools will not be easy. We needs swig with 
python bindings and this version needs the python development headers to 
build.


I would like to add swig as an official dependency to OpenWrt, we could 
make it depend on the target if this is possible.


Does anyone have an opinion on this topic?

Hauke



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


Deprecate snort in favor of snort3

2021-01-31 Thread W. Michael Petullo
OpenWrt provides two snort packages: snort and snort3. Now that snort3 is
out of beta, I would like to consider deprecating the snort package. One
difficulty of maintaining both packages is that a different version of
the libdaq package is required for each. The two versions cannot coexist,
and this make build-server builds fail.

I do not know how popular the snort package is. I use snort3.

Is dropping snort advisable? If so, what is the procedure?

-- 
Mike

:wq

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


Re: Backporting opkg fixes to 19.07

2021-01-31 Thread Baptiste Jonglez
Hi,

I've just pushed this to my (brand new) staging tree:

  
https://git.openwrt.org/?p=openwrt/staging/zorun.git;a=shortlog;h=refs/heads/openwrt-19.07

If there are no objections, I will merge that in a couple of days.

Baptiste

On 24-01-21, Baptiste Jonglez wrote:
> Hi,
> 
> I would like to backport the opkg fix for 
> https://bugs.openwrt.org/index.php?do=details_id=2690
> to 19.07.
> 
> The opkg package in 19.07 is a bit old, it's using:
> 
> f2166a8 libopkg: implement lightweight package listing logic
> 
> Since there were several other changes in opkg master, I would create a
> new openwrt-19.07 branch in opkg based on f2166a8, and backport these commits:
> 
> 61b3c62 opkg_verify_integrity: better logging and error conditions
> f73d42f download: purge cached packages that have incorrect checksum
> 1c1480e download: factor out the logic for building cache filenames
> 293b1ce libopkg: factor out checksum and size verification
> a786e25 download: remove compatibility with old cache naming scheme
> 
> And maybe also this fix for another issue:
> 
> 66f458d libopkg: fix md5sum calculation
> 
> As far as I can tell, it shouldn't cause issues such as ABI breakage, but
> I prefer if somebody can double-check...
> 
> Thanks,
> Baptiste




signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[no subject]

2021-01-31 Thread Stephen Walker via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
  Branch: refs/heads/master
  Home:   https://github.com/sdwalker/sdwalker.github.io
  Commit: 889fef893adbf608e67c2c1c4375efbf2aa7047c
  
https://github.com/sdwalker/sdwalker.github.io/commit/889fef893adbf608e67c2c1c4375efbf2aa7047c
  Author: Stephen Walker 
  Date:   2021-01-31 (Sun, 31 Jan 2021)

  Changed paths:
M uscan/index-18.06.html
M uscan/index-19.07.html
M uscan/index.html

  Log Message:
  ---
  This week's update



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


Re: [PATCH] treewide: unify OpenWrt hosted source URL

2021-01-31 Thread Hannu Nyman

Paul Spooren kirjoitti 31.1.2021 klo 11.19:



On Sun, Jan 31, 2021 at 10:08, Hannu Nyman  wrote:

Paul Spooren kirjoitti 30.1.2021 klo 23.54:

Multiple sources are hosted on OpenWrts source server only. The source
URLs to point to the server vary based on different epochs in OpenWrts
history. Unify them to use always the new source CDN and HTTPS.

If the CDN fails, sources.o.o is used as a fallback via downloads.pl.

Signed-off-by: Paul Spooren 
---
...
    PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://downloads.openwrt.org/sources
+PKG_SOURCE_URL:=https://sources.cdn.openwrt.org



Would it make sense to define a similar @OPENWRT alias in 
scripts/download.pl as we have done for SF, APACHE, GITHUB, GNU, SAVANNAH, 
KERNEL and GNOME ?


I had the same idea but thought it's awkward to define a variable which is 
then empty. I'll give it a try and see how it looks. We could then decide 
for either solution.



Just an elsif block with a comment about the actual sites being added at the 
end as deafult fallback sites in any case. (and possibly a no-op line like 
sleep(1), if the elsif block needs some actual contents. (not sure about perl)).


Or possibly an elsif block containing the same cdn line, so that it gets 
added twice (once here, once as fallback). Seems extraflous, but would look tidy.







https://github.com/openwrt/openwrt/blob/master/scripts/download.pl#L192-L255

Then we could in future change those download locations centrally in 
download.pl, instead of changing it every single Makefile where it is 
used. The Makefiles could just contain PKG_SOURCE_URL:=@OPENWRT


(One afterthought: the pushed contents might actually be empty, as the 
actual download locations are pushed on lines 261-263 to the same trial 
queue. Not quite sure about the pushing order logic, but might work.)








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


Re: [PATCH] treewide: unify OpenWrt hosted source URL

2021-01-31 Thread Paul Spooren




On Sun, Jan 31, 2021 at 10:08, Hannu Nyman  wrote:

Paul Spooren kirjoitti 30.1.2021 klo 23.54:
Multiple sources are hosted on OpenWrts source server only. The 
source
URLs to point to the server vary based on different epochs in 
OpenWrts

history. Unify them to use always the new source CDN and HTTPS.

If the CDN fails, sources.o.o is used as a fallback via downloads.pl.

Signed-off-by: Paul Spooren 
---
  package/boot/fconfig/Makefile | 2 +-
  package/firmware/b43legacy-firmware/Makefile  | 2 +-
  package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile | 2 +-
  package/kernel/broadcom-wl/Makefile   | 2 +-
  package/kernel/lantiq/ltq-adsl/Makefile   | 2 +-
  package/kernel/lantiq/ltq-tapi/Makefile   | 2 +-
  package/kernel/lantiq/ltq-vdsl-mei/Makefile   | 2 +-
  package/kernel/lantiq/ltq-vdsl/Makefile   | 2 +-
  package/kernel/lantiq/ltq-vmmc/Makefile   | 2 +-
  package/kernel/mac80211/broadcom.mk   | 6 
+++---

  package/network/config/ltq-adsl-app/Makefile  | 2 +-
  package/network/config/ltq-vdsl-app/Makefile  | 2 +-
  tools/lzma-old/Makefile   | 2 +-
  tools/lzma/Makefile   | 2 +-
  14 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/package/boot/fconfig/Makefile 
b/package/boot/fconfig/Makefile

index 9b806fe97c..31986e6942 100644
--- a/package/boot/fconfig/Makefile
+++ b/package/boot/fconfig/Makefile
@@ -12,7 +12,7 @@ PKG_VERSION:=20080329
  PKG_RELEASE:=1
    PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://downloads.openwrt.org/sources
+PKG_SOURCE_URL:=https://sources.cdn.openwrt.org



Would it make sense to define a similar @OPENWRT alias in 
scripts/download.pl as we have done for SF, APACHE, GITHUB, GNU, 
SAVANNAH, KERNEL and GNOME ?


I had the same idea but thought it's awkward to define a variable which 
is then empty. I'll give it a try and see how it looks. We could then 
decide for either solution.




https://github.com/openwrt/openwrt/blob/master/scripts/download.pl#L192-L255

Then we could in future change those download locations centrally in 
download.pl, instead of changing it every single Makefile where it is 
used. The Makefiles could just contain PKG_SOURCE_URL:=@OPENWRT


(One afterthought: the pushed contents might actually be empty, as 
the actual download locations are pushed on lines 261-263 to the same 
trial queue. Not quite sure about the pushing order logic, but might 
work.)






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


Re: [PATCH] mvebu: omnia: make initramfs image usable out of the box

2021-01-31 Thread Klaus Kudielka

On 30.01.21 14:04, Petr Štetiar wrote:

Currently it's not possible to boot the device with just initramfs image
without additional effort as the initramfs image doesn't contain device tree.
Fix it by producing FIT based image which could be booted with following
commands:

  setenv bootargs earlyprintk console=ttyS0,115200
  tftpboot ${kernel_addr_r} 
openwrt-mvebu-cortexa9-cznic_turris-omnia-initramfs-kernel.bin
  bootm ${kernel_addr_r}

Cc: Karel Kočí 
Cc: Tomasz Maciej Nowak 
Cc: Klaus Kudielka 
Signed-off-by: Petr Štetiar 


At first I was concerned that this image format change also propagates 
into the omnia-medkit.
(Which would likely have broken OpenWrt first-time installation on 
devices with U-Boot 2015.10-rc2).


With a test build I convinced myself that this is not the case.

Acked-by: Klaus Kudielka 

---
  target/linux/mvebu/image/cortexa9.mk | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/mvebu/image/cortexa9.mk 
b/target/linux/mvebu/image/cortexa9.mk
index ea20a25a2990..968e2a38f480 100644
--- a/target/linux/mvebu/image/cortexa9.mk
+++ b/target/linux/mvebu/image/cortexa9.mk
@@ -32,8 +32,9 @@ define Device/cznic_turris-omnia
DEVICE_VENDOR := CZ.NIC
DEVICE_MODEL := Turris Omnia
KERNEL_INSTALL := 1
+  SOC := armada-385
KERNEL := kernel-bin
-  KERNEL_INITRAMFS := kernel-bin
+  KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip 
$$(KDIR)/image-$$(DEVICE_DTS).dtb
DEVICE_PACKAGES :=  \
  mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
  wpad-basic-wolfssl kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct \
@@ -42,7 +43,6 @@ define Device/cznic_turris-omnia
IMAGE/$$(IMAGE_PREFIX)-sysupgrade.img.gz := boot-scr | boot-img | 
sdcard-img | gzip | append-metadata
IMAGE/omnia-medkit-$$(IMAGE_PREFIX)-initramfs.tar.gz := 
omnia-medkit-initramfs | gzip
IMAGE_NAME = $$(2)
-  SOC := armada-385
SUPPORTED_DEVICES += armada-385-turris-omnia
BOOT_SCRIPT := turris-omnia
  endef



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


Re: [PATCH] treewide: unify OpenWrt hosted source URL

2021-01-31 Thread Hannu Nyman

Paul Spooren kirjoitti 30.1.2021 klo 23.54:

Multiple sources are hosted on OpenWrts source server only. The source
URLs to point to the server vary based on different epochs in OpenWrts
history. Unify them to use always the new source CDN and HTTPS.

If the CDN fails, sources.o.o is used as a fallback via downloads.pl.

Signed-off-by: Paul Spooren 
---
  package/boot/fconfig/Makefile | 2 +-
  package/firmware/b43legacy-firmware/Makefile  | 2 +-
  package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile | 2 +-
  package/kernel/broadcom-wl/Makefile   | 2 +-
  package/kernel/lantiq/ltq-adsl/Makefile   | 2 +-
  package/kernel/lantiq/ltq-tapi/Makefile   | 2 +-
  package/kernel/lantiq/ltq-vdsl-mei/Makefile   | 2 +-
  package/kernel/lantiq/ltq-vdsl/Makefile   | 2 +-
  package/kernel/lantiq/ltq-vmmc/Makefile   | 2 +-
  package/kernel/mac80211/broadcom.mk   | 6 +++---
  package/network/config/ltq-adsl-app/Makefile  | 2 +-
  package/network/config/ltq-vdsl-app/Makefile  | 2 +-
  tools/lzma-old/Makefile   | 2 +-
  tools/lzma/Makefile   | 2 +-
  14 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/package/boot/fconfig/Makefile b/package/boot/fconfig/Makefile
index 9b806fe97c..31986e6942 100644
--- a/package/boot/fconfig/Makefile
+++ b/package/boot/fconfig/Makefile
@@ -12,7 +12,7 @@ PKG_VERSION:=20080329
  PKG_RELEASE:=1
  
  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz

-PKG_SOURCE_URL:=https://downloads.openwrt.org/sources
+PKG_SOURCE_URL:=https://sources.cdn.openwrt.org



Would it make sense to define a similar @OPENWRT alias in scripts/download.pl 
as we have done for SF, APACHE, GITHUB, GNU, SAVANNAH, KERNEL and GNOME ?


https://github.com/openwrt/openwrt/blob/master/scripts/download.pl#L192-L255

Then we could in future change those download locations centrally in 
download.pl, instead of changing it every single Makefile where it is used. 
The Makefiles could just contain PKG_SOURCE_URL:=@OPENWRT


(One afterthought: the pushed contents might actually be empty, as the actual 
download locations are pushed on lines 261-263 to the same trial queue. Not 
quite sure about the pushing order logic, but might work.)



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