[PATCH] fakeroot: fix to work with glibc 2.33

2021-02-10 Thread Ilya Lipnitskiy
The following commit removed _STAT_VER definitions from glibc:
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=8ed005daf0ab03e142500324a34087ce179ae78e

That subsequently broke fakeroot:
https://bugs.archlinux.org/task/69572
https://bugzilla.redhat.com/show_bug.cgi?id=1889862#c13
https://forum.openwrt.org/t/unable-to-build-toolchain-fakeroot-fails-perhaps-others-after-it/87966

Make the patch based on Jan Pazdziora's suggestion from here:
https://lists.fedoraproject.org/archives/list/de...@lists.fedoraproject.org/message/SMQ3RYXEYTVZH6PLQMKNB3NM4XLPMNZO/

Tested on my x86_64 Arch Linux machine, fakeroot unit tests pass.

Signed-off-by: Ilya Lipnitskiy 
---
 tools/fakeroot/patches/100-portability.patch | 27 
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/tools/fakeroot/patches/100-portability.patch 
b/tools/fakeroot/patches/100-portability.patch
index 7ba12996be..edf63d3ff4 100644
--- a/tools/fakeroot/patches/100-portability.patch
+++ b/tools/fakeroot/patches/100-portability.patch
@@ -1,6 +1,23 @@
 --- a/libfakeroot.c
 +++ b/libfakeroot.c
-@@ -112,8 +112,16 @@
+@@ -90,6 +90,16 @@
+ #define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b)
+ #endif
+ 
++#ifndef _STAT_VER
++ #if defined (__aarch64__)
++  #define _STAT_VER 0
++ #elif defined (__x86_64__)
++  #define _STAT_VER 1
++ #else
++  #define _STAT_VER 3
++ #endif
++#endif
++
+ /*
+These INT_* (which stands for internal) macros should always be used when
+the fakeroot library owns the storage of the stat variable.
+@@ -112,8 +122,16 @@
  #define INT_SEND_STAT(a,b) SEND_STAT(a,b,_STAT_VER)
  #define INT_SEND_GET_XATTR(a,b) SEND_GET_XATTR(a,b,_STAT_VER)
  #define INT_SEND_GET_STAT(a,b) SEND_GET_STAT(a,b)
@@ -17,7 +34,7 @@
  #include 
  #include 
  #include 
-@@ -125,7 +133,6 @@
+@@ -125,7 +143,6 @@
  #include 
  #include 
  #include 
@@ -25,7 +42,7 @@
  #ifdef HAVE_SYS_ACL_H
  #include 
  #endif /* HAVE_SYS_ACL_H */
-@@ -188,6 +195,15 @@ extern int unsetenv (const char *name);
+@@ -188,6 +205,15 @@ extern int unsetenv (const char *name);
  #undef __lxstat64
  #undef _FILE_OFFSET_BITS
  
@@ -41,7 +58,7 @@
  /*
  // next_wrap_st:
  // this structure is used in next_wrap, which is defined in
-@@ -1911,7 +1927,7 @@ ssize_t fremovexattr(int fd, const char
+@@ -1911,7 +1937,7 @@ ssize_t fremovexattr(int fd, const char
  }
  #endif /* HAVE_FREMOVEXATTR */
  
@@ -50,7 +67,7 @@
if (fakeroot_disabled)
  return next_setpriority(which, who, prio);
next_setpriority(which, who, prio);
-@@ -2520,3 +2536,19 @@ int sysinfo(int command, char *buf, long
+@@ -2520,3 +2546,19 @@ int sysinfo(int command, char *buf, long
  }
  }
  #endif
-- 
2.30.1


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


[PATCH 2/2] imx6: bootscript-apalis: make it working on v2021.01 release

