Skip to content
Permalink
Browse files

package/utils sync with owrt 2020.01

  • Loading branch information
zyxmon committed Jan 8, 2020
1 parent 6301912 commit 618942ac26412efd597579721e166eaabc411267
@@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=adb
PKG_VERSION:=android.5.0.2_r1
PKG_RELEASE:=2
PKG_RELEASE:=3

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://android.googlesource.com/platform/system/core
@@ -1,5 +1,5 @@
--- /dev/null
+++ b/adb/Makefile 2016-10-19 15:28:03.421194137 +0200
+++ b/adb/Makefile
@@ -0,0 +1,42 @@
+SRCS+= adb.c
+SRCS+= adb_auth_host.c
@@ -0,0 +1,39 @@
From 58b01e01875e2f6ae593ded197430bc23713dd0a Mon Sep 17 00:00:00 2001
From: Ingo Rohloff <lundril@gmx.de>
Date: Fri, 16 May 2014 21:51:41 +0200
Subject: [PATCH] ADB on linux: Handle USB SuperSpeed extra Descriptors

Under Linux, ADB manually parses USB Descriptors to check for
possible ADB USB Interfaces. USB Devices connected with SuperSpeed
will exhibit extra USB SuperSpeed Endpoint Companion Descriptors.
This patch handles these USB SuperSpeed specific USB Descriptors.

Change-Id: Icd1e5fdde0b324c7df4f933583499f2c52a922f3
Signed-off-by: Ingo Rohloff <lundril@gmx.de>
---
adb/usb_linux.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

