diff options
74 files changed, 1822 insertions, 951 deletions
diff --git a/.gitignore b/.gitignore index e7117d31f..93b53bb7a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ /.config *.depend *.o +*.orig +*~ @@ -3,15 +3,19 @@ Issues resolved (http://bugs.uclibc.org): #83: liblockfile fails to compile due to eaccess redefinition + #163: Xtensa architecture port #241: device mapper + lvm2: build together + #271: Library 'libgcc_s.so.1' not installed in search path #333: Bump sqlite package to 3.6.15 #349: update libsoup to version 2.26.2 #359,#413: Upgrade openvpn to Makefile.autotools.in #367: linux kernel compile error for arm926t + #369: Add SDL_gfx package #373: Support for building gstreamer without libxml #379: update DirectFB to version 1.4.0 #383: gst-plugins-good: Allow soup plugin to be configured #385: neon: Fix pkgconfig dependency + #387: Tremor not installed to toolchain #391: gstreamer: Bump version to 0.10.23 #393: gst-plugins-base: Bump version to 0.10.23 #395: gst-plugins-bad: New package @@ -19,6 +23,8 @@ #411: ipsec-tools: Bump version to 0.7.2 #417: New package spawn-fcgi #419: Bump lighttpd package to 1.4.23 + #467: DirectFB 1.4.1 + #473: memstat_0.5.tar.gz has install with -D and that fails "make" 2009.05, Released June 1st, 2009: @@ -332,6 +332,9 @@ $(PROJECT_BUILD_DIR)/.root: if [ -d "$(TARGET_SKELETON)" ]; then \ cp -fa $(TARGET_SKELETON)/* $(TARGET_DIR)/; \ fi; \ + if [ -d "$(TARGET_SKELETON_PATCH)" ]; then \ + toolchain/patch-kernel.sh $(TARGET_DIR) $(TARGET_SKELETON_PATCH)/ \*patch\*; \ + fi; \ touch $(STAGING_DIR)/.fakeroot.00000; \ fi -find $(TARGET_DIR) -type d -name CVS -o -name .svn -print0 | xargs -0 rm -rf @@ -5,10 +5,3 @@ Buildroot2 TODOs - convert all packages that use autoconf to use the infrastructure of packages/Makefile.autotools.in - fix setting of flags for packages - -- stabilize for a 0.10.0 release - -- think about using a common --config-cache for configure - Should take care of expanding TARGET_CONFIGURE_ARGS for cross compiles - to working presets. - diff --git a/package/Config.in b/package/Config.in index e7550d00d..d27c01792 100644 --- a/package/Config.in +++ b/package/Config.in @@ -306,6 +306,7 @@ source "package/sdl_image/Config.in" source "package/sdl_mixer/Config.in" source "package/sdl_net/Config.in" source "package/sdl_ttf/Config.in" +source "package/sdl_gfx/Config.in" source "package/tiff/Config.in" comment "busybox graphic applications" diff --git a/package/Makefile.in b/package/Makefile.in index 351124410..f0dc47a36 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -130,7 +130,7 @@ TOOLCHAIN_EXTERNAL_PATH:=$(strip $(subst ",, $(BR2_TOOLCHAIN_EXTERNAL_PATH))) #")) #TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(TOOLCHAIN_EXTERNAL_PREFIX) TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(ARCH)$(COND_ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX) -TARGET_PATH="$(STAGING_DIR)/bin:$(STAGING_DIR)/usr/bin:$(TOOL_BUILD_DIR)/bin:$(TOOLCHAIN_EXTERNAL_PATH)/bin:$(PATH)" +TARGET_PATH="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(TOOL_BUILD_DIR)/bin:$(TOOLCHAIN_EXTERNAL_PATH)/bin:$(PATH)" #IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(TOOLCHAIN_EXTERNAL_PREFIX)$(ROOTFS_SUFFIX) IMAGE:=$(BINARIES_DIR)/$(BR2_ROOTFS_PREFIX).$(ARCH)$(COND_ARCH_FPU_SUFFIX)$(ROOTFS_SUFFIX) @@ -205,6 +205,7 @@ HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \ -e 's/mipsel-.*/mipsel/' \ -e 's/cris.*/cris/' \ -e 's/i[3-9]86/i386/' \ + -e 's/xtensa.*/xtensa/' \ ) GNU_HOST_NAME:=$(HOST_ARCH)-$(subst ",,$(BR2_GNU_BUILD_SUFFIX)) #") diff --git a/package/busybox/busybox-1.14.2-test.patch b/package/busybox/busybox-1.14.2-test.patch new file mode 100644 index 000000000..ce0d9a77e --- /dev/null +++ b/package/busybox/busybox-1.14.2-test.patch @@ -0,0 +1,64 @@ +diff -urpN busybox-1.14.2/coreutils/test.c busybox-1.14.2-test/coreutils/test.c +--- busybox-1.14.2/coreutils/test.c 2009-07-05 22:59:28.000000000 +0200 ++++ busybox-1.14.2-test/coreutils/test.c 2009-07-17 01:46:28.000000000 +0200 +@@ -571,7 +571,14 @@ static number_t nexpr(enum token n) + + nest_msg(">nexpr(%s)\n", TOKSTR[n]); + if (n == UNOT) { +- res = !nexpr(check_operator(*++args)); ++ n = check_operator(*++args); ++ if (n == EOI) { ++ /* special case: [ ! ], [ a -a ! ] are valid */ ++ /* IOW, "! ARG" may miss ARG */ ++ unnest_msg("<nexpr:1 (!EOI)\n"); ++ return 1; ++ } ++ res = !nexpr(n); + unnest_msg("<nexpr:%lld\n", res); + return res; + } +@@ -742,7 +749,7 @@ int test_main(int argc, char **argv) + check_operator(argv[1]); + if (last_operator->op_type == BINOP) { + /* "test [!] arg1 <binary_op> arg2" */ +- args = &argv[0]; ++ args = argv; + res = (binop() == 0); + goto ret; + } +@@ -755,7 +762,7 @@ int test_main(int argc, char **argv) + argv--; + } + #endif +- args = &argv[0]; ++ args = argv; + res = !oexpr(check_operator(*args)); + + if (*args != NULL && *++args != NULL) { +diff -urpN busybox-1.14.2/testsuite/test.tests busybox-1.14.2-test/testsuite/test.tests +--- busybox-1.14.2/testsuite/test.tests 2009-07-05 22:59:22.000000000 +0200 ++++ busybox-1.14.2-test/testsuite/test.tests 2009-07-17 01:46:28.000000000 +0200 +@@ -21,6 +21,11 @@ testing "test '': should be false (1)" \ + "1\n" \ + "" "" + ++testing "test !: should be true (0)" \ ++ "busybox test !; echo \$?" \ ++ "0\n" \ ++ "" "" ++ + testing "test a: should be true (0)" \ + "busybox test a; echo \$?" \ + "0\n" \ +@@ -51,6 +56,11 @@ testing "test -lt = -gt: should be false + "1\n" \ + "" "" + ++testing "test a -a !: should be true (0)" \ ++ "busybox test a -a !; echo \$?" \ ++ "0\n" \ ++ "" "" ++ + testing "test -f = a -o b: should be true (0)" \ + "busybox test -f = a -o b; echo \$?" \ + "0\n" \ diff --git a/package/directfb/directfb.mk b/package/directfb/directfb.mk index 282661591..93b45938d 100644 --- a/package/directfb/directfb.mk +++ b/package/directfb/directfb.mk @@ -4,7 +4,7 @@ # ############################################################# DIRECTFB_VERSION_MAJOR:=1.4 -DIRECTFB_VERSION:=1.4.0 +DIRECTFB_VERSION:=1.4.1 DIRECTFB_SITE:=http://www.directfb.org/downloads/Core/DirectFB-$(DIRECTFB_VERSION_MAJOR) DIRECTFB_SOURCE:=DirectFB-$(DIRECTFB_VERSION).tar.gz DIRECTFB_AUTORECONF = NO diff --git a/package/expat/expat.mk b/package/expat/expat.mk index 88a7f1674..6706716b7 100644 --- a/package/expat/expat.mk +++ b/package/expat/expat.mk @@ -55,7 +55,7 @@ $(STAMP_DIR)/host_expat_installed: $(STAMP_DIR)/host_expat_compiled $(MAKE) -C $(EXPAT_HOST_DIR) installlib touch $@ -host-expat: $(STAM_DIR)/host_expat_installed +host-expat: $(STAMP_DIR)/host_expat_installed host-expat-source: expat-source diff --git a/package/gnuconfig/config.guess b/package/gnuconfig/config.guess index ebf353e3d..ced32b63a 100755 --- a/package/gnuconfig/config.guess +++ b/package/gnuconfig/config.guess @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. -timestamp='2007-07-22' +timestamp='2009-07-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -971,8 +971,8 @@ EOF x86_64:Linux:*:*) echo x86_64-unknown-linux-${LIBC} exit ;; - xtensa:Linux:*:*) - echo xtensa-unknown-linux-${LIBC} + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so diff --git a/package/gnuconfig/config.sub b/package/gnuconfig/config.sub index 392e21fc2..efbb230f4 100755 --- a/package/gnuconfig/config.sub +++ b/package/gnuconfig/config.sub @@ -370,10 +370,14 @@ case $basic_machine in | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ + | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) diff --git a/package/gnuconfig/testsuite/config-sub.data b/package/gnuconfig/testsuite/config-sub.data index 0f2272a14..2a5e1f1eb 100644 --- a/package/gnuconfig/testsuite/config-sub.data +++ b/package/gnuconfig/testsuite/config-sub.data @@ -109,6 +109,7 @@ fido-elf fido-unknown-elf fido fido-unknown-none xtensa-elf xtensa-unknown-elf xtensa-linux xtensa-unknown-linux-gnu +xtensa_dc232b-linux xtensa_dc232b-unknown-linux-gnu i386-drops1.0 i386-pc-drops1.0 mep mep-unknown-elf mep-elf mep-unknown-elf diff --git a/package/haserl/haserl-0.9.25/haserl-0.9.25-array-vars-fix.patch b/package/haserl/haserl-0.9.25/haserl-0.9.25-array-vars-fix.patch new file mode 100644 index 000000000..e6c959a66 --- /dev/null +++ b/package/haserl/haserl-0.9.25/haserl-0.9.25-array-vars-fix.patch @@ -0,0 +1,19 @@ +haserl: array vars fix + +Fix buffer overflow error. Len is the length of the name= part of the +name=value string, not the value part. + +Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> +Index: haserl-0.9.25/src/haserl.c +=================================================================== +--- haserl-0.9.25.orig/src/haserl.c 2009-07-20 15:05:26.000000000 +0200 ++++ haserl-0.9.25/src/haserl.c 2009-07-20 15:06:05.000000000 +0200 +@@ -269,7 +269,7 @@ + /* if an array, create a new string with this + * value added to the end of the old value(s) + */ +- temp = xmalloc (strlen (cur->buf) + len + 1); ++ temp = xmalloc (strlen (cur->buf) + strlen(entry) - len + 1); + memmove (temp, cur->buf, strlen (cur->buf) + 1); + strcat (temp, "\n"); + strcat (temp, str + keylen + 3); diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk index 75f0cfc6c..b2738b012 100644 --- a/package/libglib2/libglib2.mk +++ b/package/libglib2/libglib2.mk @@ -4,7 +4,7 @@ # ############################################################# LIBGLIB2_VERSION_MAJOR = 2.20 -LIBGLIB2_VERSION_MINOR = 1 +LIBGLIB2_VERSION_MINOR = 4 LIBGLIB2_VERSION = $(LIBGLIB2_VERSION_MAJOR).$(LIBGLIB2_VERSION_MINOR) LIBGLIB2_SOURCE = glib-$(LIBGLIB2_VERSION).tar.bz2 LIBGLIB2_SITE = http://ftp.gtk.org/pub/glib/$(LIBGLIB2_VERSION_MAJOR) diff --git a/package/libpng/libpng-remove-setjmp-error.patch b/package/libpng/libpng-remove-setjmp-error.patch deleted file mode 100644 index 6d0d8f7f2..000000000 --- a/package/libpng/libpng-remove-setjmp-error.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -ur libpng-1.2.25/pngconf.h libpng-1.2.25-patched/pngconf.h ---- libpng-1.2.25/pngconf.h 2008-02-18 16:31:05.000000000 -0600 -+++ libpng-1.2.25-patched/pngconf.h 2008-03-05 07:30:22.900478085 -0600 -@@ -319,13 +319,6 @@ - # define PNG_SAVE_BSD_SOURCE - # undef _BSD_SOURCE - # endif --# ifdef _SETJMP_H -- /* If you encounter a compiler error here, see the explanation -- * near the end of INSTALL. -- */ -- __pngconf.h__ already includes setjmp.h; -- __dont__ include it again.; --# endif - # endif /* __linux__ */ - - /* include setjmp.h for error handling */ diff --git a/package/libpng/libpng.mk b/package/libpng/libpng.mk index 8ed1b1a21..b1cb2209d 100644 --- a/package/libpng/libpng.mk +++ b/package/libpng/libpng.mk @@ -3,7 +3,7 @@ # libpng (Portable Network Graphic library) # ############################################################# -LIBPNG_VERSION:=1.2.35 +LIBPNG_VERSION:=1.2.38 LIBPNG_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libpng LIBPNG_SOURCE = libpng-$(LIBPNG_VERSION).tar.bz2 LIBPNG_LIBTOOL_PATCH = NO diff --git a/package/memstat/memstat.mk b/package/memstat/memstat.mk index 7220aeeeb..a54509ac1 100644 --- a/package/memstat/memstat.mk +++ b/package/memstat/memstat.mk @@ -21,15 +21,17 @@ $(MEMSTAT_DIR)/.configured: $(MEMSTAT_DIR)/.unpacked touch $@ $(MEMSTAT_DIR)/memstat: $(MEMSTAT_DIR)/.configured - $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) $(@D)/memstat.c -o $@ + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ + $(CFLAGS_WHOLE_PROGRAM) $(@D)/memstat.c -o $@ $(TARGET_DIR)/usr/bin/memstat: $(MEMSTAT_DIR)/memstat [ -e $(TARGET_DIR)/etc/memstat.conf ] || \ - $(INSTALL) -m 0644 -D $(^D)/memstat.conf $(TARGET_DIR)/etc + $(INSTALL) -m 0644 -D $(^D)/memstat.conf \ + $(TARGET_DIR)/etc/memstat.conf $(INSTALL) -m 0755 -D $^ $@ $(STRIPCMD) $(STRIP_STRIP_ALL) $@ -memstat: uclibc $(TARGET_DIR)/usr/bin/memstat +memstat: $(TARGET_DIR)/usr/bin/memstat memstat-source: $(DL_DIR)/$(MEMSTAT_SOURCE) diff --git a/package/mtd/20050122/mtd.mk b/package/mtd/20050122/mtd.mk deleted file mode 100644 index b5a9d5c50..000000000 --- a/package/mtd/20050122/mtd.mk +++ /dev/null @@ -1,138 +0,0 @@ -############################################################# -# -# mtd provides jffs2 utilities -# -############################################################# -MTD_SOURCE:=mtd_20050122.orig.tar.gz -MTD_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mtd -MTD_HOST_DIR := $(TOOL_BUILD_DIR)/mtd_orig -MTD_DIR:=$(BUILD_DIR)/mtd_orig -MTD_CAT:=$(ZCAT) - - - -############################################################# -# -# Build mkfs.jffs2 and sumtool for use on the local host system if -# needed by target/jffs2root. -# -############################################################# -MKFS_JFFS2 := $(MTD_HOST_DIR)/util/mkfs.jffs2 -SUMTOOL := $(MTD_HOST_DIR)/util/sumtool - -ifneq ($(MTD_SOURCE),) -$(DL_DIR)/$(MTD_SOURCE): - $(call DOWNLOAD,$(MTD_SITE),$(MTD_SOURCE)) -endif - -$(MTD_HOST_DIR)/.unpacked: $(DL_DIR)/$(MTD_SOURCE) - $(MTD_CAT) $(DL_DIR)/$(MTD_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - - mv $(TOOL_BUILD_DIR)/$(shell tar tzf $(DL_DIR)/$(MTD_SOURCE) | head -n 1 \ - | xargs basename) $(MTD_HOST_DIR) - toolchain/patch-kernel.sh $(MTD_HOST_DIR) package/mtd/20050122 \*.patch - touch $@ - -$(MKFS_JFFS2): $(MTD_HOST_DIR)/.unpacked - CFLAGS=-I$(LINUX_HEADERS_DIR)/include $(MAKE) CC="$(HOSTCC)" CROSS= \ - LINUXDIR=$(LINUX_DIR) -C $(MTD_HOST_DIR)/util mkfs.jffs2 - -$(SUMTOOL): $(MTD_HOST_DIR)/.unpacked - CFLAGS=-I$(LINUX_HEADERS_DIR)/include $(MAKE) CC="$(HOSTCC)" CROSS= \ - LINUXDIR=$(LINUX_DIR) -C $(MTD_HOST_DIR)/util sumtool - -mtd-host: $(MKFS_JFFS2) $(SUMTOOL) - -mtd-host-source: $(DL_DIR)/$(MTD_SOURCE) - -mtd-host-clean: - -$(MAKE) -C $(MTD_HOST_DIR) clean - -mtd-host-dirclean: - rm -rf $(MTD_HOST_DIR) - -############################################################# -# -# build mtd for use on the target system -# -############################################################# -$(MTD_DIR)/.unpacked: $(DL_DIR)/$(MTD_SOURCE) - $(MTD_CAT) $(DL_DIR)/$(MTD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - mv $(BUILD_DIR)/$(shell tar tzf $(DL_DIR)/$(MTD_SOURCE) \ - | head -n 1 | xargs basename) $(MTD_DIR) - toolchain/patch-kernel.sh $(MTD_DIR) \ - package/mtd/20050122 \*.patch - touch $@ - -MTD_TARGETS_n := -MTD_TARGETS_y := - -MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_ERASE) += flash_erase -MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_ERASEALL) += flash_eraseall -MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_INFO) += flash_info -MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_LOCK) += flash_lock -MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_UNLOCK) += flash_unlock -MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASHCP) += flashcp -MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSJFFS2) += mkfs.jffs2 -MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSJFFS) += mkfs.jffs -MTD_TARGETS_$(BR2_PACKAGE_MTD_JFFS2DUMP) += jffs2dump -MTD_TARGETS_$(BR2_PACKAGE_MTD_JFFS3DUMP) += jffs3dump -MTD_TARGETS_$(BR2_PACKAGE_MTD_SUMTOOL) += sumtool -MTD_TARGETS_$(BR2_PACKAGE_MTD_FTL_CHECK) += ftl_check -MTD_TARGETS_$(BR2_PACKAGE_MTD_FTL_FORMAT) += ftl_format -MTD_TARGETS_$(BR2_PACKAGE_MTD_NFTLDUMP) += nftldump -MTD_TARGETS_$(BR2_PACKAGE_MTD_NFTL_FORMAT) += nftl_format -MTD_TARGETS_$(BR2_PACKAGE_MTD_NANDDUMP) += nanddump -MTD_TARGETS_$(BR2_PACKAGE_MTD_NANDWRITE) += nandwrite -MTD_TARGETS_$(BR2_PACKAGE_MTD_MTD_DEBUG) += mtd_debug -MTD_TARGETS_$(BR2_PACKAGE_MTD_DOCFDISK) += docfdisk -MTD_TARGETS_$(BR2_PACKAGE_MTD_DOC_LOADBIOS) += doc_loadbios - -MTD_BUILD_TARGETS := $(addprefix $(MTD_DIR)/util/, $(MTD_TARGETS_y)) - -$(MTD_BUILD_TARGETS): $(MTD_DIR)/.unpacked - $(MAKE) $(TARGET_CONFIGURE_OPTS) \ - CFLAGS+="-I$(MTD_DIR)/include" \ - CFLAGS+="-I$(LINUX_HEADERS_DIR)/include" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util - -MTD_TARGETS := $(addprefix $(TARGET_DIR)/usr/sbin/, $(MTD_TARGETS_y)) - -$(MTD_TARGETS): $(TARGET_DIR)/usr/sbin/% : $(MTD_DIR)/util/% - mkdir -p $(TARGET_DIR)/usr/sbin - cp -f $< $@ - $(STRIPCMD) $@ -ifneq ($(BR2_PACKAGE_MTD_FLASHCP),) - -ln -sf flashcp $(TARGET_DIR)/usr/sbin/fcp -endif -ifneq ($(BR2_PACKAGE_MTD_ERASE),) - -ln -sf flash_erase $(TARGET_DIR)/usr/sbin/erase - -ln -sf flash_eraseall $(TARGET_DIR)/usr/sbin/eraseall -endif - -mtd: zlib $(MTD_TARGETS) - -mtd-source: $(DL_DIR)/$(MTD_SOURCE) - -mtd-clean: - -$(MAKE) -C $(MTD_DIR) clean -ifneq ($(BR2_PACKAGE_MTD_FLASHCP),) - -rm -f $(MTD_TARGETS) $(TARGET_DIR)/usr/sbin/fcp -endif -ifneq ($(BR2_PACKAGE_MTD_ERASE),) - -rm -f $(MTD_TARGETS) $(TARGET_DIR)/usr/sbin/erase - -rm -f $(MTD_TARGETS) $(TARGET_DIR)/usr/sbin/eraseall -endif - -mtd-dirclean: - rm -rf $(MTD_DIR) - - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_MTD),y) -TARGETS+=mtd -endif diff --git a/package/mtd/20050122/mtd.patch b/package/mtd/20050122/mtd.patch deleted file mode 100644 index 40d6865cc..000000000 --- a/package/mtd/20050122/mtd.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -ur mtd-20050122.orig/util/flash_eraseall.c mtd-20050122.orig-patched/util/flash_eraseall.c ---- mtd-20050122.orig/util/flash_eraseall.c 2004-12-09 17:00:52.000000000 -0600 -+++ mtd-20050122.orig-patched/util/flash_eraseall.c 2007-01-13 22:56:51.864233154 -0600 -@@ -54,7 +54,7 @@ - static void display_help (void); - static void display_version (void); - static struct jffs2_unknown_node cleanmarker; --static int target_endian = __BYTE_ORDER; -+int target_endian = __BYTE_ORDER; - - int main (int argc, char *argv[]) - { -@@ -134,7 +134,7 @@ - if (!quiet) - printf ("\nSkipping bad block at 0x%08x\n", erase.start); - continue; -- } else if (ret == -EOPNOTSUPP) { -+ } else if (errno == EOPNOTSUPP) { - fprintf(stderr, "%s: %s: Bad block check not available\n", exe_name, mtd_device); - bbtest = 0; - } else if (ret < 0) { -diff -ur mtd-20050122.orig/util/mkfs.jffs2.c mtd-20050122.orig-patched/util/mkfs.jffs2.c ---- mtd-20050122.orig/util/mkfs.jffs2.c 2004-11-26 17:00:13.000000000 -0600 -+++ mtd-20050122.orig-patched/util/mkfs.jffs2.c 2007-01-13 22:55:53.627687214 -0600 -@@ -101,7 +101,7 @@ - static int squash_uids = 0; - static int squash_perms = 0; - static int fake_times = 0; --static int target_endian = __BYTE_ORDER; -+int target_endian = __BYTE_ORDER; - static const char *const app_name = "mkfs.jffs2"; - static const char *const memory_exhausted = "memory exhausted"; - -diff -ur mtd-20050122.orig/util/sumtool.c mtd-20050122.orig-patched/util/sumtool.c ---- mtd-20050122.orig/util/sumtool.c 2005-01-05 17:00:16.000000000 -0600 -+++ mtd-20050122.orig-patched/util/sumtool.c 2007-01-13 22:56:05.528616125 -0600 -@@ -68,7 +68,7 @@ - static int cleanmarker_size = sizeof(cleanmarker); - static const char *short_options = "o:i:e:hvVblnc:p"; - static int erase_block_size = 65536; --static int target_endian = __BYTE_ORDER; -+int target_endian = __BYTE_ORDER; - static int out_fd = -1; - static int in_fd = -1; - diff --git a/package/mtd/20061007/mtd-20061007-mkfs.jffs2.patch b/package/mtd/20061007/mtd-20061007-mkfs.jffs2.patch deleted file mode 100644 index 3c4d6bad6..000000000 --- a/package/mtd/20061007/mtd-20061007-mkfs.jffs2.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -urN mtd-20061007.orig-0rig/mkfs.jffs2.c mtd-20061007.orig/mkfs.jffs2.c ---- mtd-20061007.orig-0rig/mkfs.jffs2.c 2006-10-07 17:33:37.000000000 +0200 -+++ mtd-20061007.orig/mkfs.jffs2.c 2007-04-09 02:16:06.000000000 +0200 -@@ -240,6 +242,15 @@ - { - struct filesystem_entry *e = dir; - -+ if((strlen(fullname) == 1) && (fullname[0] == '/')) { -+ /* Looking for "root" */ -+ if(e != NULL) { -+ if((strlen(e->fullname) == 1) && (e->fullname[0] == '/')) { -+ return (e); -+ } -+ } -+ } -+ - if (S_ISDIR(dir->sb.st_mode)) { - e = dir->files; - } diff --git a/package/mtd/20061007/mtd.mk b/package/mtd/20061007/mtd.mk deleted file mode 100644 index dfd348579..000000000 --- a/package/mtd/20061007/mtd.mk +++ /dev/null @@ -1,120 +0,0 @@ -############################################################# -# -# mtd provides jffs2 utilities -# -############################################################# -MTD_SOURCE=mtd_20061007.orig.tar.gz -MTD_SITE=$(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mtd -MTD_HOST_DIR := $(TOOL_BUILD_DIR)/mtd_orig -MTD_DIR:=$(BUILD_DIR)/mtd_orig -MTD_CAT:=$(ZCAT) -MTD_DATE:=20061007 - -############################################################# -# -# Build mkfs.jffs2 and sumtool for use on the local host system if -# needed by target/jffs2root. -# -############################################################# -MKFS_JFFS2 := $(MTD_HOST_DIR)/mkfs.jffs2 -SUMTOOL := $(MTD_HOST_DIR)/sumtool - -$(DL_DIR)/$(MTD_SOURCE): - $(call DOWNLOAD,$(MTD_SITE),$(MTD_SOURCE)) - -$(MTD_HOST_DIR)/.unpacked: $(DL_DIR)/$(MTD_SOURCE) - $(MTD_CAT) $(DL_DIR)/$(MTD_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - - mv $(TOOL_BUILD_DIR)/$(shell tar tzf $(DL_DIR)/$(MTD_SOURCE) | head -n 1 \ - | xargs basename) $(MTD_HOST_DIR) - toolchain/patch-kernel.sh $(MTD_HOST_DIR) \ - package/mtd/$(MTD_DATE) \*.patch - touch $@ - -$(MKFS_JFFS2): $(MTD_HOST_DIR)/.unpacked - CC="$(HOSTCC)" CROSS= CFLAGS=-I$(LINUX_HEADERS_DIR)/include \ - $(MAKE) LINUXDIR=$(LINUX_DIR) -C $(MTD_HOST_DIR) mkfs.jffs2 - -$(SUMTOOL): $(MTD_HOST_DIR)/.unpacked - CC="$(HOSTCC)" CROSS= CFLAGS=-I$(LINUX_HEADERS_DIR)/include \ - $(MAKE) LINUXDIR=$(LINUX_DIR) -C $(MTD_HOST_DIR) sumtool - -mtd-host: $(MKFS_JFFS2) $(SUMTOOL) - -mtd-host-source: $(DL_DIR)/$(MTD_SOURCE) - -mtd-host-clean: - -$(MAKE) -C $(MTD_HOST_DIR) clean - -mtd-host-dirclean: - rm -rf $(MTD_HOST_DIR) - -############################################################# -# -# build mtd for use on the target system -# -############################################################# -$(MTD_DIR)/.unpacked: $(DL_DIR)/$(MTD_SOURCE) - $(MTD_CAT) $(DL_DIR)/$(MTD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - - mv $(BUILD_DIR)/$(shell tar tzf $(DL_DIR)/$(MTD_SOURCE) \ - | head -n 1 | xargs basename) $(MTD_DIR) - toolchain/patch-kernel.sh $(MTD_DIR) \ - package/mtd/$(MTD_DATE) \*.patch - touch $@ - -MTD_TARGETS_n := -MTD_TARGETS_y := - -MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_ERASE) += flash_erase -MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_ERASEALL) += flash_eraseall -MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_INFO) += flash_info -MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_LOCK) += flash_lock -MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_UNLOCK) += flash_unlock -MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASHCP) += flashcp -MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSJFFS2) += mkfs.jffs2 -MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSJFFS) += mkfs.jffs -MTD_TARGETS_$(BR2_PACKAGE_MTD_JFFS2DUMP) += jffs2dump -#MTD_TARGETS_$(BR2_PACKAGE_MTD_JFFS3DUMP) += jffs3dump -MTD_TARGETS_$(BR2_PACKAGE_MTD_SUMTOOL) += sumtool -MTD_TARGETS_$(BR2_PACKAGE_MTD_FTL_CHECK) += ftl_check -MTD_TARGETS_$(BR2_PACKAGE_MTD_FTL_FORMAT) += ftl_format -MTD_TARGETS_$(BR2_PACKAGE_MTD_NFTLDUMP) += nftldump -MTD_TARGETS_$(BR2_PACKAGE_MTD_NFTL_FORMAT) += nftl_format -MTD_TARGETS_$(BR2_PACKAGE_MTD_NANDDUMP) += nanddump -MTD_TARGETS_$(BR2_PACKAGE_MTD_NANDWRITE) += nandwrite -MTD_TARGETS_$(BR2_PACKAGE_MTD_MTD_DEBUG) += mtd_debug -MTD_TARGETS_$(BR2_PACKAGE_MTD_DOCFDISK) += docfdisk -MTD_TARGETS_$(BR2_PACKAGE_MTD_DOC_LOADBIOS) += doc_loadbios - -MTD_BUILD_TARGETS := $(addprefix $(MTD_DIR)/, $(MTD_TARGETS_y)) - -$(MTD_BUILD_TARGETS): $(MTD_DIR)/.unpacked - mkdir -p $(TARGET_DIR)/usr/sbin - $(MAKE) CFLAGS="-I. -I./include -I$(LINUX_HEADERS_DIR)/include -I$(STAGING_DIR)/usr/include $(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - CROSS= CC=$(TARGET_CC) LINUXDIR=$(LINUX26_DIR) WITHOUT_XATTR=1 -C $(MTD_DIR) - -MTD_TARGETS := $(addprefix $(TARGET_DIR)/usr/sbin/, $(MTD_TARGETS_y)) - -$(MTD_TARGETS): $(TARGET_DIR)/usr/sbin/% : $(MTD_DIR)/% - cp -f $< $@ - $(STRIPCMD) $@ - -mtd: zlib $(MTD_TARGETS) - -mtd-source: $(DL_DIR)/$(MTD_SOURCE) - -mtd-clean: - -$(MAKE) -C $(MTD_DIR) clean - -mtd-dirclean: - rm -rf $(MTD_DIR) - - -############################################################# -# -# Toplevel Makefile options -# -############################################################# -ifeq ($(BR2_PACKAGE_MTD),y) -TARGETS+=mtd -endif diff --git a/package/mtd/20061007/mtd_20061007.patch b/package/mtd/20061007/mtd_20061007.patch deleted file mode 100644 index 23654fea6..000000000 --- a/package/mtd/20061007/mtd_20061007.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff -urN mtd-20061007.orig/Makefile mtd-20061007.orig.patch/Makefile ---- mtd-20061007.orig/Makefile 2006-10-07 16:33:37.000000000 +0100 -+++ mtd-20061007.orig.patch/Makefile 2007-01-09 14:06:22.000000000 +0000 -@@ -9,12 +9,10 @@ - #CROSS=arm-linux- - CC := $(CROSS)gcc - CFLAGS := -I./include -O2 -Wall -+BUILDDIR := . - --ifeq ($(origin CROSS),undefined) -- BUILDDIR := . --else --# Remove the trailing slash to make the directory name -- BUILDDIR := $(CROSS:-=) -+ifeq ($(WITHOUT_XATTR), 1) -+ CFLAGS += -DWITHOUT_XATTR - endif - - RAWTARGETS = ftl_format flash_erase flash_eraseall nanddump doc_loadbios \ -diff -urN mtd-20061007.orig/mkfs.jffs2.c mtd-20061007.orig.patch/mkfs.jffs2.c ---- mtd-20061007.orig/mkfs.jffs2.c 2006-10-07 16:33:37.000000000 +0100 -+++ mtd-20061007.orig.patch/mkfs.jffs2.c 2007-01-09 11:18:33.000000000 +0000 -@@ -64,8 +64,10 @@ - #include <ctype.h> - #include <time.h> - #include <getopt.h> --#include <sys/xattr.h> --#include <sys/acl.h> -+#ifndef WITHOUT_XATTR -+ #include <sys/xattr.h> -+ #include <sys/acl.h> -+#endif - #include <byteswap.h> - #define crc32 __complete_crap - #include <zlib.h> -@@ -1030,6 +1032,7 @@ - padword(); - } - -+#ifndef WITHOUT_XATTR - typedef struct xattr_entry { - struct xattr_entry *next; - uint32_t xid; -@@ -1258,6 +1261,9 @@ - padword(); - } - } -+#else /* WITHOUT_XATTR */ -+#define write_xattr_entry(x) -+#endif - - static void recursive_populate_directory(struct filesystem_entry *dir) - { -@@ -1416,9 +1422,11 @@ - {"test-compression", 0, NULL, 't'}, - {"compressor-priority", 1, NULL, 'y'}, - {"incremental", 1, NULL, 'i'}, -+#ifndef WITHOUT_XATTR - {"with-xattr", 0, NULL, 1000 }, - {"with-selinux", 0, NULL, 1001 }, - {"with-posix-acl", 0, NULL, 1002 }, -+#endif - {NULL, 0, NULL, 0} - }; - -@@ -1451,9 +1459,11 @@ - " -q, --squash Squash permissions and owners making all files be owned by root\n" - " -U, --squash-uids Squash owners making all files be owned by root\n" - " -P, --squash-perms Squash permissions on all files\n" -+#ifndef WITHOUT_XATTR - " --with-xattr stuff all xattr entries into image\n" - " --with-selinux stuff only SELinux Labels into jffs2 image\n" - " --with-posix-acl stuff only POSIX ACL entries into jffs2 image\n" -+#endif - " -h, --help Display this help text\n" - " -v, --verbose Verbose operation\n" - " -V, --version Display version information\n" -@@ -1772,6 +1782,7 @@ - perror_msg_and_die("cannot open (incremental) file"); - } - break; -+#ifndef WITHOUT_XATTR - case 1000: /* --with-xattr */ - enable_xattr |= (1 << JFFS2_XPREFIX_USER) - | (1 << JFFS2_XPREFIX_SECURITY) -@@ -1786,6 +1797,7 @@ - enable_xattr |= (1 << JFFS2_XPREFIX_ACL_ACCESS) - | (1 << JFFS2_XPREFIX_ACL_DEFAULT); - break; -+#endif - } - } - if (out_fd == -1) { diff --git a/package/mtd/20061007/mtd_acl.patch b/package/mtd/20061007/mtd_acl.patch deleted file mode 100644 index 953786eb1..000000000 --- a/package/mtd/20061007/mtd_acl.patch +++ /dev/null @@ -1,48 +0,0 @@ -Author: Ulf Samuelsson -Date: 2007-01-25 - -Log: -Patch adding "sys/acl.h" needed to compile mtd. - -Modified: - package/mtd/mtd_acl.patch - -Changeset - package/mtd/mtd_acl.patch - -diff -urN mtd_orig-0rig/include/sys/acl.h mtd_orig/include/sys/acl.h ---- mtd_orig-0rig/include/sys/acl.h 1970-01-01 01:00:00.000000000 +0100 -+++ mtd_orig/include/sys/acl.h 2007-01-17 20:11:22.000000000 +0100 -@@ -0,0 +1,32 @@ -+/* -+ File: linux/posix_acl.h -+ -+ (C) 2002 Andreas Gruenbacher, <a.gruenbacher@computer.org> -+*/ -+ -+ -+#ifndef __LINUX_POSIX_ACL_H -+#define __LINUX_POSIX_ACL_H -+ -+#define ACL_UNDEFINED_ID (-1) -+ -+/* a_type field in acl_user_posix_entry_t */ -+#define ACL_TYPE_ACCESS (0x8000) -+#define ACL_TYPE_DEFAULT (0x4000) -+ -+/* e_tag entry in struct posix_acl_entry */ -+#define ACL_USER_OBJ (0x01) -+#define ACL_USER (0x02) -+#define ACL_GROUP_OBJ (0x04) -+#define ACL_GROUP (0x08) -+#define ACL_MASK (0x10) -+#define ACL_OTHER (0x20) -+ -+/* permissions in the e_perm field */ -+#define ACL_READ (0x04) -+#define ACL_WRITE (0x02) -+#define ACL_EXECUTE (0x01) -+//#define ACL_ADD (0x08) -+//#define ACL_DELETE (0x10) -+ -+#endif /* __LINUX_POSIX_ACL_H */ diff --git a/package/mtd/Config.in b/package/mtd/Config.in index 2dd41bebb..125175f39 100644 --- a/package/mtd/Config.in +++ b/package/mtd/Config.in @@ -15,18 +15,6 @@ config BR2_PACKAGE_MTD_UTILS help Build mtd/jffs utilities with Dataflash support -config BR2_PACKAGE_MTD_20061007 - bool "Use MTD snapshot from 20061007" - depends on BR2_DEPRECATED || BR2_RECENT - help - Build mtd/jffs utilities with Dataflash support - -config BR2_PACKAGE_MTD_20050122 - bool "Use MTD snapshot from 20050122" - depends on BR2_DEPRECATED - help - Use the stable release. - config BR2_PACKAGE_MTD_UTILS_GIT bool "Use MTD-utils from GIT" help diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk index c7774fdb1..f81ea1888 100644 --- a/package/mtd/mtd.mk +++ b/package/mtd/mtd.mk @@ -1,12 +1,6 @@ ifeq ($(BR2_PACKAGE_MTD_UTILS),y) include package/mtd/mtd-utils/mtd.mk endif -ifeq ($(BR2_PACKAGE_MTD_20061007),y) -include package/mtd/20061007/mtd.mk -endif -ifeq ($(BR2_PACKAGE_MTD_20050122),y) -include package/mtd/20050122/mtd.mk -endif ifeq ($(BR2_PACKAGE_MTD_UTILS_GIT),y) include package/mtd/mtd-utils.git/mtd.mk endif diff --git a/package/multimedia/Config.in b/package/multimedia/Config.in index 02a35b827..c7160a663 100644 --- a/package/multimedia/Config.in +++ b/package/multimedia/Config.in @@ -11,6 +11,7 @@ source "package/multimedia/gst-plugins-bad/Config.in" source "package/multimedia/gst-plugins-ugly/Config.in" source "package/multimedia/libid3tag/Config.in" source "package/multimedia/libmad/Config.in" +source "package/multimedia/libmms/Config.in" source "package/multimedia/libmpd/Config.in" source "package/multimedia/libogg/Config.in" source "package/multimedia/libsndfile/Config.in" diff --git a/package/multimedia/gst-plugins-base/gst-plugins-base.mk b/package/multimedia/gst-plugins-base/gst-plugins-base.mk index 88c68e15d..63f23cd5c 100644 --- a/package/multimedia/gst-plugins-base/gst-plugins-base.mk +++ b/package/multimedia/gst-plugins-base/gst-plugins-base.mk @@ -9,6 +9,11 @@ GST_PLUGINS_BASE_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-base GST_PLUGINS_BASE_INSTALL_STAGING = YES GST_PLUGINS_BASE_LIBTOOL_PATCH = NO +# freetype is only used by examples, but if it is not found +# and the host has a freetype-config script, then the host +# include dirs are added to the search path causing trouble +GST_PLUGINS_BASE_CONF_ENV = FT2_CONFIG=/bin/false + GST_PLUGINS_BASE_CONF_OPT = \ $(DISABLE_NLS) \ $(DISABLE_LARGEFILE) \ diff --git a/package/multimedia/gst-plugins-good/gst-plugins-good.mk b/package/multimedia/gst-plugins-good/gst-plugins-good.mk index 75d25c88d..bd0cb7808 100644 --- a/package/multimedia/gst-plugins-good/gst-plugins-good.mk +++ b/package/multimedia/gst-plugins-good/gst-plugins-good.mk @@ -20,11 +20,12 @@ GST_PLUGINS_GOOD_CONF_OPT = \ --disable-x \ --disable-xshm \ --disable-xvideo \ + --disable-aalib \ --disable-aalibtest \ + --disable-esd \ --disable-esdtest \ --disable-shout2 \ - --disable-shout2test \ - --disable-esd + --disable-shout2test GST_PLUGINS_GOOD_DEPENDENCIES = gstreamer gst-plugins-base diff --git a/package/multimedia/libmms/Config.in b/package/multimedia/libmms/Config.in new file mode 100644 index 000000000..02055c4c2 --- /dev/null +++ b/package/multimedia/libmms/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBMMS + bool "libmms" + select BR2_PACKAGE_LIBGLIB2 + help + LibMMS is a common library for parsing mms:// and mmsh:// + type network streams. These are commonly used to stream + Windows Media Video content over the web. LibMMS itself is + only for receiving MMS stream, it doesn't handle sending at + all. + + http://launchpad.net/libmms diff --git a/package/multimedia/libmms/libmms.mk b/package/multimedia/libmms/libmms.mk new file mode 100644 index 000000000..a866fadd6 --- /dev/null +++ b/package/multimedia/libmms/libmms.mk @@ -0,0 +1,17 @@ +############################################################# +# +# libmms +# +############################################################# +LIBMMS_VERSION = 0.4 +LIBMMS_SOURCE = libmms-$(LIBMMS_VERSION).tar.gz +LIBMMS_SITE = http://launchpad.net/libmms/trunk/$(LIBMMS_VERSION)/+download + +LIBMMS_AUTORECONF = NO +LIBMMS_LIBTOOL_PATCH = NO +LIBMMS_INSTALL_STAGING = YES +LIBMMS_INSTALL_TARGET = YES + +LIBMMS_DEPENDENCIES = uclibc host-pkgconfig libglib2 + +$(eval $(call AUTOTARGETS,package/multimedia,libmms)) diff --git a/package/multimedia/libvorbis/libvorbis.mk b/package/multimedia/libvorbis/libvorbis.mk index e7399e038..a8817268f 100644 --- a/package/multimedia/libvorbis/libvorbis.mk +++ b/package/multimedia/libvorbis/libvorbis.mk @@ -4,6 +4,8 @@ # ############################################################# +ifneq ($(BR2_PACKAGE_LIBVORBIS_TREMOR),y) + LIBVORBIS_VERSION = 1.2.3 LIBVORBIS_SOURCE = libvorbis-$(LIBVORBIS_VERSION).tar.gz LIBVORBIS_SITE = http://downloads.xiph.org/releases/vorbis/$(LIBVORBIS-SOURCE) @@ -17,6 +19,7 @@ LIBVORBIS_DEPENDENCIES = uclibc host-pkgconfig libogg $(eval $(call AUTOTARGETS,package/multimedia,libvorbis)) +else ############################################################ # @@ -67,7 +70,11 @@ $(TREMOR_DIR)/.libs: $(TREMOR_DIR)/.configured $(MAKE) CC=$(TARGET_CC) -C $(TREMOR_DIR) touch $@ -$(TARGET_DIR)/usr/lib/tremor.so: $(TREMOR_DIR)/.libs +$(STAGING_DIR)/usr/lib/tremor.so: $(TREMOR_DIR)/.libs + $(MAKE) prefix=$(STAGING_DIR)/usr -C $(TREMOR_DIR) install + touch $@ + +$(TARGET_DIR)/usr/lib/tremor.so: $(STAGING_DIR)/usr/lib/tremor.so $(MAKE) prefix=$(TARGET_DIR)/usr -C $(TREMOR_DIR) \ $(if $(BR2_STRIP_none),install,install-strip) touch $@ @@ -76,15 +83,15 @@ $(TARGET_DIR)/usr/lib/tremor.a: $(TARGET_DIR)/usr/lib/tremor.so cp -dpf $(TREMOR_DIR)/lib/tremor.a $(TARGET_DIR)/usr/lib/ touch $@ -tremor: uclibc host-pkgconfig host-autoconf host-automake libogg $(TARGET_DIR)/usr/lib/tremor.so +tremor libvorbis: uclibc host-pkgconfig host-autoconf host-automake libogg $(TARGET_DIR)/usr/lib/tremor.so -tremor-source: $(DL_DIR)/$(TREMOR_SOURCE) +tremor-source libvorbis-source: $(DL_DIR)/$(TREMOR_SOURCE) -tremor-clean: +tremor-clean libvorbis-clean: $(MAKE) prefix=$(STAGING_DIR)/usr -C $(TREMOR_DIR) uninstall -$(MAKE) -C $(TREMOR_DIR) clean -tremor-dirclean: +tremor-dirclean libvorbis-dirclean: rm -rf $(TREMOR_DIR) @@ -93,9 +100,6 @@ tremor-dirclean: # Toplevel Makefile options # ############################################################ -ifeq ($(BR2_PACKAGE_LIBVORBIS),y) -ifeq ($(BR2_PACKAGE_LIBVORBIS_TREMOR),y) TARGETS+=tremor -endif -TARGETS+=libvorbis + endif diff --git a/package/qtopia4/Config.in b/package/qtopia4/Config.in index 052431257..457b9399a 100644 --- a/package/qtopia4/Config.in +++ b/package/qtopia4/Config.in @@ -310,6 +310,12 @@ config BR2_PACKAGE_QTOPIA4_WEBKIT Build the WebKit module. If unsure, say n. +config BR2_PACKAGE_QTOPIA4_STL + bool "STL support" + help + Compile STL support. + If unsure, say n. + config BR2_PACKAGE_QTOPIA4_OPENSSL bool "Enable OpenSSL support" depends on BR2_PACKAGE_QTOPIA4_NETWORK diff --git a/package/qtopia4/qtopia4.mk b/package/qtopia4/qtopia4.mk index f7196f476..0d2b980e9 100644 --- a/package/qtopia4/qtopia4.mk +++ b/package/qtopia4/qtopia4.mk @@ -323,6 +323,12 @@ else QTOPIA4_CONFIGURE+= -no-webkit endif +ifeq ($(BR2_PACKAGE_QTOPIA4_STL),y) +QTOPIA4_CONFIGURE+= -stl +else +QTOPIA4_CONFIGURE+= -no-stl +endif + QTOPIA4_CONFIGURE:=$(strip $(subst ",, $(QTOPIA4_CONFIGURE))) #")) BR2_PACKAGE_QTOPIA4_EMB_PLATFORM:=$(strip $(subst ",, $(BR2_PACKAGE_QTOPIA4_EMB_PLATFORM))) @@ -460,7 +466,6 @@ endif -embedded $(BR2_PACKAGE_QTOPIA4_EMB_PLATFORM) \ $(QTOPIA4_QCONFIG_COMMAND) \ $(QTOPIA4_CONFIGURE) \ - -no-stl \ -no-cups \ -no-nis \ -no-accessibility \ diff --git a/package/sawman/sawman.mk b/package/sawman/sawman.mk index 1e525ace3..76e599a2b 100644 --- a/package/sawman/sawman.mk +++ b/package/sawman/sawman.mk @@ -3,7 +3,7 @@ # SAWMAN # ############################################################# -SAWMAN_VERSION:=1.2.0-rc1 +SAWMAN_VERSION:=1.4.1 SAWMAN_SOURCE:=SaWMan-$(SAWMAN_VERSION).tar.gz SAWMAN_SITE:=http://www.directfb.org/downloads/Extras SAWMAN_INSTALL_STAGING = YES diff --git a/package/sdl_gfx/Config.in b/package/sdl_gfx/Config.in new file mode 100644 index 000000000..4910b2d64 --- /dev/null +++ b/package/sdl_gfx/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_SDL_GFX + bool "SDL_gfx" + depends on BR2_PACKAGE_SDL + help + The SDL_gfx library is an extension to the SDL library which + provides basic antialiased drawing routines such as lines, + circles or polygons, an interpolating rotozoomer for SDL + surfaces, framerate control and MMX image filters. + + http://www.ferzkopp.net/joomla/content/view/19/14/ diff --git a/package/sdl_gfx/sdl_gfx.mk b/package/sdl_gfx/sdl_gfx.mk new file mode 100644 index 000000000..bd4e3f154 --- /dev/null +++ b/package/sdl_gfx/sdl_gfx.mk @@ -0,0 +1,26 @@ +############################################################# +# +# SDL_gfx addon for SDL +# +############################################################# +SDL_GFX_VERSION:=2.0.19 +SDL_GFX_SOURCE:=SDL_gfx-$(SDL_GFX_VERSION).tar.gz +SDL_GFX_SITE:=http://www.ferzkopp.net/Software/SDL_gfx-2.0/ +SDL_GFX_LIBTOOL_PATCH:=NO +SDL_GFX_INSTALL_STAGING:=YES +SDL_GFX_INSTALL_TARGET:=YES + +SDL_GFX_DEPENDENCIES:=sdl + +SDL_GFX_CONF_OPT:=--with-sdl-prefix=$(STAGING_DIR)/usr \ + --disable-sdltest \ + --enable-static + +# enable mmx for newer x86's +ifeq ($(BR2_i386)$(BR2_x86_i386)$(BR2_x86_i486)$(BR2_x86_i586)$(BR2_x86_pentiumpro)$(BR2_x86_geode),y) +SDL_GFX_CONF_OPT += --enable-mmx +else +SDL_GFX_CONF_OPT += --disable-mmx +endif + +$(eval $(call AUTOTARGETS,package,sdl_gfx)) diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk index 2cceeb3c1..eaa6ab42e 100644 --- a/package/wpa_supplicant/wpa_supplicant.mk +++ b/package/wpa_supplicant/wpa_supplicant.mk @@ -13,10 +13,14 @@ WPA_SUPPLICANT_DEPENDENCIES = uclibc WPA_SUPPLICANT_CONFIG = $(WPA_SUPPLICANT_DIR)/wpa_supplicant/.config WPA_SUPPLICANT_SUBDIR = wpa_supplicant WPA_SUPPLICANT_TARGET_BINS = wpa_cli wpa_supplicant wpa_passphrase +WPA_SUPPLICANT_DBUS_SERVICE = fi.epitest.hostap.WPASupplicant ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_OPENSSL),y) WPA_SUPPLICANT_DEPENDENCIES += openssl endif +ifeq ($(BR2_PACKAGE_DBUS),y) + WPA_SUPPLICANT_DEPENDENCIES += dbus +endif $(eval $(call AUTOTARGETS,package,wpa_supplicant)) @@ -36,6 +40,9 @@ else echo "CONFIG_INTERNAL_LIBTOMMATH=y" >>$(WPA_SUPPLICANT_CONFIG) endif endif +ifeq ($(BR2_PACKAGE_DBUS),y) + echo "CONFIG_CTRL_IFACE_DBUS=y" >>$(WPA_SUPPLICANT_CONFIG) +endif touch $@ $(WPA_SUPPLICANT_HOOK_POST_INSTALL): @@ -45,9 +52,19 @@ endif ifneq ($(BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE),y) rm -f $(TARGET_DIR)/usr/sbin/wpa_passphrase endif +ifeq ($(BR2_PACKAGE_DBUS),y) + $(INSTALL) -D \ + $(WPA_SUPPLICANT_DIR)/wpa_supplicant/dbus-wpa_supplicant.conf \ + $(TARGET_DIR)/etc/dbus-1/system.d/wpa_supplicant.conf + $(INSTALL) -D \ + $(WPA_SUPPLICANT_DIR)/wpa_supplicant/dbus-wpa_supplicant.service \ + $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_SERVICE).service +endif $(WPA_SUPPLICANT_TARGET_UNINSTALL): $(call MESSAGE,"Uninstalling") rm -f $(addprefix $(TARGET_DIR)/usr/sbin/, $(WPA_SUPPLICANT_TARGET_BINS)) + rm -f $(TARGET_DIR)/etc/dbus-1/system.d/wpa_supplicant.conf + rm -f $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_SERVICE).service rm -f $(WPA_SUPPLICANT_TARGET_INSTALL_TARGET) $(WPA_SUPPLICANT_HOOK_POST_INSTALL) diff --git a/package/x11r7/mesa3d/mesa3d.mk b/package/x11r7/mesa3d/mesa3d.mk index 644c1bcf2..945765f9c 100644 --- a/package/x11r7/mesa3d/mesa3d.mk +++ b/package/x11r7/mesa3d/mesa3d.mk @@ -72,7 +72,7 @@ $(MESA3D_DIR)/.installed: $(MESA3D_DIR)/.built rm -Rf $(TARGET_DIR)/usr/include/GL touch $@ -mesa3d-depends: xproto_glproto xproto_xf86vidmodeproto xlib_libXxf86vm xlib_libXmu xlib_libXdamage libdrm xlib_libpciaccess +mesa3d-depends: xproto_glproto xproto_xf86vidmodeproto xlib_libXxf86vm xlib_libXmu xlib_libXdamage libdrm xlib_libpciaccess host-makedepend mesa3d-source: $(DL_DIR)/$(MESA3D_SOURCE) mesa3d-configure: $(MESA3D_DIR)/.configured mesa3d-build: $(MESA3D_DIR)/.built diff --git a/package/x11r7/xproto_xproto/xproto_xproto.mk b/package/x11r7/xproto_xproto/xproto_xproto.mk index 9d4faf4f6..d46743e09 100644 --- a/package/x11r7/xproto_xproto/xproto_xproto.mk +++ b/package/x11r7/xproto_xproto/xproto_xproto.mk @@ -12,3 +12,46 @@ XPROTO_XPROTO_INSTALL_STAGING = YES XPROTO_XPROTO_INSTALL_TARGET = NO $(eval $(call AUTOTARGETS,package/x11r7,xproto_xproto)) + +# xproto_xproto for the host +XPROTO_XPROTO_HOST_DIR:=$(BUILD_DIR)/xproto_xproto-$(XPROTO_XPROTO_VERSION)-host + +$(DL_DIR)/$(XPROTO_XPROTO_SOURCE): + $(call DOWNLOAD,$(XPROTO_XPROTO_SITE),$(XPROTO_XPROTO_SOURCE)) + +$(STAMP_DIR)/host_xproto_xproto_unpacked: $(DL_DIR)/$(XPROTO_XPROTO_SOURCE) + mkdir -p $(XPROTO_XPROTO_HOST_DIR) + $(INFLATE$(suffix $(XPROTO_XPROTO_SOURCE))) $< | \ + $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(XPROTO_XPROTO_HOST_DIR) $(TAR_OPTIONS) - + touch $@ + +$(STAMP_DIR)/host_xproto_xproto_configured: $(STAMP_DIR)/host_xproto_xproto_unpacked + (cd $(XPROTO_XPROTO_HOST_DIR); rm -rf config.cache; \ + $(HOST_CONFIGURE_OPTS) \ + CFLAGS="$(HOST_CFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" \ + ./configure \ + --prefix="$(HOST_DIR)/usr" \ + --sysconfdir="$(HOST_DIR)/etc" \ + ) + touch $@ + +$(STAMP_DIR)/host_xproto_xproto_compiled: $(STAMP_DIR)/host_xproto_xproto_configured + $(HOST_MAKE_ENV) $(MAKE) -C $(XPROTO_XPROTO_HOST_DIR) + touch $@ + +$(STAMP_DIR)/host_xproto_xproto_installed: $(STAMP_DIR)/host_xproto_xproto_compiled + $(MAKE) -C $(XPROTO_XPROTO_HOST_DIR) install + touch $@ + +host-xproto_xproto: $(STAMP_DIR)/host_xproto_xproto_installed + +host-xproto_xproto-source: xproto_xproto-source + +host-xproto_xproto-clean: + rm -f $(addprefix $(STAMP_DIR)/host_xproto_xproto_,unpacked configured compiled installed) + -$(MAKE) -C $(XPROTO_XPROTO_HOST_DIR) uninstall + -$(MAKE) -C $(XPROTO_XPROTO_HOST_DIR) clean + +host-xproto_xproto-dirclean: + rm -rf $(XPROTO_XPROTO_HOST_DIR) diff --git a/package/x11r7/xutil_makedepend/xutil_makedepend.mk b/package/x11r7/xutil_makedepend/xutil_makedepend.mk index b69878386..88754d8a7 100644 --- a/package/x11r7/xutil_makedepend/xutil_makedepend.mk +++ b/package/x11r7/xutil_makedepend/xutil_makedepend.mk @@ -8,7 +8,50 @@ XUTIL_MAKEDEPEND_VERSION = 1.0.1 XUTIL_MAKEDEPEND_SOURCE = makedepend-$(XUTIL_MAKEDEPEND_VERSION).tar.bz2 XUTIL_MAKEDEPEND_SITE = http://xorg.freedesktop.org/releases/individual/util XUTIL_MAKEDEPEND_AUTORECONF = NO -XUTIL_MAKEDEPEND_INSTALL_STAGING = YES -XUTIL_MAKEDEPEND_INSTALL_TARGET = NO +XUTIL_MAKEDEPEND_INSTALL_STAGING = NO +XUTIL_MAKEDEPEND_INSTALL_TARGET = YES $(eval $(call AUTOTARGETS,package/x11r7,xutil_makedepend)) + +# makedepend for the host +MAKEDEPEND_HOST_DIR:=$(BUILD_DIR)/makedepend-$(XUTIL_MAKEDEPEND_VERSION)-host + +$(DL_DIR)/$(XUTIL_MAKEDEPEND_SOURCE): + $(call DOWNLOAD,$(XUTIL_MAKEDEPEND_SITE),$(XUTIL_MAKEDEPEND_SOURCE)) + +$(STAMP_DIR)/host_makedepend_unpacked: $(DL_DIR)/$(XUTIL_MAKEDEPEND_SOURCE) + mkdir -p $(MAKEDEPEND_HOST_DIR) + $(INFLATE$(suffix $(XUTIL_MAKEDEPEND_SOURCE))) $< | \ + $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(MAKEDEPEND_HOST_DIR) $(TAR_OPTIONS) - + touch $@ + +$(STAMP_DIR)/host_makedepend_configured: $(STAMP_DIR)/host_makedepend_unpacked $(STAMP_DIR)/host_xproto_xproto_installed + (cd $(MAKEDEPEND_HOST_DIR); rm -rf config.cache; \ + $(HOST_CONFIGURE_OPTS) \ + CFLAGS="$(HOST_CFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" \ + ./configure \ + --prefix="$(HOST_DIR)/usr" \ + --sysconfdir="$(HOST_DIR)/etc" \ + ) + touch $@ + +$(STAMP_DIR)/host_makedepend_compiled: $(STAMP_DIR)/host_makedepend_configured + $(HOST_MAKE_ENV) $(MAKE) -C $(MAKEDEPEND_HOST_DIR) + touch $@ + +$(STAMP_DIR)/host_makedepend_installed: $(STAMP_DIR)/host_makedepend_compiled + $(MAKE) -C $(MAKEDEPEND_HOST_DIR) install + touch $@ + +host-makedepend: $(STAMP_DIR)/host_makedepend_installed + +host-makedepend-source: makedepend-source + +host-makedepend-clean: + rm -f $(addprefix $(STAMP_DIR)/host_makedepend_,unpacked configured compiled installed) + -$(MAKE) -C $(MAKEDEPEND_HOST_DIR) uninstall + -$(MAKE) -C $(MAKEDEPEND_HOST_DIR) clean + +host-makedepend-dirclean: + rm -rf $(MAKEDEPEND_HOST_DIR) diff --git a/project/Makefile.in b/project/Makefile.in index 49aec141a..85c0eaeed 100644 --- a/project/Makefile.in +++ b/project/Makefile.in @@ -10,6 +10,9 @@ QUIET:=$(if $(findstring s,$(MAKEFLAGS)),-q,) # Strip off the annoying quoting ARCH:=$(strip $(subst ",, $(BR2_ARCH))) +ifeq ($(ARCH),xtensa) +ARCH:=$(ARCH)_$(strip $(subst ",,$(BR2_xtensa_core_name))) +endif #")) WGET:=$(strip $(subst ",, $(BR2_WGET))) $(SPIDER) $(QUIET) #")) diff --git a/target/Config.in.arch b/target/Config.in.arch index 611210e87..e63fc027a 100644 --- a/target/Config.in.arch +++ b/target/Config.in.arch @@ -43,6 +43,8 @@ config BR2_sparc64 bool "sparc64" config BR2_x86_64 bool "x86_64" +config BR2_xtensa + bool "xtensa" endchoice # @@ -396,6 +398,38 @@ endchoice choice prompt "Target Architecture Variant" + depends on BR2_xtensa + default BR2_xtensa_dc232b + help + Specific CPU variant to use + +config BR2_xtensa_custom + bool "Custom Xtensa processor configuration" +config BR2_xtensa_dc232a + bool "dc232a - Diamond 232L Standard Core Rev.A (LE)" +config BR2_xtensa_dc232b + bool "dc232b - Diamond 232L Standard Core Rev.B (LE)" +#config BR2_xtensa_s5000 +# bool "s5000 - Stretch S5000" +endchoice + +config BR2_xtensa_custom_name + string "Custom Xtensa processor configuration name" + depends on BR2_xtensa_custom + default "" + help + Name given to a custom Xtensa processor configuration. + This is used to select the correct overlay. + +config BR2_xtensa_core_name + string + default BR2_xtensa_custom_name if BR2_xtensa_custom + default "dc232a" if BR2_xtensa_dc232a + default "dc232b" if BR2_xtensa_dc232b +# default "s5000" if BR2_xtensa_s5000 + +choice + prompt "Target Architecture Variant" depends on BR2_powerpc default BR2_generic_powerpc help @@ -496,6 +530,7 @@ config BR2_ARCH default "x86_64" if BR2_x86_64_opteron default "x86_64" if BR2_x86_64_opteron_sse3 default "x86_64" if BR2_x86_64_barcelona + default "xtensa" if BR2_xtensa config BR2_ENDIAN diff --git a/target/Makefile.in b/target/Makefile.in index b1450413e..ff0f6b523 100644 --- a/target/Makefile.in +++ b/target/Makefile.in @@ -62,6 +62,7 @@ include target/generic/Makefile.in include target/device/Makefile.in include target/x86/Makefile.in include target/powerpc/Makefile.in +include target/xtensa/Makefile.in ifeq ($(BR2_TARGET_UBOOT),y) include target/u-boot/Makefile.in diff --git a/target/device/Config.in b/target/device/Config.in index 50d011fe8..ca569709b 100644 --- a/target/device/Config.in +++ b/target/device/Config.in @@ -10,6 +10,7 @@ source "target/device/Atmel/Config.in" source "target/device/KwikByte/Config.in" source "target/device/valka/Config.in" source "target/device/x86/Config.in" +source "target/device/xtensa/Config.in" # This must be last source "target/generic/Config.in" diff --git a/target/device/xtensa/Config.in b/target/device/xtensa/Config.in new file mode 100644 index 000000000..0d4408c23 --- /dev/null +++ b/target/device/xtensa/Config.in @@ -0,0 +1,21 @@ +menuconfig BR2_TARGET_XTENSA + bool "Device and Board Support for Xtensa and Diamond cores" + depends on BR2_xtensa + default y + help + Lists development boards with support for the Xtensa architecture. + +if BR2_TARGET_XTENSA +comment "Tensilica Xtensa/Diamond based Device Support" + depends on BR2_xtensa + +config BR2_TARGET_XTENSA_XTAV60 + bool "XTAV60/200 board (Avnet LX60 or LX200 plus Tensilica IP)" + depends on BR2_xtensa + default y + help + The XTAV60 or XTAV200 board, which is an Avnet LX60 or LX200 + emulation board programmed with an FPGA bitstream obtained + from Tensilica. + +endif diff --git a/target/device/xtensa/Makefile.in b/target/device/xtensa/Makefile.in new file mode 100644 index 000000000..f3248962f --- /dev/null +++ b/target/device/xtensa/Makefile.in @@ -0,0 +1,14 @@ +ifeq ($(strip $(BR2_TARGET_XTENSA_XTAV60)),y) +# UCLIBC_CONFIG_FILE:=target/device/xtensa/xtav60/uClibc.config +# BR2_PACKAGE_BUSYBOX_CONFIG:=target/device/xtensa/xtav60/busybox.config +TARGET_SKELETON_PATCH:=target/device/xtensa +endif + +# Custom device table patch used when targeting ISS: +OLD_TARGET_DEVICE_TABLE := $(TARGET_DEVICE_TABLE) +TARGET_DEVICE_TABLE := target/device/xtensa/device_table.txt +makedevs: + @echo "Applying patch to $(TARGET_DEVICE_TABLE)" + cp -f $(OLD_TARGET_DEVICE_TABLE) $(TARGET_DEVICE_TABLE) + patch -p1 -g 0 < target/device/xtensa/device_table.diff + diff --git a/target/device/xtensa/device_table.diff b/target/device/xtensa/device_table.diff new file mode 100644 index 000000000..12f682546 --- /dev/null +++ b/target/device/xtensa/device_table.diff @@ -0,0 +1,10 @@ +diff --git a/target/generic/device_table.txt b/target/generic/device_table.txt +index f4b16ba..b87bf69 100644 +--- a/target/device/xtensa/device_table.txt ++++ b/target/device/xtensa/device_table.txt +@@ -169,3 +169,5 @@ + #/dev/mcd b 640 0 0 23 0 0 0 + #/dev/optcd b 640 0 0 17 0 0 0 + ++/dev/simdisk0 b 640 0 0 240 0 0 0 ++/dev/simdisk1 b 640 0 0 240 1 0 0 diff --git a/target/device/xtensa/skeleton-patch/etc/inittab b/target/device/xtensa/skeleton-patch/etc/inittab new file mode 100644 index 000000000..b336ff69c --- /dev/null +++ b/target/device/xtensa/skeleton-patch/etc/inittab @@ -0,0 +1,47 @@ +# /etc/inittab +# +# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org> +# +# Note: BusyBox init doesn't support runlevels. The runlevels field is +# completely ignored by BusyBox init. If you want runlevels, use +# sysvinit. +# +# Format for each entry: <id>:<runlevels>:<action>:<process> +# +# id == tty to run on, or empty for /dev/console +# runlevels == ignored +# action == one of sysinit, respawn, askfirst, wait, and once +# process == program to run + +# Startup the system +null::sysinit:/bin/mount -t proc proc /proc +null::sysinit:/bin/mount -o remount,rw / +null::sysinit:/bin/mount -a +null::sysinit:/bin/hostname -F /etc/hostname +null::sysinit:/sbin/ifconfig lo 127.0.0.1 up +null::sysinit:/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo +# now run any rc scripts +::sysinit:/etc/init.d/rcS + +# Set up a couple of getty's +#tty1::respawn:/sbin/getty 38400 tty1 +#tty2::respawn:/sbin/getty 38400 tty2 + +# Put a getty on the serial port +ttyS0::respawn:/sbin/getty -L ttyS0 38400 vt100 + +# Logging junk +null::sysinit:/bin/touch /var/log/messages +null::respawn:/sbin/syslogd -n -m 0 +null::respawn:/sbin/klogd -n +#tty3::respawn:/usr/bin/tail -f /var/log/messages + +# Stuff to do for the 3-finger salute +::ctrlaltdel:/sbin/reboot + +# Stuff to do before rebooting +null::shutdown:/usr/bin/killall klogd +null::shutdown:/usr/bin/killall syslogd +null::shutdown:/bin/umount -a -r +null::shutdown:/sbin/swapoff -a + diff --git a/target/linux/Config.in.advanced b/target/linux/Config.in.advanced index 3a171b560..6d755d889 100644 --- a/target/linux/Config.in.advanced +++ b/target/linux/Config.in.advanced @@ -33,6 +33,7 @@ source "target/linux/Config.in.versions" config BR2_KERNEL_PATCH_LEVEL string + default $(BR2_KERNEL_LATEST_2_6_30) if BR2_LINUX_2_6_30 && BR2_KERNEL_ADD_LATEST_MINORPATCH default $(BR2_KERNEL_LATEST_2_6_29) if BR2_LINUX_2_6_29 && BR2_KERNEL_ADD_LATEST_MINORPATCH default $(BR2_KERNEL_LATEST_2_6_28) if BR2_LINUX_2_6_28 && BR2_KERNEL_ADD_LATEST_MINORPATCH default $(BR2_KERNEL_LATEST_2_6_27) if BR2_LINUX_2_6_27 && BR2_KERNEL_ADD_LATEST_MINORPATCH @@ -47,6 +48,8 @@ config BR2_KERNEL_PATCH_LEVEL config BR2_KERNEL_NEXT_VERSION string + default "2.6.31" if BR2_LINUX_2_6_30 + default "2.6.30" if BR2_LINUX_2_6_29 default "2.6.29" if BR2_LINUX_2_6_28 default "2.6.28" if BR2_LINUX_2_6_27 default "2.6.27" if BR2_LINUX_2_6_26 @@ -59,6 +62,8 @@ config BR2_KERNEL_NEXT_VERSION config BR2_KERNEL_THIS_VERSION string + default "2.6.31" if BR2_LINUX_2_6_31 + default "2.6.30" if BR2_LINUX_2_6_30 default "2.6.29" if BR2_LINUX_2_6_29 default "2.6.28" if BR2_LINUX_2_6_28 default "2.6.27" if BR2_LINUX_2_6_27 @@ -128,7 +133,11 @@ choice Select the specific Linux version you want to use config BR2_LINUX_2_6_STABLE - bool "The latest stable Linux kernel (2.6.29.4)" + bool "The latest stable Linux kernel (2.6.30.2)" + +config BR2_LINUX_2_6_30 + bool "Linux 2.6.30" + select BR2_KERNEL_BASE config BR2_LINUX_2_6_29 bool "Linux 2.6.29" @@ -170,6 +179,10 @@ config BR2_LINUX_2_6_20 bool "Linux 2.6.20" select BR2_KERNEL_BASE +config BR2_LINUX_2_6_31 + bool "Linux 2.6.31" + select BR2_KERNEL_BASE + config BR2_LINUX26_CUSTOM bool "Linux <custom> version" @@ -178,19 +191,19 @@ endchoice if BR2_LINUX26_CUSTOM config BR2_CUSTOM_DOWNLOAD_LINUX26_VERSION string "Linux Tarball version" - default "2.6.30" + default "2.6.31" help Specify any .tar.bz2 file config BR2_CUSTOM_LINUX26_VERSION string "Linux Version" - default "2.6.30" + default "2.6.31" help Specify what the linux version will be called config BR2_CUSTOM_LINUX26_PATCH string "patch name" - default "patch-2.6.30-rc4.bz2" + default "patch-2.6.31-rc4.bz2" help Specify a patch to be downloaded diff --git a/target/linux/Config.in.experimental b/target/linux/Config.in.experimental deleted file mode 100644 index c75c69b0f..000000000 --- a/target/linux/Config.in.experimental +++ /dev/null @@ -1,345 +0,0 @@ -if BR2_KERNEL_LINUX_EXPERIMENTAL - -choice - prompt "Linux Kernel Version" - depends on BR2_PACKAGE_LINUX - default BR2_LINUX_2_6_22_1 if !BR2_avr32 - default BR2_LINUX_2_6_22_10 if BR2_avr32 - help - Select the specific Linux version you want to use - -config BR2_LINUX_2_6_SNAP - bool "The latest snapshot for the stable Linux kernel" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.x-git# - -config BR2_LINUX_2_6_MM - bool "With latest -mm patch for the stable Linux kernel" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.x-rc#-mm# - -config BR2_LINUX_2_6_STABLE - bool "The latest stable Linux kernel (2.6.22.1)" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.22.1 - -config BR2_LINUX_2_6_22_10 - bool "Linux 2.6.22.10" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.22.10 - -config BR2_LINUX_2_6_22_1 - bool "Linux 2.6.22.1" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.22.1 - -config BR2_LINUX_2_6_22 - bool "Linux 2.6.22" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.22 - -config BR2_LINUX_2_6_21_6 - bool "Linux 2.6.21.6" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.21.6 - -config BR2_LINUX_2_6_21_1 - bool "Linux 2.6.21.1" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.21.1 - -config BR2_LINUX_2_6_21 - bool "Linux 2.6.21" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.21 - -config BR2_LINUX_2_6_20_4 - bool "Linux 2.6.20.4" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.20.4 - -config BR2_LINUX_2_6_20 - bool "Linux 2.6.20" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.20 - -config BR2_LINUX_2_6_19_2 - bool "Linux 2.6.19.2" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.19.2 - -config BR2_LINUX_2_6_19 - bool "Linux 2.6.19" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.19 - -config BR2_LINUX_2_6_18 - bool "Linux 2.6.18" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.18 - -config BR2_LINUX_2_6_17 - bool "Linux 2.6.17" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.17 - -config BR2_LINUX_2_6_16 - bool "Linux 2.6.16" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.16 - -config BR2_LINUX_2_6_15 - bool "Linux 2.6.15" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.15 - -config BR2_LINUX_2_6_23 - bool "Linux 2.6.23" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.23 - -config BR2_LINUX_CUSTOM - bool "Linux <custom> version" - depends on BR2_PACKAGE_LINUX - help - Linux <your selection> - -endchoice - -config BR2_CUSTOM_DOWNLOAD_LINUX26_VERSION - string "Linux Tarball version" - depends on BR2_LINUX_CUSTOM - default "linux-2.6.22" - -config BR2_CUSTOM_LINUX26_VERSION - string "Linux Version" - depends on BR2_LINUX_CUSTOM - default "linux-2.6.22-version" - -config BR2_CUSTOM_LINUX26_RC_PATCH - string "RC patch (if needed)" - depends on BR2_LINUX_CUSTOM - default "patch-2.6.22-rc6-mm1.bz2" - -menu "Patches" - depends on BR2_PACKAGE_LINUX - -config BR2_LINUX_BSP_PATCH - string "Additional patch to apply (supply full path)" - default "" - -endmenu - -config BR2_DOWNLOAD_LINUX26_VERSION - string #"Selected Tarball:" - default "2.6.15" if BR2_LINUX_2_6_15 - default "2.6.16" if BR2_LINUX_2_6_16 - default "2.6.17" if BR2_LINUX_2_6_17 - default "2.6.18" if BR2_LINUX_2_6_18 - default "2.6.19" if BR2_LINUX_2_6_19 - default "2.6.19.2" if BR2_LINUX_2_6_19_2 - default "2.6.20" if BR2_LINUX_2_6_20 - default "2.6.20.4" if BR2_LINUX_2_6_20_4 - default "2.6.21" if BR2_LINUX_2_6_21 - default "2.6.21.1" if BR2_LINUX_2_6_21_1 - default "2.6.21.6" if BR2_LINUX_2_6_21_6 - default "2.6.22" if BR2_LINUX_2_6_22 - default "2.6.22.1" if BR2_LINUX_2_6_22_1 - default "2.6.22.10" if BR2_LINUX_2_6_22_10 - default "2.6.22" if BR2_LINUX_2_6_23_RC1 - default "2.6.22" if BR2_LINUX_2_6_SNAP - default "2.6.22" if BR2_LINUX_2_6_MM - default $(BR2_CUSTOM_DOWNLOAD_LINUX26_VERSION) if BR2_LINUX_CUSTOM - -config BR2_LINUX26_VERSION - string #"Selected Version:" - default "2.6.15" if BR2_LINUX_2_6_15 - default "2.6.16" if BR2_LINUX_2_6_16 - default "2.6.17" if BR2_LINUX_2_6_17 - default "2.6.18" if BR2_LINUX_2_6_18 - default "2.6.19" if BR2_LINUX_2_6_19 - default "2.6.19.2" if BR2_LINUX_2_6_19_2 - default "2.6.20" if BR2_LINUX_2_6_20 - default "2.6.20.4" if BR2_LINUX_2_6_20_4 - default "2.6.21" if BR2_LINUX_2_6_21 - default "2.6.21.1" if BR2_LINUX_2_6_21_1 - default "2.6.21.6" if BR2_LINUX_2_6_21_6 - default "2.6.22" if BR2_LINUX_2_6_22 - default "2.6.22.1" if BR2_LINUX_2_6_22_1 - default "2.6.22.10" if BR2_LINUX_2_6_22_10 - default "2.6.22" if BR2_LINUX_2_6_23_RC1 - default "2.6.22" if BR2_LINUX_2_6_SNAP - default "2.6.22" if BR2_LINUX_2_6_MM - default $(BR2_CUSTOM_LINUX26_VERSION) if BR2_LINUX_CUSTOM - -config BR2_LINUX26_RC_PATCH - string #"Selected Patch:" - default "" if BR2_LINUX_2_6_15 - default "" if BR2_LINUX_2_6_16 - default "" if BR2_LINUX_2_6_17 - default "" if BR2_LINUX_2_6_18 - default "" if BR2_LINUX_2_6_19 - default "" if BR2_LINUX_2_6_19_2 - default "" if BR2_LINUX_2_6_20 - default "" if BR2_LINUX_2_6_20_4 - default "" if BR2_LINUX_2_6_21 - default "" if BR2_LINUX_2_6_21_1 - default "" if BR2_LINUX_2_6_21_6 - default "" if BR2_LINUX_2_6_22 - default "" if BR2_LINUX_2_6_22_1 - default "" if BR2_LINUX_2_6_22_10 - default "patch-2.6.23-rc1.bz2" if BR2_LINUX_2_6_23_RC1 - default $(BR2_CUSTOM_LINUX26_RC_PATCH) if BR2_LINUX_CUSTOM - -choice - prompt "Linux Kernel Configuration" - depends on BR2_PACKAGE_LINUX - default BR2_PACKAGE_LINUX_USE_KCONFIG - help - Select the way to configure the Linux - -config BR2_PACKAGE_LINUX_USE_KCONFIG - bool ".config file" - depends on BR2_PACKAGE_LINUX - help - kernel's .config to use to build a kernel for the target. - - If the above setting is empty, you can change the default - board-imposed value by passing LINUX26_KCONFIG=<path> to - make. - -config BR2_LINUX26_DEFCONFIG - bool "Run make <board>_defconfig " - depends on BR2_PACKAGE_LINUX - help - Configure Linux by make <board>_defconfig - -config BR2_LINUX_CUSTOMIZE - bool "Run make ARCH=$(ARCH) xconfig before build" - depends on BR2_PACKAGE_LINUX - help - Configure Linux by make xconfig -endchoice - -config BR2_PACKAGE_LINUX_KCONFIG - string ".config file" - depends on BR2_PACKAGE_LINUX_USE_KCONFIG - default "$(BR2_BOARD_PATH)/$(BR2_BOARD_NAME)-linux-$(LINUX26_VERSION).config" - help - kernel's .config to use to build a kernel for the target. - - If the above setting is empty, you can change the default - board-imposed value by passing LINUX26_KCONFIG=<path> to - make. - -choice - prompt "kernel binary format" - depends on BR2_PACKAGE_LINUX - default BR2_LINUX_BIN_UIMAGE - help - Select the specific Linux binary type you want to use - -config BR2_LINUX_BIN_BZIMAGE - bool "bzImage" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.19.2 - -config BR2_LINUX_BIN_UIMAGE - bool "uImage" - depends on BR2_PACKAGE_LINUX - help - Build uImage binary - -config BR2_LINUX_BIN_VMLINUX - bool "vmlinux" - depends on BR2_PACKAGE_LINUX - help - Build vmlinux binary - -config BR2_LINUX_BIN_ZIMAGE - bool "zImage" - depends on BR2_PACKAGE_LINUX - help - Linux 2.6.19.2 - -config BR2_LINUX_BIN_CUSTOM - bool "<custom> Linux binary" - depends on BR2_PACKAGE_LINUX - help - Build custom Linux binary format -endchoice - -config BR2_LINUX_BIN_CUSTOM_BIN - string "custom kernel binary format" - depends on BR2_LINUX_BIN_CUSTOM - default "" - help - Which Linux binary format? - -config BR2_PACKAGE_LINUX_FORMAT - string #"kernel binary format" - depends on BR2_PACKAGE_LINUX - default "bzImage" if BR2_LINUX_BIN_BZIMAGE - default "uImage" if BR2_LINUX_BIN_UIMAGE - default "vmlinux" if BR2_LINUX_BIN_VMLINUX - default "zImage" if BR2_LINUX_BIN_ZIMAGE - default $(BR2_LINUX_BIN_CUSTOM_BIN) if BR2_LINUX_BIN_CUSTOM - help - kernel binary format. - Popular values include: - - bzImage - - zImage - - vmlinux - - zImage - - xipImage - and other, architecture dependant formats. - - Note that the default format is supposed to be set by your - board-description, if any. - i386 and compatible default to bzImage if nothing was given - above. - If the above setting is empty, you can change the default - board-imposed value by passing LINUX26_FORMAT=<string> to - make. - -comment "Destinations for linux kernel binaries" - depends on BR2_PACKAGE_LINUX - -config BR2_LINUX_IN_ROOTFS - bool "Copy kernel to root file system" - depends on BR2_PACKAGE_LINUX - help - Copy kernel to <root>/boot directory - -menuconfig BR2_LINUX_COPY - bool "Secondary Copy" - depends on BR2_PACKAGE_LINUX - default y - -config BR2_LINUX_COPYTO - string "also copy the image to..." - depends on BR2_LINUX_COPY - default "/tftpboot" - help - Copy kernel to secondary location - -endif diff --git a/target/linux/Config.in.versions b/target/linux/Config.in.versions index a37a5ad93..caf1151ee 100644 --- a/target/linux/Config.in.versions +++ b/target/linux/Config.in.versions @@ -1,11 +1,11 @@ # This file defines the latest version of # You also have to edit BR2_LINUX_2_6_STABLE # in target/linux/Config.in.advanced -# which is approximately at line 132 +# which is approximately at line 136 config LINUX26_LATEST_RC_VERSION string - default "2.6.30-rc4" if BR2_KERNEL_ADD_LATEST_RC_PATCH + default "2.6.31-rc4" if BR2_KERNEL_ADD_LATEST_RC_PATCH help Not really available as of 20090103 @@ -19,21 +19,25 @@ config LINUX26_LATEST_MM_VERSION config BR2_KERNEL_CURRENT_VERSION string - default "2.6.29.4" + default "2.6.30.2" help This is the latest stable kernel (including minor version) +config BR2_KERNEL_LATEST_2_6_30 + string + default "2" + config BR2_KERNEL_LATEST_2_6_29 string - default "4" + default "6" config BR2_KERNEL_LATEST_2_6_28 string - default "7" + default "10" config BR2_KERNEL_LATEST_2_6_27 string - default "13" + default "27" config BR2_KERNEL_LATEST_2_6_26 string diff --git a/target/linux/Makefile.in b/target/linux/Makefile.in index ff0b88e34..3e8bc7b30 100644 --- a/target/linux/Makefile.in +++ b/target/linux/Makefile.in @@ -89,11 +89,8 @@ LINUX26_PATCH_DIR:=$(BOARD_PATH)/kernel-patches/ #")) endif endif -__LINUX26_NO_PIC=-fPIC -fpic -DPIC -fwrapv -ftrapv -__LINUX26_ZERO_OPTIMIZATION=-O0 LINUX26_MAKE_FLAGS = HOSTCC="$(HOSTCC)" HOSTCFLAGS="$(HOSTCFLAGS)" \ ARCH=$(KERNEL_ARCH) \ - CFLAGS_KERNEL="$(filter-out $(__LINUX26_NO_PIC) $(__LINUX26_ZERO_OPTIMIZATION),$(TARGET_CFLAGS))" \ INSTALL_MOD_PATH=$(TARGET_DIR) \ CROSS_COMPILE=$(KERNEL_CROSS) \ LDFLAGS="$(TARGET_LDFLAGS)" \ diff --git a/target/linux/Makefile.in.advanced b/target/linux/Makefile.in.advanced index 9d878f2b0..47a1f4ebb 100644 --- a/target/linux/Makefile.in.advanced +++ b/target/linux/Makefile.in.advanced @@ -190,10 +190,8 @@ LINUX_KERNEL:=$(LINUX26_KERNEL) # ----------------------------------------------------------------------------- LINUX26_BZCAT:=$(BZCAT) -__LINUX26_NO_PIC=-fPIC -fpic -DPIC -fwrapv -ftrapv LINUX26_MAKE_FLAGS = HOSTCC="$(HOSTCC)" HOSTCFLAGS="$(HOSTCFLAGS)" \ ARCH=$(KERNEL_ARCH) \ - CFLAGS_KERNEL="$(filter-out $(__LINUX26_NO_PIC),$(TARGET_CFLAGS))" \ INSTALL_MOD_PATH=$(TARGET_DIR) \ CROSS_COMPILE=$(KERNEL_CROSS) \ LDFLAGS="$(TARGET_LDFLAGS)" \ @@ -549,6 +547,7 @@ linux-status: @echo LINUX26_SOURCE=$(LINUX26_SOURCE) @echo LINUX26_TARGETS=$(LINUX26_TARGETS) @echo LINUX26_VERSION=$(LINUX26_VERSION) + @echo LINUX26_MAKE_FLAGS=$(LINUX26_MAKE_FLAGS) @echo PROJECT_BUILD_DIR=$(PROJECT_BUILD_DIR) @echo TARGETS=$(TARGETS) diff --git a/target/xtensa/.gitignore b/target/xtensa/.gitignore new file mode 100644 index 000000000..cff61bf9e --- /dev/null +++ b/target/xtensa/.gitignore @@ -0,0 +1 @@ +/busybox-config diff --git a/target/xtensa/Makefile.in b/target/xtensa/Makefile.in new file mode 100644 index 000000000..8a654b998 --- /dev/null +++ b/target/xtensa/Makefile.in @@ -0,0 +1 @@ +-include target/xtensa/*/*.mk diff --git a/target/xtensa/defconfig b/target/xtensa/defconfig new file mode 100644 index 000000000..4127f5308 --- /dev/null +++ b/target/xtensa/defconfig @@ -0,0 +1,133 @@ +# Default buildroot configuration for running Linux on an Xtensa processor +# on an LX60 board. + +# +# Project Options +# +BR2_BANNER="Welcome to your custom Xtensa processor based uClibc environment." +BR2_HAVE_DOT_CONFIG=y +BR2_xtensa=y +BR2_xtensa_dc232b=y +BR2_xtensa_core_name="dc232b" +BR2_ARCH="xtensa" + +# +# Build options +# +BR2_WGET="wget --passive-ftp" +# BR2_STRIP_strip is not set +# BR2_STRIP_none=y + +## Added by Maxim +BR2_UPDATE_CONFIG=y + +# +# Kernel Header Options +# +BR2_KERNEL_none=y +BR2_KERNEL_HEADERS_2_6_22_1=y +BR2_DEFAULT_KERNEL_HEADERS="2.6.22.1" + +# +# uClibc Options +# +BR2_UCLIBC_VERSION_0_9_30=y +# BR2_UCLIBC_VERSION_SNAPSHOT is not set +BR2_UCLIBC_CONFIG="target/xtensa/uClibc-0.9.30.config" +BR2_PTHREADS_OLD=y +# BR2_PTHREADS_NATIVE is not set +BR2_PTHREAD_DEBUG=y + +# +# Binutils Options +# +BR2_BINUTILS_VERSION_2_19=y +BR2_BINUTILS_VERSION="2.19" +BR2_EXTRA_BINUTILS_CONFIG_OPTIONS="" + +# +# Gcc Options +# +BR2_GCC_VERSION_4_3_2=y +# BR2_GCC_IS_SNAP is not set +BR2_GCC_VERSION="4.3.2" +BR2_TOOLCHAIN_SYSROOT=y +BR2_EXTRA_GCC_CONFIG_OPTIONS="" +BR2_GCC_CROSS_CXX=y +BR2_INSTALL_LIBSTDCPP=y +BR2_GCC_SHARED_LIBGCC=y + +# +# Gdb Options +# +BR2_PACKAGE_GDB=y +BR2_PACKAGE_GDB_SERVER=y +BR2_PACKAGE_GDB_HOST=y +# BR2_GDB_VERSION_6_2_1 is not set +# BR2_GDB_VERSION_6_3 is not set +# BR2_GDB_VERSION_6_4 is not set +# BR2_GDB_VERSION_6_5 is not set +# BR2_GDB_VERSION_6_6 is not set +# BR2_GDB_VERSION_6_7_1 is not set +BR2_GDB_VERSION_6_8=y +# BR2_GDB_VERSION_SNAPSHOT is not set +BR2_GDB_VERSION="6.8" + +# +# Common Toolchain Options +# +# BR2_PACKAGE_SSTRIP_TARGET is not set +# BR2_PACKAGE_SSTRIP_HOST is not set +# BR2_ENABLE_MULTILIB is not set +BR2_LARGEFILE=y +BR2_INET_RPC=y +BR2_TARGET_OPTIMIZATION="-Os -pipe" +BR2_CROSS_TOOLCHAIN_TARGET_UTILS=y + + +## These two added by Maxim +BR2_TOOLCHAIN_BUILDROOT=y +BR2_TOOLCHAIN_SOURCE=y + + +BR2_PACKAGE_BUSYBOX_HIDE_OTHERS=y + +# +# Other development stuff +# +BR2_HOST_FAKEROOT=y +# BR2_PACKAGE_LIBINTL is not set +# For NFS mount: +BR2_PACKAGE_PORTMAP=y + +# +# Other stuff +# + +# +# filesystem for target device +# +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_CPIO_GZIP=y +BR2_TARGET_ROOTFS_INITRAMFS=y + +# +# Linux Options +# +# BR2_PACKAGE_LINUX is not set + +# +# Board Support Options +# +BR2_TARGET_XTENSA=y + +# +# Tensilica Xtensa/Diamond based Device Support +# +BR2_TARGET_XTENSA_XTAV60=y + +# +# Compressors / decompressors +# + +BR2_PACKAGE_ZLIB=y diff --git a/target/xtensa/patch.in b/target/xtensa/patch.in new file mode 100644 index 000000000..5b723a8b4 --- /dev/null +++ b/target/xtensa/patch.in @@ -0,0 +1,33 @@ +ifneq ($(filter xtensa%,$(ARCH)),) +############################################################# +# +# Xtensa processor architecture (including Diamond Standard cores) +# +############################################################# + +# The following defines a function to be used like this: +# $(call XTENSA_PATCH, <module>, <patchdir>, <relative dir list...>) +# which returns the first overlay patch file for <module> found +# in the list of directories <relative dir list...> which are +# relative to <patchdir> (itself either absolute or relative to the +# current directory). The returned filename is relative to <patchdir>. +# For example: +# $(call XTENSA_PATCH, binutils, some/dir/path, . ..) +# (no commas between directory paths in the list). +# +# A selected overlay patch must exist ("fsf" means no specific +# overlay is selected). So the function emits a Makefile error +# if a selected patch file is not found. + +XTENSA_CORENAME:=$(strip $(subst ",,$(BR2_xtensa_core_name))) +ifeq ($(XTENSA_CORENAME),fsf) +XTENSA_PATCH = +else +XTENSA_PATCH_SUFFIX = $(1)-xtensa_$(XTENSA_CORENAME).tgz +XTENSA_PATCH_FILE = $(firstword $(wildcard $(patsubst %,$(2)/%/*$(XTENSA_PATCH_SUFFIX),$(3)))) +# FULLPATH = $(if $(filter /%,$(1)),$(1),$(PWD)/$(1)) +XTENSA_PATCH = $(if $(XTENSA_PATCH_FILE),$(patsubst $(2)/%,%,$(XTENSA_PATCH_FILE)),\ + $(error Missing $(1) patch for Xtensa $(XTENSA_CORENAME) processor (*$(XTENSA_PATCH_SUFFIX) in $(addprefix $(2)/,$(3))))) +endif + +endif diff --git a/target/xtensa/setup-config b/target/xtensa/setup-config new file mode 100644 index 000000000..7ef8fe86e --- /dev/null +++ b/target/xtensa/setup-config @@ -0,0 +1,57 @@ +#!/bin/sh + +# Convenience script for setting up a default buildroot config +# for Xtensa processor targets.. + +usage() { + echo "Usage (invoke from top of buildroot tree):" + echo " ./target/xtensa/setup-config <corename>" + #echo " ./target/xtensa/setup-config <corename> [<overlaypath>]" + echo "where:" + echo " <corename> is the Xtensa core overlay name, as specified in the -c option" + echo " of the ./target/xtensa/xt-buildroot-overlay-install script." + echo "" + echo "For example:" + echo " ./target/xtensa/setup-config dc232b" + echo "" + echo "Currently installed (available) core overlay names are:" + echo " " `ls toolchain/binutils/binutils-xtensa_*.tgz | sed -e 's,toolchain\/binutils\/binutils-xtensa_\(.*\)\.tgz,\1,g'` + exit 1 +} + +if [ $# -ne 1 ]; then + usage +fi + +core=$1 ; shift + +if [ ! -f toolchain/binutils/binutils-xtensa_${core}.tgz \ + -o ! -f toolchain/gcc/gcc-xtensa_${core}.tgz \ + -o ! -f toolchain/gdb/gdb-xtensa_${core}.tgz ]; then + echo "ERROR: Did not find an installed Xtensa core overlay named '${core}'." + echo "ERROR: Please install it first with ./target/xtensa/xt-buildroot-overlay-install" + echo "" + usage +fi + +# Use preset buildroot config: +cp target/xtensa/defconfig .defconfig-xtensa +# Set core name: +sed -i -e 's,^BR2_xtensa_\(.*\)=y,BR2_xtensa_custom=y\nBR2_xtensa_custom_name="'${core}'",' .defconfig-xtensa +## sed -i -e 's,^.*BR2_xtensa_core_name.*,BR_xtensa_core_name="'${core}'",' .defconfig-xtensa +# Create full .config with defaults: +make clean defconfig CONFIG_DEFCONFIG=.defconfig-xtensa || exit 1 + +# Busybox adjustments: turn off 'ar' (can't create archives yet overrides real one) +# and turn on NFS mounting (Xtensa defconfig turns on RPC so this can work): +# +bborig=`grep '^BR2_PACKAGE_BUSYBOX_CONFIG=' .config | sed -e 's,.*"\(.*\)".*,\1,'` +bbconf=target/xtensa/busybox-config +cp $bborig $bbconf +sed -i -e 's,^CONFIG_AR=y,# CONFIG_AR is not set,' $bbconf +sed -i -e 's,^.*CONFIG_FEATURE_MOUNT_NFS.*,CONFIG_FEATURE_MOUNT_NFS=y,' $bbconf +# Make use of above busybox adjustments: +sed -i -e 's,.*\(BR2_PACKAGE_BUSYBOX_CONFIG\).*,\1="'$bbconf'",' .config + +echo "Done." + diff --git a/target/xtensa/uClibc-0.9.30.config b/target/xtensa/uClibc-0.9.30.config new file mode 100644 index 000000000..cc6815d07 --- /dev/null +++ b/target/xtensa/uClibc-0.9.30.config @@ -0,0 +1,245 @@ +# +# Automatically generated make config: don't edit +# Thu Jan 23 14:50:00 2009 +# +# TARGET_alpha is not set +# TARGET_arm is not set +# TARGET_avr32 is not set +# TARGET_bfin is not set +# TARGET_cris is not set +# TARGET_e1 is not set +# TARGET_frv is not set +# TARGET_h8300 is not set +# TARGET_hppa is not set +# TARGET_i386 is not set +# TARGET_i960 is not set +# TARGET_ia64 is not set +# TARGET_m68k is not set +# TARGET_microblaze is not set +# TARGET_mips is not set +# TARGET_nios is not set +# TARGET_nios2 is not set +# TARGET_powerpc is not set +# TARGET_sh is not set +# TARGET_sh64 is not set +# TARGET_sparc is not set +# TARGET_v850 is not set +# TARGET_vax is not set +# TARGET_x86_64 is not set +TARGET_xtensa=y + +# +# Target Architecture Features and Options +# +TARGET_ARCH="xtensa" +FORCE_OPTIONS_FOR_ARCH=y +# ARCH_LITTLE_ENDIAN is not set +# ARCH_BIG_ENDIAN is not set +# ARCH_WANTS_LITTLE_ENDIAN is not set +# ARCH_WANTS_BIG_ENDIAN is not set + +# +# Using ELF file format +# +ARCH_HAS_MMU=y +ARCH_USE_MMU=y +UCLIBC_HAS_FLOATS=y +UCLIBC_HAS_FPU=y +DO_C99_MATH=y +# UCLIBC_HAS_FENV is not set +UCLIBC_HAS_LONG_DOUBLE_MATH=y +KERNEL_HEADERS="/usr/src/linux/include" +HAVE_DOT_CONFIG=y + +# +# General Library Settings +# +# HAVE_NO_PIC is not set +DOPIC=y +# ARCH_HAS_NO_SHARED is not set +# ARCH_HAS_NO_LDSO is not set +HAVE_SHARED=y +# FORCE_SHAREABLE_TEXT_SEGMENTS is not set +LDSO_LDD_SUPPORT=y +LDSO_CACHE_SUPPORT=y +# LDSO_PRELOAD_FILE_SUPPORT is not set +LDSO_BASE_FILENAME="ld.so" +# UCLIBC_STATIC_LDCONFIG is not set +# LDSO_RUNPATH is not set +UCLIBC_CTOR_DTOR=y +# LDSO_GNU_HASH_SUPPORT is not set +# HAS_NO_THREADS is not set +UCLIBC_HAS_THREADS=y +PTHREADS_DEBUG_SUPPORT=y +LINUXTHREADS_OLD=y +UCLIBC_HAS_SYSLOG=y +UCLIBC_HAS_LFS=y +# MALLOC is not set +# MALLOC_SIMPLE is not set +MALLOC_STANDARD=y +MALLOC_GLIBC_COMPAT=y +UCLIBC_DYNAMIC_ATEXIT=y +# COMPAT_ATEXIT is not set +UCLIBC_SUSV3_LEGACY=y +UCLIBC_SUSV3_LEGACY_MACROS=y +# UCLIBC_HAS_STUBS is not set +UCLIBC_HAS_SHADOW=y +# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set +UCLIBC_HAS___PROGNAME=y +UCLIBC_HAS_PTY=y +UNIX98PTY_ONLY=y +# UCLIBC_HAS_GETPT is not set +ASSUME_DEVPTS=y +UCLIBC_HAS_TM_EXTENSIONS=y +UCLIBC_HAS_TZ_CACHING=y +UCLIBC_HAS_TZ_FILE=y +UCLIBC_HAS_TZ_FILE_READ_MANY=y +UCLIBC_TZ_FILE_PATH="/etc/TZ" + +# +# Advanced Library Settings +# +UCLIBC_PWD_BUFFER_SIZE=256 +UCLIBC_GRP_BUFFER_SIZE=256 +UCLIBC_HAS_NONREENTRANT=y + +# +# Networking Support +# + +UCLIBC_LINUX_MODULE_24=y +UCLIBC_LINUX_SPECIFIC=y +UCLIBC_HAS_GNU_ERROR=y +UCLIBC_BSD_SPECIFIC=y +UCLIBC_HAS_BSD_ERR=y +UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y +UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL=y +# UCLIBC_NTP_LEGACY is not set +# UCLIBC_SV4_DEPRECATED is not set +UCLIBC_HAS_REALTIME=y +UCLIBC_HAS_ADVANCED_REALTIME=y +UCLIBC_HAS_EPOLL=y +UCLIBC_HAS_XATTR=y +UCLIBC_HAS_PROFILING=y +UCLIBC_HAS_CRYPT_IMPL=y +UCLIBC_HAS_CRYPT=y +UCLIBC_HAS_NETWORK_SUPPORT=y +UCLIBC_HAS_SOCKET=y +UCLIBC_HAS_IPV4=y +UCLIBC_HAS_IPV6=y +UCLIBC_HAS_RPC=y +UCLIBC_HAS_FULL_RPC=y +UCLIBC_HAS_REENTRANT_RPC=y +UCLIBC_USE_NETLINK=y +# UCLIBC_SUPPORT_AI_ADDRCONFIG is not set +# UCLIBC_HAS_BSD_RES_CLOSE is not set + + +# +# String and Stdio Support +# +# UCLIBC_HAS_STRING_GENERIC_OPT is not set +# UCLIBC_HAS_STRING_ARCH_OPT is not set +UCLIBC_HAS_CTYPE_TABLES=y +UCLIBC_HAS_CTYPE_SIGNED=y +# UCLIBC_HAS_CTYPE_UNSAFE is not set +# UCLIBC_HAS_CTYPE_CHECKED is not set +# UCLIBC_HAS_CTYPE_ENFORCED is not set +# UCLIBC_HAS_WCHAR is not set +# UCLIBC_HAS_LOCALE is not set +UCLIBC_HAS_HEXADECIMAL_FLOATS=y +UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y +# USE_OLD_VFPRINTF is not set +UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 +UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y +# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set +# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set +UCLIBC_HAS_STDIO_BUFSIZ_4096=y +# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set +UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set +# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set +# UCLIBC_HAS_STDIO_GETC_MACRO is not set +# UCLIBC_HAS_STDIO_PUTC_MACRO is not set +UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y +# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y +UCLIBC_HAS_PRINTF_M_SPEC=y +UCLIBC_HAS_ERRNO_MESSAGES=y +# UCLIBC_HAS_SYS_ERRLIST is not set +UCLIBC_HAS_SIGNUM_MESSAGES=y +# UCLIBC_HAS_SYS_SIGLIST is not set +UCLIBC_HAS_GNU_GETOPT=y +# UCLIBC_HAS_GNU_GETSUBOPT is not set + +# +# Big and Tall +# +UCLIBC_HAS_REGEX=y +# UCLIBC_HAS_REGEX_OLD is not set +UCLIBC_HAS_FNMATCH=y +# UCLIBC_HAS_FNMATCH_OLD is not set +# UCLIBC_HAS_WORDEXP is not set +UCLIBC_HAS_FTW=y +UCLIBC_HAS_GLOB=y +UCLIBC_HAS_GNU_GLOB=y + +# +# Library Installation Options +# +SHARED_LIB_LOADER_PREFIX="/lib" +RUNTIME_PREFIX="/" +DEVEL_PREFIX="/usr/" + +# +# Security options +# +# UCLIBC_BUILD_PIE is not set +UCLIBC_HAS_ARC4RANDOM=y +# HAVE_NO_SSP is not set +# UCLIBC_HAS_SSP is not set +UCLIBC_BUILD_RELRO=y +UCLIBC_BUILD_NOW=y +# UCLIBC_BUILD_NOEXECSTACK is not set + +# +# uClibc development/debugging options +# +CROSS_COMPILER_PREFIX="" +UCLIBC_EXTRA_CFLAGS="" +# DODEBUG is not set +# DODEBUG_PT is not set +DOSTRIP=y +# DOASSERTS is not set +# SUPPORT_LD_DEBUG is not set +# SUPPORT_LD_DEBUG_EARLY is not set +# UCLIBC_MALLOC_DEBUGGING is not set +WARNINGS="-Wall" +# EXTRA_WARNINGS is not set +# DOMULTI is not set +# UCLIBC_MJN3_ONLY is not set + +# USE_BX is not set +# CONFIG_GENERIC_ARM is not set +# CONFIG_ARM610 is not set +# CONFIG_ARM710 is not set +# CONFIG_ARM7TDMI is not set +# CONFIG_ARM720T is not set +# CONFIG_ARM920T is not set +# CONFIG_ARM922T is not set +# CONFIG_ARM926T is not set +# CONFIG_ARM10T is not set +# CONFIG_ARM1136JF_S is not set +# CONFIG_ARM1176JZ_S is not set +# CONFIG_ARM1176JZF_S is not set +# CONFIG_ARM_CORTEX_M3 is not set +# CONFIG_ARM_CORTEX_M1 is not set +# CONFIG_ARM_SA110 is not set +# CONFIG_ARM_SA1100 is not set +# CONFIG_ARM_XSCALE is not set +# CONFIG_ARM_IWMMXT is not set diff --git a/target/xtensa/uClibc.config b/target/xtensa/uClibc.config new file mode 100644 index 000000000..546a04534 --- /dev/null +++ b/target/xtensa/uClibc.config @@ -0,0 +1,190 @@ +# +# Automatically generated make config: don't edit +# Thu Jan 10 00:46:51 2008 +# +# TARGET_alpha is not set +# TARGET_arm is not set +# TARGET_avr32 is not set +# TARGET_bfin is not set +# TARGET_cris is not set +# TARGET_e1 is not set +# TARGET_frv is not set +# TARGET_h8300 is not set +# TARGET_hppa is not set +# TARGET_i386 is not set +# TARGET_i960 is not set +# TARGET_ia64 is not set +# TARGET_m68k is not set +# TARGET_microblaze is not set +# TARGET_mips is not set +# TARGET_nios is not set +# TARGET_nios2 is not set +# TARGET_powerpc is not set +# TARGET_sh is not set +# TARGET_sh64 is not set +# TARGET_sparc is not set +# TARGET_v850 is not set +# TARGET_vax is not set +# TARGET_x86_64 is not set +TARGET_xtensa=y + +# +# Target Architecture Features and Options +# +TARGET_ARCH="xtensa" +TARGET_SUBARCH="" + +# +# Using ELF file format +# +ARCH_HAS_MMU=y +ARCH_USE_MMU=y +UCLIBC_HAS_FLOATS=y +UCLIBC_HAS_FPU=y +DO_C99_MATH=y +KERNEL_HEADERS="/usr/src/linux/include" +HAVE_DOT_CONFIG=y + +# +# General Library Settings +# +# HAVE_NO_PIC is not set +DOPIC=y +# HAVE_NO_SHARED is not set +# ARCH_HAS_NO_LDSO is not set +HAVE_SHARED=y +# FORCE_SHAREABLE_TEXT_SEGMENTS is not set +LDSO_LDD_SUPPORT=y +LDSO_CACHE_SUPPORT=y +# LDSO_PRELOAD_FILE_SUPPORT is not set +LDSO_BASE_FILENAME="ld.so" +# UCLIBC_STATIC_LDCONFIG is not set +# LDSO_RUNPATH is not set +UCLIBC_CTOR_DTOR=y +# HAS_NO_THREADS is not set +UCLIBC_HAS_THREADS=y +PTHREADS_DEBUG_SUPPORT=y +LINUXTHREADS_OLD=y +UCLIBC_HAS_LFS=y +# MALLOC is not set +# MALLOC_SIMPLE is not set +MALLOC_STANDARD=y +MALLOC_GLIBC_COMPAT=y +UCLIBC_DYNAMIC_ATEXIT=y +# COMPAT_ATEXIT is not set +# UCLIBC_SUSV3_LEGACY is not set +UCLIBC_SUSV3_LEGACY_MACROS=y +UCLIBC_HAS_SHADOW=y +# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set +UCLIBC_HAS___PROGNAME=y +# UNIX98PTY_ONLY is not set +ASSUME_DEVPTS=y +UCLIBC_HAS_TM_EXTENSIONS=y +UCLIBC_HAS_TZ_CACHING=y +UCLIBC_HAS_TZ_FILE=y +UCLIBC_HAS_TZ_FILE_READ_MANY=y +UCLIBC_TZ_FILE_PATH="/etc/TZ" + +# +# Advanced Library Settings +# +UCLIBC_PWD_BUFFER_SIZE=256 +UCLIBC_GRP_BUFFER_SIZE=256 + +# +# Networking Support +# +UCLIBC_HAS_IPV6=y +UCLIBC_HAS_RPC=y +UCLIBC_HAS_FULL_RPC=y +UCLIBC_HAS_REENTRANT_RPC=y +# UCLIBC_USE_NETLINK is not set +# UCLIBC_HAS_BSD_RES_CLOSE is not set + +# +# String and Stdio Support +# +UCLIBC_HAS_STRING_GENERIC_OPT=y +UCLIBC_HAS_STRING_ARCH_OPT=y +UCLIBC_HAS_CTYPE_TABLES=y +UCLIBC_HAS_CTYPE_SIGNED=y +# UCLIBC_HAS_CTYPE_UNSAFE is not set +UCLIBC_HAS_CTYPE_CHECKED=y +# UCLIBC_HAS_CTYPE_ENFORCED is not set +# UCLIBC_HAS_WCHAR is not set +# UCLIBC_HAS_LOCALE is not set +UCLIBC_HAS_HEXADECIMAL_FLOATS=y +UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y +# USE_OLD_VFPRINTF is not set +UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9 +UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y +# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set +# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set +# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set +UCLIBC_HAS_STDIO_BUFSIZ_4096=y +# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set +UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set +# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set +# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set +UCLIBC_HAS_STDIO_GETC_MACRO=y +UCLIBC_HAS_STDIO_PUTC_MACRO=y +UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y +# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y +UCLIBC_HAS_PRINTF_M_SPEC=y +UCLIBC_HAS_ERRNO_MESSAGES=y +# UCLIBC_HAS_SYS_ERRLIST is not set +UCLIBC_HAS_SIGNUM_MESSAGES=y +# UCLIBC_HAS_SYS_SIGLIST is not set +UCLIBC_HAS_GNU_GETOPT=y +UCLIBC_HAS_GNU_GETSUBOPT=y + +# +# Big and Tall +# +UCLIBC_HAS_REGEX=y +UCLIBC_HAS_REGEX_OLD=y +UCLIBC_HAS_FNMATCH=y +UCLIBC_HAS_FNMATCH_OLD=y +# UCLIBC_HAS_WORDEXP is not set +UCLIBC_HAS_FTW=y +UCLIBC_HAS_GLOB=y +UCLIBC_HAS_GNU_GLOB=y + +# +# Library Installation Options +# +SHARED_LIB_LOADER_PREFIX="/lib" +RUNTIME_PREFIX="/" +DEVEL_PREFIX="/usr/" + +# +# Security options +# +# UCLIBC_HAS_ARC4RANDOM is not set +# HAVE_NO_SSP is not set +# UCLIBC_HAS_SSP is not set +UCLIBC_BUILD_RELRO=y +UCLIBC_BUILD_NOW=y +# UCLIBC_BUILD_NOEXECSTACK is not set + +# +# uClibc development/debugging options +# +CROSS_COMPILER_PREFIX="" +UCLIBC_EXTRA_CFLAGS="" +# DODEBUG is not set +# DOSTRIP is not set +# DODEBUG_PT is not set +# DOASSERTS is not set +SUPPORT_LD_DEBUG=y +# SUPPORT_LD_DEBUG_EARLY is not set +# UCLIBC_MALLOC_DEBUGGING is not set +WARNINGS="-Wall" +EXTRA_WARNINGS=y +# DOMULTI is not set +# UCLIBC_MJN3_ONLY is not set diff --git a/target/xtensa/xt-buildroot-overlay-install b/target/xtensa/xt-buildroot-overlay-install new file mode 100644 index 000000000..d2afce124 --- /dev/null +++ b/target/xtensa/xt-buildroot-overlay-install @@ -0,0 +1,488 @@ +#!/bin/sh +# Not every host installs perl at the same location, handle many locations: +PATH=/usr/bin:/usr/local/bin:$PATH +exec perl -x -S $0 ${1+"$@"} +exit $? +#!perl -w +#line 8 + +# xt-buildroot-overlay-install [-t overlay_tarball] [-b buildroot_dir] \ +# [-k kernel_dir] \ +# [-c config_name] [-l long_name] [-f] [--help] +# +# Creates individual overlay tarballs for gcc, binutils, gdb, and +# the Linux kernel, out of the Xtensa Configuration Overlay tarball from +# a Tensilica Core Package. And installs these individual tarballs +# at the appropriate locations within a buildroot source tree. +# +# The Xtensa configuration overlay tarball is located in: +# <xtensa_root>/src/xtensa-config-overlay.tar.gz +# where <xtensa_root> is the path to the Tensilica Core Package. +# +# Copyright (c) 2003-2009 by Tensilica Inc. +# History: +# 2007-NOV-08 1.0 meg Initial version +# 2007-NOV-21 1.1 meg Add -k parameter +# 2007-DEC-06 1.2 meg Make -k and -b optional, check overlay sw vers. +# 2008-FEB-27 1.3 meg Accept Xtensa Tools RB-2008.3 overlays + +$progvers = "1.3"; +$progname = $0; +$progname =~ s|.*[/\\:]||; + + +###################################################################### +# +# Parse cmdline +# + +my $overlay_tarball = undef; +my $buildroot_dir = undef; +my $kernel_dir = undef; +my $config_name = undef; +my $config_long_name = undef; +my $force_clobber = 0; +my $prompt = 1; # undocumented option + +sub usage { + print "$progname version $progvers\n" + ."Usage: $progname <parameters> [<options>]\n" + ."Where <parameters> are:\n" + ." -t file.tgz Specify path to the Xtensa Linux overlay tarball, typically\n" + ." <xtensa_root>/src/xtensa-config-overlay.tar.gz\n" + ." -b dir Path to the base of the buildroot source tree, in which\n" + ." package specific overlay tarballs get installed.\n" + ." -k dir Path to the base of the Linux kernel source tree, in which\n" + ." the Linux kernel specific overlay gets installed.\n" + ." -c config_name Name for the Xtensa processor configuration as it will be\n" + ." known to the open source community. Must be a lowercase\n" + ." identifier, starting with a letter, consisting of letters\n" + ." and numbers and underscores, not ending with underscore\n" + ." and not containing consecutive underscores. For examples:\n" + ." dc232b , dc232b_be , mmubasele , fsf , s5000 .\n" + ." -l long_name Long name for the Xtensa processor configuration, human-\n" + ." readable with spaces etc allowed (must be quoted).\n" + ." For example: 'Diamond 232L Standard Core Rev.B (LE)'\n" + ." Try to keep it within approximately 40 characters.\n" + ."And <options> are:\n" + ." -f If package specific overlay tarballs already exist in\n" + ." the destination source tree, overwrite them without asking.\n" + ." --help Show this usage message.\n"; +} + +# Get arguments: +if (!@ARGV) { + usage(); + exit 0; +} +while( defined($_ = shift) ) { + if( /^-[tbclk]$/ ) { # option taking an argument + my $arg = shift; + if( !defined($arg) ) { + print STDERR "$progname: ERROR: missing parameter after '$_' option\n\n"; + usage(); + exit 1; + } + $overlay_tarball = $arg if $_ eq "-t"; + $buildroot_dir = $arg if $_ eq "-b"; + $kernel_dir = $arg if $_ eq "-k"; + $config_name = $arg if $_ eq "-c"; + $config_long_name = $arg if $_ eq "-l"; + next; + } + if( /^-f$/ ) { + $force_clobber = 1; + next; + } + if( /^--[m-t]{8}$/ && /[new]([wow])([pup])[fur]\1[maze]\2[tuff]/ ) { + $prompt = 0; + next; + } + if( /^-(h|help|\-h|\-help|\?)$/i ) { + usage(); + exit 0; + } + print STDERR "$progname: ERROR: unrecognized option or argument '$_'\n\n"; + usage(); + exit 1; +} + + +###################################################################### +# +# Validate cmdline arguments +# + +ErrorU("missing -c argument (core name)") + unless defined($config_name); +# Try to enforce reasonable names: +ErrorU("-c: malformed core name '$config_name' (must be lowercase, letter followed by letters/digits, may contain underscore separators)") + unless $config_name =~ /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/; +ErrorU("-c: core name too short '$config_name'") + unless length($config_name) >= 2; +ErrorU("-c: core name too long '$config_name'") + unless length($config_name) <= 16; + + +ErrorU("missing -l argument (core long name)") + unless defined($config_long_name); +$config_long_name =~ s/^\s+//; # trim extra whitespace... +$config_long_name =~ s/\s+$//; +$config_long_name =~ s/\s+/ /g; +# Try to enforce reasonable names: +ErrorU("-l: invalid (non-ASCII-printable) characters in core long name '$config_long_name'") + unless $config_long_name =~ /^[\x20-\x7E]+$/; +ErrorU("-l: disallowed characters (\"\'\\) in core long name '$config_long_name'") + if $config_long_name =~ /[\'\"\\]/; +ErrorU("-l: core long name too short '$config_long_name'") + unless length($config_long_name) >= 5; +ErrorU("-l: core long name too long '$config_long_name'") + unless length($config_long_name) <= 60; + + +#ErrorU("missing -b argument (buildroot source tree directory)") +# unless defined($buildroot_dir); +if (defined($buildroot_dir)) { + ErrorU("-b: not a directory: $buildroot_dir") + unless -d $buildroot_dir; + foreach my $p ("toolchain/gcc", "toolchain/binutils", "toolchain/gdb", "target/xtensa") { + ErrorU("-b: not a buildroot directory: missing $buildroot_dir/$p") + unless -d $buildroot_dir . "/" . $p; + } +} + + +#ErrorU("missing -k argument (Linux kernel source tree directory)") +# unless defined($kernel_dir); +if (defined($kernel_dir)) { + ErrorU("-k: not a directory: $kernel_dir") + unless -d $kernel_dir; + foreach my $p ("kernel", "arch/xtensa/kernel", "include/asm-xtensa") { + ErrorU("-k: not a Linux kernel directory: missing $kernel_dir/$p") + unless -d $kernel_dir . "/" . $p; + } +} + + +if (!defined($buildroot_dir) and !defined($kernel_dir)) { + print STDERR "$progname: WARNING:\n"; + print STDERR "$progname: WARNING: Test run only, NOTHING WILL BE INSTALLED\n"; + print STDERR "$progname: WARNING: (use -b and -k to specify install destination)\n"; + print STDERR "$progname: WARNING:\n"; +} + + +my @ovpaths = ( "/src/xtensa-config-overlay.tar.gz", + "/xtensa-elf/src/linux/misc/linux-overlay.tar.gz" ); +if (!defined($overlay_tarball)) { + # Try to locate the overlay tarball based on XTENSA_SYSTEM and XTENSA_CORE + # settings: + my $xtensa_root = `xt-xcc --show-config=config 2>/dev/null`; + $xtensa_root = "" unless defined($xtensa_root); + chomp($xtensa_root); + if ($xtensa_root ne "") { + ($overlay_tarball) = grep(-f $xtensa_root.$_, @ovpaths); + if (!defined($overlay_tarball)) { + ErrorU("Xtensa configuration overlay tarball not found: ".$xtensa_root.$ovpaths[0]) + } + } else { + ErrorU("missing -t argument (Xtensa configuration overlay tarball filename)\n" + ."and no default Xtensa Core Package defined in the environment"); + } +} else { + foreach my $p ("", @ovpaths) { + if (-f $overlay_tarball.$p) { + $overlay_tarball .= $p; + last; + } + } + ErrorU("-t: file not found: $overlay_tarball") unless -f $overlay_tarball; +} + + +###################################################################### +# +# Misc +# + +my $overlay_unpacked = 0; +my $ovdir; + +sub cleanup { + if ($overlay_unpacked) { + system("rm -rf '$ovdir' 2>/dev/null"); + } +} + +sub ErrorEmit { + my ($msg,$usage) = @_; + $msg =~ s|\n|"\n${progname}: ERROR: "|ge; + print STDERR "$progname: ERROR: $msg\n"; + if ($usage) { + print "\n"; + usage(); + } + cleanup(); + exit 1; +} +sub ErrorU { ErrorEmit(shift,1); } +sub Error { ErrorEmit(shift); } + + +# Read specified file (as binary), returning contents. +# +sub readfile { + my ($filename) = @_; + # Read the file: + open(INFILE,"<$filename") or Error("error reading from '$filename': $!"); + my $savesep = $/; + undef $/; + my $file = <INFILE>; + $/ = $savesep; + close(INFILE); + $file; +} + +# Write specified file (as binary) with first argument (string). +# +sub writefile { + my ($filename, $file) = @_; + # Read the file: + open(INFILE,">$filename") or Error("error writing to '$filename': $!"); + print INFILE $file; + close(INFILE) or Error("error closing file '$filename': $!"); +} + + +###################################################################### +# +# Determine a temporary directory. +# + +my $tmpdir = "/tmp"; +if (defined($ENV{"TMP"}) and -d $ENV{"TMP"}) { + $tmpdir = $ENV{"TMP"}; +} elsif (defined($ENV{"TEMP"}) and -d $ENV{"TEMP"}) { + $tmpdir = $ENV{"TEMP"}; +} + + +###################################################################### +# +# Unpack the general overlay tarball +# + +my $user = defined($ENV{"USER"}) ? $ENV{"USER"} : "xtensa"; +$ovdir = $tmpdir."/tmp-overlay-${user}-$$"; +mkdir $ovdir or Error("cannot create directory $ovdir"); +$overlay_unpacked = 1; +system("tar xfz '$overlay_tarball' -C '$ovdir'") + and Error("tar failed..."); + + +###################################################################### +# +# Define and sanity check contents of overlay +# + +my $oldpack = -f $ovdir."/xtensa-elf/src/linux/misc/core.h"; +my $pf1 = ($oldpack ? "src/" : ""); +my $pf2 = ($oldpack ? "xtensa-elf/src/linux/misc/" : "config/"); + +my @packages = ( + ["binutils", "toolchain/binutils", + ["${pf1}/binutils/xtensa-modules.c", "bfd/"], + ["${pf1}/binutils/xtensa-config.h", "include/"], + #["${pf1}/binutils/xtensa-config.sh", "ld/emulparams/"], + ], + ["gcc", "toolchain/gcc", + ["${pf1}/gcc/xtensa-config.h", "include/"], + ], + ["gdb", "toolchain/gdb", + ["${pf1}/gdb/xtensa-modules.c", "bfd/"], + ["${pf1}/gdb/xtensa-config.h", "include/"], + ["${pf1}/gdb/xtensa-config.c", "gdb/"], + ["${pf1}/gdb/xtensa-regmap.c", "gdb/gdbserver/"], + ["${pf1}/gdb/xtensa-regmap.c", "gdb/gdbserver/xtensa-xtregs.c"], # for GDB 6.8 + ["${pf1}/gdb/xtensa-regmap.c", "gdb/xtensa-xtregs.c"], # for GDB 6.8 + ["${pf1}/gdb/reg-xtensa.dat", "gdb/regformats/"], + ], + ["kernel", "target/xtensa", # ??? + ["${pf2}core.h", "include/asm-xtensa/variant-${config_name}/"], + ["${pf2}tie.h", "include/asm-xtensa/variant-${config_name}/"], + ["${pf2}tie-asm.h", "include/asm-xtensa/variant-${config_name}/"], + ], +); + +# Check that all files are present ... +foreach my $pack (@packages) { + my ($pname, $buildroot_subdir, @files) = @$pack; + print "Checking files for $pname ...\n"; + foreach my $f (@files) { + my ($src, $dst) = @$f; + -f $ovdir."/".$src or Error("missing '$src' in overlay tarball"); + } +} + + +###################################################################### +# +# Extract some useful information +# + +# Extract core name as specified in the build. +my $coreh = readfile($ovdir."/".$pf2."core.h"); + +$coreh =~ /^\s*\#\s*define\s+XCHAL_SW_VERSION\s+(\w+)/m; +my $swversion = $1; +defined($swversion) or Error("missing XCHAL_SW_VERSION in overlay core.h file;\n" + ."overlay is too old, need RB-2008.3 (SW version 7.1.1) or later"); + +$coreh =~ /^\s*\#\s*define\s+XCHAL_CORE_ID\s+"([^"]+)"/m; +my $coreid = $1; +defined($coreid) or Error("missing XCHAL_CORE_ID in overlay core.h file"); + +$coreh =~ /^\s*\#\s*define\s+XCHAL_HW_VERSION_NAME\s+"([^"]+)"/m; +my $hwversion = $1; +defined($hwversion) or Error("missing XCHAL_HW_VERSION_NAME in overlay core.h file"); + + +$swvers_human = sprintf("%u.%u.%u", + $swversion/100000, (($swversion/1000) % 100), ($swversion % 1000)); +my $release = "software version $swvers_human"; +if (-f $ovdir."/release") { + $release = readfile($ovdir."/release"); + chomp($release); +} + + +###################################################################### +# +# Prompt user to be sure this is what he wants to do +# + +# Catch Ctrl-C so we can do a proper cleanup: +sub catch_term { + my $signame = shift; + #print STDERR "whoa!\n"; + cleanup(); + print STDERR "\n$progname: Cleaned up.\n"; + exit 3; +} +$SIG{TERM} = \&catch_term; +$SIG{HUP} = \&catch_term; +$SIG{INT} = \&catch_term; + +$| = 1; +print "\n", + "About to generate package-specific overlay tarballs for the following:\n", + "\n", + " Xtensa processor short name: $config_name\n"; +print " This short name overrides the name specified in the XPG: $coreid\n" if $coreid ne $config_name; +#print " Please ensure that's the name you want. If submitted to the open source\n", +# " community, it can be a hassle to change later on.\n"; +print " Xtensa processor description: $config_long_name\n", + " Targeting Xtensa HW version: $hwversion\n", + " Xtensa configuration overlay: $overlay_tarball\n", + " (release of overlay): $release\n", + " Destination buildroot dir: ".(defined($buildroot_dir)?$buildroot_dir:"(none, not installed)")."\n", + " Destination Linux kernel dir: ".(defined($kernel_dir)?$kernel_dir:"(none, not installed)")."\n", + "\n", + "Are you sure? (y/n) "; +if ($prompt) { + my $line = <STDIN>; + chomp($line); + if ($line !~ /^y(es)?$/i) { + print "\nInstallation aborted.\n"; + cleanup(); + exit 2; + } +} else { + print "YES [no prompt]\n"; +} +print "\n"; + + +###################################################################### +# +# Now generate the tarballs +# + +# Now generate each tarball ... +foreach my $pack (@packages) { + my ($pname, $buildroot_subdir, @files) = @$pack; + my $tarname = "${pname}-xtensa_${config_name}.tgz"; + my $fulltarname; + if (defined($buildroot_dir)) { + my $tarsubname = $buildroot_subdir . "/" . $tarname; + print "Generating and installing $tarsubname ...\n"; + $fulltarname = $buildroot_dir . "/" . $tarsubname; + } else { + print "Generating $tarname ...\n"; + $fulltarname = $ovdir . "/" . $tarname; + } + if (-e $fulltarname) { + if ($force_clobber or !defined($buildroot_dir)) { + unlink($fulltarname) or Error("could not delete '$fulltarname': $!"); + } else { + Error("destination tarball already exists: '$fulltarname'"); + } + } + my $pdir = $ovdir."/tmp-".$pname; + system("rm -fr '${pdir}' 2>/dev/null"); + mkdir $pdir or Error("cannot create directory $pdir"); + foreach my $f (@files) { + my ($src, $dst) = @$f; + # If $dst ends in / , take filename from $src : + if ($dst =~ m|/$|) { + my $fname = $src; + $fname =~ s|^.*/||; + $dst .= $fname; + } + # Ensure destination directory exists: + my $dstdir = $pdir; + while ($dst =~ s|^([^/]+)/+||) { + $dstdir .= "/" . $1; + mkdir($dstdir); + } + # Read file: + my $content = readfile($ovdir."/".$src); + + # Adjust contents of file. + # Fix-up typo: + $content =~ s/XCHAL_SA_(NCP|CP\d+)_/XCHAL_$1_SA_/g; + # Update core name info: + my $iscore = ($content =~ s/^(\s*\#\s*define\s+XCHAL_CORE_ID\s+)"[^"]+"/$1"$config_name"/mg); + $iscore or $content =~ s{^(\s*\#\s*define\s+XCHAL_INST_FETCH_WIDTH\s+\S+\s*(/\*[^\*]*\*/)?\s*$)} + {$1\n\#undef XCHAL_CORE_ID\n\#define XCHAL_CORE_ID\t\t\t"$config_name"\n}smg; + # Update core description info: + $content =~ s/^(\s*\#\s*define\s+XCHAL_CORE_DESCRIPTION\s+)"[^"]+"/$1"$config_long_name"/mg + or $content =~ s{^(\s*\#\s*define\s+XCHAL_CORE_ID\s+\S+\s*(/\*[^\*]*\*/)?\s*$)} + {"$1\n" . ($iscore ? "" : "\n\#undef XCHAL_CORE_DESCRIPTION\n") + . "\#define XCHAL_CORE_DESCRIPTION\t\t\"${config_long_name}\""}smge; + + # Write (possibly modified) file: + writefile($dstdir."/".$dst, $content); + } + my $tarcmd = "tar cfz '${fulltarname}' -C '${pdir}' ."; + system($tarcmd) and Error("failed executing: $tarcmd"); + + # Install Linux kernel overlay: + if ($pname eq "kernel" and defined($kernel_dir)) { + print "Installing Linux kernel overlay from $tarname ...\n"; + my $untarcmd = "tar xfz '${fulltarname}' -C '${kernel_dir}' ."; + system($untarcmd) and Error("failed executing: $tarcmd"); + } + # Possible TODO: update arch/xtensa/{Kconfig,Makefile} to add this config? +} + + +###################################################################### +# +# The End +# + +cleanup(); +print "Done.\n"; +exit 0; + diff --git a/toolchain/binutils/binutils.mk b/toolchain/binutils/binutils.mk index 66f393efd..bcfbe7451 100644 --- a/toolchain/binutils/binutils.mk +++ b/toolchain/binutils/binutils.mk @@ -55,6 +55,11 @@ BINUTILS_SITE:=$(VENDOR_SITE) BINUTILS_PATCH_DIR:=toolchain/binutils/ext_source/$(VENDOR_PATCH_DIR)/$(BINUTILS_OFFICIAL_VERSION) endif +ifneq ($(filter xtensa%,$(ARCH)),) +include target/xtensa/patch.in +BINUTILS_PATCH_EXTRA:=$(call XTENSA_PATCH,binutils,$(BINUTILS_PATCH_DIR),. ..) +endif + BINUTILS_SOURCE:=binutils-$(BINUTILS_OFFICIAL_VERSION).tar.bz2 BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-$(BINUTILS_OFFICIAL_VERSION) BINUTILS_CAT:=$(BZCAT) @@ -76,7 +81,7 @@ $(BINUTILS_DIR)/.unpacked: $(DL_DIR)/$(BINUTILS_SOURCE) binutils-patched: $(BINUTILS_DIR)/.patched $(BINUTILS_DIR)/.patched: $(BINUTILS_DIR)/.unpacked # Apply appropriate binutils patches. - toolchain/patch-kernel.sh $(BINUTILS_DIR) $(BINUTILS_PATCH_DIR) \*.patch + toolchain/patch-kernel.sh $(BINUTILS_DIR) $(BINUTILS_PATCH_DIR) \*.patch $(BINUTILS_PATCH_EXTRA) touch $@ $(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk index b904775f4..d441a9252 100644 --- a/toolchain/external-toolchain/ext-tool.mk +++ b/toolchain/external-toolchain/ext-tool.mk @@ -1,24 +1,52 @@ # -# copy_toolchain_lib_root +# This file implements the support for external toolchains, i.e +# toolchains that have not been produced by Buildroot itself and that +# are already available on the system on which Buildroot runs. # -# $1: source -# $2: destination -# $3: strip (y|n) default is to strip +# The basic principle is the following +# +# 1. Perform some checks on the conformity between the toolchain +# configuration described in the Buildroot menuconfig system, and the +# real configuration of the external toolchain. This is for example +# important to make sure that the Buildroot configuration system +# knows whether the toolchain supports RPC, IPv6, locales, large +# files, etc. Unfortunately, these things cannot be detected +# automatically, since the value of these options (such as +# BR2_INET_RPC) are needed at configuration time because these +# options are used as dependencies for other options. And at +# configuration time, we are not able to retrieve the external +# toolchain configuration. +# +# 2. Copy the libraries needed at runtime to the target directory, +# $(TARGET_DIR). Obviously, things such as the C library, the dynamic +# loader and a few other utility libraries are needed if dynamic +# applications are to be executed on the target system. +# +# 3. Copy the libraries and headers to the staging directory. This +# will allow all further calls to gcc to be made using --sysroot +# $(STAGING_DIR), which greatly simplifies the compilation of the +# packages when using external toolchains. So in the end, only the +# cross-compiler binaries remains external, all libraries and headers +# are imported into the Buildroot tree. + +# +# Copy a toolchain library and its symbolic links from the sysroot +# directory to the target directory. Also optionaly strips the +# library. +# +# $1: sysroot directory +# $2: library name +# $3: destination directory +# $4: strip (y|n), default is to strip # copy_toolchain_lib_root = \ - LIB="$(strip $1)"; \ - DST="$(strip $2)"; \ - STRIP="$(strip $3)"; \ - \ - LIB_DIR=`$(TARGET_CC) -print-file-name=$${LIB} | sed -e "s,$${LIB}\$$,,"`; \ - \ - if test -z "$${LIB_DIR}"; then \ - echo "copy_toolchain_lib_root: lib=$${LIB} not found"; \ - exit -1; \ - fi; \ + SYSROOT_DIR="$(strip $1)"; \ + LIB="$(strip $2)"; \ + DST="$(strip $3)"; \ + STRIP="$(strip $4)"; \ \ - LIB="$(strip $1)"; \ - for FILE in `find $${LIB_DIR} -maxdepth 1 -type l -name "$${LIB}*"`; do \ + LIB_DIR="$${SYSROOT_DIR}/lib" ; \ + for FILE in `find $${LIB_DIR} -maxdepth 1 -name "$${LIB}.*"`; do \ LIB=`basename $${FILE}`; \ while test \! -z "$${LIB}"; do \ rm -fr $(TARGET_DIR)$${DST}/$${LIB}; \ @@ -43,44 +71,62 @@ copy_toolchain_lib_root = \ \ echo -n +# +# Copy the full external toolchain sysroot directory to the staging +# dir +# +# $1: sysroot directory +# copy_toolchain_sysroot = \ - SYSROOT_DIR=`$(TARGET_CC) -v 2>&1 | grep ^Configured | tr " " "\n" | grep -- "--with-sysroot" | cut -f2 -d=`; \ - if [ -n "$${SYSROOT_DIR}" ]; then cp -a $${SYSROOT_DIR}/* $(STAGING_DIR)/ ; \ - find $(STAGING_DIR) -type d | xargs chmod 755; fi + SYSROOT_DIR="$(strip $1)"; \ + cp -a $${SYSROOT_DIR}/* $(STAGING_DIR)/ ; \ + find $(STAGING_DIR) -type d | xargs chmod 755 -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y) -EXTERNAL_LIBC=libc.so.0 -EXTERNAL_LIBS=ld-uClibc.so.0 libcrypt.so.0 libdl.so.0 libgcc_s.so libm.so.0 libnsl.so.0 libpthread.so.0 libresolv.so.0 librt.so.0 libutil.so.0 -else -EXTERNAL_LIBC=libc.so.6 -EXTERNAL_LIBS=ld-linux.so.3 libcrypt.so.1 libdl.so.2 libgcc_s.so.1 libm.so.6 libnsl.so.1 libpthread.so.0 libresolv.so.2 librt.so.1 libutil.so.1 libnss_files.so.2 -endif - -check_clibrary = \ - if ! test -f `$(TARGET_CC) -print-file-name=$(EXTERNAL_LIBC)` ; then \ - echo "Incorrect selection of the C library"; \ - exit -1; \ - fi - -# 1: Buildroot option name -# 2: message +# +# Check the availability of a particular glibc feature. We assume that +# all Buildroot toolchain options are supported by glibc, so we just +# check that they are enabled. +# +# $1: Buildroot option name +# $2: feature description +# check_glibc_feature = \ if [ x$($(1)) != x"y" ] ; then \ echo "$(2) available in C library, please enable $(1)" ; \ exit 1 ; \ fi +# +# Check the correctness of a glibc external toolchain configuration. +# 1. Check that the C library selected in Buildroot matches the one +# of the external toolchain +# 2. Check that all the C library-related features are enabled in the +# config, since glibc always supports all of them +# +# $1: sysroot directory +# check_glibc = \ + SYSROOT_DIR="$(strip $1)"; \ + if ! test -f $${SYSROOT_DIR}/lib/ld-linux.so.* ; then \ + echo "Incorrect selection of the C library"; \ + exit -1; \ + fi; \ $(call check_glibc_feature,BR2_LARGEFILE,Large file support) ;\ $(call check_glibc_feature,BR2_INET_IPV6,IPv6 support) ;\ $(call check_glibc_feature,BR2_INET_RPC,RPC support) ;\ $(call check_glibc_feature,BR2_ENABLE_LOCALE,Locale support) ;\ $(call check_glibc_feature,BR2_USE_WCHAR,Wide char support) -# 1: uClibc macro name -# 2: Buildroot option name -# 3: uClibc config file -# 4: message +# +# Check the conformity of Buildroot configuration with regard to the +# uClibc configuration of the external toolchain, for a particular +# feature. +# +# $1: uClibc macro name +# $2: Buildroot option name +# $3: uClibc config file +# $4: feature description +# check_uclibc_feature = \ IS_IN_LIBC=`grep -q "\#define $(1) 1" $(3) && echo y` ; \ if [ x$($(2)) != x"y" -a x$${IS_IN_LIBC} == x"y" ] ; then \ @@ -92,8 +138,22 @@ check_uclibc_feature = \ exit 1 ; \ fi +# +# Check the correctness of a uclibc external toolchain configuration +# 1. Check that the C library selected in Buildroot matches the one +# of the external toolchain +# 2. Check that the features enabled in the Buildroot configuration +# match the features available in the uClibc of the external +# toolchain +# +# $1: sysroot directory +# check_uclibc = \ - SYSROOT_DIR=`$(TARGET_CC) -v 2>&1 | grep ^Configured | tr " " "\n" | grep -- "--with-sysroot" | cut -f2 -d=`; \ + SYSROOT_DIR="$(strip $1)"; \ + if ! test -f $${SYSROOT_DIR}/lib/ld-uClibc.so.* ; then \ + echo "Incorrect selection of the C library"; \ + exit -1; \ + fi; \ UCLIBC_CONFIG_FILE=$${SYSROOT_DIR}/usr/include/bits/uClibc_config.h ; \ $(call check_uclibc_feature,__UCLIBC_HAS_LFS__,BR2_LARGEFILE,$${UCLIBC_CONFIG_FILE},Large file support) ;\ $(call check_uclibc_feature,__UCLIBC_HAS_IPV6__,BR2_INET_IPV6,$${UCLIBC_CONFIG_FILE},IPv6 support) ;\ @@ -101,21 +161,70 @@ check_uclibc = \ $(call check_uclibc_feature,__UCLIBC_HAS_LOCALE__,BR2_ENABLE_LOCALE,$${UCLIBC_CONFIG_FILE},Locale support) ;\ $(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\ -uclibc: dependencies $(TARGET_DIR)/lib/$(EXTERNAL_LIBC) +# +# Check that the Buildroot configuration of the ABI matches the +# configuration of the external toolchain. +# +check_arm_abi = \ + EXT_TOOLCHAIN_TARGET=$(shell LANG=C $(TARGET_CC) -v 2>&1 | grep ^Target | cut -f2 -d ' ') ; \ + if echo $${EXT_TOOLCHAIN_TARGET} | grep -q 'eabi$$' ; then \ + EXT_TOOLCHAIN_ABI="eabi" ; \ + else \ + EXT_TOOLCHAIN_ABI="oabi" ; \ + fi ; \ + if [ x$(BR2_ARM_OABI) == x"y" -a $${EXT_TOOLCHAIN_ABI} == "eabi" ] ; then \ + echo "Incorrect ABI setting" ; \ + exit 1 ; \ + fi ; \ + if [ x$(BR2_ARM_EABI) == x"y" -a $${EXT_TOOLCHAIN_ABI} == "oabi" ] ; then \ + echo "Incorrect ABI setting" ; \ + exit 1 ; \ + fi ; \ + +# +# Check that the cross-compiler given in the configuration exists +# +check_cross_compiler_exists = \ + if ! test -x $(TARGET_CC) ; then \ + echo "Cannot find cross-compiler $(TARGET_CC)" ; \ + exit 1 ; \ + fi ; \ + +uclibc: dependencies $(STAMP_DIR)/ext-toolchain-installed -$(TARGET_DIR)/lib/$(EXTERNAL_LIBC): +EXTERNAL_LIBS=libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libpthread.so libresolv.so librt.so libutil.so +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y) +EXTERNAL_LIBS+=ld-uClibc.so +else +EXTERNAL_LIBS+=ld-linux.so libnss_files.so +endif + +ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +EXTERNAL_LIBS+=libstdc++.so +endif + +SYSROOT_DIR=$(shell LANG=C $(TARGET_CC) -v 2>&1 | grep ^Configured | tr " " "\n" | grep -- "--with-sysroot" | cut -f2 -d=) + +$(STAMP_DIR)/ext-toolchain-installed: @echo "Checking external toolchain settings" - @$(call check_clibrary) + $(Q)$(call check_cross_compiler_exists) +ifeq ($(strip $(SYSROOT_DIR)),) + @echo "External toolchain doesn't support --sysroot. Cannot use." + exit 1 +endif +ifeq ($(BR2_arm),y) + $(Q)$(call check_arm_abi) +endif ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y) - @$(call check_uclibc) + $(Q)$(call check_uclibc,$(SYSROOT_DIR)) else - @$(call check_glibc) + $(Q)$(call check_glibc,$(SYSROOT_DIR)) endif mkdir -p $(TARGET_DIR)/lib @echo "Copy external toolchain libraries to target..." - @$(call copy_toolchain_lib_root, $(EXTERNAL_LIBC), /lib, $(BR2_TOOLCHAIN_EXTERNAL_STRIP)) - @for libs in $(EXTERNAL_LIBS); do \ - $(call copy_toolchain_lib_root, $$libs, /lib, $(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \ + $(Q)for libs in $(EXTERNAL_LIBS); do \ + $(call copy_toolchain_lib_root,$(SYSROOT_DIR),$$libs,/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \ done @echo "Copy external toolchain sysroot to staging..." - @$(call copy_toolchain_sysroot) + $(Q)$(call copy_toolchain_sysroot,$(SYSROOT_DIR)) + @touch $@ diff --git a/toolchain/gcc/4.4.0/100-uclibc-conf.patch b/toolchain/gcc/4.4.1/100-uclibc-conf.patch index cca8c8229..cca8c8229 100644 --- a/toolchain/gcc/4.4.0/100-uclibc-conf.patch +++ b/toolchain/gcc/4.4.1/100-uclibc-conf.patch diff --git a/toolchain/gcc/4.4.0/301-missing-execinfo_h.patch b/toolchain/gcc/4.4.1/301-missing-execinfo_h.patch index 0e2092f3f..0e2092f3f 100644 --- a/toolchain/gcc/4.4.0/301-missing-execinfo_h.patch +++ b/toolchain/gcc/4.4.1/301-missing-execinfo_h.patch diff --git a/toolchain/gcc/4.4.0/302-c99-snprintf.patch b/toolchain/gcc/4.4.1/302-c99-snprintf.patch index ba51a0e1d..ba51a0e1d 100644 --- a/toolchain/gcc/4.4.0/302-c99-snprintf.patch +++ b/toolchain/gcc/4.4.1/302-c99-snprintf.patch diff --git a/toolchain/gcc/4.4.0/305-libmudflap-susv3-legacy.patch b/toolchain/gcc/4.4.1/305-libmudflap-susv3-legacy.patch index 374b1f865..374b1f865 100644 --- a/toolchain/gcc/4.4.0/305-libmudflap-susv3-legacy.patch +++ b/toolchain/gcc/4.4.1/305-libmudflap-susv3-legacy.patch diff --git a/toolchain/gcc/4.4.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/4.4.1/810-arm-softfloat-libgcc.patch index e6a30a3f0..e6a30a3f0 100644 --- a/toolchain/gcc/4.4.0/810-arm-softfloat-libgcc.patch +++ b/toolchain/gcc/4.4.1/810-arm-softfloat-libgcc.patch diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in index 9aba2f7d3..76e7f78db 100644 --- a/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in @@ -105,7 +105,7 @@ config BR2_GCC_VERSION default "4.3.1" if BR2_GCC_VERSION_4_3_1 default "4.3.2" if BR2_GCC_VERSION_4_3_2 default "4.3.3" if BR2_GCC_VERSION_4_3_3 - default "4.4.0" if BR2_GCC_VERSION_4_4_X + default "4.4.1" if BR2_GCC_VERSION_4_4_X default "4.3" if BR2_GCC_VERSION_4_3 config BR2_TOOLCHAIN_SYSROOT diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk index 5770081b3..e9249c1c5 100644 --- a/toolchain/gcc/gcc-uclibc-4.x.mk +++ b/toolchain/gcc/gcc-uclibc-4.x.mk @@ -50,6 +50,11 @@ endif # Snapshot patch endif # Not a snapshot endif # BR2_TOOLCHAIN_BUILDROOT +ifneq ($(filter xtensa%,$(ARCH)),) +include target/xtensa/patch.in +GCC_PATCH_EXTRA:=$(call XTENSA_PATCH,gcc,$(GCC_PATCH_DIR),. ..) +endif + GCC_SOURCE:=gcc-$(GCC_OFFICIAL_VERSION).tar.bz2 GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-$(GCC_OFFICIAL_VERSION) GCC_CAT:=$(BZCAT) @@ -164,7 +169,7 @@ $(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE) gcc-patched: $(GCC_DIR)/.patched $(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked # Apply any files named gcc-*.patch from the source directory to gcc - toolchain/patch-kernel.sh $(GCC_DIR) $(GCC_PATCH_DIR) \*.patch + toolchain/patch-kernel.sh $(GCC_DIR) $(GCC_PATCH_DIR) \*.patch $(GCC_PATCH_EXTRA) # Note: The soft float situation has improved considerably with gcc 3.4.x. # We can dispense with the custom spec files, as well as libfloat for the arm case. diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk index ba8a1f273..29c4c9c0b 100644 --- a/toolchain/gdb/gdb.mk +++ b/toolchain/gdb/gdb.mk @@ -19,6 +19,11 @@ GDB_SITE:=$(BR2_GNU_MIRROR)/gdb GDB_PATCH_DIR:=toolchain/gdb/$(GDB_OFFICIAL_VERSION) endif +ifneq ($(filter xtensa%,$(ARCH)),) +include target/xtensa/patch.in +GDB_PATCH_EXTRA:=$(call XTENSA_PATCH,gdb,$(GDB_PATCH_DIR),. ..) +endif + GDB_DIR:=$(TOOL_BUILD_DIR)/gdb-$(GDB_OFFICIAL_VERSION) $(DL_DIR)/$(GDB_SOURCE): @@ -33,7 +38,7 @@ ifeq ($(GDB_VERSION),snapshot) tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) ln -sf $(TOOL_BUILD_DIR)/$(shell tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) $(GDB_DIR) endif - toolchain/patch-kernel.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch + toolchain/patch-kernel.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch $(GDB_PATCH_EXTRA) $(CONFIG_UPDATE) $(@D) touch $@ diff --git a/toolchain/kernel-headers/Config.in b/toolchain/kernel-headers/Config.in index 13acecc94..f1103f259 100644 --- a/toolchain/kernel-headers/Config.in +++ b/toolchain/kernel-headers/Config.in @@ -49,9 +49,9 @@ config BR2_KERNEL_HEADERS_RT config BR2_DEFAULT_KERNEL_HEADERS string default "2.6.26.8" if BR2_KERNEL_HEADERS_2_6_26 - default "2.6.27.26" if BR2_KERNEL_HEADERS_2_6_27 + default "2.6.27.27" if BR2_KERNEL_HEADERS_2_6_27 default "2.6.28.10" if BR2_KERNEL_HEADERS_2_6_28 default "2.6.29.6" if BR2_KERNEL_HEADERS_2_6_29 - default "2.6.30.1" if BR2_KERNEL_HEADERS_2_6_30 + default "2.6.30.2" if BR2_KERNEL_HEADERS_2_6_30 default "2.6" if BR2_KERNEL_HEADERS_SNAP diff --git a/toolchain/patch-kernel.sh b/toolchain/patch-kernel.sh index e2e89486d..76cb9f753 100755 --- a/toolchain/patch-kernel.sh +++ b/toolchain/patch-kernel.sh @@ -21,7 +21,14 @@ if [ ! -d "${patchdir}" ] ; then fi for i in `cd ${patchdir}; ls -d ${patchpattern} 2> /dev/null` ; do - case "$i" in + apply="patch -p1 -E -d" + uncomp_parm="" + if [ -d "${patchdir}/$i" ] ; then + type="directory overlay" + uncomp="tar cf - --exclude=.svn --no-anchored -C" + uncomp_parm="." + apply="tar xvf - -C" + else case "$i" in *.gz) type="gzip"; uncomp="gunzip -dc"; ;; *.bz) @@ -32,13 +39,17 @@ for i in `cd ${patchdir}; ls -d ${patchpattern} 2> /dev/null` ; do type="zip"; uncomp="unzip -d"; ;; *.Z) type="compress"; uncomp="uncompress -c"; ;; + *.tgz) + type="tar gzip"; uncomp="gunzip -dc"; apply="tar xvf - -C"; ;; + *.tar) + type="tar"; uncomp="cat"; apply="tar xvf - -C"; ;; *) type="plaintext"; uncomp="cat"; ;; - esac + esac fi echo "" echo "Applying ${i} using ${type}: " echo ${i} | cat >> ${targetdir}/.applied_patches_list - ${uncomp} ${patchdir}/${i} | patch -p1 -E -d ${targetdir} + ${uncomp} ${patchdir}/${i} ${uncomp_parm} | ${apply} ${targetdir} if [ $? != 0 ] ; then echo "Patch failed! Please fix $i!" exit 1 diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk index b39b9399b..80d7d9861 100644 --- a/toolchain/uClibc/uclibc.mk +++ b/toolchain/uClibc/uclibc.mk @@ -52,6 +52,7 @@ UCLIBC_TARGET_ARCH:=$(shell $(SHELL) -c "echo $(ARCH) | sed \ -e 's/mipsel.*/mips/' \ -e 's/cris.*/cris/' \ -e 's/nios2.*/nios2/' \ + -e 's/xtensa.*/xtensa/' \ ") # just handle the ones that can be big or little UCLIBC_TARGET_ENDIAN:=$(shell $(SHELL) -c "echo $(ARCH) | sed \ |