2021-02-10 Thread Petr Štetiar
Upstream in commit 8b9c0cb46471 ("apalis_imx6: boot env configuration
updates") removed emmc legacy wrappers, but so far didn't included any
replacements. Fix it by simply defining the missing variables and UUID
gathering directly into the boot script.

Signed-off-by: Petr Štetiar 
---
 target/linux/imx6/image/bootscript-apalis | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/target/linux/imx6/image/bootscript-apalis 
b/target/linux/imx6/image/bootscript-apalis
index 3a3a6dadb145..f163b92ed0ae 100644
--- a/target/linux/imx6/image/bootscript-apalis
+++ b/target/linux/imx6/image/bootscript-apalis
@@ -1,13 +1,15 @@
 echo "Toradex Apalis OpenWrt Boot script v1.1"
 
-run emmcfinduuid
+setenv mmcdev 0
+setenv mmcrootpart 2
+part uuid mmc ${mmcdev}:${mmcrootpart} uuid
 
 setenv nextcon 0
 setenv boot_file uImage
 setenv fdt_file imx6q-apalis-ixora.dtb
 setenv root root=PARTUUID=${uuid} rootfstype=squashfs rootwait
 setenv bootargs earlyprintk console=${console},${baudrate}n8 ${root}
-setenv fsload ext4load mmc ${emmcdev}:${emmcbootpart}
+setenv fsload ext4load mmc ${mmcdev}:${mmcbootpart}
 
 if ${fsload} ${kernel_addr_r} ${boot_file}; then
if ${fsload} ${fdt_addr_r} ${fdt_file}; then

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


[PATCH 1/2] uboot-imx6: bump to 2021.01 release

2021-02-10 Thread Petr Štetiar
Refreshed all patches, removed 110-mx6cuboxi-mmc-fallback.patch as it
seems, that upstream has probably added similar funcionality in commit
6c3fbf3e456c ("mx6cuboxi: customize board_boot_order to access eMMC")
and it needs to be re-verified by device owner.

Run tested on apalis.

Cc: Felix Fietkau 
Signed-off-by: Petr Štetiar 
---
 package/boot/uboot-imx6/Makefile |  4 ++--
 ...6_defconfig-enable-some-useful-commands.patch | 16 +---
 .../patches/110-mx6cuboxi-mmc-fallback.patch | 15 ---
 3 files changed, 11 insertions(+), 24 deletions(-)
 delete mode 100644 
package/boot/uboot-imx6/patches/110-mx6cuboxi-mmc-fallback.patch

diff --git a/package/boot/uboot-imx6/Makefile b/package/boot/uboot-imx6/Makefile
index 79acd4abf742..549bebb7d255 100644
--- a/package/boot/uboot-imx6/Makefile
+++ b/package/boot/uboot-imx6/Makefile
@@ -7,10 +7,10 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_VERSION:=2020.04
+PKG_VERSION:=2021.01
 PKG_RELEASE:=1
 
-PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
+PKG_HASH:=b407e1510a74e863b8b5cb42a24625344f0e0c2fc7582d8c866bd899367d0454
 
 include $(INCLUDE_DIR)/u-boot.mk
 include $(INCLUDE_DIR)/package.mk
diff --git 
a/package/boot/uboot-imx6/patches/0001-apalis_imx6_defconfig-enable-some-useful-commands.patch
 
b/package/boot/uboot-imx6/patches/0001-apalis_imx6_defconfig-enable-some-useful-commands.patch
index 10ed918e7734..8f8026faf945 100644
--- 
a/package/boot/uboot-imx6/patches/0001-apalis_imx6_defconfig-enable-some-useful-commands.patch
+++ 
b/package/boot/uboot-imx6/patches/0001-apalis_imx6_defconfig-enable-some-useful-commands.patch
@@ -1,4 +1,4 @@
-From 630b39c46b29de1874149c6b2c18c64966a0fabf Mon Sep 17 00:00:00 2001
+From 40fea3f6913086566586ba3a7304e28e670c9455 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= 
 Date: Sun, 1 Mar 2020 22:47:31 +0100
 Subject: [PATCH] apalis_imx6_defconfig: enable some useful commands
@@ -14,24 +14,26 @@ Signed-off-by: Petr Štetiar 
  configs/apalis_imx6_defconfig | 5 +
  1 file changed, 5 insertions(+)
 
+diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
+index 1c791ab74846..4d21e9680747 100644
 --- a/configs/apalis_imx6_defconfig
 +++ b/configs/apalis_imx6_defconfig
-@@ -44,6 +44,7 @@ CONFIG_CMD_GPIO=y
- CONFIG_CMD_GPT=y
- CONFIG_CMD_I2C=y
+@@ -46,6 +46,7 @@ CONFIG_CMD_I2C=y
+ # CONFIG_CMD_LOADB is not set
+ # CONFIG_CMD_LOADS is not set
  CONFIG_CMD_MMC=y
 +CONFIG_CMD_PART=y
  CONFIG_CMD_USB=y
  CONFIG_CMD_USB_SDP=y
  CONFIG_CMD_USB_MASS_STORAGE=y
-@@ -53,6 +54,10 @@ CONFIG_CMD_PMIC=y
+@@ -58,6 +59,10 @@ CONFIG_CMD_PMIC=y
  CONFIG_CMD_REGULATOR=y
  CONFIG_OF_CONTROL=y
- CONFIG_DEFAULT_DEVICE_TREE="imx6-apalis"
+ CONFIG_ENV_OVERWRITE=y
 +CONFIG_CMD_EXT4=y
 +CONFIG_CMD_EXT4_WRITE=y
 +CONFIG_CMD_FAT=y
 +CONFIG_CMD_FS_GENERIC=y
  CONFIG_ENV_IS_IN_MMC=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
- CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+ CONFIG_SYS_MMC_ENV_PART=1
diff --git a/package/boot/uboot-imx6/patches/110-mx6cuboxi-mmc-fallback.patch 
b/package/boot/uboot-imx6/patches/110-mx6cuboxi-mmc-fallback.patch
deleted file mode 100644
index 9d490ddf7ea8..
--- a/package/boot/uboot-imx6/patches/110-mx6cuboxi-mmc-fallback.patch
+++ /dev/null
@@ -1,15 +0,0 @@
 a/board/solidrun/mx6cuboxi/mx6cuboxi.c
-+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
-@@ -286,6 +286,12 @@ static void setup_iomux_enet(void)
-   gpio_free_list_nodev(, 1);
- }
- 
-+void board_boot_order(u32 *spl_boot_list)
-+{
-+  spl_boot_list[0] = spl_boot_device();
-+  spl_boot_list[1] = BOOT_DEVICE_MMC1;
-+}
-+
- int board_phy_config(struct phy_device *phydev)
- {
-   if (phydev->drv->config)

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


[PATCH v3] openpgm: Add Pragmatic General Multicast library

2021-02-10 Thread Ye Holmes
OpenPGM is a library implementing the PGM reliable multicast
network protocol; The famous messaging library ZMQ has an
optional dependency on OpenPGM, with OpenPGM enabled, we can
foster the development of multicast network applications.

Signed-off-by: Ye Holmes 
---
On Dienstag, 9. Februar 2021 04:20, Adrian Schmutzler wrote:
> This comes with certain helpers like build tests etc.
Thanks, I will initiate a Pull-Reqeust on packages/github later,
to test whether build succeeds (I've tested it on my machine).

On Tue, 9 Feb 2021 17:05:00 +0100, Alberto Bursi wrote:
> I have now added a paragraph on the submitting patches article
> to send contributions to the right repository
> https://openwrt.org/submitting-patches

Thanks, a lot, Alberto! 

The v3 patch differs from previous patch: the relative path of
license file is changed to `LICENSE, instead of `openpgm/pgm/LICENSE,
as the post-move of source files after tarball extraction.
---
 libs/openpgm/Makefile | 62 +++
 .../0001-Rename-openpgm-5.2.pc.in.patch   | 22 +++
 ...hecksum.c-fix-build-with-32-bits-MMX.patch | 38 
 3 files changed, 122 insertions(+)
 create mode 100644 libs/openpgm/Makefile
 create mode 100644 libs/openpgm/patches/0001-Rename-openpgm-5.2.pc.in.patch
 create mode 100644 
libs/openpgm/patches/0002-openpgm-pgm-checksum.c-fix-build-with-32-bits-MMX.patch

diff --git a/libs/openpgm/Makefile b/libs/openpgm/Makefile
new file mode 100644
index 0..5f996c125
--- /dev/null
+++ b/libs/openpgm/Makefile
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2021 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=openpgm
+PKG_VERSION:=5.3.128
+PKG_RELEASE:=1
+
+PKG_SOURCE:=release-5-3-128.tar.gz
+PKG_SOURCE_URL:=https://github.com/steve-o/openpgm/archive
+PKG_HASH:=8d707ef8dda45f4a7bc91016d7f2fed6a418637185d76c7ab30b306499c6d393
+
+PKG_MAINTAINER:=Ye Holmes 
+PKG_LICENSE:=LGPL-2.1-or-later
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:openpgm:openpgm
+
+PKG_FIXUP:=autoreconf
+PKG_BUILD_DIR:=$(BUILD_DIR)/openpgm-release-5-3-128
+include $(INCLUDE_DIR)/package.mk
+
+define Package/openpgm
+  TITLE:=OpenPGM, an implementation of the PGM protocol
+  URL:=http://openpgm.googlecode.com/
+  SECTION:=libs
+  CATEGORY:=Libraries
+endef
+
+define Package/openpgm/description
+  OpenPGM is a library implementing the PGM reliable multicast
+  network protocol. For more information about OpenPGM, see:
+  http://openpgm.googlecode.com/
+endef
+
+CONFIGURE_VARS += ac_cv_file__proc_cpuinfo=yes \
+ac_cv_file__dev_rtc=no ac_cv_file__dev_hpet=no
+CONFIGURE_ARGS += --enable-static=no --enable-shared=yes
+
+define Build/Prepare
+   $(call Build/Prepare/Default)
+   mv $(PKG_BUILD_DIR)/openpgm/pgm/* $(PKG_BUILD_DIR)/
+endef
+
+define Build/InstallDev
+   $(INSTALL_DIR) $(1)/usr/include/pgm
+   $(CP) $(PKG_BUILD_DIR)/include/pgm/* $(1)/usr/include/pgm/
+   $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+   $(CP) $(PKG_BUILD_DIR)/.libs/libpgm*.so* $(1)/usr/lib/
+   $(CP) $(PKG_BUILD_DIR)/openpgm-5.3.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/openpgm/install
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP) $(PKG_BUILD_DIR)/.libs/libpgm*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,openpgm))
diff --git a/libs/openpgm/patches/0001-Rename-openpgm-5.2.pc.in.patch 
b/libs/openpgm/patches/0001-Rename-openpgm-5.2.pc.in.patch
new file mode 100644
index 0..a51a026f9
--- /dev/null
+++ b/libs/openpgm/patches/0001-Rename-openpgm-5.2.pc.in.patch
@@ -0,0 +1,22 @@
+From 240634b1afb968a051f8c68696eae2a582a02450 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine 
+Date: Mon, 31 Aug 2020 20:16:25 +0200
+Subject: [PATCH 1/2] Rename openpgm-5.2.pc.in
+
+This will fix the following build failure:
+
+config.status: error: cannot find input file: `openpgm-5.3.pc.in'
+
+Signed-off-by: Fabrice Fontaine 
+---
+ openpgm/pgm/{openpgm-5.2.pc.in => openpgm-5.3.pc.in} | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ rename openpgm/pgm/{openpgm-5.2.pc.in => openpgm-5.3.pc.in} (100%)
+
+diff --git a/openpgm/pgm/openpgm-5.2.pc.in b/openpgm/pgm/openpgm-5.3.pc.in
+similarity index 100%
+rename from openpgm/pgm/openpgm-5.2.pc.in
+rename to openpgm/pgm/openpgm-5.3.pc.in
+-- 
+2.25.1
+
diff --git 
a/libs/openpgm/patches/0002-openpgm-pgm-checksum.c-fix-build-with-32-bits-MMX.patch
 
b/libs/openpgm/patches/0002-openpgm-pgm-checksum.c-fix-build-with-32-bits-MMX.patch
new file mode 100644
index 0..2012021c0
--- /dev/null
+++ 
b/libs/openpgm/patches/0002-openpgm-pgm-checksum.c-fix-build-with-32-bits-MMX.patch
@@ -0,0 +1,38 @@
+From b7fa865fa6b06d97d424c500fd1c4bc44c096359 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine 
+Date: Sun, 1 Nov 2020 22:46:18 +0100
+Subject: [PATCH 2/2] openpgm/pgm/checksum.c: fix build with 32 bits MMX
+
+Build with i386-pentium-mmx or i686 is broken 

Re: [PATCH] x86/64: Add CONFIG_DEVMEM=y for targets/x86/64

2021-02-10 Thread Bjørn Mork
Alberto Bursi  writes:

> On 09/02/21 17:46, Supriya Mane wrote:
>> Setting 'CONFIG_DEVMEM=y' provides access to /dev/mem.
>> Fixes "cannot access '/dev/mem' : No such file or directory"
>> Signed-off-by: Supriya Mane 
>> ---
>>   target/linux/x86/64/config-5.4 | 1 +
>>   1 file changed, 1 insertion(+)
>> diff --git a/target/linux/x86/64/config-5.4
>> b/target/linux/x86/64/config-5.4
>> index f09deca5b0..a483d6ea2a 100644
>> --- a/target/linux/x86/64/config-5.4
>> +++ b/target/linux/x86/64/config-5.4
>> @@ -115,6 +115,7 @@ CONFIG_CRYPTO_SIMD=y
>>   # CONFIG_CRYPTO_TWOFISH_X86_64_3WAY is not set
>>   CONFIG_CRYPTO_XTS=y
>>   # CONFIG_DEBUG_HOTPLUG_CPU0 is not set
>> +CONFIG_DEVMEM=y
>>   CONFIG_DMA_ACPI=y
>>   CONFIG_DMA_SHARED_BUFFER=y
>>   # CONFIG_DPTF_POWER is not set
>> 
>
> It's disabled by default because it is a debugging feature that is not
> terribly secure (lets anyone see the RAM contents, to an extent).
>
> I'm not sure this should be enabled for all x86_64 target like that.

Sure you aren't thinking about DEVKMEM now?

DEVMEM is a standard feature, defaulting to Y in the kernel config:

config DEVMEM
bool "/dev/mem virtual device support"
default y
help
  Say Y here if you want to support the /dev/mem device.
  The /dev/mem device is used to access areas of physical
  memory.
  When in doubt, say "Y".



and it's enabled in other distro kernels, like Debian (stable and
unstable) and RHEL (7 and 8).



Bjørn

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