--- a/adb/usb_linux.c
+++ b/adb/usb_linux.c
@@ -238,8 +238,20 @@ static void find_usb_device(const char *
// looks like ADB...
ep1 = (struct usb_endpoint_descriptor *)bufptr;
bufptr += USB_DT_ENDPOINT_SIZE;
+ // For USB 3.0 SuperSpeed devices, skip potential
+ // USB 3.0 SuperSpeed Endpoint Companion descriptor
+ if (bufptr+2 <= devdesc + desclength &&
+ bufptr[0] == USB_DT_SS_EP_COMP_SIZE &&
+ bufptr[1] == USB_DT_SS_ENDPOINT_COMP) {
+ bufptr += USB_DT_SS_EP_COMP_SIZE;
+ }
ep2 = (struct usb_endpoint_descriptor *)bufptr;
bufptr += USB_DT_ENDPOINT_SIZE;
+ if (bufptr+2 <= devdesc + desclength &&
+ bufptr[0] == USB_DT_SS_EP_COMP_SIZE &&
+ bufptr[1] == USB_DT_SS_ENDPOINT_COMP) {
+ bufptr += USB_DT_SS_EP_COMP_SIZE;
+ }

if (bufptr > devdesc + desclength ||
ep1->bLength != USB_DT_ENDPOINT_SIZE ||
@@ -0,0 +1,64 @@
#
# Copyright (C) 2019 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:=brcm2708-userland
PKG_VERSION:=42ec119e03eb8dffc7c83e2ac0e665e333abbef6
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/raspberrypi/userland/tar.gz/$(PKG_VERSION)?
PKG_HASH:=cb0f1d653fdb9975783f30359277d9de2868607381e081796eac68745e3e8324

PKG_FLAGS:=nonshared

PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>

CMAKE_INSTALL:=1
CMAKE_OPTIONS+=-DVMCS_INSTALL_PREFIX=/usr

ifeq ($(ARCH),aarch64)
CMAKE_OPTIONS+=-DARM64=ON
else
CMAKE_OPTIONS+=-DARM64=OFF
endif

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk

TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)

define Package/brcm2708-userland
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=@TARGET_brcm2708
TITLE:=BCM2708 userland tools
DEFAULT:=y if TARGET_brcm2708
endef

define Package/brcm2708-userland/description
BCM2708 userland tools including vcgencmd and tvservice.
endef

define Package/brcm2708-userland/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtparam $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtoverlay $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tvservice $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcgencmd $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcmailbox $(1)/usr/bin

$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/

$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ $(1)/usr/
endef

$(eval $(call BuildPackage,brcm2708-userland))
@@ -0,0 +1,11 @@
--- a/interface/vmcs_host/CMakeLists.txt
+++ b/interface/vmcs_host/CMakeLists.txt
@@ -24,7 +24,7 @@ if(NOT ARM64)

# ILCS pulls in EGL for the ILCS/EGL surface API support
target_link_libraries(vcilcs brcmEGL brcmGLESv2 khrn_client vchiq_arm vcos)
- set(INSTALL_TARGETS "${INSTALL_TARGETS} vcilcs")
+ set(INSTALL_TARGETS ${INSTALL_TARGETS} vcilcs)
endif()

# vchostif needs ilcore as well (vmcs_main pulls it in)
@@ -9,14 +9,14 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=busybox
PKG_VERSION:=1.31.0
PKG_VERSION:=1.31.1
PKG_RELEASE:=1
PKG_FLAGS:=essential

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://www.busybox.net/downloads \
http://sources.buildroot.net
PKG_HASH:=0e4925392fd9f3743cc517e031b68b012b24a63b0cf6c1ff03cce7bb3846cc99
PKG_HASH:=d0f940a72f648943c1f2211e0e3117387c31d765137d92bd8284a3fb9752a998

PKG_BUILD_DEPENDS:=BUSYBOX_CONFIG_PAM:libpam
PKG_BUILD_PARALLEL:=1
@@ -69,7 +69,9 @@ endif
export KCONFIG_NOTIMESTAMP=1


ifndef CONFIG_USE_MUSL
LDLIBS:=m crypt
endif

LDLIBS += $(call BUSYBOX_IF_ENABLED,PAM,pam pam_misc pthread)
ifeq ($(CONFIG_USE_GLIBC),y)
@@ -126,8 +126,9 @@ config BUSYBOX_CONFIG_FEATURE_VI_SEARCH

config BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH
bool "Enable regex in search and replace"
default BUSYBOX_DEFAULT_FEATURE_VI_REGEX_SEARCH # Uses GNU regex, which may be unavailable. FIXME
default BUSYBOX_DEFAULT_FEATURE_VI_REGEX_SEARCH
depends on BUSYBOX_CONFIG_FEATURE_VI_SEARCH
depends on USE_GLIBC
help
Use extended regex search.

@@ -0,0 +1,11 @@
--- a/Makefile-libbz2_so
+++ b/Makefile-libbz2_so
@@ -35,7 +35,7 @@ OBJS= blocksort.o \
bzlib.o

all: $(OBJS)
- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS)
+ $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 $(LDFLAGS) -o libbz2.so.1.0.8 $(OBJS)
$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8
rm -f libbz2.so.1.0
ln -s libbz2.so.1.0.8 libbz2.so.1.0
@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=e2fsprogs
PKG_VERSION:=1.44.5
PKG_VERSION:=1.45.4
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/
PKG_HASH:=ba5eb3069d69160d96818bb9700de9ab5a8458d9add1fd85d427c0000d34c5b9
PKG_HASH:=65faf6b590ca1da97440d6446bd11de9e0914b42553740ba5d9d2a796fa0dc02

PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=NOTICE
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=lua
PKG_VERSION:=5.1.5
PKG_RELEASE:=6
PKG_RELEASE:=7

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.lua.org/ftp/ \
@@ -135,6 +135,7 @@ define Host/Install
install

$(LN) $(STAGING_DIR_HOSTPKG)/bin/lua5.1 $(STAGING_DIR_HOSTPKG)/bin/lua
$(LN) $(STAGING_DIR_HOSTPKG)/bin/luac5.1 $(STAGING_DIR_HOSTPKG)/bin/luac
endef

