initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
@@ -0,0 +1,38 @@
From 12d3b3c01b0ec28d45427754541a8156939346d9 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Thu, 13 Aug 2020 23:24:05 +0200
Subject: [PATCH] plt.h: fix build with gcc 10
Drop EFUSE_PARAMETER_TYPE_ENM to fix the following build failure with
gcc 10:
/home/buildroot/autobuild/run/instance-3/output-1/host/bin/arm-buildroot-linux-gnueabihf-gcc -L/home/buildroot/autobuild/run/instance-3/output-1/host/arm-buildroot-linux-gnueabihf/sysroot/lib nvs.o misc_cmds.o calibrator.o plt.o wl18xx_plt.o ini.o -lm -lnl-3 -lnl-genl-3 -o calibrator
/home/buildroot/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: misc_cmds.o:(.bss+0x0): multiple definition of `EFUSE_PARAMETER_TYPE_ENM'; nvs.o:(.bss+0x0): first defined here
/home/buildroot/autobuild/run/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: calibrator.o: in function `.LANCHOR0':
calibrator.c:(.bss+0xc): multiple definition of `EFUSE_PARAMETER_TYPE_ENM'; nvs.o:(.bss+0x0): first defined here
Fixes:
- http://autobuild.buildroot.org/results/df2d04de4b2e5003f3fc56c9e84db5054bd4d499
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: sent to sudharshan <sudharshan@ti.com>]
---
plt.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plt.h b/plt.h
index 8b534a9..43d5dbc 100644
--- a/plt.h
+++ b/plt.h
@@ -399,7 +399,7 @@ enum EFUSE_PARAMETER_TYPE_ENMT {
TX_BIP_PD_BUFFER_VBIAS_ERROR_E,
EFUSE_NUMBER_OF_PARAMETERS_E,
EFUSE_LAST_PARAMETER_E = (EFUSE_NUMBER_OF_PARAMETERS_E - 1)
-} EFUSE_PARAMETER_TYPE_ENM;
+};
int get_mac_addr(int ifc_num, unsigned char *mac_addr);
--
2.27.0
+3
View File
@@ -0,0 +1,3 @@
# Locally calculated
sha256 ce0185ba8a9bf456cc94a798bf66903775065e337e53ff812f18a6d88f5bac13 18xx-ti-utils-R8.8.tar.xz
sha256 363cef40b276a7a91ebcff3f78626d9cfe5e5a51927c725236007259403d5fc4 COPYING
+35
View File
@@ -0,0 +1,35 @@
################################################################################
#
# 18xx-ti-utils
#
################################################################################
18XX_TI_UTILS_VERSION = 8.8
18XX_TI_UTILS_SITE = https://git.ti.com/cgit/wilink8-wlan/18xx-ti-utils/snapshot
18XX_TI_UTILS_SOURCE = 18xx-ti-utils-R$(18XX_TI_UTILS_VERSION).tar.xz
18XX_TI_UTILS_DEPENDENCIES = libnl
18XX_TI_UTILS_LICENSE = BSD-3-Clause
18XX_TI_UTILS_LICENSE_FILES = COPYING
18XX_TI_UTILS_CFLAGS = -I$(STAGING_DIR)/usr/include/libnl3 -DCONFIG_LIBNL32
ifeq ($(BR2_STATIC_LIBS),y)
18XX_TI_UTILS_BUILD_TARGET = static
endif
define 18XX_TI_UTILS_BUILD_CMDS
$(TARGET_MAKE_ENV) CROSS_COMPILE=$(TARGET_CROSS) \
NFSROOT="$(STAGING_DIR)" NLVER=3 $(MAKE) -C $(@D) \
CFLAGS="$(TARGET_CFLAGS) $(18XX_TI_UTILS_CFLAGS)" \
$(18XX_TI_UTILS_BUILD_TARGET)
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/wlconf \
$(HOST_CONFIGURE_OPTS)
endef
define 18XX_TI_UTILS_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 $(@D)/calibrator $(TARGET_DIR)/usr/bin/calibrator
$(INSTALL) -m 0755 $(@D)/wlconf/wlconf $(HOST_DIR)/bin/wlconf
endef
$(eval $(generic-package))
+14
View File
@@ -0,0 +1,14 @@
config BR2_PACKAGE_18XX_TI_UTILS
bool "18xx-ti-utils"
depends on BR2_TOOLCHAIN_HAS_THREADS # libnl
select BR2_PACKAGE_LIBNL
help
TI Wilink calibration utilities.
CONFIG_NL80211_TESTMODE must be enabled in the kernel
configuration for this package to work.
http://processors.wiki.ti.com/index.php/WL18xx_TX_Testing
comment "18xx-ti-utils needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS
@@ -0,0 +1,17 @@
avoid regen during install
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
--- a/sources/Makefile
+++ b/sources/Makefile
@@ -120,7 +120,7 @@
ln -sf $(SHARED_LIB) $(LIBRARIES)/lib4th.so
endif
-mostlyinstall: libinstall all
+mostlyinstall: libinstall
cp 4th 4tsh pp4th $(BINARIES)
install: mostlyinstall
--
+3
View File
@@ -0,0 +1,3 @@
# Locally computed:
sha256 f822f7dd8cfb0b1744a62d653c6efe933578ae1789ec60a088509a38bca4b4fc 4th-3.62.5-unix.tar.gz
sha256 8c6111b645a02219579ea66e84aa8e78a0ed4f4dd80857ffb91bcda5528717d4 COPYING
+70
View File
@@ -0,0 +1,70 @@
################################################################################
#
# 4th
#
################################################################################
4TH_VERSION = 3.62.5
4TH_SOURCE = 4th-$(4TH_VERSION)-unix.tar.gz
4TH_SITE = http://downloads.sourceforge.net/project/forth-4th/4th-$(4TH_VERSION)
4TH_LICENSE = GPL-3.0+, LGPL-3.0+
# The COPYING file only contains the text of the LGPL-3.0, but the
# source code really contains parts under GPL-3.0+.
4TH_LICENSE_FILES = COPYING
4TH_DEPENDENCIES = host-4th
4TH_INSTALL_STAGING = YES
4TH_CFLAGS = $(TARGET_CFLAGS) -DUNIX -fsigned-char
ifeq ($(BR2_STATIC_LIBS),y)
4TH_MAKE_ENV = $(TARGET_MAKE_ENV) STATIC=1
else
4TH_MAKE_ENV = $(TARGET_MAKE_ENV) SHARED=1
4TH_CFLAGS += -fPIC
endif
define 4TH_BUILD_CMDS
$(4TH_MAKE_ENV) $(MAKE) -C $(@D)/sources all \
CROSS="$(TARGET_CROSS)" \
CFLAGS="$(4TH_CFLAGS)" \
FOURTH=$(HOST_DIR)/bin/4th
endef
define 4TH_INSTALL_STAGING_CMDS
$(4TH_MAKE_ENV) $(MAKE) -C $(@D)/sources libinstall \
LIBRARIES=$(STAGING_DIR)/usr/lib
$(INSTALL) -D -m 0644 $(@D)/sources/4th.h \
$(STAGING_DIR)/usr/include/4th.h
endef
define 4TH_INSTALL_TARGET_CMDS
mkdir -p $(TARGET_DIR)/usr/bin
mkdir -p $(TARGET_DIR)/usr/lib
$(4TH_MAKE_ENV) $(MAKE) -C $(@D)/sources mostlyinstall \
BINARIES=$(TARGET_DIR)/usr/bin \
LIBRARIES=$(TARGET_DIR)/usr/lib
mkdir -p $(TARGET_DIR)/usr/share/4th/lib
cp -dpf $(@D)/4th/*.4th $(TARGET_DIR)/usr/share/4th
cp -dpf $(@D)/4th/lib/*.4th $(TARGET_DIR)/usr/share/4th/lib
mkdir -p $(TARGET_DIR)/usr/share/4th/demo
cp -dpf $(@D)/4th/demo/*.4th $(TARGET_DIR)/usr/share/4th/demo
mkdir -p $(TARGET_DIR)/usr/share/4th/4pp/lib
cp -dpf $(@D)/4th/4pp/*.4pp $(TARGET_DIR)/usr/share/4th/4pp
cp -dpf $(@D)/4th/4pp/lib/*.4pp $(TARGET_DIR)/usr/share/4th/4pp/lib
endef
define HOST_4TH_BUILD_CMDS
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/sources all \
CFLAGS="$(HOST_CFLAGS) -DUNIX -fsigned-char"
endef
define HOST_4TH_INSTALL_CMDS
mkdir -p $(HOST_DIR)/bin
mkdir -p $(HOST_DIR)/lib
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/sources mostlyinstall \
BINARIES=$(HOST_DIR)/bin \
LIBRARIES=$(HOST_DIR)/lib
endef
$(eval $(generic-package))
$(eval $(host-generic-package))
+8
View File
@@ -0,0 +1,8 @@
config BR2_PACKAGE_4TH
bool "4th"
help
4tH is a Forth compiler that can create bytecode,
C-embeddable bytecode, standalone executables, but also
works fine as a scripting language
http://thebeez.home.xs4all.nl/4tH/
+2575
View File
File diff suppressed because it is too large Load Diff
+98
View File
@@ -0,0 +1,98 @@
menu "Host utilities"
source "package/abootimg/Config.in.host"
source "package/aespipe/Config.in.host"
source "package/android-tools/Config.in.host"
source "package/asn1c/Config.in.host"
source "package/babeltrace2/Config.in.host"
source "package/bmap-tools/Config.in.host"
source "package/btrfs-progs/Config.in.host"
source "package/cbootimage/Config.in.host"
source "package/checkpolicy/Config.in.host"
source "package/checksec/Config.in.host"
source "package/cmake/Config.in.host"
source "package/cramfs/Config.in.host"
source "package/cryptsetup/Config.in.host"
source "package/dbus-python/Config.in.host"
source "package/dfu-util/Config.in.host"
source "package/dos2unix/Config.in.host"
source "package/dosfstools/Config.in.host"
source "package/doxygen/Config.in.host"
source "package/dtc/Config.in.host"
source "package/e2fsprogs/Config.in.host"
source "package/e2tools/Config.in.host"
source "package/environment-setup/Config.in.host"
source "package/erofs-utils/Config.in.host"
source "package/eudev/Config.in.host"
source "package/exfatprogs/Config.in.host"
source "package/f2fs-tools/Config.in.host"
source "package/faketime/Config.in.host"
source "package/fatcat/Config.in.host"
source "package/firmware-utils/Config.in.host"
source "package/fwup/Config.in.host"
source "package/genext2fs/Config.in.host"
source "package/genimage/Config.in.host"
source "package/genpart/Config.in.host"
source "package/gnupg/Config.in.host"
source "package/go/Config.in.host"
source "package/go-bootstrap/Config.in.host"
source "package/google-breakpad/Config.in.host"
source "package/gptfdisk/Config.in.host"
source "package/imagemagick/Config.in.host"
source "package/imx-mkimage/Config.in.host"
source "package/imx-usb-loader/Config.in.host"
source "package/jh71xx-tools/Config.in.host"
source "package/jq/Config.in.host"
source "package/jsmin/Config.in.host"
source "package/kmod/Config.in.host"
source "package/libp11/Config.in.host"
source "package/lld/Config.in.host"
source "package/lpc3250loader/Config.in.host"
source "package/lttng-babeltrace/Config.in.host"
source "package/mender-artifact/Config.in.host"
source "package/meson-tools/Config.in.host"
source "package/mfgtools/Config.in.host"
source "package/mkpasswd/Config.in.host"
source "package/mtd/Config.in.host"
source "package/mtools/Config.in.host"
source "package/mxsldr/Config.in.host"
source "package/odb/Config.in.host"
source "package/omap-u-boot-utils/Config.in.host"
source "package/openocd/Config.in.host"
source "package/opkg-utils/Config.in.host"
source "package/parted/Config.in.host"
source "package/patchelf/Config.in.host"
source "package/pigz/Config.in.host"
source "package/pkgconf/Config.in.host"
source "package/pru-software-support/Config.in.host"
source "package/pwgen/Config.in.host"
source "package/python/Config.in.host"
source "package/python-cython/Config.in.host"
source "package/python-lxml/Config.in.host"
source "package/python-six/Config.in.host"
source "package/python-xlrd/Config.in.host"
source "package/python3/Config.in.host"
source "package/qemu/Config.in.host"
source "package/qoriq-rcw/Config.in.host"
source "package/raspberrypi-usbboot/Config.in.host"
source "package/rauc/Config.in.host"
source "package/rustc/Config.in.host"
source "package/s6-rc/Config.in.host"
source "package/sam-ba/Config.in.host"
source "package/sdbusplus/Config.in.host"
source "package/sloci-image/Config.in.host"
source "package/squashfs/Config.in.host"
source "package/sunxi-tools/Config.in.host"
source "package/swig/Config.in.host"
source "package/systemd/Config.in.host"
source "package/tegrarcm/Config.in.host"
source "package/ti-cgt-pru/Config.in.host"
source "package/uboot-tools/Config.in.host"
source "package/util-linux/Config.in.host"
source "package/utp_com/Config.in.host"
source "package/vboot-utils/Config.in.host"
source "package/xorriso/Config.in.host"
source "package/zip/Config.in.host"
source "package/zstd/Config.in.host"
endmenu
+443
View File
@@ -0,0 +1,443 @@
ifndef MAKE
MAKE := make
endif
ifndef HOSTMAKE
HOSTMAKE = $(MAKE)
endif
HOSTMAKE := $(shell which $(HOSTMAKE) || type -p $(HOSTMAKE) || echo make)
# If BR2_JLEVEL is 0, scale the maximum concurrency with the number of
# CPUs. An additional job is used in order to keep processors busy
# while waiting on I/O.
# If the number of processors is not available, assume one.
ifeq ($(BR2_JLEVEL),0)
PARALLEL_JOBS := $(shell echo \
$$((1 + `getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1`)))
else
PARALLEL_JOBS := $(BR2_JLEVEL)
endif
MAKE1 := $(HOSTMAKE) -j1
override MAKE = $(HOSTMAKE) \
$(if $(findstring j,$(filter-out --%,$(MAKEFLAGS))),,-j$(PARALLEL_JOBS))
ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
TARGET_VENDOR = $(call qstrip,$(BR2_TOOLCHAIN_BUILDROOT_VENDOR))
else
TARGET_VENDOR = buildroot
endif
# Sanity checks
ifeq ($(TARGET_VENDOR),)
$(error BR2_TOOLCHAIN_BUILDROOT_VENDOR is not allowed to be empty)
endif
ifeq ($(TARGET_VENDOR),unknown)
$(error BR2_TOOLCHAIN_BUILDROOT_VENDOR cannot be 'unknown'. \
It might be confused with the native toolchain)
endif
# Compute GNU_TARGET_NAME
GNU_TARGET_NAME = $(ARCH)-$(TARGET_VENDOR)-$(TARGET_OS)-$(LIBC)$(ABI)
# FLAT binary format needs uclinux, except RISC-V 64-bits which needs
# the regular linux name.
ifeq ($(BR2_BINFMT_FLAT):$(BR2_RISCV_64),y:)
TARGET_OS = uclinux
else
TARGET_OS = linux
endif
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
LIBC = uclibc
else ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
LIBC = musl
else
LIBC = gnu
endif
# The ABI suffix is a bit special on ARM, as it needs to be
# -uclibcgnueabi for uClibc EABI, and -gnueabi for glibc EABI.
# This means that the LIBC and ABI aren't strictly orthogonal,
# which explains why we need the test on LIBC below.
ifeq ($(BR2_arm)$(BR2_armeb),y)
ifeq ($(LIBC),uclibc)
ABI = gnueabi
else
ABI = eabi
endif
ifeq ($(BR2_ARM_EABIHF),y)
ABI := $(ABI)hf
endif
endif
# For C-SKY abiv1 & abiv2
ifeq ($(BR2_csky),y)
ifeq ($(BR2_ck610),y)
ABI = abiv1
else
ABI = abiv2
endif
endif
# For FSL PowerPC there's SPE
ifeq ($(BR2_powerpc_SPE),y)
ABI = spe
# MPC8540s are e500v1 with single precision FP
ifeq ($(BR2_powerpc_8540),y)
TARGET_ABI += -mabi=spe -mfloat-gprs=single -Wa,-me500
endif
ifeq ($(BR2_powerpc_8548),y)
TARGET_ABI += -mabi=spe -mfloat-gprs=double -Wa,-me500x2
endif
ifeq ($(BR2_powerpc_e500mc),y)
TARGET_ABI += -mabi=spe -mfloat-gprs=double -Wa,-me500mc
endif
endif
# Use longcalls option for Xtensa globally.
# The 'longcalls' option allows calls across a greater range of addresses,
# and is required for some packages. While this option can degrade both
# code size and performance, the linker can usually optimize away the
# overhead when a call ends up within a certain range.
#
# Use auto-litpools for Xtensa globally.
# Collecting literals into separate section can be advantageous if that
# section is placed into DTCM at link time. This is applicable for code
# running on bare metal, but makes no sense under linux, where userspace
# is isolated from the physical memory details. OTOH placing literals into
# separate section breaks build of huge source files, because l32r
# instruction can only access literals in 256 KBytes range.
#
ifeq ($(BR2_xtensa),y)
TARGET_ABI += -mlongcalls -mauto-litpools
endif
STAGING_SUBDIR = $(GNU_TARGET_NAME)/sysroot
STAGING_DIR = $(HOST_DIR)/$(STAGING_SUBDIR)
ifeq ($(BR2_OPTIMIZE_0),y)
TARGET_OPTIMIZATION = -O0
endif
ifeq ($(BR2_OPTIMIZE_1),y)
TARGET_OPTIMIZATION = -O1
endif
ifeq ($(BR2_OPTIMIZE_2),y)
TARGET_OPTIMIZATION = -O2
endif
ifeq ($(BR2_OPTIMIZE_3),y)
TARGET_OPTIMIZATION = -O3
endif
ifeq ($(BR2_OPTIMIZE_G),y)
TARGET_OPTIMIZATION = -Og
endif
ifeq ($(BR2_OPTIMIZE_S),y)
TARGET_OPTIMIZATION = -Os
endif
ifeq ($(BR2_OPTIMIZE_FAST),y)
TARGET_OPTIMIZATION = -Ofast
endif
ifeq ($(BR2_ENABLE_DEBUG),)
TARGET_DEBUGGING = -g0
endif
ifeq ($(BR2_DEBUG_1),y)
TARGET_DEBUGGING = -g1
endif
ifeq ($(BR2_DEBUG_2),y)
TARGET_DEBUGGING = -g2
endif
ifeq ($(BR2_DEBUG_3),y)
TARGET_DEBUGGING = -g3
endif
TARGET_LDFLAGS = $(call qstrip,$(BR2_TARGET_LDFLAGS))
# By design, _FORTIFY_SOURCE requires gcc optimization to be enabled.
# Therefore, we need to pass _FORTIFY_SOURCE and the optimization level
# through the same mechanism, i.e currently through CFLAGS. Passing
# _FORTIFY_SOURCE through the wrapper and the optimization level
# through CFLAGS would not work, because CFLAGS are sometimes
# ignored/overridden by packages, but the flags passed by the wrapper
# are enforced: this would cause _FORTIFY_SOURCE to be used without any
# optimization level, leading to a build / configure failure. So we keep
# passing _FORTIFY_SOURCE and the optimization level both through CFLAGS.
ifeq ($(BR2_FORTIFY_SOURCE_1),y)
TARGET_HARDENED += -D_FORTIFY_SOURCE=1
else ifeq ($(BR2_FORTIFY_SOURCE_2),y)
TARGET_HARDENED += -D_FORTIFY_SOURCE=2
endif
TARGET_CPPFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
TARGET_CFLAGS = $(TARGET_CPPFLAGS) $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) $(TARGET_HARDENED)
TARGET_CXXFLAGS = $(TARGET_CFLAGS)
TARGET_FCFLAGS = $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79509
ifeq ($(BR2_m68k_cf),y)
TARGET_CFLAGS += -fno-dwarf2-cfi-asm
TARGET_CXXFLAGS += -fno-dwarf2-cfi-asm
endif
ifeq ($(BR2_BINFMT_FLAT),y)
ifeq ($(BR2_RISCV_64),y)
TARGET_CFLAGS += -fPIC
endif
ifeq ($(BR2_BINFMT_FLAT_ONE),y)
ELF2FLT_FLAGS = $(if $($(PKG)_FLAT_STACKSIZE),\
-Wl$(comma)-elf2flt="-r -s$($(PKG)_FLAT_STACKSIZE)",\
-Wl$(comma)-elf2flt=-r)
else
ELF2FLT_FLAGS = $(if $($(PKG)_FLAT_STACKSIZE),\
-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\
-Wl$(comma)-elf2flt)
endif
TARGET_CFLAGS += $(ELF2FLT_FLAGS)
TARGET_CXXFLAGS += $(ELF2FLT_FLAGS)
TARGET_FCFLAGS += $(ELF2FLT_FLAGS)
TARGET_LDFLAGS += $(ELF2FLT_FLAGS)
endif
ifeq ($(BR2_BINFMT_FLAT_SHARED),y)
TARGET_LDFLAGS += -mid-shared-library -mshared-library-id=0
TARGET_CFLAGS += -mid-shared-library -mshared-library-id=0
TARGET_FCFLAGS += -mid-shared-library -mshared-library-id=0
TARGET_CXXFLAGS += -mid-shared-library -mshared-library-id=0
endif
ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
TARGET_CROSS = $(HOST_DIR)/bin/$(GNU_TARGET_NAME)-
else
TARGET_CROSS = $(HOST_DIR)/bin/$(TOOLCHAIN_EXTERNAL_PREFIX)-
endif
# Define TARGET_xx variables for all common binutils/gcc
TARGET_AR = $(TARGET_CROSS)ar
TARGET_AS = $(TARGET_CROSS)as
TARGET_CC = $(TARGET_CROSS)gcc
TARGET_CPP = $(TARGET_CROSS)cpp
TARGET_CXX = $(TARGET_CROSS)g++
TARGET_FC = $(TARGET_CROSS)gfortran
TARGET_LD = $(TARGET_CROSS)ld
TARGET_NM = $(TARGET_CROSS)nm
TARGET_RANLIB = $(TARGET_CROSS)ranlib
TARGET_READELF = $(TARGET_CROSS)readelf
TARGET_OBJCOPY = $(TARGET_CROSS)objcopy
TARGET_OBJDUMP = $(TARGET_CROSS)objdump
ifeq ($(BR2_STRIP_strip),y)
STRIP_STRIP_DEBUG := --strip-debug
TARGET_STRIP = $(TARGET_CROSS)strip
STRIPCMD = $(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note
else
TARGET_STRIP = /bin/true
STRIPCMD = $(TARGET_STRIP)
endif
INSTALL := $(shell which install || type -p install)
UNZIP := $(shell which unzip || type -p unzip) -q
APPLY_PATCHES = PATH=$(HOST_DIR)/bin:$$PATH support/scripts/apply-patches.sh $(if $(QUIET),-s)
HOST_CPPFLAGS = -I$(HOST_DIR)/include
HOST_CFLAGS ?= -O2
HOST_CFLAGS += $(HOST_CPPFLAGS)
HOST_CXXFLAGS += $(HOST_CFLAGS)
HOST_LDFLAGS += -L$(HOST_DIR)/lib -Wl,-rpath,$(HOST_DIR)/lib
# host-intltool should be executed with the system perl, so we save
# the path to the system perl, before a host-perl built by Buildroot
# might get installed into $(HOST_DIR)/bin and therefore appears
# in our PATH. This system perl will be used as INTLTOOL_PERL.
export PERL=$(shell which perl)
# host-intltool needs libxml-parser-perl, which Buildroot installs in
# $(HOST_DIR)/lib/perl, so we must make sure that the system perl
# finds this perl module by exporting the proper value for PERL5LIB.
export PERL5LIB=$(HOST_DIR)/lib/perl
TARGET_MAKE_ENV = PATH=$(BR_PATH)
TARGET_CONFIGURE_OPTS = \
$(TARGET_MAKE_ENV) \
AR="$(TARGET_AR)" \
AS="$(TARGET_AS)" \
LD="$(TARGET_LD)" \
NM="$(TARGET_NM)" \
CC="$(TARGET_CC)" \
GCC="$(TARGET_CC)" \
CPP="$(TARGET_CPP)" \
CXX="$(TARGET_CXX)" \
FC="$(TARGET_FC)" \
F77="$(TARGET_FC)" \
RANLIB="$(TARGET_RANLIB)" \
READELF="$(TARGET_READELF)" \
STRIP="$(TARGET_STRIP)" \
OBJCOPY="$(TARGET_OBJCOPY)" \
OBJDUMP="$(TARGET_OBJDUMP)" \
AR_FOR_BUILD="$(HOSTAR)" \
AS_FOR_BUILD="$(HOSTAS)" \
CC_FOR_BUILD="$(HOSTCC)" \
GCC_FOR_BUILD="$(HOSTCC)" \
CXX_FOR_BUILD="$(HOSTCXX)" \
LD_FOR_BUILD="$(HOSTLD)" \
CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \
CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
CXXFLAGS_FOR_BUILD="$(HOST_CXXFLAGS)" \
LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
FCFLAGS_FOR_BUILD="$(HOST_FCFLAGS)" \
DEFAULT_ASSEMBLER="$(TARGET_AS)" \
DEFAULT_LINKER="$(TARGET_LD)" \
CPPFLAGS="$(TARGET_CPPFLAGS)" \
CFLAGS="$(TARGET_CFLAGS)" \
CXXFLAGS="$(TARGET_CXXFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
FCFLAGS="$(TARGET_FCFLAGS)" \
FFLAGS="$(TARGET_FCFLAGS)" \
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
STAGING_DIR="$(STAGING_DIR)" \
INTLTOOL_PERL=$(PERL)
HOST_MAKE_ENV = \
PATH=$(BR_PATH) \
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
PKG_CONFIG_SYSROOT_DIR="/" \
PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
PKG_CONFIG_LIBDIR="$(HOST_DIR)/lib/pkgconfig:$(HOST_DIR)/share/pkgconfig"
HOST_CONFIGURE_OPTS = \
$(HOST_MAKE_ENV) \
AR="$(HOSTAR)" \
AS="$(HOSTAS)" \
LD="$(HOSTLD)" \
NM="$(HOSTNM)" \
CC="$(HOSTCC)" \
GCC="$(HOSTCC)" \
CXX="$(HOSTCXX)" \
CPP="$(HOSTCPP)" \
OBJCOPY="$(HOSTOBJCOPY)" \
RANLIB="$(HOSTRANLIB)" \
CPPFLAGS="$(HOST_CPPFLAGS)" \
CFLAGS="$(HOST_CFLAGS)" \
CXXFLAGS="$(HOST_CXXFLAGS)" \
LDFLAGS="$(HOST_LDFLAGS)" \
INTLTOOL_PERL=$(PERL)
# This is extra environment we can not export ourselves (eg. because some
# packages use that variable internally, eg. uboot), so we have to
# explicitly pass it to user-supplied external hooks (eg. post-build,
# post-images)
EXTRA_ENV = \
PATH=$(BR_PATH) \
BR2_DL_DIR=$(BR2_DL_DIR) \
BUILD_DIR=$(BUILD_DIR) \
CONFIG_DIR=$(CONFIG_DIR) \
O=$(CANONICAL_O)
################################################################################
# settings we need to pass to configure
# does unaligned access trap?
BR2_AC_CV_TRAP_CHECK = ac_cv_lbl_unaligned_fail=yes
ifeq ($(BR2_i386),y)
BR2_AC_CV_TRAP_CHECK = ac_cv_lbl_unaligned_fail=no
endif
ifeq ($(BR2_x86_64),y)
BR2_AC_CV_TRAP_CHECK = ac_cv_lbl_unaligned_fail=no
endif
ifeq ($(BR2_m68k),y)
BR2_AC_CV_TRAP_CHECK = ac_cv_lbl_unaligned_fail=no
endif
ifeq ($(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),y)
BR2_AC_CV_TRAP_CHECK = ac_cv_lbl_unaligned_fail=no
endif
ifeq ($(BR2_ENDIAN),"BIG")
BR2_AC_CV_C_BIGENDIAN = ac_cv_c_bigendian=yes
else
BR2_AC_CV_C_BIGENDIAN = ac_cv_c_bigendian=no
endif
# AM_GNU_GETTEXT misdetects musl gettext support.
# musl currently implements api level 1 and 2 (basic + ngettext)
# http://www.openwall.com/lists/musl/2015/04/16/3
#
# These autoconf variables should only be pre-seeded when the minimal
# gettext implementation of musl is used. When the full blown
# implementation provided by gettext libintl is used, auto-detection
# works fine, and pre-seeding those values is actually wrong.
ifeq ($(BR2_TOOLCHAIN_USES_MUSL):$(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y:)
BR2_GT_CV_FUNC_GNUGETTEXT_LIBC = \
gt_cv_func_gnugettext1_libc=yes \
gt_cv_func_gnugettext2_libc=yes
endif
TARGET_CONFIGURE_ARGS = \
$(BR2_AC_CV_TRAP_CHECK) \
ac_cv_func_mmap_fixed_mapped=yes \
ac_cv_func_memcmp_working=yes \
ac_cv_have_decl_malloc=yes \
gl_cv_func_malloc_0_nonnull=yes \
ac_cv_func_malloc_0_nonnull=yes \
ac_cv_func_calloc_0_nonnull=yes \
ac_cv_func_realloc_0_nonnull=yes \
lt_cv_sys_lib_search_path_spec="" \
$(BR2_AC_CV_C_BIGENDIAN) \
$(BR2_GT_CV_FUNC_GNUGETTEXT_LIBC)
################################################################################
ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
NLS_OPTS = --enable-nls
TARGET_NLS_DEPENDENCIES = host-gettext
ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
TARGET_NLS_DEPENDENCIES += gettext
TARGET_NLS_LIBS += -lintl
endif
else
NLS_OPTS = --disable-nls
endif
# We need anything that is invalid. Traditionally, we'd have used 'false' (and
# we did so in the past). However, that breaks libtool for packages that have
# optional C++ support (e.g. gnutls), because libtool will *require* a *valid*
# C++ preprocessor as long as CXX is not 'no'.
# Now, whether we use 'no' or 'false' for CXX as the same side effect: it is an
# invalid C++ compiler, and thus will cause detection of C++ to fail (which is
# expected and what we want), while at the same time taming libtool into
# silence.
ifneq ($(BR2_INSTALL_LIBSTDCPP),y)
TARGET_CONFIGURE_OPTS += CXX=no
endif
ifeq ($(BR2_STATIC_LIBS),y)
SHARED_STATIC_LIBS_OPTS = --enable-static --disable-shared
TARGET_CFLAGS += -static
TARGET_CXXFLAGS += -static
TARGET_FCFLAGS += -static
TARGET_LDFLAGS += -static
else ifeq ($(BR2_SHARED_LIBS),y)
SHARED_STATIC_LIBS_OPTS = --disable-static --enable-shared
else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
SHARED_STATIC_LIBS_OPTS = --enable-static --enable-shared
endif
ifeq ($(BR2_COMPILER_PARANOID_UNSAFE_PATH),y)
export BR_COMPILER_PARANOID_UNSAFE_PATH=enabled
endif
include package/pkg-download.mk
include package/pkg-autotools.mk
include package/pkg-cmake.mk
include package/pkg-luarocks.mk
include package/pkg-perl.mk
include package/pkg-python.mk
include package/pkg-virtual.mk
include package/pkg-generic.mk
include package/pkg-kconfig.mk
include package/pkg-rebar.mk
include package/pkg-kernel-module.mk
include package/pkg-waf.mk
include package/pkg-golang.mk
include package/pkg-meson.mk
include package/pkg-qmake.mk
+13
View File
@@ -0,0 +1,13 @@
config BR2_PACKAGE_A10DISP
bool "a10disp"
depends on BR2_arm
depends on BR2_LINUX_KERNEL
help
Program to change the display mode of Allwinner ARM SOCs
running the linux-sunxi kernel (and not the mainline kernel.)
http://github.com/hglm/a10disp
comment "a10disp needs a Linux kernel to be built"
depends on BR2_arm
depends on !BR2_LINUX_KERNEL
+3
View File
@@ -0,0 +1,3 @@
# Locally calculated
sha256 5077405030e8f97a1edd4b86d469466abbc4d32b4a4609e58459347fcd1ba35b a10disp-0.6.1.tar.gz
sha256 ddf849966f57fee8f9675f5a3c7791353d1cba71695cd58016212fc236bbdbee a10disp.c
+23
View File
@@ -0,0 +1,23 @@
################################################################################
#
# a10disp
#
################################################################################
A10DISP_VERSION = 0.6.1
A10DISP_SITE = $(call github,hglm,a10disp,v$(A10DISP_VERSION))
A10DISP_LICENSE = MIT
A10DISP_LICENSE_FILES = a10disp.c
A10DISP_DEPENDENCIES = linux
define A10DISP_BUILD_CMDS
cp -f $(LINUX_DIR)/include/video/sunxi_disp_ioctl.h $(@D)/
$(TARGET_CC) $(TARGET_CFLAGS) $(@D)/a10disp.c -o $(@D)/a10disp
endef
define A10DISP_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/a10disp $(TARGET_DIR)/usr/bin/a10disp
endef
$(eval $(generic-package))
+10
View File
@@ -0,0 +1,10 @@
config BR2_PACKAGE_ABOOTIMG
bool "abootimg"
depends on BR2_USE_MMU # libblkid
select BR2_PACKAGE_UTIL_LINUX
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
help
Tool to manipulate Android Boot Images, either on files
or directly on /dev block devices.
https://gitlab.com/ajs124/abootimg
+8
View File
@@ -0,0 +1,8 @@
config BR2_PACKAGE_HOST_ABOOTIMG
bool "host abootimg"
select BR2_PACKAGE_HOST_UTIL_LINUX
help
Tool to manipulate Android Boot Images, either on files
or directly on /dev block devices.
https://github.com/ggrandou/abootimg
+3
View File
@@ -0,0 +1,3 @@
# Locally calculated
sha256 f377da42a57d982cfc22fa75c5a69febdc3e4c1ef43cd0ceaec42e14067e2f37 abootimg-1ebeb393252ab5aeed62e34bc439b6728444f06e-br1.tar.gz
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 LICENSE
+34
View File
@@ -0,0 +1,34 @@
################################################################################
#
# abootimg
#
################################################################################
ABOOTIMG_VERSION = 1ebeb393252ab5aeed62e34bc439b6728444f06e
ABOOTIMG_SITE = https://gitlab.com/ajs124/abootimg.git
ABOOTIMG_SITE_METHOD = git
ABOOTIMG_LICENSE = GPL-2.0+
ABOOTIMG_LICENSE_FILES = LICENSE
# depends on libblkid from util-linux
ABOOTIMG_DEPENDENCIES = util-linux
HOST_ABOOTIMG_DEPENDENCIES = host-util-linux
define ABOOTIMG_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
endef
define ABOOTIMG_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 $(@D)/abootimg $(TARGET_DIR)/usr/bin/abootimg
endef
define HOST_ABOOTIMG_BUILD_CMDS
$(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)
endef
define HOST_ABOOTIMG_INSTALL_CMDS
$(INSTALL) -m 0755 $(@D)/abootimg $(HOST_DIR)/usr/bin/abootimg
endef
$(eval $(generic-package))
$(eval $(host-generic-package))
@@ -0,0 +1,32 @@
From a42519dceef0493ece45538375ae1791313f16d3 Mon Sep 17 00:00:00 2001
From: Hollis Blanchard <hollis_blanchard@mentor.com>
Date: Mon, 30 Jul 2018 14:29:46 -0700
Subject: [PATCH] Remove pragmas inside functions
GCC 4.4.7, as found in RHEL6, reports:
libacl/acl_from_text.c:307: error: #pragma GCC diagnostic not allowed inside functions
Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>
---
libacl/acl_from_text.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/libacl/acl_from_text.c b/libacl/acl_from_text.c
index 09790c9..fb6bc07 100644
--- a/libacl/acl_from_text.c
+++ b/libacl/acl_from_text.c
@@ -304,11 +304,8 @@ parse_acl_entry(const char **text_p, acl_t *acl_p)
create_entry:
if (acl_create_entry(acl_p, &entry_d) != 0)
return -1;
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Waddress"
if (acl_copy_entry(entry_d, int2ext(&entry_obj)) != 0)
return -1;
-#pragma GCC diagnostic pop
return 0;
fail:
--
2.13.0
+10
View File
@@ -0,0 +1,10 @@
config BR2_PACKAGE_ACL
bool "acl"
select BR2_PACKAGE_ATTR
help
POSIX Access Control Lists, which are used to define more
fine-grained discretionary access rights for files and
directories.
This package also provides libacl.
http://savannah.nongnu.org/projects/acl
+6
View File
@@ -0,0 +1,6 @@
# Locally calculated after checking pgp signature
sha256 c0234042e17f11306c23c038b08e5e070edb7be44bef6697fb8734dcff1c66b1 acl-2.3.1.tar.xz
# Locally calculated
sha256 a45a845012742796534f7e91fe623262ccfb99460a2bd04015bd28d66fba95b8 doc/COPYING
sha256 01b1f9f2c8ee648a7a596a1abe8aa4ed7899b1c9e5551bda06da6e422b04aa55 doc/COPYING.LGPL
+22
View File
@@ -0,0 +1,22 @@
################################################################################
#
# acl
#
################################################################################
ACL_VERSION = 2.3.1
ACL_SOURCE = acl-$(ACL_VERSION).tar.xz
ACL_SITE = http://download.savannah.gnu.org/releases/acl
ACL_LICENSE = GPL-2.0+ (programs), LGPL-2.1+ (libraries)
ACL_LICENSE_FILES = doc/COPYING doc/COPYING.LGPL
ACL_CPE_ID_VENDOR = acl_project
ACL_DEPENDENCIES = attr
HOST_ACL_DEPENDENCIES = host-attr
ACL_INSTALL_STAGING = YES
ACL_CONF_OPTS = --disable-nls
$(eval $(autotools-package))
$(eval $(host-autotools-package))
@@ -0,0 +1,82 @@
From 9382ae2431d2962c430e7149302c8690f5bc159c Mon Sep 17 00:00:00 2001
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
Date: Sun, 10 Jul 2016 15:06:15 +0200
Subject: [PATCH] build: do not use -Werror
Warnings come and go with various compiler versions, so using -Werror is
prone to cause build failures with various compiler versions, especially
newer versions that introduce new warnings.
Remove use of -Werror.
[Vincent: tweak patch for 20170531 release]
[Bernd: tweak patch for 20191018 release]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Vicente Olivert Riera" <Vincent.Riera@imgtec.com>
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
generate/unix/Makefile.config | 1 -
generate/unix/iasl/Makefile | 16 ++++++++--------
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/generate/unix/Makefile.config b/generate/unix/Makefile.config
index c28e8a9b1..7064bed97 100644
--- a/generate/unix/Makefile.config
+++ b/generate/unix/Makefile.config
@@ -204,7 +204,6 @@ CWARNINGFLAGS = \
-Wall\
-Wbad-function-cast\
-Wdeclaration-after-statement\
- -Werror\
-Wformat=2\
-Wmissing-declarations\
-Wmissing-prototypes\
diff --git a/generate/unix/iasl/Makefile b/generate/unix/iasl/Makefile
index 47ea73cab..2c756af79 100644
--- a/generate/unix/iasl/Makefile
+++ b/generate/unix/iasl/Makefile
@@ -360,32 +360,32 @@ $(OBJDIR)/prparserparse.c $(OBJDIR)/prparser.y.h : $(ASL_COMPILER)/prparse
#
$(OBJDIR)/aslcompilerlex.o : $(OBJDIR)/aslcompilerlex.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
+ @$(CC) -c $(CFLAGS) -Wall -o$@ $<
$(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
+ @$(CC) -c $(CFLAGS) -Wall -o$@ $<
$(OBJDIR)/dtcompilerparserlex.o : $(OBJDIR)/dtcompilerparserlex.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
+ @$(CC) -c $(CFLAGS) -Wall -o$@ $<
$(OBJDIR)/dtcompilerparserparse.o : $(OBJDIR)/dtcompilerparserparse.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
+ @$(CC) -c $(CFLAGS) -Wall -o$@ $<
$(OBJDIR)/dtparserlex.o : $(OBJDIR)/dtparserlex.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
+ @$(CC) -c $(CFLAGS) -Wall -o$@ $<
$(OBJDIR)/dtparserparse.o : $(OBJDIR)/dtparserparse.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
+ @$(CC) -c $(CFLAGS) -Wall -o$@ $<
$(OBJDIR)/prparserlex.o : $(OBJDIR)/prparserlex.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
+ @$(CC) -c $(CFLAGS) -Wall -o$@ $<
$(OBJDIR)/prparserparse.o : $(OBJDIR)/prparserparse.c
@echo "- " "Intermediate" $<
- @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
+ @$(CC) -c $(CFLAGS) -Wall -o$@ $<
--
2.20.1
+13
View File
@@ -0,0 +1,13 @@
config BR2_PACKAGE_ACPICA
bool "acpica"
depends on BR2_TOOLCHAIN_HAS_THREADS
help
The ACPI Component Architecture (ACPICA) project provides an
operating system (OS)-independent reference implementation
of the Advanced Configuration and Power Interface
Specification (ACPI).
https://www.acpica.org
comment "acpica needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS
+3
View File
@@ -0,0 +1,3 @@
# locally computed hash
sha256 8a49904744a8159b7f325ed941b56968ba37a0371c634036628064f97538de4b acpica-unix2-20200717.tar.gz
sha256 cb17c679d3291eba1a70a1336062fb07eec2e839b0821b443b24f41de18c5218 source/include/acpi.h
+39
View File
@@ -0,0 +1,39 @@
################################################################################
#
# acpica
#
################################################################################
ACPICA_VERSION = 20200717
ACPICA_SOURCE = acpica-unix2-$(ACPICA_VERSION).tar.gz
ACPICA_SITE = https://acpica.org/sites/acpica/files
ACPICA_LICENSE = BSD-3-Clause or GPL-2.0
ACPICA_LICENSE_FILES = source/include/acpi.h
ACPICA_DEPENDENCIES = host-bison host-flex
HOST_ACPICA_DEPENDENCIES = host-bison host-flex
define ACPICA_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
HARDWARE_NAME=$(BR2_ARCH) HOST=_LINUX CC="$(TARGET_CC)" \
all
endef
define HOST_ACPICA_BUILD_CMDS
$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
all
endef
define ACPICA_INSTALL_TARGET_CMDS
$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
HARDWARE_NAME=$(BR2_ARCH) DESTDIR="$(TARGET_DIR)" \
INSTALLFLAGS=-m755 install
endef
define HOST_ACPICA_INSTALL_CMDS
$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
PREFIX="$(HOST_DIR)" \
INSTALLFLAGS=-m755 install
endef
$(eval $(generic-package))
$(eval $(host-generic-package))
@@ -0,0 +1,20 @@
Partially roll back upstream commit 4711119089e1ad08dad206f4fded68f1972fdeed
since released versions of uClibc don't support isfdtype().
Signed-off-by: Gustavo Zaarias <gustavo@zacarias.com.ar>
diff -Nura acpid-2.0.22.orig/sock.c acpid-2.0.22/sock.c
--- acpid-2.0.22.orig/sock.c 2014-04-22 18:04:19.706841764 -0300
+++ acpid-2.0.22/sock.c 2014-04-22 18:05:08.285479625 -0300
@@ -53,7 +53,10 @@
int
is_socket(int fd)
{
- return (isfdtype(fd, S_IFSOCK) == 1);
+ int v;
+ socklen_t l = sizeof(int);
+
+ return (getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0);
}
/* accept a new client connection */
@@ -0,0 +1,40 @@
Add missing MSG_CMSG_CLOEXEC
Unpatched uClibc toolchains, even using the latest 0.9.33.2, do not
have the MSG_CMSG_CLOEXEC definition. Even though the Buildroot
internal toolchain backend has a uClibc patch to provide it, it
doesn't apply to external toolchains. This patch provides the
definition of MSG_CMSG_CLOEXEC.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/libnetlink.h
===================================================================
--- a/libnetlink.h
+++ b/libnetlink.h
@@ -7,6 +7,10 @@
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
+#ifndef MSG_CMSG_CLOEXEC
+#define MSG_CMSG_CLOEXEC 0x40000000
+#endif
+
struct rtnl_handle
{
int fd;
Index: b/kacpimon/libnetlink.h
===================================================================
--- a/kacpimon/libnetlink.h
+++ b/kacpimon/libnetlink.h
@@ -7,6 +7,10 @@
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
+#ifndef MSG_CMSG_CLOEXEC
+#define MSG_CMSG_CLOEXEC 0x40000000
+#endif
+
struct rtnl_handle
{
int fd;
+11
View File
@@ -0,0 +1,11 @@
config BR2_PACKAGE_ACPID
bool "acpid"
depends on BR2_USE_MMU # fork()
help
Advanced Configuration and Power Interface event daemon.
Acpid is designed to notify user-space programs of ACPI
events, and allows you to configure specific actions for
specific events.
http://sourceforge.net/projects/acpid2/
+53
View File
@@ -0,0 +1,53 @@
#!/bin/sh
DAEMON="acpid"
EXEC="/usr/sbin/$DAEMON"
PIDFILE="/var/run/$DAEMON.pid"
ACPID_ARGS=""
# shellcheck source=/dev/null
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
start() {
printf 'Starting %s: ' "$DAEMON"
# shellcheck disable=SC2086 # we need the word splitting
start-stop-daemon -S -q -p "$PIDFILE" -x "$EXEC" \
-- -n $ACPID_ARGS
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
stop() {
printf 'Stopping %s: ' "$DAEMON"
start-stop-daemon -K -q -p "$PIDFILE" -x "$EXEC"
status=$?
if [ "$status" -eq 0 ]; then
# Give acpid time to send dying gasp to syslog
sleep 1
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
restart() {
stop
start
}
case "$1" in
start|stop|restart)
"$1";;
reload)
restart;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac
+7
View File
@@ -0,0 +1,7 @@
# From https://sourceforge.net/projects/acpid2/files/
md5 b2f2ca633b30ae893c47981fa4d3b258 acpid-2.0.33.tar.xz
sha1 b3e06c3f2213db8ee1a9024cf372fb30e2fab637 acpid-2.0.33.tar.xz
# Locally computed
sha256 0856f71b3eb34a1b663d0a8e6363dfcbc519e63d847330498898658e2972dbe8 acpid-2.0.33.tar.xz
sha256 91df39d1816bfb17a4dda2d3d2c83b1f6f2d38d53e53e41e8f97ad5ac46a0cad COPYING
+40
View File
@@ -0,0 +1,40 @@
################################################################################
#
# acpid
#
################################################################################
ACPID_VERSION = 2.0.33
ACPID_SOURCE = acpid-$(ACPID_VERSION).tar.xz
ACPID_SITE = http://downloads.sourceforge.net/project/acpid2
ACPID_LICENSE = GPL-2.0+
ACPID_LICENSE_FILES = COPYING
ACPID_CPE_ID_VENDOR = tedfelix
ACPID_CPE_ID_PRODUCT = acpid2
ACPID_SELINUX_MODULES = acpi
define ACPID_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 package/acpid/acpid.service \
$(TARGET_DIR)/usr/lib/systemd/system/acpid.service
endef
define ACPID_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/acpid/S02acpid \
$(TARGET_DIR)/etc/init.d/S02acpid
endef
ifeq ($(BR2_INIT_SYSV)$(BR2_INIT_SYSTEMD),y)
ACPID_POWEROFF_CMD = /sbin/shutdown -hP now
else
ACPID_POWEROFF_CMD = /sbin/poweroff
endif
define ACPID_SET_EVENTS
mkdir -p $(TARGET_DIR)/etc/acpi/events
printf 'event=button[ /]power\naction=%s\n' '$(ACPID_POWEROFF_CMD)' \
>$(TARGET_DIR)/etc/acpi/events/powerbtn
endef
ACPID_POST_INSTALL_TARGET_HOOKS += ACPID_SET_EVENTS
$(eval $(autotools-package))
+9
View File
@@ -0,0 +1,9 @@
[Unit]
Description=ACPI event daemon
Documentation=man:acpid(8)
[Service]
ExecStart=/usr/sbin/acpid --foreground --netlink
[Install]
WantedBy=multi-user.target
+14
View File
@@ -0,0 +1,14 @@
config BR2_PACKAGE_ACPITOOL
bool "acpitool"
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_INSTALL_LIBSTDCPP
help
A small, convenient command-line ACPI client with a lot of
features for Linux
http://acpitool.sourceforge.net
comment "acpitool needs a toolchain w/ threads, C++, dynamic library"
depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS \
|| !BR2_INSTALL_LIBSTDCPP
+3
View File
@@ -0,0 +1,3 @@
# locally computed hash
sha256 004fb6cd43102918b6302cf537a2db7ceadda04aef2e0906ddf230f820dad34f acpitool-0.5.1.tar.bz2
sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING
+13
View File
@@ -0,0 +1,13 @@
################################################################################
#
# acpitool
#
################################################################################
ACPITOOL_VERSION = 0.5.1
ACPITOOL_SOURCE = acpitool-$(ACPITOOL_VERSION).tar.bz2
ACPITOOL_SITE = http://downloads.sourceforge.net/sourceforge/acpitool
ACPITOOL_LICENSE = GPL-2.0+
ACPITOOL_LICENSE_FILES = COPYING
$(eval $(autotools-package))
+21
View File
@@ -0,0 +1,21 @@
config BR2_PACKAGE_ACSCCID
bool "acsccid"
depends on BR2_TOOLCHAIN_HAS_THREADS # pcsc-lite, libusb
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
depends on BR2_USE_MMU # pcsc-lite
depends on !BR2_STATIC_LIBS # pcsc-lite
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
select BR2_PACKAGE_PCSC_LITE
# Even though there is a --disable-libusb option, it has in
# fact no effect, and acsccid really requires libusb.
select BR2_PACKAGE_LIBUSB
help
acsccid is a PC/SC driver for Linux/Mac OS X and it supports
ACS CCID smart card readers.
http://acsccid.sourceforge.net/
comment "acsccid needs a toolchain w/ threads, dynamic library, gcc >= 4.9"
depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+6
View File
@@ -0,0 +1,6 @@
# From https://sourceforge.net/projects/acsccid/files/acsccid/1.1.7/
sha1 c0062401e5fedf3ec12c8c2d375d6e1561a8a8ed acsccid-1.1.8.tar.bz2
md5 3eba7b2527aa0b14c73b1a620a1d72d2 acsccid-1.1.8.tar.bz2
# Locally computed
sha256 f86fd846bc88594a569ea27040cb441d933b7eca8d51d2a90bacf161e7740051 acsccid-1.1.8.tar.bz2
sha256 a9bdde5616ecdd1e980b44f360600ee8783b1f99b8cc83a2beb163a0a390e861 COPYING
+20
View File
@@ -0,0 +1,20 @@
################################################################################
#
# acsccid
#
################################################################################
ACSCCID_VERSION = 1.1.8
ACSCCID_SOURCE = acsccid-$(ACSCCID_VERSION).tar.bz2
ACSCCID_SITE = http://downloads.sourceforge.net/acsccid
ACSCCID_LICENSE = LGPL-2.1+
ACSCCID_LICENSE_FILES = COPYING
ACSCCID_INSTALL_STAGING = YES
ACSCCID_DEPENDENCIES = pcsc-lite host-flex host-pkgconf libusb
ACSCCID_CONF_OPTS = --enable-usbdropdir=/usr/lib/pcsc/drivers
ifeq ($(BR2_PACKAGE_LIBICONV),y)
ACSCCID_DEPENDENCIES += libiconv
endif
$(eval $(autotools-package))
+5
View File
@@ -0,0 +1,5 @@
config BR2_PACKAGE_ADWAITA_ICON_THEME
bool "adwaita icon theme"
depends on BR2_PACKAGE_LIBGTK2 || BR2_PACKAGE_LIBGTK3
help
Adwaita icon theme
@@ -0,0 +1,6 @@
# From http://ftp.gnome.org/pub/gnome/sources/adwaita-icon-theme/3.22/adwaita-icon-theme-3.22.0.sha256sum
sha256 a594e7440971f860cc61b1b8291be15ffc1b8dd06a9f11485a5a7faf189bcf6b adwaita-icon-theme-3.37.2.tar.xz
# locally computed
sha256 51f83b2b4e9ed2beebc9b8eed2ecad29314a58ed8c5184b22ad8f9df703d3ce5 COPYING
sha256 da7eabb7bafdf7d3ae5e9f223aa5bdc1eece45ac569dc21b3b037520b4464768 COPYING_LGPL
sha256 207fe75c396c0ae197c57d42c727163428b6667d98cef3644e41c6f1afe1895f COPYING_CCBYSA3
@@ -0,0 +1,16 @@
################################################################################
#
# adwaita-icon-theme
#
################################################################################
ADWAITA_ICON_THEME_VERSION_MAJOR = 3.37
ADWAITA_ICON_THEME_VERSION = $(ADWAITA_ICON_THEME_VERSION_MAJOR).2
ADWAITA_ICON_THEME_SITE = http://ftp.gnome.org/pub/gnome/sources/adwaita-icon-theme/$(ADWAITA_ICON_THEME_VERSION_MAJOR)
ADWAITA_ICON_THEME_SOURCE = adwaita-icon-theme-$(ADWAITA_ICON_THEME_VERSION).tar.xz
ADWAITA_ICON_THEME_INSTALL_STAGING = YES
ADWAITA_ICON_THEME_LICENSE = LGPL-3.0 or CC-BY-SA-3.0
ADWAITA_ICON_THEME_LICENSE_FILES = COPYING COPYING_LGPL COPYING_CCBYSA3
ADWAITA_ICON_THEME_DEPENDENCIES = host-intltool host-libgtk3
$(eval $(autotools-package))
+12
View File
@@ -0,0 +1,12 @@
config BR2_PACKAGE_AER_INJECT
bool "aer-inject"
help
aer-inject allows to inject PCIE AER errors on the software
level into a running Linux kernel. This is intended for
validation of the PCIE driver error recovery handler and
PCIE AER core handler.
Requires a new Linux kernel with PCIE AER error injection
patches.
https://git.kernel.org/cgit/linux/kernel/git/gong.chen/aer-inject.git/
+3
View File
@@ -0,0 +1,3 @@
# Locally computed
sha256 2dd2bd73aa738c1cc26ba04b6e502329778d18c2cc873c0bd00e6b2d38e9477c aer-inject-9bd5e2c7886fca72f139cd8402488a2235957d41-br1.tar.gz
sha256 659a191d8775e05c6c6a9a4ba66b3577c577342bb83f20d393135eb6633c8973 README
+22
View File
@@ -0,0 +1,22 @@
################################################################################
#
# aer-inject
#
################################################################################
AER_INJECT_VERSION = 9bd5e2c7886fca72f139cd8402488a2235957d41
AER_INJECT_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/gong.chen/aer-inject.git
AER_INJECT_LICENSE = GPL-2.0
AER_INJECT_LICENSE_FILES = README
AER_INJECT_DEPENDENCIES = host-flex host-bison
define AER_INJECT_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
endef
define AER_INJECT_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
DESTDIR=$(TARGET_DIR) PREFIX=/usr/bin install
endef
$(eval $(generic-package))
+11
View File
@@ -0,0 +1,11 @@
config BR2_PACKAGE_AESPIPE
bool "aespipe"
depends on BR2_USE_MMU # fork()
help
aespipe program is AES encrypting or decrypting pipe. It reads
from standard input and writes to standard output. It can be
used to create and restore encrypted tar or cpio archives.
It can be used to encrypt and decrypt loop-AES compatible
encrypted disk images.
http://loop-aes.sourceforge.net/
+10
View File
@@ -0,0 +1,10 @@
config BR2_PACKAGE_HOST_AESPIPE
bool "host aespipe"
help
aespipe program is AES encrypting or decrypting pipe. It
reads from standard input and writes to standard output. It
can be used to create and restore encrypted tar or cpio
archives. It can be used to encrypt and decrypt loop-AES
compatible encrypted disk images.
http://loop-aes.sourceforge.net/
+5
View File
@@ -0,0 +1,5 @@
# From https://sourceforge.net/projects/loop-aes/files/aespipe/v2.4f/
sha1 2c23e1a6be298cf4f173f06b1123e4ecd5e9a202 aespipe-v2.4f.tar.bz2
md5 ed05c62c1954110f009bedda4bc1562f aespipe-v2.4f.tar.bz2
# Locally computed:
sha256 b135e1659f58dc9be5e3c88923cd03d2a936096ab8cd7f2b3af4cb7a844cef96 aespipe-v2.4f.tar.bz2
+13
View File
@@ -0,0 +1,13 @@
################################################################################
#
# aespipe
#
################################################################################
AESPIPE_VERSION = 2.4f
AESPIPE_SOURCE = aespipe-v$(AESPIPE_VERSION).tar.bz2
AESPIPE_SITE = http://loop-aes.sourceforge.net/aespipe
AESPIPE_LICENSE = GPL
$(eval $(autotools-package))
$(eval $(host-autotools-package))
@@ -0,0 +1,102 @@
From 2a0fe384eec254643ca2176ccfcbbd036a5aad06 Mon Sep 17 00:00:00 2001
From: Luca Ceresoli <luca@lucaceresoli.net>
Date: Tue, 14 Jul 2020 10:30:10 +0200
Subject: [PATCH] Fix build when SNMPv3 is disabled
agentpp has ifdefs to disable v3 code when SNMPv3 is disabled. However it
is missing one and it has a few ones in excess. Fix them.
Upstream is aware, says "will fix in later version", but thinks to make v3
mandatory. See discussion at
https://forum.snmp.app/t/agent-compile-fails-if-snmp-has-disable-snmpv3/326
Upstream status: none, upstream is not welcoming contributions.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
include/agent_pp/notification_log_mib.h | 4 ++--
include/agent_pp/notification_originator.h | 2 ++
include/agent_pp/snmp_community_mib.h | 4 ++--
src/notification_originator.cpp | 2 ++
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/include/agent_pp/notification_log_mib.h b/include/agent_pp/notification_log_mib.h
index ddac05e515d9..8fd8cfec32ca 100644
--- a/include/agent_pp/notification_log_mib.h
+++ b/include/agent_pp/notification_log_mib.h
@@ -22,7 +22,7 @@
//--AgentGen BEGIN=_BEGIN
#include <agent_pp/agent++.h>
-#ifdef _SNMPv3
+// #ifdef _SNMPv3 // This file deos not look SNMPv3-specific
#include <agent_pp/mib_complex_entry.h>
//--AgentGen END
@@ -688,6 +688,6 @@ protected:
*/
-#endif
+// #endif // _SNMPv3
diff --git a/include/agent_pp/notification_originator.h b/include/agent_pp/notification_originator.h
index 95e8b4e1836d..6f50cd52625b 100644
--- a/include/agent_pp/notification_originator.h
+++ b/include/agent_pp/notification_originator.h
@@ -307,7 +307,9 @@ class AGENTPP_DECL NotificationOriginator: public NotificationSender {
*/
virtual nlmLogEntry* get_nlm_log_entry();
+#ifdef _SNMPv3
virtual v3MP* get_v3mp();
+#endif
protected:
diff --git a/include/agent_pp/snmp_community_mib.h b/include/agent_pp/snmp_community_mib.h
index 7d5c4558f36d..d9eb2b4a87ec 100644
--- a/include/agent_pp/snmp_community_mib.h
+++ b/include/agent_pp/snmp_community_mib.h
@@ -49,7 +49,7 @@ namespace Agentpp {
#define oidSnmpTrapAddress "1.3.6.1.6.3.18.1.3.0"
#define oidSnmpTrapCommunity "1.3.6.1.6.3.18.1.4.0"
-#ifdef _SNMPv3
+// #ifdef _SNMPv3 // This file deos not look SNMPv3-specific
/**
* snmpCommunityName
@@ -346,7 +346,7 @@ class AGENTPP_DECL snmp_community_mib: public MibGroup
static void add_public();
static void add_public(Mib* mib);
};
-#endif
+// #endif // _SNMPv3
#ifdef AGENTPP_NAMESPACE
}
diff --git a/src/notification_originator.cpp b/src/notification_originator.cpp
index d7d566869998..39ddbe08cdeb 100644
--- a/src/notification_originator.cpp
+++ b/src/notification_originator.cpp
@@ -237,6 +237,7 @@ nlmLogEntry* NotificationOriginator::get_nlm_log_entry() {
return nlmLogEntry::instance;
}
+#ifdef _SNMPv3
v3MP* NotificationOriginator::get_v3mp() {
if (mib) {
return mib->get_request_list()->get_v3mp();
@@ -244,6 +245,7 @@ v3MP* NotificationOriginator::get_v3mp() {
return v3MP::I;
}
}
+#endif
bool NotificationOriginator::check_access(ListCursor<MibTableRow>& cur,
--
2.27.0
+23
View File
@@ -0,0 +1,23 @@
config BR2_PACKAGE_AGENTPP
bool "agent++"
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_TOOLCHAIN_HAS_THREADS # snmp++
depends on !BR2_STATIC_LIBS # snmp++
select BR2_PACKAGE_SNMPPP
help
AGENT++ is a set of C++ classes which provides a complete
protocol engine and dispatch table for the development of
SNMP agents. AGENT++ is a multilingual API which supports
SNMPv1, SNMPv2c, and SNMPv3. It provides various C++ classes
implementing prototypes for scalar and table SNMP managed
objects that can be customized by derivation. Additional
classes support the development of proxy agents as well as
sending notifications.
SNMPv3 support is enabled if SNMP++ enables it.
http://www.agentpp.com/agentpp3_5/agentpp3_5.html
comment "agent++ needs a toolchain w/ threads, C++, dynamic library"
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
BR2_STATIC_LIBS
+3
View File
@@ -0,0 +1,3 @@
# Locally computed:
sha256 9b45123df45e803198a1181540b37a4ccd0e63c68df6e826702e2ba49167edac agent++-4.3.1.tar.gz
sha256 1eb85fc97224598dad1852b5d6483bbcf0aa8608790dcc657a5a2a761ae9c8c6 LICENSE-2_0.txt
+19
View File
@@ -0,0 +1,19 @@
################################################################################
#
# agentpp
#
################################################################################
AGENTPP_VERSION = 4.3.1
AGENTPP_SOURCE = agent++-$(AGENTPP_VERSION).tar.gz
AGENTPP_SITE = http://www.agentpp.com/download
AGENTPP_LICENSE = Apache-2.0
AGENTPP_LICENSE_FILES = LICENSE-2_0.txt
AGENTPP_INSTALL_STAGING = YES
AGENTPP_DEPENDENCIES = host-pkgconf snmppp
AGENTPP_CONF_OPTS += \
--disable-proxy \
--disable-forwarder \
--disable-rpath
$(eval $(autotools-package))
@@ -0,0 +1,26 @@
From d4496006ac1e0c99908108b998ae39afb0658733 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Tue, 7 Jul 2020 11:42:40 -0700
Subject: [PATCH] Expand __packed definition.
Signed-off-by: Joseph Benden <joe@benden.us>
[Retrieved from:
https://github.com/aircrack-ng/aircrack-ng/commit/d4496006ac1e0c99908108b998ae39afb0658733]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
lib/radiotap/radiotap.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/radiotap/radiotap.h b/lib/radiotap/radiotap.h
index 57f784b8d..bb5a41dfc 100644
--- a/lib/radiotap/radiotap.h
+++ b/lib/radiotap/radiotap.h
@@ -56,7 +56,7 @@ struct ieee80211_radiotap_header {
* @it_present: (first) present word
*/
uint32_t it_present;
-} __packed;
+} __attribute__((__packed__));
/* version is always 0 */
#define PKTHDR_RADIOTAP_VERSION 0
@@ -0,0 +1,74 @@
From f6f1396807607f5649d20631db517cfca3a1f5c4 Mon Sep 17 00:00:00 2001
From: Joseph Benden <joe@benden.us>
Date: Tue, 7 Jul 2020 11:44:40 -0700
Subject: [PATCH] Fix duplicated symbols.
Signed-off-by: Joseph Benden <joe@benden.us>
[Retrieved from:
https://github.com/aircrack-ng/aircrack-ng/commit/f6f1396807607f5649d20631db517cfca3a1f5c4]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
src/airodump-ng/airodump-ng.c | 2 --
src/airventriloquist-ng/airventriloquist-ng.c | 6 +++---
src/tkiptun-ng/tkiptun-ng.c | 4 ++--
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/airodump-ng/airodump-ng.c b/src/airodump-ng/airodump-ng.c
index 3ae6994dd..e72bc88e2 100644
--- a/src/airodump-ng/airodump-ng.c
+++ b/src/airodump-ng/airodump-ng.c
@@ -92,8 +92,6 @@
#include "radiotap/radiotap_iter.h"
struct devices dev;
-uint8_t h80211[4096] __attribute__((aligned(16)));
-uint8_t tmpbuf[4096] __attribute__((aligned(16)));
static const unsigned char llcnull[] = {0, 0, 0, 0};
diff --git a/src/airventriloquist-ng/airventriloquist-ng.c b/src/airventriloquist-ng/airventriloquist-ng.c
index ac6b7647e..267d95540 100644
--- a/src/airventriloquist-ng/airventriloquist-ng.c
+++ b/src/airventriloquist-ng/airventriloquist-ng.c
@@ -173,7 +173,7 @@ static struct local_options
} lopt;
struct devices dev;
-struct wif *_wi_in, *_wi_out;
+extern struct wif *_wi_in, *_wi_out;
struct ARP_req
{
@@ -195,8 +195,8 @@ struct APt
};
unsigned long nb_pkt_sent;
-u_int8_t h80211[4096];
-static u_int8_t tmpbuf[4096];
+extern u_int8_t h80211[4096];
+extern u_int8_t tmpbuf[4096];
static int tcp_test(const char * ip_str, const short port)
{
diff --git a/src/tkiptun-ng/tkiptun-ng.c b/src/tkiptun-ng/tkiptun-ng.c
index dc67f5d58..43db0bc23 100644
--- a/src/tkiptun-ng/tkiptun-ng.c
+++ b/src/tkiptun-ng/tkiptun-ng.c
@@ -267,7 +267,7 @@ static struct local_options
// unused, but needed for link
struct devices dev;
-struct wif *_wi_in, *_wi_out;
+extern struct wif *_wi_in, *_wi_out;
struct ARP_req
{
@@ -289,7 +289,7 @@ struct APt
};
unsigned long nb_pkt_sent;
-unsigned char h80211[4096];
+extern unsigned char h80211[4096];
static unsigned char srcbuf[4096];
static char strbuf[512];
static int alarmed;
+20
View File
@@ -0,0 +1,20 @@
config BR2_PACKAGE_AIRCRACK_NG
bool "aircrack-ng"
depends on BR2_USE_MMU # uses fork()
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_INSTALL_LIBSTDCPP
depends on !BR2_STATIC_LIBS # dlfcn.h
select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_LIBGCRYPT
select BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4 if BR2_PACKAGE_LIBOPENSSL
help
A set of tools for auditing wireless networks
For complete functionality, also select ethtool, iw,
util-linux (utilities and rfkill), and wireless_tools.
http://www.aircrack-ng.org/
comment "aircrack-ng needs a toolchain w/ dynamic library, threads, C++"
depends on BR2_USE_MMU
depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS \
|| !BR2_INSTALL_LIBSTDCPP
+6
View File
@@ -0,0 +1,6 @@
# From http://www.aircrack-ng.org/downloads.html
sha1 ffeb4816476e7b329dc0c154f1aa4a30ad171beb aircrack-ng-1.6.tar.gz
md5 22ddc85549b51ed0da0931d01ef215e5 aircrack-ng-1.6.tar.gz
# Hash for license file:
sha256 fc51fd3a97223f2fd47b057202d4a6b0daaedf23b5a1f5ff8723c192fc1e021d LICENSE
+77
View File
@@ -0,0 +1,77 @@
################################################################################
#
# aircrack-ng
#
################################################################################
AIRCRACK_NG_VERSION = 1.6
AIRCRACK_NG_SITE = http://download.aircrack-ng.org
AIRCRACK_NG_LICENSE = GPL-2.0+
AIRCRACK_NG_LICENSE_FILES = LICENSE
AIRCRACK_NG_CPE_ID_VENDOR = aircrack-ng
AIRCRACK_NG_DEPENDENCIES = \
$(if $(BR2_PACKAGE_CMOCKA),cmocka) \
$(if $(BR2_PACKAGE_LIBNL),libnl) \
$(if $(BR2_PACKAGE_OPENSSL),openssl) \
$(if $(BR2_PACKAGE_PCRE),pcre) \
$(if $(BR2_PACKAGE_ZLIB),zlib) \
host-pkgconf
AIRCRACK_NG_AUTORECONF = YES
# Enable buddy-ng, easside-ng, tkiptun-ng, wesside-ng
AIRCRACK_NG_CONF_OPTS = --with-experimental
ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)
AIRCRACK_NG_CONF_OPTS += --with-opt
else
AIRCRACK_NG_CONF_OPTS += --without-opt
endif
ifeq ($(BR2_PACKAGE_DUMA),y)
AIRCRACK_NG_DEPENDENCIES += duma
AIRCRACK_NG_CONF_OPTS += --with-duma
else
AIRCRACK_NG_CONF_OPTS += --without-duma
endif
ifeq ($(BR2_PACKAGE_HWLOC),y)
AIRCRACK_NG_DEPENDENCIES += hwloc
AIRCRACK_NG_CONF_OPTS += --enable-hwloc
else
AIRCRACK_NG_CONF_OPTS += --disable-hwloc
endif
ifeq ($(BR2_PACKAGE_JEMALLOC),y)
AIRCRACK_NG_DEPENDENCIES += jemalloc
AIRCRACK_NG_CONF_OPTS += --with-jemalloc
else
AIRCRACK_NG_CONF_OPTS += --without-jemalloc
endif
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
AIRCRACK_NG_DEPENDENCIES += libgcrypt
AIRCRACK_NG_CONF_OPTS += \
--with-gcrypt \
--with-libgcrypt-prefix=$(STAGING_DIR)/usr
else
AIRCRACK_NG_CONF_OPTS += --without-gcrypt
endif
ifeq ($(BR2_PACKAGE_LIBPCAP),y)
AIRCRACK_NG_DEPENDENCIES += libpcap
AIRCRACK_NG_CONF_OPTS += \
--with-libpcap-include=$(STAGING_DIR)/usr/include \
--with-libpcap-lib=$(STAGING_DIR)/usr/lib
ifeq ($(BR2_STATIC_LIBS),y)
AIRCRACK_NG_CONF_ENV += \
LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`"
endif
endif
ifeq ($(BR2_PACKAGE_SQLITE),y)
AIRCRACK_NG_DEPENDENCIES += sqlite
AIRCRACK_NG_CONF_OPTS += --with-sqlite3
else
AIRCRACK_NG_CONF_OPTS += --without-sqlite3
endif
$(eval $(autotools-package))
@@ -0,0 +1,62 @@
From 41c029755502acf01ed634db437ac06d09be6c41 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Fri, 13 Apr 2018 09:02:37 +0200
Subject: [PATCH] Don't use fork() on noMMU platforms
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[Jörg: update patch for 1.1.6]
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Upstream: http://mailman.alsa-project.org/pipermail/alsa-devel/2018-November/141376.html
[Bernd: update patch for 1.2.4]
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
configure.ac | 2 ++
src/pcm/pcm_direct.c | 10 +++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index cce195ae..0c852434 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,6 +51,8 @@ dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_CHECK_FUNCS([uselocale])
+AC_CHECK_FUNC([fork])
+
SAVE_LIBRARY_VERSION
AC_SUBST(LIBTOOL_VERSION_INFO)
diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
index 2b07eff9..4dc3ea26 100644
--- a/src/pcm/pcm_direct.c
+++ b/src/pcm/pcm_direct.c
@@ -437,13 +437,21 @@ int snd_pcm_direct_server_create(snd_pcm_direct_t *dmix)
close(dmix->server_fd);
return ret;
}
-
+
+#ifdef HAVE_FORK
ret = fork();
+#else
+ ret = vfork();
+#endif
if (ret < 0) {
close(dmix->server_fd);
return ret;
} else if (ret == 0) {
+#ifdef HAVE_FORK
ret = fork();
+#else
+ ret = vfork();
+#endif
if (ret == 0)
server_job(dmix);
_exit(EXIT_SUCCESS);
--
2.14.3
@@ -0,0 +1,43 @@
From 3fbaea3ff390d4c09adbf5d6ae62fb7b5f3f24f5 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Mon, 28 Jun 2021 12:08:53 +0200
Subject: [PATCH] fix build with --disable-ucm
Link: https://mailman.alsa-project.org/pipermail/alsa-devel/2021-June/186729.html
Reported-by: Michael Forney <mforney@mforney.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Upstream: f4f29d42be8b8ad60ea4c5697374adad4bfe6868
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
include/local.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/local.h b/include/local.h
index 4e7d88a0..7cfcec53 100644
--- a/include/local.h
+++ b/include/local.h
@@ -374,6 +374,8 @@ int _snd_config_load_with_include(snd_config_t *config, snd_input_t *in,
void *INTERNAL(snd_dlopen)(const char *name, int mode, char *errbuf, size_t errbuflen);
#endif
+#ifdef BUILD_UCM
+
const char *uc_mgr_alibcfg_by_device(snd_config_t **config, const char *name);
static inline int _snd_is_ucm_device(const char *name)
@@ -381,4 +383,12 @@ static inline int _snd_is_ucm_device(const char *name)
return name && name[0] == '_' && name[1] == 'u' && name[2] == 'c' && name[3] == 'm';
}
+#else
+
+static inline const char *uc_mgr_alibcfg_by_device(snd_config_t **config, const char *name) { return NULL; }
+static inline int _snd_is_ucm_device(const char *name) { return 0; }
+
+
+#endif
+
#endif
--
2.31.1
@@ -0,0 +1,29 @@
From 81e7923fbfad45b2f353a4d6e3053af51f5f7d0b Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Tue, 15 Jun 2021 23:21:42 +0200
Subject: [PATCH] control: empty - fix the static build
Reported-by: Jan Palus <atler@pld-linux.org>
Fixes: https://github.com/alsa-project/alsa-lib/issues/157
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
[Retrieved from:
https://github.com/alsa-project/alsa-lib/commit/81e7923fbfad45b2f353a4d6e3053af51f5f7d0b]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
src/control/control_empty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/control/control_empty.c b/src/control/control_empty.c
index 49d1026c..c9b048c1 100644
--- a/src/control/control_empty.c
+++ b/src/control/control_empty.c
@@ -30,7 +30,7 @@
#ifndef PIC
/* entry for static linking */
-const char *_snd_module_ctl_empty = "";
+const char *_snd_module_control_empty = "";
#endif
/*! \page control_plugins
+83
View File
@@ -0,0 +1,83 @@
comment "alsa-lib needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS
menuconfig BR2_PACKAGE_ALSA_LIB
bool "alsa-lib"
# Even though some parts of alsa-lib use threads only when
# available, some PCM plugins use them unconditionally. Since
# the usage of alsa-lib on no-thread systems is pretty
# unlikely, just require thread support globally for alsa-lib.
depends on BR2_TOOLCHAIN_HAS_THREADS
# Temporary until
# https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4913
# is fixed
select BR2_PACKAGE_ALSA_LIB_PCM
help
The Advanced Linux Sound Architecture (ALSA) provides audio
and MIDI functionality to the Linux operating system.
http://www.alsa-project.org/
if BR2_PACKAGE_ALSA_LIB
config BR2_PACKAGE_ALSA_LIB_PYTHON
bool "Python support for alsa-lib"
depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
help
Add python support for alsa-lib.
Python will be built and libpython will be installed
in the target directory
http://www.alsa-project.org/
config BR2_PACKAGE_ALSA_LIB_DEVDIR
string "directory with ALSA device files"
default "/dev/snd"
config BR2_PACKAGE_ALSA_LIB_PCM_PLUGINS
string "built PCM plugins"
default "all" if BR2_USE_MMU
default "copy linear route mulaw alaw adpcm rate plug multi file null empty share meter hooks lfloat ladspa dmix dshare dsnoop asym iec958 softvol extplug ioplug mmap_emul" if !BR2_USE_MMU
config BR2_PACKAGE_ALSA_LIB_CTL_PLUGINS
string "built control plugins"
default "all"
config BR2_PACKAGE_ALSA_LIB_ALOAD
bool "aload"
default y
config BR2_PACKAGE_ALSA_LIB_MIXER
bool "mixer"
default y
config BR2_PACKAGE_ALSA_LIB_PCM
bool "pcm"
default y
config BR2_PACKAGE_ALSA_LIB_RAWMIDI
bool "rawmidi"
default y
config BR2_PACKAGE_ALSA_LIB_HWDEP
bool "hwdep"
default y
config BR2_PACKAGE_ALSA_LIB_SEQ
bool "seq"
default y
config BR2_PACKAGE_ALSA_LIB_UCM
bool "ucm"
default y
select BR2_PACKAGE_ALSA_LIB_MIXER
config BR2_PACKAGE_ALSA_LIB_ALISP
bool "alisp"
default y
depends on BR2_USE_MMU
config BR2_PACKAGE_ALSA_LIB_OLD_SYMBOLS
bool "old-symbols"
default y
endif
+4
View File
@@ -0,0 +1,4 @@
# Locally calculated
sha256 628421d950cecaf234de3f899d520c0a6923313c964ad751ffac081df331438e alsa-lib-1.2.5.1.tar.bz2
sha256 32434afcc8666ba060e111d715bfdb6c2d5dd8a35fa4d3ab8ad67d8f850d2f2b COPYING
sha256 bfe16cf823bcff261fc6a062c07ee96660e3c39678f42f39a788a68dbc234ced aserver/COPYING
+83
View File
@@ -0,0 +1,83 @@
################################################################################
#
# alsa-lib
#
################################################################################
ALSA_LIB_VERSION = 1.2.5.1
ALSA_LIB_SOURCE = alsa-lib-$(ALSA_LIB_VERSION).tar.bz2
ALSA_LIB_SITE = https://www.alsa-project.org/files/pub/lib
ALSA_LIB_LICENSE = LGPL-2.1+ (library), GPL-2.0+ (aserver)
ALSA_LIB_LICENSE_FILES = COPYING aserver/COPYING
ALSA_LIB_CPE_ID_VENDOR = alsa-project
ALSA_LIB_INSTALL_STAGING = YES
ALSA_LIB_CFLAGS = $(TARGET_CFLAGS)
ALSA_LIB_AUTORECONF = YES
ALSA_LIB_CONF_OPTS = \
--with-alsa-devdir=$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_DEVDIR)) \
--with-pcm-plugins="$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_PCM_PLUGINS))" \
--with-ctl-plugins="$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_CTL_PLUGINS))" \
--without-versioned
# Can't build with static & shared at the same time (1.0.25+)
ifeq ($(BR2_STATIC_LIBS),y)
ALSA_LIB_CONF_OPTS += \
--enable-shared=no \
--without-libdl
else
ALSA_LIB_CONF_OPTS += --enable-static=no
endif
ifneq ($(BR2_PACKAGE_ALSA_LIB_ALOAD),y)
ALSA_LIB_CONF_OPTS += --disable-aload
endif
ifneq ($(BR2_PACKAGE_ALSA_LIB_MIXER),y)
ALSA_LIB_CONF_OPTS += --disable-mixer
endif
ifneq ($(BR2_PACKAGE_ALSA_LIB_PCM),y)
ALSA_LIB_CONF_OPTS += --disable-pcm
endif
ifneq ($(BR2_PACKAGE_ALSA_LIB_RAWMIDI),y)
ALSA_LIB_CONF_OPTS += --disable-rawmidi
endif
ifneq ($(BR2_PACKAGE_ALSA_LIB_HWDEP),y)
ALSA_LIB_CONF_OPTS += --disable-hwdep
endif
ifneq ($(BR2_PACKAGE_ALSA_LIB_SEQ),y)
ALSA_LIB_CONF_OPTS += --disable-seq
endif
ifneq ($(BR2_PACKAGE_ALSA_LIB_UCM),y)
ALSA_LIB_CONF_OPTS += --disable-ucm
endif
ifneq ($(BR2_PACKAGE_ALSA_LIB_ALISP),y)
ALSA_LIB_CONF_OPTS += --disable-alisp
endif
ifneq ($(BR2_PACKAGE_ALSA_LIB_OLD_SYMBOLS),y)
ALSA_LIB_CONF_OPTS += --disable-old-symbols
endif
ifeq ($(BR2_PACKAGE_ALSA_LIB_PYTHON),y)
ALSA_LIB_CONF_OPTS += \
--enable-mixer-pymods
ifeq ($(BR2_PACKAGE_PYTHON),y)
ALSA_LIB_CONF_OPTS += \
--with-pythonlibs=-lpython$(PYTHON_VERSION_MAJOR) \
--with-pythonincludes=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)
ALSA_LIB_CFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)
ALSA_LIB_DEPENDENCIES += python
else
ALSA_LIB_CONF_OPTS += \
--with-pythonlibs=-lpython$(PYTHON3_VERSION_MAJOR) \
--with-pythonincludes=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)
ALSA_LIB_CFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)
ALSA_LIB_DEPENDENCIES += python3
endif
else
ALSA_LIB_CONF_OPTS += --disable-python
endif
ALSA_LIB_CONF_ENV = \
CFLAGS="$(ALSA_LIB_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) -lm"
$(eval $(autotools-package))
+8
View File
@@ -0,0 +1,8 @@
config BR2_PACKAGE_ALSA_PLUGINS
bool "alsa-plugins"
depends on BR2_PACKAGE_ALSA_LIB
select BR2_PACKAGE_ALSA_LIB_HWDEP
help
Advanced Linux Sound Architecture Plugins
http://www.alsa-project.org/
+4
View File
@@ -0,0 +1,4 @@
# Locally calculated
sha256 42eef98433d2c8d11f1deeeb459643619215a75aa5a5bbdd06a794e4c413df20 alsa-plugins-1.2.5.tar.bz2
sha256 32434afcc8666ba060e111d715bfdb6c2d5dd8a35fa4d3ab8ad67d8f850d2f2b COPYING
sha256 231f7edcc7352d7734a96eef0b8030f77982678c516876fcb81e25b32d68564c COPYING.GPL
+32
View File
@@ -0,0 +1,32 @@
################################################################################
#
# alsa-plugins
#
################################################################################
ALSA_PLUGINS_VERSION = 1.2.5
ALSA_PLUGINS_SOURCE = alsa-plugins-$(ALSA_PLUGINS_VERSION).tar.bz2
ALSA_PLUGINS_SITE = https://www.alsa-project.org/files/pub/plugins
ALSA_PLUGINS_LICENSE = LGPL-2.1+
ALSA_PLUGINS_LICENSE_FILES = COPYING
ALSA_PLUGINS_DEPENDENCIES = host-pkgconf alsa-lib
ALSA_PLUGINS_CONF_OPTS = \
--disable-jack \
--disable-usbstream \
--disable-pulseaudio \
--disable-libav \
--disable-maemo-plugin \
--disable-maemo-resource-manager \
--with-speex=no
ifeq ($(BR2_PACKAGE_LIBSAMPLERATE),y)
ALSA_PLUGINS_CONF_OPTS += --enable-samplerate
ALSA_PLUGINS_DEPENDENCIES += libsamplerate
ALSA_PLUGINS_LICENSE += , GPL-2.0+ (samplerate plugin)
ALSA_PLUGINS_LICENSE_FILES += COPYING.GPL
else
ALSA_PLUGINS_CONF_OPTS += --disable-samplerate
endif
$(eval $(autotools-package))
+95
View File
@@ -0,0 +1,95 @@
comment "alsa-utils needs a toolchain w/ threads"
depends on BR2_USE_MMU # fork
depends on !BR2_TOOLCHAIN_HAS_THREADS
menuconfig BR2_PACKAGE_ALSA_UTILS
bool "alsa-utils"
depends on BR2_USE_MMU # fork
depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
select BR2_PACKAGE_ALSA_LIB
help
This package contains the command line utilities for the ALSA
project.
http://www.alsa-project.org/
if BR2_PACKAGE_ALSA_UTILS
config BR2_PACKAGE_ALSA_UTILS_ALSACONF
bool "alsaconf"
config BR2_PACKAGE_ALSA_UTILS_ACONNECT
bool "aconnect"
select BR2_PACKAGE_ALSA_LIB_SEQ
config BR2_PACKAGE_ALSA_UTILS_ALSACTL
bool "alsactl"
default y
config BR2_PACKAGE_ALSA_UTILS_ALSALOOP
bool "alsaloop"
config BR2_PACKAGE_ALSA_UTILS_ALSAMIXER
bool "alsamixer"
default y
depends on BR2_USE_WCHAR
select BR2_PACKAGE_NCURSES
select BR2_PACKAGE_ALSA_LIB_MIXER
comment "alsamixer needs a toolchain w/ wchar"
depends on !BR2_USE_WCHAR
config BR2_PACKAGE_ALSA_UTILS_ALSAUCM
bool "alsaucm"
select BR2_PACKAGE_ALSA_LIB_UCM
config BR2_PACKAGE_ALSA_UTILS_ALSATPLG
bool "alsatplg"
config BR2_PACKAGE_ALSA_UTILS_AMIDI
bool "amidi"
select BR2_PACKAGE_ALSA_LIB_RAWMIDI
config BR2_PACKAGE_ALSA_UTILS_AMIXER
bool "amixer"
select BR2_PACKAGE_ALSA_LIB_MIXER
config BR2_PACKAGE_ALSA_UTILS_APLAY
bool "aplay/arecord"
select BR2_PACKAGE_ALSA_LIB_PCM
config BR2_PACKAGE_ALSA_UTILS_APLAYMIDI
bool "aplaymidi"
select BR2_PACKAGE_ALSA_LIB_SEQ
config BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI
bool "arecordmidi"
select BR2_PACKAGE_ALSA_LIB_SEQ
config BR2_PACKAGE_ALSA_UTILS_ASEQDUMP
bool "aseqdump"
select BR2_PACKAGE_ALSA_LIB_SEQ
config BR2_PACKAGE_ALSA_UTILS_ASEQNET
bool "aseqnet"
select BR2_PACKAGE_ALSA_LIB_SEQ
config BR2_PACKAGE_ALSA_UTILS_BAT
bool "bat"
help
ALSABAT (ALSA Basic Audio Tester) is a simple command-line
utility intended to help automate audio driver and sound
server testing with little human interaction.
Note that analysis support in alsabat requires fftw single
precision.
config BR2_PACKAGE_ALSA_UTILS_IECSET
bool "iecset"
select BR2_PACKAGE_ALSA_LIB_PCM
config BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST
bool "speaker-test"
select BR2_PACKAGE_ALSA_LIB_PCM
endif
+3
View File
@@ -0,0 +1,3 @@
# Locally calculated
sha256 98ffc2d599de0577d423a48fa5f20a992ca0b82d812ed1f2e58ade49ac6da426 alsa-utils-1.2.4.tar.bz2
sha256 231f7edcc7352d7734a96eef0b8030f77982678c516876fcb81e25b32d68564c COPYING
+101
View File
@@ -0,0 +1,101 @@
################################################################################
#
# alsa-utils
#
################################################################################
ALSA_UTILS_VERSION = 1.2.4
ALSA_UTILS_SOURCE = alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2
ALSA_UTILS_SITE = https://www.alsa-project.org/files/pub/utils
ALSA_UTILS_LICENSE = GPL-2.0
ALSA_UTILS_LICENSE_FILES = COPYING
ALSA_UTILS_INSTALL_STAGING = YES
ALSA_UTILS_DEPENDENCIES = host-pkgconf alsa-lib \
$(if $(BR2_PACKAGE_NCURSES),ncurses) \
$(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \
$(TARGET_NLS_DEPENDENCIES)
ifeq ($(BR2_PACKAGE_ALSA_UTILS_ALSACTL),y)
ALSA_UTILS_SELINUX_MODULES += alsa
endif
ALSA_UTILS_CONF_ENV = \
ac_cv_prog_ncurses5_config=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS) \
LIBS=$(TARGET_NLS_LIBS)
ALSA_UTILS_CONF_OPTS = \
--disable-xmlto \
--disable-rst2man \
--with-curses=$(if $(BR2_PACKAGE_NCURSES_WCHAR),ncursesw,ncurses)
ifeq ($(BR2_PACKAGE_ALSA_UTILS_ALSALOOP),y)
ALSA_UTILS_CONF_OPTS += --enable-alsaloop
else
ALSA_UTILS_CONF_OPTS += --disable-alsaloop
endif
ifneq ($(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER),y)
ALSA_UTILS_CONF_OPTS += --disable-alsamixer
endif
ifeq ($(BR2_PACKAGE_ALSA_UTILS_BAT),y)
ALSA_UTILS_CONF_OPTS += --enable-bat
# Analysis support requires fftw single precision
ALSA_UTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_FFTW_SINGLE),fftw-single)
else
ALSA_UTILS_CONF_OPTS += --disable-bat
endif
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSACONF) += usr/sbin/alsaconf
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSACTL) += usr/sbin/alsactl
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSALOOP) += usr/bin/alsaloop
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER) += usr/bin/alsamixer
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSATPLG) += usr/bin/alsatplg
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_AMIDI) += usr/bin/amidi
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_AMIXER) += usr/bin/amixer
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_APLAY) += usr/bin/aplay usr/bin/arecord
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_BAT) += usr/bin/alsabat
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_IECSET) += usr/bin/iecset
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ACONNECT) += usr/bin/aconnect
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSAUCM) += usr/bin/alsaucm
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_APLAYMIDI) += usr/bin/aplaymidi
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI) += usr/bin/arecordmidi
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ASEQDUMP) += usr/bin/aseqdump
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ASEQNET) += usr/bin/aseqnet
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST) += usr/bin/speaker-test
define ALSA_UTILS_INSTALL_TARGET_CMDS
mkdir -p $(TARGET_DIR)/var/lib/alsa
for i in $(ALSA_UTILS_TARGETS_y); do \
$(INSTALL) -D -m 755 $(STAGING_DIR)/$$i $(TARGET_DIR)/$$i || exit 1; \
done
if [ -x "$(TARGET_DIR)/usr/bin/speaker-test" ]; then \
mkdir -p $(TARGET_DIR)/usr/share/alsa/speaker-test; \
mkdir -p $(TARGET_DIR)/usr/share/sounds/alsa; \
cp -rdpf $(STAGING_DIR)/usr/share/alsa/speaker-test/* $(TARGET_DIR)/usr/share/alsa/speaker-test/; \
cp -rdpf $(STAGING_DIR)/usr/share/sounds/alsa/* $(TARGET_DIR)/usr/share/sounds/alsa/; \
fi
if [ -x "$(TARGET_DIR)/usr/sbin/alsactl" ]; then \
mkdir -p $(TARGET_DIR)/usr/share/; \
cp -rdpf $(STAGING_DIR)/usr/share/alsa/ $(TARGET_DIR)/usr/share/alsa/; \
fi
endef
ifeq ($(BR2_PACKAGE_ALSA_UTILS_ALSACTL)$(BR2_INIT_SYSTEMD),yy)
ALSA_UTILS_DEPENDENCIES += systemd
ALSA_UTILS_CONF_OPTS += --with-systemdsystemunitdir=/usr/lib/systemd/system
define ALSA_UTILS_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 $(@D)/alsactl/alsa-restore.service \
$(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service
$(INSTALL) -D -m 0644 $(@D)/alsactl/alsa-state.service \
$(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service.d
printf '[Install]\nWantedBy=multi-user.target\n' \
>$(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service.d/buildroot-enable.conf
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service.d
printf '[Install]\nWantedBy=multi-user.target\n' \
>$(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service.d/buildroot-enable.conf;
endef
endif
$(eval $(autotools-package))
@@ -0,0 +1,40 @@
--- a/configure.in
+++ b/configure.in
@@ -11,7 +11,10 @@
AC_PROG_LN_S
dnl Checks for libraries.
-AC_CHECK_LIB(fltk,numericsort,,AC_MSG_ERROR("missing fltk"))
+AC_CHECK_LIB(fltk,numericsort,,
+AC_CHECK_LIB(fltk,fl_numericsort,,
+AC_MSG_ERROR("missing fltk"))
+)
AM_PATH_ALSA(0.9.0)
dnl Checks for header files.
--- a/src/alsamixer.cxx 2007-10-21 12:39:11.000000000 -0400
+++ b/src/alsamixer.cxx 2007-10-21 12:49:10.000000000 -0400
@@ -2081,8 +2081,8 @@ static void
mixer_signal_handler (int signal)
{
if (signal != SIGSEGV)
- mixer_abort (ERR_SIGNAL, sys_siglist[signal], 0);
- else
+ // mixer_abort (ERR_SIGNAL, sys_siglist[signal], 0);
+ //else
{
fprintf (stderr, "\nSegmentation fault.\n");
_exit (11);
--- a/src/alsamixer.cxx 2006-01-16 12:41:54.000000000 -0600
+++ b/src/alsamixer.cxx 2006-01-16 12:45:44.000000000 -0600
@@ -653,8 +653,8 @@
if (vleft >= 0 && vright >= 0) {
if (joined) {
#ifdef ALSAMIXER_GUI
- for (chn = snd_mixer_selem_channel_id_t(0); chn < SND_MIXER_SCHN_LAST;
- snd_mixer_selem_channel_id_t(int(chn)++))
+ for (chn = snd_mixer_selem_channel_id_t(0); chn < SND_MIXER_SCHN_LAST;
+ snd_mixer_selem_channel_id_t(int(chn)+1))
#else
for (chn = 0; chn < SND_MIXER_SCHN_LAST; chn++)
#endif
@@ -0,0 +1,53 @@
From c154195fa161575363280aac9e928b7225f0de9e Mon Sep 17 00:00:00 2001
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
Date: Sun, 29 Dec 2019 17:42:13 +0100
Subject: [PATCH] configure: fix detection of fltk libs
Chaining calls to AC_CHECK_LIB one in the other, breaks the configure
script, because some internal functions (e.g. ac_fn_c_try_link) would
not be defined before they are needed, leading the build to fail as
thus:
checking for snd_tplg_new in -latopology... ./configure: line 4630:
ac_fn_c_try_link: command not found
no
configure: error: No linkable libatopology was found.
Using AC_CHECK_LIB() in sequence (i.e. one after the other) and
memorising the result is not trivial: AC_CHECK_LIB() implements a
ddefault action-if-found that append to LIBS, but not if the user
ptrovides their own action-if-found.
Instead, AC_SEARH_LIBS() always append to LIBS, *and* run the
user-provided action.
So, we switch to AC_SEARCH_LIBS() and memorise the result for each
test, to eventually test if ether worked.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
configure.in | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/configure.in b/configure.in
index 9307cc2..55f6864 100644
--- a/configure.in
+++ b/configure.in
@@ -11,10 +11,10 @@ AC_PROG_INSTALL
AC_PROG_LN_S
dnl Checks for libraries.
-AC_CHECK_LIB(fltk,numericsort,,
-AC_CHECK_LIB(fltk,fl_numericsort,,
-AC_MSG_ERROR("missing fltk"))
-)
+has_fltk=false
+AC_SEARCH_LIBS(numericsort,fltk,has_fltk=true)
+AC_SEARCH_LIBS(fl_numericsort,fltk,has_fltk=true)
+AS_IF(test "${has_fltk}" = "false", AC_MSG_ERROR("missing fltk"))
AM_PATH_ALSA(0.9.0)
dnl Checks for header files.
--
2.20.1
+18
View File
@@ -0,0 +1,18 @@
config BR2_PACKAGE_ALSAMIXERGUI
bool "alsamixergui"
depends on BR2_PACKAGE_XORG7
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_USE_MMU # fltk fork()
depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
select BR2_PACKAGE_FLTK
select BR2_PACKAGE_ALSA_LIB
select BR2_PACKAGE_ALSA_LIB_PCM
select BR2_PACKAGE_ALSA_LIB_MIXER
help
A nice GUI mixer for Alsa using fltk
http://www.iua.upf.es/~mdeboer/projects/alsamixergui/
comment "alsamixergui needs a toolchain w/ C++, threads"
depends on BR2_PACKAGE_XORG7 && BR2_USE_MMU
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+4
View File
@@ -0,0 +1,4 @@
# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/a/alsamixergui/alsamixergui_0.9.0rc2-1-9.dsc
md5 af942a41b81ba27e2e4d0a1e1ab0decb alsamixergui_0.9.0rc2-1.orig.tar.gz
# locally computed
sha256 ea617b76dcd0df74576686ca34c281f43bb9d844015cea91e3debc91538d2b1d debian/copyright
+16
View File
@@ -0,0 +1,16 @@
################################################################################
#
# alsamixergui
#
################################################################################
ALSAMIXERGUI_VERSION = 0.9.0rc2-1
ALSAMIXERGUI_SOURCE = alsamixergui_$(ALSAMIXERGUI_VERSION).orig.tar.gz
ALSAMIXERGUI_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/a/alsamixergui
ALSAMIXERGUI_LICENSE = GPL-2.0+
ALSAMIXERGUI_LICENSE_FILES = debian/copyright
ALSAMIXERGUI_AUTORECONF = YES
ALSAMIXERGUI_DEPENDENCIES = fltk alsa-lib
$(eval $(autotools-package))
+8
View File
@@ -0,0 +1,8 @@
config BR2_PACKAGE_ALTERA_STAPL
bool "altera-stapl"
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8 # libgpiod
select BR2_PACKAGE_LIBGPIOD
help
Altera Jam STAPL Bytecode Player.
https://github.com/kontron/altera-stapl
+2
View File
@@ -0,0 +1,2 @@
sha256 a4d85a79790eab851399132fce4524979fe764d5297413b2445673e6a190bb42 altera-stapl-0.3.3.tar.gz
sha256 d8c320ffc0030d1b096ae4732b50d2b811cf95e9a9b7377c1127b2563e0a0388 COPYING
+21
View File
@@ -0,0 +1,21 @@
################################################################################
#
# altera-stapl
#
################################################################################
ALTERA_STAPL_VERSION = 0.3.3
ALTERA_STAPL_SITE = $(call github,kontron,altera-stapl,$(ALTERA_STAPL_VERSION))
ALTERA_STAPL_LICENSE = GPLv2+
ALTERA_STAPL_LICENSE_FILES = COPYING
ALTERA_STAPL_DEPENDENCIES = libgpiod
define ALTERA_STAPL_BUILD_CMDS
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all
endef
define ALTERA_STAPL_INSTALL_TARGET_CMDS
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) DESTDIR=$(TARGET_DIR) install
endef
$(eval $(generic-package))
+61
View File
@@ -0,0 +1,61 @@
config BR2_PACKAGE_ALURE
bool "alure"
depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # openal
depends on BR2_USE_WCHAR # use wchar_t
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::shared_future
select BR2_PACKAGE_OPENAL
help
Alure is a C++ 3D audio API. It uses OpenAL for audio
rendering, and provides common higher-level features such as
file loading and decoding, buffer caching, background
streaming, and source management for virtually unlimited
sound source handles.
https://kcat.strangesoft.net/alure.html
if BR2_PACKAGE_ALURE
config BR2_PACKAGE_ALURE_FLAC_DECODER
bool "flac decoder"
help
Enables the built-in FLAC decoder.
config BR2_PACKAGE_ALURE_MINIMP3_DECODER
bool "minimp3 decoder"
help
Enables the built-in minimp3 decoder.
config BR2_PACKAGE_ALURE_OPUS_DECODER
bool "opus decoder"
select BR2_PACKAGE_LIBOGG
select BR2_PACKAGE_OPUS
help
Enables the built-in libopusfile decoder.
config BR2_PACKAGE_ALURE_SNDFILE_DECODER
bool "sndfile decoder"
select BR2_PACKAGE_LIBSNDFILE
help
Enables the built-in libsndfile decoder.
config BR2_PACKAGE_ALURE_VORBIS_DECODER
bool "vorbis decoder"
select BR2_PACKAGE_LIBOGG
select BR2_PACKAGE_LIBVORBIS
help
Enables the built-in libvorbis decoder.
endif
comment "alure needs a toolchain w/ C++, gcc >= 4.9, NPTL, wchar"
depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS
depends on !BR2_INSTALL_LIBSTDCPP \
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \
|| !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_USE_WCHAR
comment "alure needs a toolchain not affected by GCC bug 64735"
depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
+3
View File
@@ -0,0 +1,3 @@
# Locally computed
sha256 9b808e5b5a54d156348221dc86704c7831115047d5238691e6088f8c4814b2ca alure-14beed2a86d5a36030e907b21c46614d505f07cd.tar.gz
sha256 7331ddc67daaf1a283c81e8dc17bac8dc40f54ed3fab3d3964616f4bd502a0a3 LICENSE
+65
View File
@@ -0,0 +1,65 @@
################################################################################
#
# alure
#
################################################################################
ALURE_VERSION = 14beed2a86d5a36030e907b21c46614d505f07cd
ALURE_SITE = $(call github,kcat,alure,$(ALURE_VERSION))
ALURE_LICENSE = Zlib, Public Domain (src/decoders/dr_flac.h)
ALURE_LICENSE_FILES = LICENSE
ALURE_INSTALL_STAGING = YES
ALURE_DEPENDENCIES = openal
# Disabling alure examples remove the dependecies on physfs and dump libraries.
# Enable at least one built-in decoder (wave).
ALURE_CONF_OPTS = -DALURE_INSTALL=ON \
-DALURE_BUILD_EXAMPLES=OFF \
-DALURE_ENABLE_WAVE=ON
ifeq ($(BR2_PACKAGE_ALURE_FLAC_DECODER),y)
ALURE_CONF_OPTS += -DALURE_ENABLE_FLAC=ON
else
ALURE_CONF_OPTS += -DALURE_ENABLE_FLAC=OFF
endif
ifeq ($(BR2_PACKAGE_ALURE_MINIMP3_DECODER),y)
ALURE_CONF_OPTS += -DALURE_ENABLE_MINIMP3=ON
else
ALURE_CONF_OPTS += -DALURE_ENABLE_MINIMP3=OFF
endif
ifeq ($(BR2_PACKAGE_ALURE_OPUS_DECODER),y)
ALURE_CONF_OPTS += -DALURE_ENABLE_OPUS=ON
ALURE_DEPENDENCIES += libogg opus
else
ALURE_CONF_OPTS += -DALURE_ENABLE_OPUS=OFF
endif
ifeq ($(BR2_PACKAGE_ALURE_SNDFILE_DECODER),y)
ALURE_CONF_OPTS += -DALURE_ENABLE_SNDFILE=ON
ALURE_DEPENDENCIES += libsndfile
else
ALURE_CONF_OPTS += -DALURE_ENABLE_SNDFILE=OFF
endif
ifeq ($(BR2_PACKAGE_ALURE_VORBIS_DECODER),y)
ALURE_CONF_OPTS += -DALURE_ENABLE_VORBIS=ON
ALURE_DEPENDENCIES += libogg libvorbis
else
ALURE_CONF_OPTS += -DALURE_ENABLE_VORBIS=OFF
endif
ifeq ($(BR2_STATIC_LIBS),y)
ALURE_CONF_OPTS += -DALURE_BUILD_SHARED=OFF \
-DALURE_BUILD_STATIC=ON
else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
ALURE_CONF_OPTS += -DALURE_BUILD_SHARED=ON \
-DALURE_BUILD_STATIC=ON
else
ALURE_CONF_OPTS += -DALURE_BUILD_SHARED=ON \
-DALURE_BUILD_STATIC=OFF
endif
$(eval $(cmake-package))
@@ -0,0 +1,23 @@
Makefile: do not force the release build on install
If we did build any of the other targets, and are just interested
in those and not the release one, we still want to use the 'install'
rule, but not build (and install) the release libraries.
So, remove the dependency on the 'release' target from the 'install'
rule.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
diff -durN am335x-pru-package-506e074859891a2b350eb4f5fcb451c4961410ea.orig/pru_sw/app_loader/interface/Makefile am335x-pru-package-506e074859891a2b350eb4f5fcb451c4961410ea/pru_sw/app_loader/interface/Makefile
--- am335x-pru-package-506e074859891a2b350eb4f5fcb451c4961410ea.orig/pru_sw/app_loader/interface/Makefile 2014-08-18 00:24:36.000000000 +0200
+++ am335x-pru-package-506e074859891a2b350eb4f5fcb451c4961410ea/pru_sw/app_loader/interface/Makefile 2014-10-12 11:39:17.144682697 +0200
@@ -38,7 +38,7 @@
all: debug release sodebug sorelease
-install: release
+install:
install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
install -m 0755 -d $(DESTDIR)$(PREFIX)/include
install -m 0644 $(LIBDIR)/* $(DESTDIR)$(PREFIX)/lib
+7
View File
@@ -0,0 +1,7 @@
config BR2_PACKAGE_AM335X_PRU_PACKAGE
bool "am335x-pru-package"
depends on BR2_arm # only relevant for TI am335x
help
TI AM335X PRU program loader
https://github.com/beagleboard/am335x_pru_package
@@ -0,0 +1,3 @@
# Locally computed
sha256 2a902f825ccc1885c5dccd83e1ccee104aa30e601c9964a24f49459f76f674b9 am335x-pru-package-5f374ad57cc195f28bf5e585c3d446aba6ee7096.tar.gz
sha256 f0fcdf9b2090896389eb4b784f23be96d5544c5ce5282d84f82ae9a8e8331beb pru_sw/utils/LICENCE.txt
@@ -0,0 +1,74 @@
################################################################################
#
# am335x-pru-package
#
################################################################################
AM335X_PRU_PACKAGE_VERSION = 5f374ad57cc195f28bf5e585c3d446aba6ee7096
AM335X_PRU_PACKAGE_SITE = $(call github,beagleboard,am335x_pru_package,$(AM335X_PRU_PACKAGE_VERSION))
AM335X_PRU_PACKAGE_LICENSE = BSD-3-Clause
AM335X_PRU_PACKAGE_LICENSE_FILES = pru_sw/utils/LICENCE.txt
AM335X_PRU_PACKAGE_DEPENDENCIES = host-am335x-pru-package
AM335X_PRU_PACKAGE_INSTALL_STAGING = YES
# The default 'all' rule builds everything, when we just need the library
ifeq ($(BR2_ENABLE_DEBUG),y)
AM335X_PRU_PACKAGE_MAKE_TARGET = debug $(if $(BR2_STATIC_LIBS),,sodebug)
else
AM335X_PRU_PACKAGE_MAKE_TARGET = release $(if $(BR2_STATIC_LIBS),,sorelease)
endif
define AM335X_PRU_PACKAGE_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" \
-C $(@D)/pru_sw/app_loader/interface $(AM335X_PRU_PACKAGE_MAKE_TARGET)
endef
# 'install' installs whatever was built, and our patch removes the dependency
# on the release build, so we can use it to install whatever we built above.
define AM335X_PRU_PACKAGE_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(MAKE1) DESTDIR="$(STAGING_DIR)" PREFIX="/usr" \
-C $(@D)/pru_sw/app_loader/interface install
endef
define AM335X_PRU_PACKAGE_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE1) DESTDIR="$(TARGET_DIR)" PREFIX="/usr" \
-C $(@D)/pru_sw/app_loader/interface install
endef
# The debug libraries are named differently than the release ones,
# so we must provide a symlink to still be able to link with them.
ifeq ($(BR2_ENABLE_DEBUG),y)
define AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_STATIC
ln -sf libprussdrvd.a $(STAGING_DIR)/usr/lib/libprussdrv.a
endef
AM335X_PRU_PACKAGE_POST_INSTALL_STAGING_HOOKS += AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_STATIC
ifeq ($(BR2_STATIC_LIBS),)
define AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_SHARED
ln -sf libprussdrvd.so $(STAGING_DIR)/usr/lib/libprussdrv.so
endef
AM335X_PRU_PACKAGE_POST_INSTALL_STAGING_HOOKS += AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_SHARED
define AM335X_PRU_PACKAGE_LN_DEBUG_TARGET
ln -sf libprussdrvd.so $(TARGET_DIR)/usr/lib/libprussdrv.so
endef
AM335X_PRU_PACKAGE_POST_INSTALL_TARGET_HOOKS += AM335X_PRU_PACKAGE_LN_DEBUG_TARGET
endif # !STATIC
endif # DEBUG
define HOST_AM335X_PRU_PACKAGE_BUILD_CMDS
cd $(@D)/pru_sw/utils/pasm_source; \
$(HOSTCC) -Wall -D_UNIX_ pasm.c pasmpp.c pasmexp.c pasmop.c \
pasmdot.c pasmstruct.c pasmmacro.c path_utils.c -o ../pasm
endef
define HOST_AM335X_PRU_PACKAGE_INSTALL_CMDS
$(INSTALL) -m 0755 -D $(@D)/pru_sw/utils/pasm $(HOST_DIR)/bin/pasm
endef
$(eval $(generic-package))
$(eval $(host-generic-package))
+30
View File
@@ -0,0 +1,30 @@
Enforce correct -march option
Buildroot uses a normal ARM compiler to build the AM33X CM3 firmware
(which runs on a Cortex-M3 processor), but Buildroot will have a
default -march value that doesn't necessarily match the one needed for
Cortex-M3, leading to build failures (gcc complains that the
-mcpu=cortex-m3 option being passed is not compatible with the
selected -march).
Fix this by explicitly indicating -march=armv7-m.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Updated the patch to the latest version of the Makefile
Signed-off-by: Anders Darander <anders@chargestorm.se>
Index: b/Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ SRCDIR = src
BINDIR = bin
INCLUDES = $(SRCDIR)/include
-CFLAGS =-mcpu=cortex-m3 -mthumb -nostdlib -Wall -Wundef \
+CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -Wall -Wundef \
-Werror-implicit-function-declaration -Wstrict-prototypes \
-Wdeclaration-after-statement -fno-delete-null-pointer-checks \
-Wempty-body -fno-strict-overflow -g -I$(INCLUDES) -O2
@@ -0,0 +1,35 @@
From 6c3b05b74ccd49d8ba246bfef0c2e549b9f2bf7b Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Tue, 29 Oct 2019 16:14:18 +0100
Subject: [PATCH] Makefile: unconditionally disable SSP
Though -nostdlib is passed in $(CFLAGS), -fno-stack-protector must also be
passed to avoid linking errors related to undefined references to
'__stack_chk_guard' and '__stack_chk_fail' if toolchain enforces
-fstack-protector.
Fixes:
- http://autobuild.buildroot.net/results/3a3a21f3c35ea025e9b93e09c2454aed0ad31034
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index c3ec071..5226006 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,8 @@ INCLUDES = $(SRCDIR)/include
CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -Wall -Wundef \
-Werror-implicit-function-declaration -Wstrict-prototypes \
-Wdeclaration-after-statement -fno-delete-null-pointer-checks \
- -Wempty-body -fno-strict-overflow -g -I$(INCLUDES) -O2
+ -Wempty-body -fno-strict-overflow -fno-stack-protector \
+ -g -I$(INCLUDES) -O2
LDFLAGS =-nostartfiles -fno-exceptions -Tfirmware.ld
EXECUTABLE=am335x-pm-firmware.elf
--
2.23.0
@@ -0,0 +1,33 @@
From 0e8c3c4851ce64268a8ae1810ef72594251d917d Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sun, 10 Nov 2019 21:57:12 +0100
Subject: [PATCH] Makefile: unconditionally disable PIE
Though -nostdlib is passed in $(CFLAGS), -fno-pie must also be passed to
avoid linking errors related to overlapping sections if toolchain
enforces PIE.
Fixes:
- http://autobuild.buildroot.org/results/418a40b995e91bc66e692dfbc4b0521db3fa5fbb
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 5226006..fe3d844 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -Wall -Wundef \
-Werror-implicit-function-declaration -Wstrict-prototypes \
-Wdeclaration-after-statement -fno-delete-null-pointer-checks \
-Wempty-body -fno-strict-overflow -fno-stack-protector \
- -g -I$(INCLUDES) -O2
+ -fno-pie -g -I$(INCLUDES) -O2
LDFLAGS =-nostartfiles -fno-exceptions -Tfirmware.ld
EXECUTABLE=am335x-pm-firmware.elf
--
2.23.0
@@ -0,0 +1,41 @@
From 25fc567ba8a0cd199e48bfa82863247d953784ea Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sun, 30 Aug 2020 20:59:29 +0200
Subject: [PATCH] Makefile: add -fno-builtin
Build with gcc 10 fails on:
/srv/storage/autobuild/run/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: src/foundation/startup.o: in function `reset_handler':
/srv/storage/autobuild/run/instance-2/output-1/build/am33x-cm3-11107db2f1e9e58ee75d4fe9cc38423c9a6e4365/src/foundation/startup.c:177: undefined reference to `memcpy'
This is due to the fact that gcc 10 replaces the following statement by
a memcpy call:
*puldest++ = *pulsrc++;
To fix this build failure, add -fno-builtin
Fixes:
- http://autobuild.buildroot.org/results/a991e6efa012df518ff1bb35017ad2c96c8feedc
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index fe3d844..fa24d4b 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -Wall -Wundef \
-Werror-implicit-function-declaration -Wstrict-prototypes \
-Wdeclaration-after-statement -fno-delete-null-pointer-checks \
-Wempty-body -fno-strict-overflow -fno-stack-protector \
- -fno-pie -g -I$(INCLUDES) -O2
+ -fno-pie -fno-builtin -g -I$(INCLUDES) -O2
LDFLAGS =-nostartfiles -fno-exceptions -Tfirmware.ld
EXECUTABLE=am335x-pm-firmware.elf
--
2.28.0
+8
View File
@@ -0,0 +1,8 @@
config BR2_PACKAGE_AM33X_CM3
bool "am33x-cm3"
depends on BR2_arm # only relevant for TI am335x
depends on BR2_BINFMT_ELF # assumes the compiler builds ELF file
help
Cortex-M3 binary blob for suspend-resume on am335x
http://arago-project.org/git/projects/am33x-cm3.git
@@ -0,0 +1,6 @@
#!/bin/sh
# Load the PM CM3 firmware
echo 1 > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/loading
cat /lib/firmware/am335x-pm-firmware.bin > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/data
echo 0 > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/loading
+3
View File
@@ -0,0 +1,3 @@
# Locally computed
sha256 c0b11d7ed2300172354f2948e858ddb5cae19d084bd1ab6d48cfa7b6bfa13261 am33x-cm3-11107db2f1e9e58ee75d4fe9cc38423c9a6e4365-br1.tar.gz
sha256 e136e6949a1d3ca144374375af8b9387faa11d2eee7debff8cf22ca8fe7bf7e9 License.txt
+31
View File
@@ -0,0 +1,31 @@
################################################################################
#
# am33x-cm3
#
################################################################################
# This should correpsond to v05.00.00.02
AM33X_CM3_VERSION = 11107db2f1e9e58ee75d4fe9cc38423c9a6e4365
AM33X_CM3_SITE = http://arago-project.org/git/projects/am33x-cm3.git
AM33X_CM3_SITE_METHOD = git
AM33X_CM3_LICENSE = TI Publicly Available Software License
AM33X_CM3_LICENSE_FILES = License.txt
# The build command below will use the standard cross-compiler (normally
# build for Cortex-A8, to build the FW for the Cortex-M3.
define AM33X_CM3_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) all
endef
# Not all of the firmware files are used
define AM33X_CM3_INSTALL_TARGET_CMDS
$(INSTALL) -m 0644 -D $(@D)/bin/am335x-pm-firmware.bin \
$(TARGET_DIR)/lib/firmware/am335x-pm-firmware.bin
endef
define AM33X_CM3_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/am33x-cm3/S93-am335x-pm-firmware-load \
$(TARGET_DIR)/etc/init.d/S93-am335x-pm-firmware-load
endef
$(eval $(generic-package))
@@ -0,0 +1,162 @@
[PATCH] Fix makefiles for out-of-tree build
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
debian/makefiles/adb.mk | 10 +++++-----
debian/makefiles/adbd.mk | 33 ++++++++++++++++-----------------
debian/makefiles/fastboot.mk | 17 +++++++++--------
3 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/debian/makefiles/adb.mk b/debian/makefiles/adb.mk
index d9d4feb..654b9f1 100644
--- a/debian/makefiles/adb.mk
+++ b/debian/makefiles/adb.mk
@@ -1,5 +1,6 @@
# Makefile for adb; from https://heiher.info/2227.html
+VPATH+= $(SRCDIR)/core/adb
SRCS+= adb.c
SRCS+= adb_client.c
SRCS+= adb_auth_host.c
@@ -17,7 +18,7 @@ SRCS+= usb_linux.c
SRCS+= usb_vendors.c
SRCS+= utils.c
-VPATH+= ../libcutils
+VPATH+= $(SRCDIR)/core/libcutils
SRCS+= abort_socket.c
SRCS+= socket_inaddr_any_server.c
SRCS+= socket_local_client.c
@@ -28,7 +29,7 @@ SRCS+= socket_network_client.c
SRCS+= list.c
SRCS+= load_file.c
-VPATH+= ../libzipfile
+VPATH+= $(SRCDIR)/core/libzipfile
SRCS+= centraldir.c
SRCS+= zipfile.c
@@ -37,9 +38,8 @@ CPPFLAGS+= -DADB_HOST=1
CPPFLAGS+= -DHAVE_FORKEXEC=1
CPPFLAGS+= -DHAVE_SYMLINKS
CPPFLAGS+= -DHAVE_TERMIO_H
-CPPFLAGS+= -I.
-CPPFLAGS+= -I../include
-CPPFLAGS+= -I../../../external/zlib
+CPPFLAGS+= -I$(SRCDIR)/core/adb
+CPPFLAGS+= -I$(SRCDIR)/core/include
LIBS+= -lc -lpthread -lz -lcrypto
diff --git a/debian/makefiles/adbd.mk b/debian/makefiles/adbd.mk
index 94d3a90..49dab8c 100644
--- a/debian/makefiles/adbd.mk
+++ b/debian/makefiles/adbd.mk
@@ -1,18 +1,6 @@
# Makefile for adbd
-VPATH+= ../libcutils
-SRCS+= abort_socket.c
-SRCS+= socket_inaddr_any_server.c
-SRCS+= socket_local_client.c
-SRCS+= socket_local_server.c
-SRCS+= socket_loopback_client.c
-SRCS+= socket_loopback_server.c
-SRCS+= socket_network_client.c
-SRCS+= list.c
-SRCS+= load_file.c
-SRCS+= android_reboot.c
-
-#VPATH+= ../adb
+VPATH+= $(SRCDIR)/core/adbd
SRCS+= adb.c
SRCS+= backup_service.c
SRCS+= fdevent.c
@@ -31,7 +19,19 @@ SRCS+= log_service.c
SRCS+= utils.c
SRCS+= base64.c
-VPATH+= ../libzipfile
+VPATH+= $(SRCDIR)/core/libcutils
+SRCS+= abort_socket.c
+SRCS+= socket_inaddr_any_server.c
+SRCS+= socket_local_client.c
+SRCS+= socket_local_server.c
+SRCS+= socket_loopback_client.c
+SRCS+= socket_loopback_server.c
+SRCS+= socket_network_client.c
+SRCS+= list.c
+SRCS+= load_file.c
+SRCS+= android_reboot.c
+
+VPATH+= $(SRCDIR)/core/libzipfile
SRCS+= centraldir.c
SRCS+= zipfile.c
@@ -40,10 +40,9 @@ CPPFLAGS+= -O2 -g -Wall -Wno-unused-parameter
CPPFLAGS+= -DADB_HOST=0 -DHAVE_FORKEXEC=1 -D_XOPEN_SOURCE -D_GNU_SOURCE -DALLOW_ADBD_ROOT=1
CPPFLAGS+= -DHAVE_SYMLINKS -DBOARD_ALWAYS_INSECURE
CPPFLAGS+= -DHAVE_TERMIO_H
-CPPFLAGS+= -I.
-CPPFLAGS+= -I../include
-CPPFLAGS+= -I../../../external/zlib
CPPFLAGS+= `pkg-config --cflags glib-2.0 gio-2.0`
+CPPFLAGS+= -I$(SRCDIR)/core/adbd
+CPPFLAGS+= -I$(SRCDIR)/core/include
LIBS+= -lc -lpthread -lz -lcrypto -lcrypt `pkg-config --libs glib-2.0 gio-2.0`
diff --git a/debian/makefiles/fastboot.mk b/debian/makefiles/fastboot.mk
index 9e8b751..94a069b 100644
--- a/debian/makefiles/fastboot.mk
+++ b/debian/makefiles/fastboot.mk
@@ -1,5 +1,6 @@
# Makefile for fastboot; from https://heiher.info/2227.html
+VPATH+= $(SRCDIR)/core/fastboot
SRCS+= bootimg.c
SRCS+= engine.c
SRCS+= fastboot.c
@@ -7,11 +8,11 @@ SRCS+= protocol.c
SRCS+= usb_linux.c
SRCS+= util_linux.c
-VPATH+= ../libzipfile
+VPATH+= $(SRCDIR)/core/libzipfile
SRCS+= centraldir.c
SRCS+= zipfile.c
-VPATH+= ../libsparse
+VPATH+= $(SRCDIR)/core/libsparse
SRCS+= backed_block.c
SRCS+= sparse_crc32.c
SRCS+= sparse.c
@@ -19,7 +20,7 @@ SRCS+= sparse_read.c
SRCS+= sparse_err.c
SRCS+= output_file.c
-VPATH+= ../../extras/ext4_utils/
+VPATH+= $(SRCDIR)/extras/ext4_utils/
SRCS+= make_ext4fs.c
SRCS+= crc16.c
SRCS+= ext4_utils.c
@@ -31,11 +32,11 @@ SRCS+= extent.c
SRCS+= wipe.c
SRCS+= sha1.c
-CPPFLAGS+= -I.
-CPPFLAGS+= -I../include
-CPPFLAGS+= -I../mkbootimg
-CPPFLAGS+= -I../../extras/ext4_utils/
-CPPFLAGS+= -I../libsparse/include/
+CPPFLAGS+= -I$(SRCDIR)/core/fastboot
+CPPFLAGS+= -I$(SRCDIR)/core/include
+CPPFLAGS+= -I$(SRCDIR)/core/mkbootimg
+CPPFLAGS+= -I$(SRCDIR)/extras/ext4_utils/
+CPPFLAGS+= -I$(SRCDIR)/core/libsparse/include/
LIBS+= -lz -lselinux
--
2.5.1
@@ -0,0 +1,264 @@
[PATCH] Fix adbd for non-Ubuntu systems
Remove glib/dbus dependencies and partially restore services.c to be
closer to the original source code in order to run on systems without
sudo.
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
core/adbd/adb.c | 1 -
core/adbd/services.c | 160 ++++-------------------------------------------
debian/makefiles/adbd.mk | 4 +-
3 files changed, 14 insertions(+), 151 deletions(-)
diff --git a/core/adbd/adb.c b/core/adbd/adb.c
index d90e6b8..7fe6445 100644
--- a/core/adbd/adb.c
+++ b/core/adbd/adb.c
@@ -1165,7 +1165,6 @@ void build_local_name(char* target_str, size_t target_size, int server_port)
#if !ADB_HOST
static int should_drop_privileges() {
- return 1;
#ifndef ALLOW_ADBD_ROOT
return 1;
#else /* ALLOW_ADBD_ROOT */
diff --git a/core/adbd/services.c b/core/adbd/services.c
index 05bd0d0..5adcefe 100644
--- a/core/adbd/services.c
+++ b/core/adbd/services.c
@@ -20,15 +20,6 @@
#include <string.h>
#include <errno.h>
#include <pwd.h>
-#include <glib.h>
-#include <gio/gio.h>
-
-#define UNITY_SERVICE "com.canonical.UnityGreeter"
-#define GREETER_OBJ "/"
-#define GREETER_INTERFACE "com.canonical.UnityGreeter"
-#define PROPERTIES_INTERFACE "org.freedesktop.DBus.Properties"
-#define ACTIVE_PROPERTY "IsActive"
-#define UNLOCK_PATH "/userdata/.adb_onlock"
#include "sysdeps.h"
@@ -268,11 +259,11 @@ static int create_service_thread(void (*func)(int, void *), void *cookie)
}
#if !ADB_HOST
-static int create_subprocess(const char *cmd, const char *arg0, const char *arg1, const char *arg2, const char *arg3, const char *arg4, pid_t *pid)
+static int create_subprocess(const char *cmd, const char *arg0, const char *arg1, pid_t *pid)
{
#ifdef HAVE_WIN32_PROC
- D("create_subprocess(cmd=%s, arg0=%s, arg1=%s, arg2=%s, arg3=%, arg4=%ss)\n", cmd, arg0, arg1, arg2, arg3, arg4);
- fprintf(stderr, "error: create_subprocess not implemented on Win32 (%s %s %s %s %s %s)\n", cmd, arg0, arg1, arg2, arg3, arg4);
+ D("create_subprocess(cmd=%s, arg0=%s, arg1=%s)\n", cmd, arg0, arg1);
+ fprintf(stderr, "error: create_subprocess not implemented on Win32 (%s %s %s)\n", cmd, arg0, arg1);
return -1;
#else /* !HAVE_WIN32_PROC */
char *devname;
@@ -327,7 +318,7 @@ static int create_subprocess(const char *cmd, const char *arg0, const char *arg1
} else {
D("adb: unable to open %s\n", text);
}
- execl(cmd, cmd, arg0, arg1, arg2, arg3, arg4, NULL);
+ execl(cmd, cmd, arg0, arg1, NULL);
fprintf(stderr, "- exec '%s' failed: %s (%d) -\n",
cmd, strerror(errno), errno);
exit(-1);
@@ -342,7 +333,7 @@ static int create_subprocess(const char *cmd, const char *arg0, const char *arg1
}
#endif /* !ABD_HOST */
-#if ADB_HOST
+#if ADB_HOST || ADBD_NON_ANDROID
#define SHELL_COMMAND "/bin/sh"
#else
#define SHELL_COMMAND "/system/bin/sh"
@@ -380,139 +371,16 @@ static void subproc_waiter_service(int fd, void *cookie)
}
}
-int is_phone_locked() {
- GError *error = NULL;
- GVariant *variant = NULL;
- GDBusConnection *connection = NULL;
-
- if (g_file_test(UNLOCK_PATH, G_FILE_TEST_EXISTS)) {
- D("unlock path present.");
- return 0;
- }
-
- // check if the environment variable is present, if not we grab it from
- // the phablet user
- if (g_getenv("DBUS_SESSION_BUS_ADDRESS") == NULL) {
- D("DBUS_SESSION_BUS_ADDRESS missing.\n");
- struct passwd *pw = getpwuid(AID_SHELL);
- char user_id[15];
- gchar *path = NULL;
- gchar *contents = NULL;
- gchar *session_path = NULL;
-
- snprintf(user_id, sizeof user_id, "%d", pw->pw_uid);
-
- path = g_build_filename("/run", "user", user_id, "dbus-session", NULL);
-
- g_file_get_contents(path, &contents, NULL, &error);
- session_path = g_strstrip(g_strsplit(contents, "DBUS_SESSION_BUS_ADDRESS=", -1)[1]);
- D("Session bus is %s\n", session_path);
-
- // path is not longer used
- g_free(path);
-
- if (error != NULL) {
- g_clear_error(&error);
- D("Couldn't set session bus\n");
- return 1;
- }
-
- g_setenv("DBUS_SESSION_BUS_ADDRESS", session_path, TRUE);
- g_free(contents);
- }
-
- // set the uid to be able to connect to the phablet user session bus
- setuid(AID_SHELL);
- connection = g_dbus_connection_new_for_address_sync(g_getenv("DBUS_SESSION_BUS_ADDRESS"),
- G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT | G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION,
- NULL,
- NULL,
- &error);
- if (connection == NULL) {
- D("session bus not available: %s", error->message);
- g_error_free (error);
- return 1;
- }
-
- variant = g_dbus_connection_call_sync(connection,
- UNITY_SERVICE,
- GREETER_OBJ,
- PROPERTIES_INTERFACE,
- "Get",
- g_variant_new("(ss)", GREETER_INTERFACE, ACTIVE_PROPERTY),
- g_variant_type_new("(v)"),
- G_DBUS_CALL_FLAGS_NONE,
- -1,
- NULL,
- &error);
-
- if (error != NULL) {
- D("Could not get property: %s", error->message);
- g_object_unref(connection);
- g_error_free(error);
- return 1;
- }
-
- if (variant == NULL) {
- D("Failed to get property '%s': %s", "IsActive", error->message);
- g_object_unref(connection);
- g_error_free(error);
- return 1;
- }
-
- variant = g_variant_get_variant(g_variant_get_child_value(variant, 0));
-
- int active = 1;
- if (!g_variant_get_boolean(variant)) {
- active = 0;
- }
-
- // get back to be root and return the value
- g_object_unref(connection);
- g_variant_unref(variant);
- setuid(0);
- return active;
-}
-
static int create_subproc_thread(const char *name)
{
- if (is_phone_locked() ) {
- fprintf(stderr, "device is locked\n");
- return -1;
- }
-
stinfo *sti;
adb_thread_t t;
int ret_fd;
pid_t pid;
-
- struct passwd *user = getpwuid(getuid());
- char *shell;
- char *shellopts = "-c";
- char *home;
- char *sudo = "/usr/bin/sudo";
- char useropt[256] = "-u";
-
- if (user->pw_name)
- strcat(useropt, user->pw_name);
-
- if (user && user->pw_shell) {
- shell = user->pw_shell;
- shellopts = "-cl";
- } else {
- shell = SHELL_COMMAND;
- }
-
- if (user->pw_dir)
- home = user->pw_dir;
- if(chdir(home) < 0 )
- return 1;
-
if(name) {
- ret_fd = create_subprocess(sudo, useropt, "-i", shell, shellopts, name, &pid);
+ ret_fd = create_subprocess(SHELL_COMMAND, "-c", name, &pid);
} else {
- shellopts = "-l";
- ret_fd = create_subprocess(sudo, useropt, "-i", shell, shellopts, 0, &pid);
+ ret_fd = create_subprocess(SHELL_COMMAND, "-", 0, &pid);
}
D("create_subprocess() ret_fd=%d pid=%d\n", ret_fd, pid);
@@ -585,17 +453,13 @@ int service_to_fd(const char *name)
} else if (!strncmp(name, "log:", 4)) {
ret = create_service_thread(log_service, get_log_file_path(name + 4));
} else if(!HOST && !strncmp(name, "shell:", 6)) {
- if (!is_phone_locked() ) {
- if(name[6]) {
- ret = create_subproc_thread(name + 6);
- } else {
- ret = create_subproc_thread(0);
- }
+ if(name[6]) {
+ ret = create_subproc_thread(name + 6);
+ } else {
+ ret = create_subproc_thread(0);
}
} else if(!strncmp(name, "sync:", 5)) {
- if (!is_phone_locked() ) {
- ret = create_service_thread(file_sync_service, NULL);
- }
+ ret = create_service_thread(file_sync_service, NULL);
} else if(!strncmp(name, "remount:", 8)) {
ret = create_service_thread(remount_service, NULL);
} else if(!strncmp(name, "reboot:", 7)) {
diff --git a/debian/makefiles/adbd.mk b/debian/makefiles/adbd.mk
index 49dab8c..22c1816 100644
--- a/debian/makefiles/adbd.mk
+++ b/debian/makefiles/adbd.mk
@@ -40,11 +40,11 @@ CPPFLAGS+= -O2 -g -Wall -Wno-unused-parameter
CPPFLAGS+= -DADB_HOST=0 -DHAVE_FORKEXEC=1 -D_XOPEN_SOURCE -D_GNU_SOURCE -DALLOW_ADBD_ROOT=1
CPPFLAGS+= -DHAVE_SYMLINKS -DBOARD_ALWAYS_INSECURE
CPPFLAGS+= -DHAVE_TERMIO_H
-CPPFLAGS+= `pkg-config --cflags glib-2.0 gio-2.0`
+CPPFLAGS+= -DADBD_NON_ANDROID
CPPFLAGS+= -I$(SRCDIR)/core/adbd
CPPFLAGS+= -I$(SRCDIR)/core/include
-LIBS+= -lc -lpthread -lz -lcrypto -lcrypt `pkg-config --libs glib-2.0 gio-2.0`
+LIBS+= -lc -lpthread -lz -lcrypto -lcrypt
OBJS= $(patsubst %, %.o, $(basename $(SRCS)))
--
2.5.1
@@ -0,0 +1,36 @@
[PATCH] Fix build issue with uclibc
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
core/adbd/adb_auth_client.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/adb/adb_auth_client.c b/core/adb/adb_auth_client.c
index 0b4913e..068d837 100644
--- a/core/adb/adb_auth_client.c
+++ b/core/adb/adb_auth_client.c
@@ -72,7 +72,7 @@ static void read_keys(const char *file, struct listnode *list)
if (sep)
*sep = '\0';
- ret = __b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4);
+ ret = b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4);
if (ret != sizeof(key->key)) {
D("%s: Invalid base64 data ret=%d\n", file, ret);
free(key);
diff --git a/core/adbd/adb_auth_client.c b/core/adbd/adb_auth_client.c
index 0b4913e..068d837 100644
--- a/core/adbd/adb_auth_client.c
+++ b/core/adbd/adb_auth_client.c
@@ -72,7 +72,7 @@ static void read_keys(const char *file, struct listnode *list)
if (sep)
*sep = '\0';
- ret = __b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4);
+ ret = b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4);
if (ret != sizeof(key->key)) {
D("%s: Invalid base64 data ret=%d\n", file, ret);
free(key);
--
2.6.1
@@ -0,0 +1,54 @@
[PATCH] Fix build issue with musl
arpa/nameser.h doesn't use the same macro name to avoid several
inclusions.
Finally had an issue with framebuffer_service.c since it was missing the
TEMP_FAILURE_RETRY macro.
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
core/adbd/arpa_nameser.h | 12 +++++++++---
core/adbd/base64.c | 1 -
core/adbd/framebuffer_service.c | 1 +
core/adbd/qemu_pipe.h | 1 -
core/include/cutils/android_reboot.h | 8 ++++++--
core/include/cutils/bitops.h | 10 ++++++----
core/include/cutils/partition_utils.h | 8 ++++++--
extras/ext4_utils/sha1.c | 3 ---
extras/ext4_utils/sha1.h | 13 ++++++-------
9 files changed, 34 insertions(+), 23 deletions(-)
diff --git a/core/adbd/arpa_nameser.h b/core/adbd/arpa_nameser.h
index 438dc04..b2a28d6 100644
--- a/core/adbd/arpa_nameser.h
+++ b/core/adbd/arpa_nameser.h
@@ -52,6 +52,8 @@
#ifndef _ARPA_NAMESER_H_
#define _ARPA_NAMESER_H_
+#ifndef _ARPA_NAMESER_H
+#define _ARPA_NAMESER_H
#define BIND_4_COMPAT
@@ -574,4 +579,5 @@ __END_DECLS
#define XLOG(...) do {} while (0)
#endif
+#endif /* !_ARPA_NAMESER_H */
#endif /* !_ARPA_NAMESER_H_ */
diff --git a/core/adbd/framebuffer_service.c b/core/adbd/framebuffer_service.c
index 20c08d2..48e0241 100644
--- a/core/adbd/framebuffer_service.c
+++ b/core/adbd/framebuffer_service.c
@@ -26,6 +26,7 @@
#include "fdevent.h"
#include "adb.h"
+#include <cutils/fs.h>
#include <linux/fb.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
--
2.6.1
@@ -0,0 +1,35 @@
makefiles: use pkgconf to get libs deps
LIBS lists library dependencies without taking into account static linking
that need ordered listing and more libraries listed since differently from
shared linking dependency is not transparent(i.e. -lcrypto could need
-latomic etc.).
Replace -lcrypto with `pkg-config --libs libcrypto` command to be sure all
needed libraries are listed during linking.
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
diff -urpN android-tools-4.2.2+git20130218.orig/debian/makefiles/adbd.mk android-tools-4.2.2+git20130218/debian/makefiles/adbd.mk
--- android-tools-4.2.2+git20130218.orig/debian/makefiles/adbd.mk 2019-04-08 16:05:02.967710428 +0200
+++ android-tools-4.2.2+git20130218/debian/makefiles/adbd.mk 2019-04-08 16:30:42.463084426 +0200
@@ -44,7 +44,7 @@ CPPFLAGS+= -DADBD_NON_ANDROID
CPPFLAGS+= -I$(SRCDIR)/core/adbd
CPPFLAGS+= -I$(SRCDIR)/core/include
-LIBS+= -lc -lpthread -lz -lcrypto -lcrypt
+LIBS+= -lc -lpthread -lz `pkg-config --libs libcrypto` -lcrypt
OBJS= $(patsubst %, %.o, $(basename $(SRCS)))
diff -urpN android-tools-4.2.2+git20130218.orig/debian/makefiles/adb.mk android-tools-4.2.2+git20130218/debian/makefiles/adb.mk
--- android-tools-4.2.2+git20130218.orig/debian/makefiles/adb.mk 2019-04-08 16:05:02.959701400 +0200
+++ android-tools-4.2.2+git20130218/debian/makefiles/adb.mk 2019-04-08 16:31:06.529426250 +0200
@@ -41,7 +41,7 @@ CPPFLAGS+= -DHAVE_TERMIO_H
CPPFLAGS+= -I$(SRCDIR)/core/adb
CPPFLAGS+= -I$(SRCDIR)/core/include
-LIBS+= -lc -lpthread -lz -lcrypto
+LIBS+= -lc -lpthread -lz `pkg-config --libs libcrypto`
OBJS= $(SRCS:.c=.o)
@@ -0,0 +1,61 @@
Fix build on big endian systems
The usb_linux_client.c file defines cpu_to_le16/32 by using the C
library htole16/32 function calls. However, cpu_to_le16/32 are used
when initializing structures, i.e in a context where a function call
is not allowed.
It works fine on little endian systems because htole16/32 are defined
by the C library as no-ops. But on big-endian systems, they are
actually doing something, which might involve calling a function,
causing build failures.
To solve this, we simply open-code cpu_to_le16/32 in a way that allows
them to be used when initializing structures.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/core/adb/usb_linux_client.c
===================================================================
--- a/core/adb/usb_linux_client.c
+++ b/core/adb/usb_linux_client.c
@@ -34,8 +34,15 @@
#define MAX_PACKET_SIZE_FS 64
#define MAX_PACKET_SIZE_HS 512
-#define cpu_to_le16(x) htole16(x)
-#define cpu_to_le32(x) htole32(x)
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# define cpu_to_le16(x) (x)
+# define cpu_to_le32(x) (x)
+#else
+# define cpu_to_le16(x) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))
+# define cpu_to_le32(x) \
+ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \
+ (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
+#endif
struct usb_handle
{
Index: b/core/adbd/usb_linux_client.c
===================================================================
--- a/core/adbd/usb_linux_client.c
+++ b/core/adbd/usb_linux_client.c
@@ -34,8 +34,15 @@
#define MAX_PACKET_SIZE_FS 64
#define MAX_PACKET_SIZE_HS 512
-#define cpu_to_le16(x) htole16(x)
-#define cpu_to_le32(x) htole32(x)
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# define cpu_to_le16(x) (x)
+# define cpu_to_le32(x) (x)
+#else
+# define cpu_to_le16(x) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))
+# define cpu_to_le32(x) \
+ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \
+ (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
+#endif
struct usb_handle
{
@@ -0,0 +1,41 @@
Include cdefs.h wherever it is needed
cdefs.h is included from within a lot of glibc headers, so it almost
invariably and automagically gets pulled in with glibc.
However, this might not be the case with other C libraries. musl does
not provide cdefs.h so it does not include it from its own headers
(cdefs.h must be provided separately).
So we must include it when we are going to use macros it provides.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
core/adbd/services.c | 1 +
core/libcutils/android_reboot.c | 1 +
2 files changed, 2 insertions(+), 0 deletion(-)
diff --git a/core/adbd/services.c b/core/adbd/services.c
index 20c08d2..48e0241 100644
--- a/core/adbd/services.c
+++ b/core/adbd/services.c
@@ -20,6 +20,7 @@
#include <string.h>
#include <errno.h>
#include <pwd.h>
+#include <sys/cdefs.h>
#include "sysdeps.h"
diff --git a/core/libcutils/android_reboot.c b/core/libcutils/android_reboot.c
index 20c08d2..48e0241 100644
--- a/core/libcutils/android_reboot.c
+++ b/core/libcutils/android_reboot.c
@@ -23,6 +23,7 @@
#include <string.h>
#include <linux/reboot.h>
#include <sys/syscall.h>
+#include <sys/cdefs.h>
#include <cutils/android_reboot.h>

Some files were not shown because too many files have changed in this diff Show More