summaryrefslogtreecommitdiffstats
path: root/toolchain
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain')
-rwxr-xr-xtoolchain/dependencies/dependencies.sh2
-rw-r--r--toolchain/external-toolchain/ext-tool.mk9
-rw-r--r--toolchain/kernel-headers/linux-2.6.31.13-scsi-use-__uX-types-for-headers-exported-to-user-space.patch29
-rw-r--r--toolchain/kernel-headers/linux-2.6.32.11-scsi-use-__uX-types-for-headers-exported-to-user-space.patch29
-rw-r--r--toolchain/kernel-headers/linux-2.6.33.2-scsi-use-__uX-types-for-headers-exported-to-user-space.patch59
-rw-r--r--toolchain/uClibc/uClibc-0.9.31-dnslookup-use-after-free.patch36
6 files changed, 97 insertions, 67 deletions
diff --git a/toolchain/dependencies/dependencies.sh b/toolchain/dependencies/dependencies.sh
index 146e08023..68b275176 100755
--- a/toolchain/dependencies/dependencies.sh
+++ b/toolchain/dependencies/dependencies.sh
@@ -122,7 +122,7 @@ if ! $SHELL --version 2>&1 | grep -q '^GNU bash'; then
fi;
# Check that a few mandatory programs are installed
-for prog in awk bison flex msgfmt makeinfo patch gzip bzip2 perl ; do
+for prog in awk bison flex msgfmt makeinfo patch gzip bzip2 perl tar wget ; do
if ! which $prog > /dev/null ; then
/bin/echo -e "\nYou must install '$prog' on your build machine";
if test $prog = "makeinfo" ; then
diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index 80bdae63b..449328131 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -205,14 +205,7 @@ ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
EXTERNAL_LIBS+=libstdc++.so
endif
-# This dance is needed because the toolchain may have been relocated, so the
-# configured paths may no longer match; fortunately, the sysroot moves along
-# the toolchain, so is always at the same place relative to the toolchain's
-# current location.
-CFG_PREFIX_DIR=$(shell LANG=C $(TARGET_CC) -v 2>&1 | grep ^Configured | tr " " "\n" | grep -- "--prefix=" | cut -f2 -d=)
-CFG_SYSROOT_DIR=$(shell LANG=C $(TARGET_CC) -v 2>&1 | grep ^Configured | tr " " "\n" | grep -- "--with-sysroot=" | cut -f2 -d=)
-REL_SYSROOT_DIR=$(shell echo "$(CFG_SYSROOT_DIR)" |sed -r -e 's:^$(CFG_PREFIX_DIR)::;')
-SYSROOT_DIR=$(TOOLCHAIN_EXTERNAL_PATH)/$(REL_SYSROOT_DIR)
+SYSROOT_DIR=$(shell readlink -f $$(LANG=C $(TARGET_CC) -print-file-name=libc.a |sed -r -e 's:usr/lib/libc\.a::;'))
$(STAMP_DIR)/ext-toolchain-installed:
@echo "Checking external toolchain settings"
diff --git a/toolchain/kernel-headers/linux-2.6.31.13-scsi-use-__uX-types-for-headers-exported-to-user-space.patch b/toolchain/kernel-headers/linux-2.6.31.13-scsi-use-__uX-types-for-headers-exported-to-user-space.patch
index ac9875dd7..2fc6176e8 100644
--- a/toolchain/kernel-headers/linux-2.6.31.13-scsi-use-__uX-types-for-headers-exported-to-user-space.patch
+++ b/toolchain/kernel-headers/linux-2.6.31.13-scsi-use-__uX-types-for-headers-exported-to-user-space.patch
@@ -54,35 +54,6 @@ index 536752c..7445c46 100644
#define SCSI_NL_VID_ID_MASK (~ SCSI_NL_VID_TYPE_MASK)
-@@ -125,21 +125,21 @@ struct scsi_nl_host_vendor_msg {
- #include <scsi/scsi_host.h>
-
- /* Exported Kernel Interfaces */
--int scsi_nl_add_transport(u8 tport,
-+int scsi_nl_add_transport(__u8 tport,
- int (*msg_handler)(struct sk_buff *),
- void (*event_handler)(struct notifier_block *, unsigned long, void *));
--void scsi_nl_remove_transport(u8 tport);
-+void scsi_nl_remove_transport(__u8 tport);
-
--int scsi_nl_add_driver(u64 vendor_id, struct scsi_host_template *hostt,
-+int scsi_nl_add_driver(__u64 vendor_id, struct scsi_host_template *hostt,
- int (*nlmsg_handler)(struct Scsi_Host *shost, void *payload,
-- u32 len, u32 pid),
-+ __u32 len, __u32 pid),
- void (*nlevt_handler)(struct notifier_block *nb,
- unsigned long event, void *notify_ptr));
--void scsi_nl_remove_driver(u64 vendor_id);
-+void scsi_nl_remove_driver(__u64 vendor_id);
-
--void scsi_nl_send_transport_msg(u32 pid, struct scsi_nl_hdr *hdr);
--int scsi_nl_send_vendor_msg(u32 pid, unsigned short host_no, u64 vendor_id,
-- char *data_buf, u32 data_len);
-+void scsi_nl_send_transport_msg(__u32 pid, struct scsi_nl_hdr *hdr);
-+int scsi_nl_send_vendor_msg(__u32 pid, unsigned short host_no, __u64 vendor_id,
-+ char *data_buf, __u32 data_len);
-
- #endif /* __KERNEL__ */
--
1.6.5
diff --git a/toolchain/kernel-headers/linux-2.6.32.11-scsi-use-__uX-types-for-headers-exported-to-user-space.patch b/toolchain/kernel-headers/linux-2.6.32.11-scsi-use-__uX-types-for-headers-exported-to-user-space.patch
index ac9875dd7..2fc6176e8 100644
--- a/toolchain/kernel-headers/linux-2.6.32.11-scsi-use-__uX-types-for-headers-exported-to-user-space.patch
+++ b/toolchain/kernel-headers/linux-2.6.32.11-scsi-use-__uX-types-for-headers-exported-to-user-space.patch
@@ -54,35 +54,6 @@ index 536752c..7445c46 100644
#define SCSI_NL_VID_ID_MASK (~ SCSI_NL_VID_TYPE_MASK)
-@@ -125,21 +125,21 @@ struct scsi_nl_host_vendor_msg {
- #include <scsi/scsi_host.h>
-
- /* Exported Kernel Interfaces */
--int scsi_nl_add_transport(u8 tport,
-+int scsi_nl_add_transport(__u8 tport,
- int (*msg_handler)(struct sk_buff *),
- void (*event_handler)(struct notifier_block *, unsigned long, void *));
--void scsi_nl_remove_transport(u8 tport);
-+void scsi_nl_remove_transport(__u8 tport);
-
--int scsi_nl_add_driver(u64 vendor_id, struct scsi_host_template *hostt,
-+int scsi_nl_add_driver(__u64 vendor_id, struct scsi_host_template *hostt,
- int (*nlmsg_handler)(struct Scsi_Host *shost, void *payload,
-- u32 len, u32 pid),
-+ __u32 len, __u32 pid),
- void (*nlevt_handler)(struct notifier_block *nb,
- unsigned long event, void *notify_ptr));
--void scsi_nl_remove_driver(u64 vendor_id);
-+void scsi_nl_remove_driver(__u64 vendor_id);
-
--void scsi_nl_send_transport_msg(u32 pid, struct scsi_nl_hdr *hdr);
--int scsi_nl_send_vendor_msg(u32 pid, unsigned short host_no, u64 vendor_id,
-- char *data_buf, u32 data_len);
-+void scsi_nl_send_transport_msg(__u32 pid, struct scsi_nl_hdr *hdr);
-+int scsi_nl_send_vendor_msg(__u32 pid, unsigned short host_no, __u64 vendor_id,
-+ char *data_buf, __u32 data_len);
-
- #endif /* __KERNEL__ */
--
1.6.5
diff --git a/toolchain/kernel-headers/linux-2.6.33.2-scsi-use-__uX-types-for-headers-exported-to-user-space.patch b/toolchain/kernel-headers/linux-2.6.33.2-scsi-use-__uX-types-for-headers-exported-to-user-space.patch
new file mode 100644
index 000000000..1089c7106
--- /dev/null
+++ b/toolchain/kernel-headers/linux-2.6.33.2-scsi-use-__uX-types-for-headers-exported-to-user-space.patch
@@ -0,0 +1,59 @@
+From 877aa0313e7d22b88d04ebef76392e1688fffff9 Mon Sep 17 00:00:00 2001
+From: Peter Korsgaard <jacmet@sunsite.dk>
+Date: Fri, 27 Nov 2009 11:20:54 +0100
+Subject: [PATCH] scsi: use __uX types for headers exported to user space
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Commit 9e4f5e29 (FC Pass Thru support) exported a number of header files
+in include/scsi to user space, but didn't change the uX types to the
+userspace-compatible __uX types. Without that you'll get compile errors
+when including them - E.G.:
+
+/tmp/include/scsi/scsi.h:145: error: expected specifier-qualifier-list
+before ‘u8’
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+ include/scsi/scsi.h | 8 ++++----
+ include/scsi/scsi_netlink.h | 4 ++--
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
+index 8b4deca..ec3053e 100644
+--- a/include/scsi/scsi.h
++++ b/include/scsi/scsi.h
+@@ -149,10 +149,10 @@ struct scsi_cmnd;
+
+ /* defined in T10 SCSI Primary Commands-2 (SPC2) */
+ struct scsi_varlen_cdb_hdr {
+- u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */
+- u8 control;
+- u8 misc[5];
+- u8 additional_cdb_length; /* total cdb length - 8 */
++ __u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */
++ __u8 control;
++ __u8 misc[5];
++ __u8 additional_cdb_length; /* total cdb length - 8 */
+ __be16 service_action;
+ /* service specific data follows */
+ };
+diff --git a/include/scsi/scsi_netlink.h b/include/scsi/scsi_netlink.h
+index 536752c..58ce8fe 100644
+--- a/include/scsi/scsi_netlink.h
++++ b/include/scsi/scsi_netlink.h
+@@ -105,8 +105,8 @@ struct scsi_nl_host_vendor_msg {
+ * PCI : ID data is the 16 bit PCI Registered Vendor ID
+ */
+ #define SCSI_NL_VID_TYPE_SHIFT 56
+-#define SCSI_NL_VID_TYPE_MASK ((u64)0xFF << SCSI_NL_VID_TYPE_SHIFT)
+-#define SCSI_NL_VID_TYPE_PCI ((u64)0x01 << SCSI_NL_VID_TYPE_SHIFT)
++#define SCSI_NL_VID_TYPE_MASK ((__u64)0xFF << SCSI_NL_VID_TYPE_SHIFT)
++#define SCSI_NL_VID_TYPE_PCI ((__u64)0x01 << SCSI_NL_VID_TYPE_SHIFT)
+ #define SCSI_NL_VID_ID_MASK (~ SCSI_NL_VID_TYPE_MASK)
+
+
+--
+1.7.0
+
diff --git a/toolchain/uClibc/uClibc-0.9.31-dnslookup-use-after-free.patch b/toolchain/uClibc/uClibc-0.9.31-dnslookup-use-after-free.patch
new file mode 100644
index 000000000..9956d591a
--- /dev/null
+++ b/toolchain/uClibc/uClibc-0.9.31-dnslookup-use-after-free.patch
@@ -0,0 +1,36 @@
+From eb1d8c8289f466ba3ad10b9a88ab2e426b8a9dc7 Mon Sep 17 00:00:00 2001
+From: Gabor Juhos <juhosg@openwrt.org>
+Date: Tue, 6 Apr 2010 09:55:19 +0200
+Subject: [PATCH] Fix use-after-free bug in __dns_lookup
+
+If the type of the first answer does not match with the requested type,
+then the dotted name was freed. If there are no further answers in
+the DNS reply, this pointer was used later on in the same function.
+Additionally it is passed to the caller, and caused strange
+behaviour.
+
+Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
+---
+ libc/inet/resolv.c | 4 +---
+ 1 files changed, 1 insertions(+), 3 deletions(-)
+
+diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
+index 056539f..9459199 100644
+--- a/libc/inet/resolv.c
++++ b/libc/inet/resolv.c
+@@ -1517,10 +1517,8 @@ int attribute_hidden __dns_lookup(const char *name,
+ memcpy(a, &ma, sizeof(ma));
+ if (a->atype != T_SIG && (NULL == a->buf || (type != T_A && type != T_AAAA)))
+ break;
+- if (a->atype != type) {
+- free(a->dotted);
++ if (a->atype != type)
+ continue;
+- }
+ a->add_count = h.ancount - j - 1;
+ if ((a->rdlength + sizeof(struct in_addr*)) * a->add_count > a->buflen)
+ break;
+--
+1.7.0
+