summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/base.bbclass54
-rw-r--r--conf/bitbake.conf1
-rw-r--r--packages/uclibc/uclibc-cvs/dyn-ldconfig.patch34
-rw-r--r--packages/uclibc/uclibc-cvs/i386/uClibc.config170
-rw-r--r--packages/uclibc/uclibc-cvs/i686/uClibc.config170
5 files changed, 404 insertions, 25 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 608114cb22..47720464f9 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -405,40 +405,44 @@ addtask patch after do_unpack
do_patch[dirs] = "${WORKDIR}"
python base_do_patch() {
import re
+ import bb.fetch
+
+ src_uri = (bb.data.getVar('SRC_URI', d, 1) or '').split()
+ workdir = bb.data.getVar('WORKDIR', d, 1)
+ for url in src_uri:
- src_uri = bb.data.getVar('SRC_URI', d)
- if not src_uri:
- return
- src_uri = bb.data.expand(src_uri, d)
- for url in src_uri.split():
-# bb.note('url is %s' % url)
(type, host, path, user, pswd, parm) = bb.decodeurl(url)
if not "patch" in parm:
continue
- from bb.fetch import init, localpath
- init([url])
+
+ bb.fetch.init([url])
url = bb.encodeurl((type, host, path, user, pswd, []))
- local = '/' + localpath(url, d)
- # patch!
+ local = os.path.join('/', bb.fetch.localpath(url, d))
+
+ # did it need to be unpacked?
dots = local.split(".")
if dots[-1] in ['gz', 'bz2', 'Z']:
- efile = os.path.join(bb.data.getVar('WORKDIR', d),os.path.basename('.'.join(dots[0:-1])))
+ unpacked = os.path.join(bb.data.getVar('WORKDIR', d),os.path.basename('.'.join(dots[0:-1])))
else:
- efile = local
- efile = bb.data.expand(efile, d)
- patches_dir = bb.data.expand(bb.data.getVar('PATCHES_DIR', d), d)
- bb.mkdirhier(patches_dir + "/.patches")
- os.chdir(patches_dir)
- cmd = "PATH=\"%s\" patcher" % bb.data.getVar("PATH", d, 1)
+ unpacked = local
+ unpacked = bb.data.expand(unpacked, d)
+
if "pnum" in parm:
- cmd += " -p %s" % parm["pnum"]
- # Getting rid of // at the front helps the Cygwin-Users of OE
- if efile.startswith('//'):
- efile = efile[1:]
- cmd += " -R -n \"%s\" -i %s" % (os.path.basename(efile), efile)
- ret = os.system(cmd)
- if ret != 0:
- raise bb.build.FuncFailed("'patcher' execution failed")
+ pnum = parm["pnum"]
+ else:
+ pnum = "1"
+
+ dots = os.path.basename(unpacked).split(".")
+ if len(dots) > 1:
+ pname = ".".join(dots[:-1])
+ else:
+ pname = unpacked
+
+ os.chdir(workdir)
+ bb.note("Applying patch '%s'" % pname)
+ bb.data.setVar("do_patchcmd", bb.data.getVar("PATCHCMD", d, 1) % (pnum, pname, unpacked), d)
+ bb.data.setVarFlag("do_patchcmd", "func", 1, d)
+ bb.build.exec_func("do_patchcmd", d)
}
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 5fa8bb0d38..1d64f49320 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -303,6 +303,7 @@ SRC_URI = "file://${FILE}"
MKTEMPDIRCMD = "mktemp -d -q ${TMPBASE}"
MKTEMPCMD = "mktemp -q ${TMPBASE}"
+PATCHCMD = "patcher -R -p '%s' -n '%s' -i '%s'"
##################################################################
# Not sure about the rest of this yet.
diff --git a/packages/uclibc/uclibc-cvs/dyn-ldconfig.patch b/packages/uclibc/uclibc-cvs/dyn-ldconfig.patch
index e69de29bb2..a053b9ee81 100644
--- a/packages/uclibc/uclibc-cvs/dyn-ldconfig.patch
+++ b/packages/uclibc/uclibc-cvs/dyn-ldconfig.patch
@@ -0,0 +1,34 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- uClibc/utils/Makefile~dyn-ldconfig
++++ uClibc/utils/Makefile
+@@ -45,7 +45,7 @@
+ $(STRIPTOOL) -x -R .note -R .comment $@
+
+ ldconfig: ldconfig.c
+- $(CC) $(CFLAGS) -Wl,-s -static \
++ $(CC) $(CFLAGS) -Wl,-s $(if $(filter $(UCLIBC_STATIC_LDCONFIG),y),-static) \
+ -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
+ -DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \
+ $^ -o $@
+--- uClibc/extra/Configs/Config.in~dyn-ldconfig
++++ uClibc/extra/Configs/Config.in
+@@ -311,6 +311,15 @@
+ if you are using an older Linux kernel (2.0.x) that lacks large file
+ support. Enabling this option will increase the size of uClibc.
+
++config UCLIBC_STATIC_LDCONFIG
++ bool "Link ldconfig statically"
++ default y
++ help
++ If you wish to link the ldconfig binary statically, enable this option.
++ It being static can be beneficial if you have a library problem and need
++ ldconfig to recover from it. If keeping the size down is more important
++ to you than system recovery, disable this option.
++
+ choice
+ prompt "Malloc Implementation"
+ default MALLOC if ! ARCH_HAS_MMU
diff --git a/packages/uclibc/uclibc-cvs/i386/uClibc.config b/packages/uclibc/uclibc-cvs/i386/uClibc.config
index e69de29bb2..90d5ce1fd7 100644
--- a/packages/uclibc/uclibc-cvs/i386/uClibc.config
+++ b/packages/uclibc/uclibc-cvs/i386/uClibc.config
@@ -0,0 +1,170 @@
+#
+# Automatically generated make config: don't edit
+#
+# TARGET_alpha is not set
+# TARGET_arm 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_i386=y
+# TARGET_i960 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_sparc is not set
+# TARGET_v850 is not set
+
+#
+# Target Architecture Features and Options
+#
+HAVE_ELF=y
+ARCH_SUPPORTS_LITTLE_ENDIAN=y
+TARGET_ARCH="i386"
+# CONFIG_GENERIC_386 is not set
+# CONFIG_386 is not set
+# CONFIG_486 is not set
+# CONFIG_586 is not set
+# CONFIG_586MMX is not set
+# CONFIG_686 is not set
+# CONFIG_PENTIUMII is not set
+# CONFIG_PENTIUMIII is not set
+CONFIG_PENTIUM4=y
+# CONFIG_K6 is not set
+# CONFIG_K7 is not set
+# CONFIG_ELAN is not set
+# CONFIG_CRUSOE is not set
+# CONFIG_WINCHIPC6 is not set
+# CONFIG_WINCHIP2 is not set
+# CONFIG_CYRIXIII is not set
+# CONFIG_NEHEMIAH is not set
+ARCH_LITTLE_ENDIAN=y
+# ARCH_BIG_ENDIAN is not set
+# ARCH_HAS_NO_MMU is not set
+ARCH_HAS_MMU=y
+UCLIBC_HAS_FLOATS=y
+HAS_FPU=y
+DO_C99_MATH=y
+WARNINGS="-Wall"
+KERNEL_SOURCE="/home/kergoth/code/user/oe/build-colinux/tmp/cross/i686-linux-uclibc/include"
+C_SYMBOL_PREFIX=""
+HAVE_DOT_CONFIG=y
+
+#
+# General Library Settings
+#
+# HAVE_NO_PIC is not set
+DOPIC=y
+# HAVE_NO_SHARED is not set
+HAVE_SHARED=y
+# ARCH_HAS_NO_LDSO is not set
+BUILD_UCLIBC_LDSO=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_CTOR_DTOR=y
+# HAS_NO_THREADS is not set
+UCLIBC_HAS_THREADS=y
+PTHREADS_DEBUG_SUPPORT=y
+UCLIBC_HAS_LFS=y
+# UCLIBC_STATIC_LDCONFIG is not set
+# MALLOC is not set
+# MALLOC_SIMPLE is not set
+MALLOC_STANDARD=y
+MALLOC_GLIBC_COMPAT=y
+UCLIBC_DYNAMIC_ATEXIT=y
+HAS_SHADOW=y
+UNIX98PTY_ONLY=y
+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"
+
+#
+# Networking Support
+#
+UCLIBC_HAS_IPV6=y
+UCLIBC_HAS_RPC=y
+UCLIBC_HAS_FULL_RPC=y
+
+#
+# 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=y
+UCLIBC_HAS_LOCALE=y
+UCLIBC_PREGENERATED_LOCALE_DATA=y
+# UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA is not set
+UCLIBC_HAS_XLOCALE=y
+UCLIBC_HAS_HEXADECIMAL_FLOATS=y
+UCLIBC_HAS_GLIBC_DIGIT_GROUPING=y
+UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING=y
+UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
+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=y
+# 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 is not set
+# 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_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
+
+#
+# Big and Tall
+#
+UCLIBC_HAS_REGEX=y
+UCLIBC_HAS_WORDEXP=y
+UCLIBC_HAS_FTW=y
+UCLIBC_HAS_GLOB=y
+
+#
+# Library Installation Options
+#
+SHARED_LIB_LOADER_PREFIX="$(DEVEL_PREFIX)/lib"
+RUNTIME_PREFIX="/"
+DEVEL_PREFIX="//usr"
+
+#
+# uClibc security related options
+#
+# UCLIBC_SECURITY is not set
+
+#
+# uClibc development/debugging options
+#
+# DODEBUG is not set
+# DOASSERTS is not set
+# SUPPORT_LD_DEBUG is not set
+# SUPPORT_LD_DEBUG_EARLY is not set
+# UCLIBC_MJN3_ONLY is not set
diff --git a/packages/uclibc/uclibc-cvs/i686/uClibc.config b/packages/uclibc/uclibc-cvs/i686/uClibc.config
index e69de29bb2..90d5ce1fd7 100644
--- a/packages/uclibc/uclibc-cvs/i686/uClibc.config
+++ b/packages/uclibc/uclibc-cvs/i686/uClibc.config
@@ -0,0 +1,170 @@
+#
+# Automatically generated make config: don't edit
+#
+# TARGET_alpha is not set
+# TARGET_arm 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_i386=y
+# TARGET_i960 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_sparc is not set
+# TARGET_v850 is not set
+
+#
+# Target Architecture Features and Options
+#
+HAVE_ELF=y
+ARCH_SUPPORTS_LITTLE_ENDIAN=y
+TARGET_ARCH="i386"
+# CONFIG_GENERIC_386 is not set
+# CONFIG_386 is not set
+# CONFIG_486 is not set
+# CONFIG_586 is not set
+# CONFIG_586MMX is not set
+# CONFIG_686 is not set
+# CONFIG_PENTIUMII is not set
+# CONFIG_PENTIUMIII is not set
+CONFIG_PENTIUM4=y
+# CONFIG_K6 is not set
+# CONFIG_K7 is not set
+# CONFIG_ELAN is not set
+# CONFIG_CRUSOE is not set
+# CONFIG_WINCHIPC6 is not set
+# CONFIG_WINCHIP2 is not set
+# CONFIG_CYRIXIII is not set
+# CONFIG_NEHEMIAH is not set
+ARCH_LITTLE_ENDIAN=y
+# ARCH_BIG_ENDIAN is not set
+# ARCH_HAS_NO_MMU is not set
+ARCH_HAS_MMU=y
+UCLIBC_HAS_FLOATS=y
+HAS_FPU=y
+DO_C99_MATH=y
+WARNINGS="-Wall"
+KERNEL_SOURCE="/home/kergoth/code/user/oe/build-colinux/tmp/cross/i686-linux-uclibc/include"
+C_SYMBOL_PREFIX=""
+HAVE_DOT_CONFIG=y
+
+#
+# General Library Settings
+#
+# HAVE_NO_PIC is not set
+DOPIC=y
+# HAVE_NO_SHARED is not set
+HAVE_SHARED=y
+# ARCH_HAS_NO_LDSO is not set
+BUILD_UCLIBC_LDSO=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_CTOR_DTOR=y
+# HAS_NO_THREADS is not set
+UCLIBC_HAS_THREADS=y
+PTHREADS_DEBUG_SUPPORT=y
+UCLIBC_HAS_LFS=y
+# UCLIBC_STATIC_LDCONFIG is not set
+# MALLOC is not set
+# MALLOC_SIMPLE is not set
+MALLOC_STANDARD=y
+MALLOC_GLIBC_COMPAT=y
+UCLIBC_DYNAMIC_ATEXIT=y
+HAS_SHADOW=y
+UNIX98PTY_ONLY=y
+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"
+
+#
+# Networking Support
+#
+UCLIBC_HAS_IPV6=y
+UCLIBC_HAS_RPC=y
+UCLIBC_HAS_FULL_RPC=y
+
+#
+# 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=y
+UCLIBC_HAS_LOCALE=y
+UCLIBC_PREGENERATED_LOCALE_DATA=y
+# UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA is not set
+UCLIBC_HAS_XLOCALE=y
+UCLIBC_HAS_HEXADECIMAL_FLOATS=y
+UCLIBC_HAS_GLIBC_DIGIT_GROUPING=y
+UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING=y
+UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
+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=y
+# 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 is not set
+# 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_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
+
+#
+# Big and Tall
+#
+UCLIBC_HAS_REGEX=y
+UCLIBC_HAS_WORDEXP=y
+UCLIBC_HAS_FTW=y
+UCLIBC_HAS_GLOB=y
+
+#
+# Library Installation Options
+#
+SHARED_LIB_LOADER_PREFIX="$(DEVEL_PREFIX)/lib"
+RUNTIME_PREFIX="/"
+DEVEL_PREFIX="//usr"
+
+#
+# uClibc security related options
+#
+# UCLIBC_SECURITY is not set
+
+#
+# uClibc development/debugging options
+#
+# DODEBUG is not set
+# DOASSERTS is not set
+# SUPPORT_LD_DEBUG is not set
+# SUPPORT_LD_DEBUG_EARLY is not set
+# UCLIBC_MJN3_ONLY is not set