update buildroot to 2017.02.11
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
From 3984adc4976de7553f51e0cf4de1e18c373b332b Mon Sep 17 00:00:00 2001
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
Date: Thu, 15 Dec 2016 15:10:19 +0200
|
||||
Subject: [PATCH] Avoid redefinition of struct ethhdr
|
||||
|
||||
This is a workaround to the if_ether.h conflict between musl and the kernel.
|
||||
Both define struct ethhdr.
|
||||
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
---
|
||||
include/netinet/if_ether.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/include/netinet/if_ether.h b/include/netinet/if_ether.h
|
||||
index 11ee65823f93..cfe1949d3371 100644
|
||||
--- a/include/netinet/if_ether.h
|
||||
+++ b/include/netinet/if_ether.h
|
||||
@@ -1,6 +1,9 @@
|
||||
#ifndef _NETINET_IF_ETHER_H
|
||||
#define _NETINET_IF_ETHER_H
|
||||
|
||||
+/* Suppress kernel if_ether.h header inclusion */
|
||||
+#define _LINUX_IF_ETHER_H
|
||||
+
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
--
|
||||
2.10.2
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From 45ca5d3fcb6f874bf5ba55d0e9651cef68515395 Mon Sep 17 00:00:00 2001
|
||||
From: Rich Felker <dalias@aerifal.cx>
|
||||
Date: Wed, 18 Oct 2017 14:50:03 -0400
|
||||
Subject: [PATCH] in dns parsing callback, enforce MAXADDRS to preclude
|
||||
overflow
|
||||
|
||||
MAXADDRS was chosen not to need enforcement, but the logic used to
|
||||
compute it assumes the answers received match the RR types of the
|
||||
queries. specifically, it assumes that only one replu contains A
|
||||
record answers. if the replies to both the A and the AAAA query have
|
||||
their answer sections filled with A records, MAXADDRS can be exceeded
|
||||
and clobber the stack of the calling function.
|
||||
|
||||
this bug was found and reported by Felix Wilhelm.
|
||||
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
src/network/lookup_name.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/network/lookup_name.c b/src/network/lookup_name.c
|
||||
index 066be4d5..209c20f0 100644
|
||||
--- a/src/network/lookup_name.c
|
||||
+++ b/src/network/lookup_name.c
|
||||
@@ -111,6 +111,7 @@ static int dns_parse_callback(void *c, int rr, const void *data, int len, const
|
||||
{
|
||||
char tmp[256];
|
||||
struct dpc_ctx *ctx = c;
|
||||
+ if (ctx->cnt >= MAXADDRS) return -1;
|
||||
switch (rr) {
|
||||
case RR_A:
|
||||
if (len != 4) return -1;
|
||||
--
|
||||
2.11.0
|
||||
|
||||
9
bsp/buildroot-2017.02.11/package/musl/Config.in
Normal file
9
bsp/buildroot-2017.02.11/package/musl/Config.in
Normal file
@@ -0,0 +1,9 @@
|
||||
config BR2_PACKAGE_MUSL
|
||||
bool
|
||||
depends on BR2_TOOLCHAIN_USES_MUSL
|
||||
default y
|
||||
select BR2_PACKAGE_LINUX_HEADERS
|
||||
# SSP broken on i386/ppc: http://www.openwall.com/lists/musl/2016/12/04/2
|
||||
select BR2_TOOLCHAIN_HAS_SSP if !(BR2_i386 || BR2_powerpc)
|
||||
# Compatibility headers: cdefs.h, queue.h
|
||||
select BR2_PACKAGE_MUSL_COMPAT_HEADERS
|
||||
2
bsp/buildroot-2017.02.11/package/musl/musl.hash
Normal file
2
bsp/buildroot-2017.02.11/package/musl/musl.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally calculated after checking pgp signature
|
||||
sha256 937185a5e5d721050306cf106507a006c3f1f86d86cd550024ea7be909071011 musl-1.1.16.tar.gz
|
||||
64
bsp/buildroot-2017.02.11/package/musl/musl.mk
Normal file
64
bsp/buildroot-2017.02.11/package/musl/musl.mk
Normal file
@@ -0,0 +1,64 @@
|
||||
################################################################################
|
||||
#
|
||||
# musl
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MUSL_VERSION = 1.1.16
|
||||
MUSL_SITE = http://www.musl-libc.org/releases
|
||||
MUSL_LICENSE = MIT
|
||||
MUSL_LICENSE_FILES = COPYRIGHT
|
||||
|
||||
# Before musl is configured, we must have the first stage
|
||||
# cross-compiler and the kernel headers
|
||||
MUSL_DEPENDENCIES = host-gcc-initial linux-headers
|
||||
|
||||
# musl does not provide an implementation for sys/queue.h or sys/cdefs.h.
|
||||
# So, add the musl-compat-headers package that will install those files,
|
||||
# into the staging directory:
|
||||
# sys/queue.h: header from NetBSD
|
||||
# sys/cdefs.h: minimalist header bundled in Buildroot
|
||||
MUSL_DEPENDENCIES += musl-compat-headers
|
||||
|
||||
# musl is part of the toolchain so disable the toolchain dependency
|
||||
MUSL_ADD_TOOLCHAIN_DEPENDENCY = NO
|
||||
|
||||
MUSL_INSTALL_STAGING = YES
|
||||
|
||||
# Thumb build is broken, build in ARM mode, since all architectures
|
||||
# that support Thumb1 also support ARM.
|
||||
ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
|
||||
MUSL_EXTRA_CFLAGS += -marm
|
||||
endif
|
||||
|
||||
define MUSL_CONFIGURE_CMDS
|
||||
(cd $(@D); \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
CFLAGS="$(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS)) $(MUSL_EXTRA_CFLAGS)" \
|
||||
CPPFLAGS="$(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))" \
|
||||
./configure \
|
||||
--target=$(GNU_TARGET_NAME) \
|
||||
--host=$(GNU_TARGET_NAME) \
|
||||
--prefix=/usr \
|
||||
--libdir=/lib \
|
||||
--disable-gcc-wrapper \
|
||||
--enable-static \
|
||||
$(if $(BR2_STATIC_LIBS),--disable-shared,--enable-shared))
|
||||
endef
|
||||
|
||||
define MUSL_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
|
||||
endef
|
||||
|
||||
define MUSL_INSTALL_STAGING_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
|
||||
DESTDIR=$(STAGING_DIR) install-libs install-tools install-headers
|
||||
endef
|
||||
|
||||
define MUSL_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
|
||||
DESTDIR=$(TARGET_DIR) install-libs
|
||||
$(RM) $(addprefix $(TARGET_DIR)/lib/,crt1.o crtn.o crti.o Scrt1.o)
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user