define Build/InstallDev
@@ -23,7 +23,6 @@ define Package/spidev-test
TITLE:=SPI testing utility
VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
URL:=http://www.kernel.org
MAINTAINER:=Florian Fainelli <florian@openwrt.org>
endef

define Package/spidev-test/description
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=util-linux
PKG_VERSION:=2.34
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.34
@@ -346,6 +346,16 @@ define Package/lscpu/description
lscpu displays information about the CPU architecture
endef

define Package/more
$(call Package/util-linux/Default)
TITLE:=filter for paging through text one screenful at a time
DEPENDS:= +libncurses
endef

define Package/more/description
more is a filter for paging through text one screenful at a time
endef

define Package/mcookie
$(call Package/util-linux/Default)
TITLE:=generate magic cookies for xauth
@@ -540,7 +550,6 @@ CONFIGURE_ARGS += \
--without-python \
--without-udev \
--without-readline \
--disable-more \
--with-ncursesw

TARGET_CFLAGS += $(FPIC) -std=gnu99
@@ -833,6 +842,7 @@ $(eval $(call BuildPackage,look))
$(eval $(call BuildPackage,losetup))
$(eval $(call BuildPackage,lsblk))
$(eval $(call BuildPackage,lscpu))
$(eval $(call BuildPackage,more))
$(eval $(call BuildPackage,mcookie))
$(eval $(call BuildPackage,mount-utils))
$(eval $(call BuildPackage,namei))
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=xfsprogs
PKG_CPE_ID:=cpe:/a:sgi:xfsprogs
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_VERSION:=4.11.0
PKG_SOURCE_URL:=@KERNEL/linux/utils/fs/xfs/xfsprogs
PKG_HASH:=c3a6d87b564d7738243c507df82276bed982265e345363a95f2c764e8a5f5bb2
@@ -12,8 +12,6 @@ Signed-off-by: Rosen Penev <rosenp@gmail.com>
db/malloc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/db/malloc.c b/db/malloc.c
index 77b3e022..38fe0b05 100644
--- a/db/malloc.c
+++ b/db/malloc.c
@@ -56,8 +56,7 @@ xmalloc(
@@ -26,6 +24,3 @@ index 77b3e022..38fe0b05 100644
return ptr;
badmalloc();
/* NOTREACHED */
--
2.17.1

@@ -0,0 +1,48 @@
From 8041435de7ed028a27ecca64302945ad455c69a6 Mon Sep 17 00:00:00 2001
From: "Darrick J. Wong" <darrick.wong@oracle.com>
Date: Mon, 5 Feb 2018 14:38:02 -0600
Subject: [PATCH] xfs_io: fix copy_file_range symbol name collision

glibc 2.27 has a copy_file_range wrapper, so we need to change our
internal function out of the way to avoid compiler warnings.

Reported-by: fredrik@crux.nu
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---
io/copy_file_range.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

--- a/io/copy_file_range.c
+++ b/io/copy_file_range.c
@@ -42,13 +42,18 @@ copy_range_help(void)
"));
}

+/*
+ * Issue a raw copy_file_range syscall; for our test program we don't want the
+ * glibc buffered copy fallback.
+ */
static loff_t
-copy_file_range(int fd, loff_t *src, loff_t *dst, size_t len)
+copy_file_range_cmd(int fd, loff_t *src, loff_t *dst, size_t len)
{
loff_t ret;

do {
- ret = syscall(__NR_copy_file_range, fd, src, file->fd, dst, len, 0);
+ ret = syscall(__NR_copy_file_range, fd, src, file->fd, dst,
+ len, 0);
if (ret == -1) {
perror("copy_range");
return errno;
@@ -130,7 +135,7 @@ copy_range_f(int argc, char **argv)
copy_dst_truncate();
}

- ret = copy_file_range(fd, &src, &dst, len);
+ ret = copy_file_range_cmd(fd, &src, &dst, len);
close(fd);
return ret;
}

0 comments on commit 618942a

Please sign in to comment.
You can’t perform that action at this time.