mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-14 13:02:58 +02:00
Merge branch 'kernel-update' of git.ipfire.org:/pub/git/ipfire-2.x into kernel-update
This commit is contained in:
@@ -22,7 +22,8 @@ CONFIG_GENERIC_HWEIGHT=y
|
||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_VECTORS_BASE=0xffff0000
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
# CONFIG_ARM_PATCH_PHYS_VIRT is not set
|
||||
CONFIG_PHYS_OFFSET=0x0
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
|
||||
CONFIG_HAVE_IRQ_WORK=y
|
||||
@@ -40,8 +41,8 @@ CONFIG_LOCALVERSION=""
|
||||
CONFIG_HAVE_KERNEL_GZIP=y
|
||||
CONFIG_HAVE_KERNEL_LZMA=y
|
||||
CONFIG_HAVE_KERNEL_LZO=y
|
||||
CONFIG_KERNEL_GZIP=y
|
||||
# CONFIG_KERNEL_LZMA is not set
|
||||
# CONFIG_KERNEL_GZIP is not set
|
||||
CONFIG_KERNEL_LZMA=y
|
||||
# CONFIG_KERNEL_LZO is not set
|
||||
CONFIG_DEFAULT_HOSTNAME="(none)"
|
||||
CONFIG_SWAP=y
|
||||
@@ -438,7 +439,7 @@ CONFIG_HAVE_AOUT=y
|
||||
CONFIG_PM_RUNTIME=y
|
||||
CONFIG_PM=y
|
||||
# CONFIG_PM_DEBUG is not set
|
||||
# CONFIG_APM_EMULATION is not set
|
||||
CONFIG_APM_EMULATION=m
|
||||
CONFIG_CPU_PM=y
|
||||
# CONFIG_ARM_CPU_SUSPEND is not set
|
||||
CONFIG_NET=y
|
||||
@@ -2124,7 +2125,7 @@ CONFIG_SERIAL_MFD_HSU=m
|
||||
CONFIG_SERIAL_CORE=y
|
||||
CONFIG_SERIAL_CORE_CONSOLE=y
|
||||
# CONFIG_SERIAL_JSM is not set
|
||||
CONFIG_SERIAL_OF_PLATFORM=m
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SERIAL_TIMBERDALE=m
|
||||
CONFIG_SERIAL_ALTERA_JTAGUART=m
|
||||
CONFIG_SERIAL_ALTERA_UART=m
|
||||
@@ -2323,6 +2324,7 @@ CONFIG_W1_SLAVE_BQ27000=m
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
# CONFIG_POWER_SUPPLY_DEBUG is not set
|
||||
# CONFIG_PDA_POWER is not set
|
||||
# CONFIG_APM_POWER is not set
|
||||
# CONFIG_TEST_POWER is not set
|
||||
# CONFIG_BATTERY_DS2760 is not set
|
||||
# CONFIG_BATTERY_DS2780 is not set
|
||||
@@ -4052,7 +4054,10 @@ CONFIG_HAVE_ARCH_KGDB=y
|
||||
# CONFIG_STRICT_DEVMEM is not set
|
||||
# CONFIG_ARM_UNWIND is not set
|
||||
# CONFIG_DEBUG_USER is not set
|
||||
# CONFIG_DEBUG_LL is not set
|
||||
CONFIG_DEBUG_LL=y
|
||||
CONFIG_DEBUG_LL_UART_NONE=y
|
||||
# CONFIG_DEBUG_ICEDCC is not set
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
|
||||
#
|
||||
# Security options
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +0,0 @@
|
||||
boot/System.map-KVER-ipfire-versatile
|
||||
boot/config-KVER-ipfire-versatile
|
||||
boot/vmlinuz-KVER-ipfire-versatile
|
||||
boot/ipfirerd-KVER-versatile.img
|
||||
lib/modules/KVER-ipfire-versatile
|
||||
@@ -44,6 +44,7 @@ ifeq "$(ROOT)" ""
|
||||
else
|
||||
ifeq "$(PASS)" "1"
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)-tools1
|
||||
CFLAGS =
|
||||
EXTRA_CONFIG = --prefix=/tools --disable-nls --disable-werror --disable-gprof
|
||||
#EXTRA_MAKE = LDFLAGS="-all-static"
|
||||
EXTRA_INSTALL =
|
||||
|
||||
@@ -70,8 +70,7 @@ $(subst %,%_MD5,$(objects)) :
|
||||
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP) && patch -p1 < $(DIR_SRC)/src/patches/$(THISAPP)-no_compiler_mtime.patch
|
||||
cd $(DIR_APP) && CFLAGS="-O2 -static -DDEFAULT_MAXSIZE=2097152" ./configure --prefix=$(ROOT)/usr/local
|
||||
cd $(DIR_APP) && CFLAGS="-O2 -static -DDEFAULT_MAXSIZE=5242880" ./configure --prefix=$(ROOT)/usr/local
|
||||
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
|
||||
cd $(DIR_APP) && make install
|
||||
ln -sf ccache $(ROOT)/usr/local/bin/gcc
|
||||
|
||||
@@ -92,8 +92,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
# needed.
|
||||
|
||||
ifeq "$(MACHINE_TYPE)" "arm"
|
||||
# versatile kernel
|
||||
/sbin/dracut --force --verbose --strip /boot/ipfirerd-$(KVER)-versatile.img $(KVER)-ipfire-versatile
|
||||
# kirkwood kernel
|
||||
/sbin/dracut --force --verbose --strip /boot/ipfirerd-$(KVER)-kirkwood.img $(KVER)-ipfire-kirkwood
|
||||
cd /boot && mkimage -A arm -T ramdisk -C lzma -d ipfirerd-$(KVER)-kirkwood.img uInit-ipfire-kirkwood
|
||||
|
||||
6
lfs/gcc
6
lfs/gcc
@@ -53,7 +53,7 @@ ifeq "$(PASS)" "1"
|
||||
--disable-nls \
|
||||
--enable-shared \
|
||||
--enable-languages=c \
|
||||
--disable-bootstrap
|
||||
--enable-bootstrap
|
||||
EXTRA_MAKE =
|
||||
EXTRA_INSTALL =
|
||||
else
|
||||
@@ -93,6 +93,10 @@ endif
|
||||
export XCFLAGS = $(CFLAGS)
|
||||
export TCFLAGS = $(CFLAGS)
|
||||
|
||||
ifeq "$(PASS)" "1"
|
||||
CFLAGS =
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
@@ -113,6 +113,7 @@ ifeq "$(MACHINE_TYPE)" "arm"
|
||||
cd $(DIR_APP) && mv -v glibc-ports-$(VER) ports
|
||||
|
||||
cd $(DIR_APP)/ports && patch -Np1 -i $(DIR_SRC)/src/patches/glibc-ports-avoid-using-asm-procinfo.patch
|
||||
cd $(DIR_APP)/ports && patch -Np1 -i $(DIR_SRC)/src/patches/glibc-arm-dont-use-swp.patch
|
||||
|
||||
# asm/page.h should not be included in sysdeps/unix/sysv/linux/arm/ioperm.c.
|
||||
cd $(DIR_APP) && sed "/asm\/page.h/d" -i ports/sysdeps/unix/sysv/linux/arm/ioperm.c
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
include Config
|
||||
|
||||
VER = 3.2.25
|
||||
VER = 3.2.27
|
||||
|
||||
RPI_PATCHES = linux-3.2-bootc-f23da7f
|
||||
|
||||
@@ -75,7 +75,7 @@ objects =$(DL_FILE) \
|
||||
$(DL_FILE) = $(URL_IPFIRE)/$(DL_FILE)
|
||||
rpi-patches-$(RPI_PATCHES).patch.xz = $(URL_IPFIRE)/rpi-patches-$(RPI_PATCHES).patch.xz
|
||||
|
||||
$(DL_FILE)_MD5 = b663da3da2dfba70a2a2d0c7f5999423
|
||||
$(DL_FILE)_MD5 = ba14821366a1c055bcd0fe210297d09b
|
||||
rpi-patches-$(RPI_PATCHES).patch.xz_MD5 = 5651c6411bb1cbdbfe4b2908c117aaf3
|
||||
|
||||
install : $(TARGET)
|
||||
@@ -188,16 +188,11 @@ ifeq "$(KCFG)" "-rpi"
|
||||
cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" zImage
|
||||
cd /boot && cat first32k.bin $(DIR_APP)/arch/arm/boot/Image > kernel.img
|
||||
cd $(DIR_APP) && cp -v /boot/kernel.img /boot/vmlinuz-$(VER)-$(VERSUFIX)
|
||||
else
|
||||
ifeq "$(KCFG)" "-versatile"
|
||||
cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" zImage
|
||||
cd $(DIR_APP) && cp -v arch/arm/boot/zImage /boot/vmlinuz-$(VER)-$(VERSUFIX)
|
||||
else
|
||||
cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" bzImage
|
||||
cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/vmlinuz-$(VER)-$(VERSUFIX)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER)-$(VERSUFIX)
|
||||
cd $(DIR_APP) && cp -v .config /boot/config-$(VER)-$(VERSUFIX)
|
||||
|
||||
@@ -201,15 +201,10 @@ ifeq "$(KCFG)" "-kirkwood"
|
||||
cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" uImage
|
||||
cd $(DIR_APP) && cp -v arch/arm/boot/uImage /boot/vmlinuz-$(VER)-$(VERSUFIX)
|
||||
cd $(DIR_APP) && cp -v arch/arm/boot/uImage /boot/uImage-$(VERSUFIX)
|
||||
else
|
||||
ifeq "$(KCFG)" "-versatile"
|
||||
cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" zImage
|
||||
cd $(DIR_APP) && cp -v arch/arm/boot/zImage /boot/vmlinuz-$(VER)-$(VERSUFIX)
|
||||
else
|
||||
cd $(DIR_APP) && make $(MAKETUNING) CC="$(KGCC)" bzImage
|
||||
cd $(DIR_APP) && cp -v arch/i386/boot/bzImage /boot/vmlinuz-$(VER)-$(VERSUFIX)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
cd $(DIR_APP) && cp -v System.map /boot/System.map-$(VER)-$(VERSUFIX)
|
||||
cd $(DIR_APP) && cp -v .config /boot/config-$(VER)-$(VERSUFIX)
|
||||
|
||||
4
lfs/make
4
lfs/make
@@ -49,6 +49,10 @@ else
|
||||
EXTRA_INSTALL =
|
||||
endif
|
||||
|
||||
ifeq "$(PASS)" "1"
|
||||
CFLAGS =
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
28
make.sh
28
make.sh
@@ -37,7 +37,7 @@ KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'`
|
||||
MACHINE=`uname -m`
|
||||
GIT_TAG=$(git tag | tail -1) # Git Tag
|
||||
GIT_LASTCOMMIT=$(git log | head -n1 | cut -d" " -f2 |head -c8) # Last commit
|
||||
TOOLCHAINVER=3
|
||||
TOOLCHAINVER=4
|
||||
|
||||
BUILDMACHINE=$MACHINE
|
||||
if [ "$MACHINE" = "x86_64" ]; then
|
||||
@@ -240,7 +240,7 @@ buildtoolchain() {
|
||||
;;
|
||||
|
||||
# ARM
|
||||
armv5tel:armv5tel|armv5tel:armv5tejl|armv5tel:armv7l)
|
||||
armv5tel:armv5tel|armv5tel:armv5tejl|armv5tel:armv6l|armv5tel:armv7l)
|
||||
# These are working.
|
||||
;;
|
||||
armv5tel:*)
|
||||
@@ -255,6 +255,14 @@ buildtoolchain() {
|
||||
exiterror "Cannot build toolchain on ipfire. Please use the download."
|
||||
fi
|
||||
|
||||
if [ ! -e /usr/include/asm -o ! -e /usr/include/bits -o ! -e /usr/include/gnu -o ! -e /usr/include/sys ]; then
|
||||
exiterror "Cannot build toolchain without (asm, bits, gnu or sys includes). Please fix or use the download."
|
||||
fi
|
||||
|
||||
if [ ! -e /usr/lib/libc.so ]; then
|
||||
exiterror "Cannot build toolchain without (/usr/lib/libc.so). Please fix or use the download."
|
||||
fi
|
||||
|
||||
LOGFILE="$BASEDIR/log/_build.toolchain.log"
|
||||
export LOGFILE
|
||||
NATIVEGCC=`gcc --version | grep GCC | awk {'print $3'}`
|
||||
@@ -262,10 +270,10 @@ buildtoolchain() {
|
||||
ORG_PATH=$PATH
|
||||
lfsmake1 ccache PASS=1
|
||||
lfsmake1 make PASS=1
|
||||
lfsmake1 linux2 TOOLS=1 HEADERS=1
|
||||
lfsmake1 binutils PASS=1
|
||||
lfsmake1 gcc PASS=1
|
||||
export PATH=$BASEDIR/build/usr/local/bin:$BASEDIR/build/tools/bin:$PATH
|
||||
lfsmake1 linux2 TOOLS=1 HEADERS=1
|
||||
lfsmake1 glibc
|
||||
lfsmake1 cleanup-toolchain PASS=1
|
||||
lfsmake1 fake-environ
|
||||
@@ -455,20 +463,6 @@ buildipfire() {
|
||||
# ipfiremake e1000e KCFG="-omap"
|
||||
# ipfiremake igb KCFG="-omap"
|
||||
|
||||
# arm-versatile kernel build
|
||||
ipfiremake linux KCFG="-versatile"
|
||||
# ipfiremake v4l-dvb KCFG="-versatile"
|
||||
# ipfiremake kvm-kmod KCFG="-versatile"
|
||||
# ipfiremake mISDN KCFG="-versatile"
|
||||
# ipfiremake dahdi KCFG="-versatile" KMOD=1
|
||||
ipfiremake cryptodev KCFG="-versatile"
|
||||
ipfiremake compat-wireless KCFG="-versatile"
|
||||
# ipfiremake r8169 KCFG="-versatile"
|
||||
# ipfiremake r8168 KCFG="-versatile"
|
||||
# ipfiremake r8101 KCFG="-versatile"
|
||||
# ipfiremake e1000 KCFG="-versatile"
|
||||
# ipfiremake e1000e KCFG="-versatile"
|
||||
# ipfiremake igb KCFG="-versatile"
|
||||
# arm-kirkwood kernel build
|
||||
ipfiremake linux KCFG="-kirkwood"
|
||||
# ipfiremake v4l-dvb KCFG="-kirkwood"
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
diff -Naur ccache-3.1.org/ccache.c ccache-3.1/ccache.c
|
||||
--- ccache-3.1.org/ccache.c 2010-09-16 19:01:09.000000000 +0200
|
||||
+++ ccache-3.1/ccache.c 2010-10-21 21:41:08.000000000 +0200
|
||||
@@ -805,13 +805,16 @@
|
||||
*/
|
||||
compilercheck = getenv("CCACHE_COMPILERCHECK");
|
||||
if (!compilercheck) {
|
||||
- compilercheck = "mtime";
|
||||
+ compilercheck = "size";
|
||||
}
|
||||
if (str_eq(compilercheck, "none")) {
|
||||
/* Do nothing. */
|
||||
} else if (str_eq(compilercheck, "content")) {
|
||||
hash_delimiter(hash, "cc_content");
|
||||
hash_file(hash, args->argv[0]);
|
||||
+ } else if (str_eq(compilercheck, "size")) {
|
||||
+ hash_delimiter(hash, "cc_size");
|
||||
+ hash_int(hash, st.st_size);
|
||||
} else if (str_eq(compilercheck, "mtime")) {
|
||||
hash_delimiter(hash, "cc_mtime");
|
||||
hash_int(hash, st.st_size);
|
||||
305
src/patches/glibc-arm-dont-use-swp.patch
Normal file
305
src/patches/glibc-arm-dont-use-swp.patch
Normal file
@@ -0,0 +1,305 @@
|
||||
commit 1ba025a9a21eda65d8c36cc0dbb51d214a3ebb1a
|
||||
Author: Daniel Jacobowitz <dan@codesourcery.com>
|
||||
Date: Mon Jun 2 01:57:03 2008 +0000
|
||||
|
||||
2008-06-01 Paul Brook <paul@codesourcery.com>
|
||||
Zack Weinberg <zack@codesourcery.com>
|
||||
Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* sysdeps/arm/nptl/pthread_spin_lock.S,
|
||||
sysdeps/arm/nptl/pthread_spin_trylock.S: Delete.
|
||||
* sysdeps/arm/nptl/pthread_spin_lock.c,
|
||||
sysdeps/arm/nptl/pthread_spin_trylock.c: New files using
|
||||
atomic_compare_and_exchange_val_acq to take spinlocks.
|
||||
* sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (lll_trylock,
|
||||
lll_cond_trylock): Use atomic_compare_and_exchange_val_acq.
|
||||
(__lll_trylock, __lll_cond_trylock): Delete.
|
||||
* sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
|
||||
(atomic_exchange_acq): Delete.
|
||||
(atomic_full_barrier): Define.
|
||||
(__arch_compare_and_exchange_val_32_acq): Use named operands.
|
||||
* sysdeps/unix/sysv/linux/arm/eabi/configure.in: Update
|
||||
arch_minimum_kernel to 2.6.16.
|
||||
* sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerated.
|
||||
|
||||
diff --git a/sysdeps/arm/nptl/pthread_spin_lock.S b/sysdeps/arm/nptl/pthread_spin_lock.S
|
||||
deleted file mode 100644
|
||||
index bd6adf7..0000000
|
||||
--- a/sysdeps/arm/nptl/pthread_spin_lock.S
|
||||
+++ /dev/null
|
||||
@@ -1,31 +0,0 @@
|
||||
-/* Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
- This file is part of the GNU C Library.
|
||||
-
|
||||
- The GNU C Library is free software; you can redistribute it and/or
|
||||
- modify it under the terms of the GNU Lesser General Public
|
||||
- License as published by the Free Software Foundation; either
|
||||
- version 2.1 of the License, or (at your option) any later version.
|
||||
-
|
||||
- The GNU C Library is distributed in the hope that it will be useful,
|
||||
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
- Lesser General Public License for more details.
|
||||
-
|
||||
- You should have received a copy of the GNU Lesser General Public
|
||||
- License along with the GNU C Library; if not, write to the Free
|
||||
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
- 02111-1307 USA. */
|
||||
-
|
||||
-#include <sysdep.h>
|
||||
-
|
||||
- .text
|
||||
- .align 4
|
||||
-
|
||||
-ENTRY (pthread_spin_lock)
|
||||
- mov r1, #1
|
||||
-1: swp r2, r1, [r0]
|
||||
- teq r2, #0
|
||||
- bne 1b
|
||||
- mov r0, #0
|
||||
- PSEUDO_RET_NOERRNO
|
||||
-END (pthread_spin_lock)
|
||||
diff --git a/sysdeps/arm/nptl/pthread_spin_lock.c b/sysdeps/arm/nptl/pthread_spin_lock.c
|
||||
new file mode 100644
|
||||
index 0000000..1217b89
|
||||
--- /dev/null
|
||||
+++ b/sysdeps/arm/nptl/pthread_spin_lock.c
|
||||
@@ -0,0 +1,30 @@
|
||||
+/* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+
|
||||
+ The GNU C Library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, write to the Free
|
||||
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
+ 02111-1307 USA. */
|
||||
+
|
||||
+#include <atomic.h>
|
||||
+#include "pthreadP.h"
|
||||
+
|
||||
+int
|
||||
+pthread_spin_lock (pthread_spinlock_t *lock)
|
||||
+{
|
||||
+ while (atomic_compare_and_exchange_val_acq (lock, 1, 0) != 0)
|
||||
+ while (*lock != 0)
|
||||
+ ;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/sysdeps/arm/nptl/pthread_spin_trylock.S b/sysdeps/arm/nptl/pthread_spin_trylock.S
|
||||
deleted file mode 100644
|
||||
index 8593150..0000000
|
||||
--- a/sysdeps/arm/nptl/pthread_spin_trylock.S
|
||||
+++ /dev/null
|
||||
@@ -1,34 +0,0 @@
|
||||
-/* Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
- This file is part of the GNU C Library.
|
||||
-
|
||||
- The GNU C Library is free software; you can redistribute it and/or
|
||||
- modify it under the terms of the GNU Lesser General Public
|
||||
- License as published by the Free Software Foundation; either
|
||||
- version 2.1 of the License, or (at your option) any later version.
|
||||
-
|
||||
- The GNU C Library is distributed in the hope that it will be useful,
|
||||
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
- Lesser General Public License for more details.
|
||||
-
|
||||
- You should have received a copy of the GNU Lesser General Public
|
||||
- License along with the GNU C Library; if not, write to the Free
|
||||
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
- 02111-1307 USA. */
|
||||
-
|
||||
-#define _ERRNO_H 1
|
||||
-#include <bits/errno.h>
|
||||
-
|
||||
-#include <sysdep.h>
|
||||
-
|
||||
- .text
|
||||
- .align 4
|
||||
-
|
||||
-ENTRY (pthread_spin_trylock)
|
||||
- mov r1, #1
|
||||
- swp r2, r1, [r0]
|
||||
- teq r2, #0
|
||||
- moveq r0, #0
|
||||
- movne r0, #EBUSY
|
||||
- PSEUDO_RET_NOERRNO
|
||||
-END (pthread_spin_trylock)
|
||||
diff --git a/sysdeps/arm/nptl/pthread_spin_trylock.c b/sysdeps/arm/nptl/pthread_spin_trylock.c
|
||||
new file mode 100644
|
||||
index 0000000..fb998d2
|
||||
--- /dev/null
|
||||
+++ b/sysdeps/arm/nptl/pthread_spin_trylock.c
|
||||
@@ -0,0 +1,27 @@
|
||||
+/* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+
|
||||
+ The GNU C Library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, write to the Free
|
||||
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
+ 02111-1307 USA. */
|
||||
+
|
||||
+#include <errno.h>
|
||||
+#include <atomic.h>
|
||||
+#include "pthreadP.h"
|
||||
+
|
||||
+int
|
||||
+pthread_spin_trylock (pthread_spinlock_t *lock)
|
||||
+{
|
||||
+ return atomic_compare_and_exchange_val_acq (lock, 1, 0) ? EBUSY : 0;
|
||||
+}
|
||||
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure b/sysdeps/unix/sysv/linux/arm/eabi/configure
|
||||
index ab83048..28fb9ef 100644
|
||||
--- a/sysdeps/unix/sysv/linux/arm/eabi/configure
|
||||
+++ b/sysdeps/unix/sysv/linux/arm/eabi/configure
|
||||
@@ -1,5 +1,5 @@
|
||||
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
|
||||
# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
|
||||
|
||||
-arch_minimum_kernel=2.6.14
|
||||
+arch_minimum_kernel=2.6.16
|
||||
libc_cv_gcc_unwind_find_fde=no
|
||||
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure.in b/sysdeps/unix/sysv/linux/arm/eabi/configure.in
|
||||
index 83aa8fc..d1fb7f4 100644
|
||||
--- a/sysdeps/unix/sysv/linux/arm/eabi/configure.in
|
||||
+++ b/sysdeps/unix/sysv/linux/arm/eabi/configure.in
|
||||
@@ -1,5 +1,5 @@
|
||||
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
|
||||
# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
|
||||
|
||||
-arch_minimum_kernel=2.6.14
|
||||
+arch_minimum_kernel=2.6.16
|
||||
libc_cv_gcc_unwind_find_fde=no
|
||||
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
|
||||
index 71ed714..247ddd3 100644
|
||||
--- a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
|
||||
+++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
|
||||
@@ -37,22 +37,12 @@ typedef uintmax_t uatomic_max_t;
|
||||
|
||||
void __arm_link_error (void);
|
||||
|
||||
-#define atomic_exchange_acq(mem, newvalue) \
|
||||
- ({ __typeof (*mem) result; \
|
||||
- if (sizeof (*mem) == 1) \
|
||||
- __asm__ __volatile__ ("swpb %0, %1, [%2]" \
|
||||
- : "=&r,&r" (result) \
|
||||
- : "r,0" (newvalue), "r,r" (mem) : "memory"); \
|
||||
- else if (sizeof (*mem) == 4) \
|
||||
- __asm__ __volatile__ ("swp %0, %1, [%2]" \
|
||||
- : "=&r,&r" (result) \
|
||||
- : "r,0" (newvalue), "r,r" (mem) : "memory"); \
|
||||
- else \
|
||||
- { \
|
||||
- result = 0; \
|
||||
- abort (); \
|
||||
- } \
|
||||
- result; })
|
||||
+#define atomic_full_barrier() \
|
||||
+ __asm__ __volatile__ \
|
||||
+ ("mov\tip, #0xffff0fff\n\t" \
|
||||
+ "mov\tlr, pc\n\t" \
|
||||
+ "add\tpc, ip, #(0xffff0fa0 - 0xffff0fff)" \
|
||||
+ : : : "ip", "lr", "cc", "memory");
|
||||
|
||||
/* Atomic compare and exchange. This sequence relies on the kernel to
|
||||
provide a compare and exchange operation which is atomic on the
|
||||
@@ -76,18 +66,19 @@ void __arm_link_error (void);
|
||||
register __typeof (oldval) a_tmp asm ("r3"); \
|
||||
register __typeof (oldval) a_oldval2 asm ("r4") = (oldval); \
|
||||
__asm__ __volatile__ \
|
||||
- ("0:\tldr\t%1,[%3]\n\t" \
|
||||
- "cmp\t%1, %4\n\t" \
|
||||
+ ("0:\tldr\t%[tmp],[%[ptr]]\n\t" \
|
||||
+ "cmp\t%[tmp], %[old2]\n\t" \
|
||||
"bne\t1f\n\t" \
|
||||
- "mov\t%0, %4\n\t" \
|
||||
- "mov\t%1, #0xffff0fff\n\t" \
|
||||
+ "mov\t%[old], %[old2]\n\t" \
|
||||
+ "mov\t%[tmp], #0xffff0fff\n\t" \
|
||||
"mov\tlr, pc\n\t" \
|
||||
- "add\tpc, %1, #(0xffff0fc0 - 0xffff0fff)\n\t" \
|
||||
+ "add\tpc, %[tmp], #(0xffff0fc0 - 0xffff0fff)\n\t" \
|
||||
"bcc\t0b\n\t" \
|
||||
- "mov\t%1, %4\n\t" \
|
||||
+ "mov\t%[tmp], %[old2]\n\t" \
|
||||
"1:" \
|
||||
- : "=&r" (a_oldval), "=&r" (a_tmp) \
|
||||
- : "r" (a_newval), "r" (a_ptr), "r" (a_oldval2) \
|
||||
+ : [old] "=&r" (a_oldval), [tmp] "=&r" (a_tmp) \
|
||||
+ : [new] "r" (a_newval), [ptr] "r" (a_ptr), \
|
||||
+ [old2] "r" (a_oldval2) \
|
||||
: "ip", "lr", "cc", "memory"); \
|
||||
a_tmp; })
|
||||
|
||||
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
|
||||
index f48e867..889f97c 100644
|
||||
--- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
|
||||
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
|
||||
@@ -126,43 +126,11 @@
|
||||
})
|
||||
|
||||
|
||||
-static inline int __attribute__((always_inline))
|
||||
-__lll_mutex_trylock (int *futex)
|
||||
-{
|
||||
- int flag = 1, old;
|
||||
- asm volatile (
|
||||
- "\tswp %[old], %[flag], [%[futex]] @ try to take the lock\n"
|
||||
- "\tcmp %[old], #1 @ check old lock value\n"
|
||||
- "\tmovlo %[flag], #0 @ if we got it, return 0\n"
|
||||
- "\tswphi %[flag], %[old], [%[futex]] @ if it was contested,\n"
|
||||
- " @ restore the contested flag,\n"
|
||||
- " @ and check whether that won."
|
||||
- : [futex] "+&r" (futex), [flag] "+&r" (flag), [old] "=&r" (old)
|
||||
- : : "memory" );
|
||||
-
|
||||
- return flag;
|
||||
-}
|
||||
-#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock))
|
||||
-
|
||||
-
|
||||
-static inline int __attribute__((always_inline))
|
||||
-__lll_mutex_cond_trylock (int *futex)
|
||||
-{
|
||||
- int flag = 2, old;
|
||||
- asm volatile (
|
||||
- "\tswp %[old], %[flag], [%[futex]] @ try to take the lock\n"
|
||||
- "\tcmp %[old], #1 @ check old lock value\n"
|
||||
- "\tmovlo %[flag], #0 @ if we got it, return 0\n"
|
||||
- "\tswphi %[flag], %[old], [%[futex]] @ if it was contested,\n"
|
||||
- " @ restore the contested flag,\n"
|
||||
- " @ and check whether that won."
|
||||
- : [futex] "+&r" (futex), [flag] "+&r" (flag), [old] "=&r" (old)
|
||||
- : : "memory" );
|
||||
-
|
||||
- return flag;
|
||||
-}
|
||||
-#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock))
|
||||
+#define lll_mutex_trylock(lock) \
|
||||
+ atomic_compare_and_exchange_val_acq(&(lock), 1, 0)
|
||||
|
||||
+#define lll_mutex_cond_trylock(lock) \
|
||||
+ atomic_compare_and_exchange_val_acq(&(lock), 2, 0)
|
||||
|
||||
#define __lll_robust_trylock(futex, id) \
|
||||
(atomic_compare_and_exchange_val_acq (futex, id, 0) != 0)
|
||||
@@ -1,7 +1,19 @@
|
||||
diff -Naur linux-3.2.25.org/arch/arm/Kconfig linux-3.2.25/arch/arm/Kconfig
|
||||
--- linux-3.2.25.org/arch/arm/Kconfig 2012-08-02 09:38:04.000000000 -0400
|
||||
+++ linux-3.2.25/arch/arm/Kconfig 2012-08-11 04:42:20.985949735 -0400
|
||||
@@ -197,7 +197,7 @@
|
||||
|
||||
config ARM_PATCH_PHYS_VIRT
|
||||
bool "Patch physical to virtual translations at runtime" if EMBEDDED
|
||||
- default y
|
||||
+ default n
|
||||
depends on !XIP_KERNEL && MMU
|
||||
depends on !ARCH_REALVIEW || !SPARSEMEM
|
||||
help
|
||||
diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/dreamplug-setup.c linux-3.2.25/arch/arm/mach-kirkwood/dreamplug-setup.c
|
||||
--- linux-3.2.25.org/arch/arm/mach-kirkwood/dreamplug-setup.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-3.2.25/arch/arm/mach-kirkwood/dreamplug-setup.c 2012-08-05 19:04:12.000000000 +0200
|
||||
@@ -0,0 +1,139 @@
|
||||
--- linux-3.2.25.org/arch/arm/mach-kirkwood/dreamplug-setup.c 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ linux-3.2.25/arch/arm/mach-kirkwood/dreamplug-setup.c 2012-08-11 10:22:53.242276474 -0400
|
||||
@@ -0,0 +1,148 @@
|
||||
+/*
|
||||
+ * arch/arm/mach-kirkwood/dreamplug-setup.c
|
||||
+ *
|
||||
@@ -141,9 +153,18 @@ diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/dreamplug-setup.c linux-3.2.2
|
||||
+ .init_irq = kirkwood_init_irq,
|
||||
+ .timer = &kirkwood_timer,
|
||||
+MACHINE_END
|
||||
+
|
||||
+MACHINE_START(DREAMPLUG1, "Marvell DreamPlug Reference Board")
|
||||
+ .atag_offset = 0x100,
|
||||
+ .init_machine = dreamplug_init,
|
||||
+ .map_io = kirkwood_map_io,
|
||||
+ .init_early = kirkwood_init_early,
|
||||
+ .init_irq = kirkwood_init_irq,
|
||||
+ .timer = &kirkwood_timer,
|
||||
+MACHINE_END
|
||||
diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/guruplug-setup.c linux-3.2.25/arch/arm/mach-kirkwood/guruplug-setup.c
|
||||
--- linux-3.2.25.org/arch/arm/mach-kirkwood/guruplug-setup.c 2012-08-02 15:38:04.000000000 +0200
|
||||
+++ linux-3.2.25/arch/arm/mach-kirkwood/guruplug-setup.c 2012-08-05 19:05:22.000000000 +0200
|
||||
--- linux-3.2.25.org/arch/arm/mach-kirkwood/guruplug-setup.c 2012-08-02 09:38:04.000000000 -0400
|
||||
+++ linux-3.2.25/arch/arm/mach-kirkwood/guruplug-setup.c 2012-08-05 13:05:22.000000000 -0400
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
@@ -173,8 +194,8 @@ diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/guruplug-setup.c linux-3.2.25
|
||||
};
|
||||
|
||||
diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/iconnect-setup.c linux-3.2.25/arch/arm/mach-kirkwood/iconnect-setup.c
|
||||
--- linux-3.2.25.org/arch/arm/mach-kirkwood/iconnect-setup.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-3.2.25/arch/arm/mach-kirkwood/iconnect-setup.c 2012-08-05 19:06:06.000000000 +0200
|
||||
--- linux-3.2.25.org/arch/arm/mach-kirkwood/iconnect-setup.c 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ linux-3.2.25/arch/arm/mach-kirkwood/iconnect-setup.c 2012-08-11 04:58:00.565660184 -0400
|
||||
@@ -0,0 +1,212 @@
|
||||
+/*
|
||||
+ * arch/arm/mach-kirkwood/iconnect-setup.c
|
||||
@@ -389,8 +410,8 @@ diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/iconnect-setup.c linux-3.2.25
|
||||
+ .timer = &kirkwood_timer,
|
||||
+MACHINE_END
|
||||
diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/Kconfig linux-3.2.25/arch/arm/mach-kirkwood/Kconfig
|
||||
--- linux-3.2.25.org/arch/arm/mach-kirkwood/Kconfig 2012-08-02 15:38:04.000000000 +0200
|
||||
+++ linux-3.2.25/arch/arm/mach-kirkwood/Kconfig 2012-08-05 18:45:22.015253501 +0200
|
||||
--- linux-3.2.25.org/arch/arm/mach-kirkwood/Kconfig 2012-08-02 09:38:04.000000000 -0400
|
||||
+++ linux-3.2.25/arch/arm/mach-kirkwood/Kconfig 2012-08-05 12:45:22.015253501 -0400
|
||||
@@ -44,6 +44,12 @@
|
||||
Say 'Y' here if you want your kernel to support the
|
||||
Marvell GuruPlug Reference Board.
|
||||
@@ -424,8 +445,8 @@ diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/Kconfig linux-3.2.25/arch/arm
|
||||
|
||||
endif
|
||||
diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/Makefile linux-3.2.25/arch/arm/mach-kirkwood/Makefile
|
||||
--- linux-3.2.25.org/arch/arm/mach-kirkwood/Makefile 2012-08-02 15:38:04.000000000 +0200
|
||||
+++ linux-3.2.25/arch/arm/mach-kirkwood/Makefile 2012-08-05 18:46:49.015253501 +0200
|
||||
--- linux-3.2.25.org/arch/arm/mach-kirkwood/Makefile 2012-08-02 09:38:04.000000000 -0400
|
||||
+++ linux-3.2.25/arch/arm/mach-kirkwood/Makefile 2012-08-05 12:46:49.015253501 -0400
|
||||
@@ -7,6 +7,7 @@
|
||||
obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
|
||||
obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
|
||||
@@ -443,8 +464,8 @@ diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/Makefile linux-3.2.25/arch/ar
|
||||
|
||||
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
|
||||
diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/mpp.h linux-3.2.25/arch/arm/mach-kirkwood/mpp.h
|
||||
--- linux-3.2.25.org/arch/arm/mach-kirkwood/mpp.h 2012-08-02 15:38:04.000000000 +0200
|
||||
+++ linux-3.2.25/arch/arm/mach-kirkwood/mpp.h 2012-08-05 19:08:23.835566001 +0200
|
||||
--- linux-3.2.25.org/arch/arm/mach-kirkwood/mpp.h 2012-08-02 09:38:04.000000000 -0400
|
||||
+++ linux-3.2.25/arch/arm/mach-kirkwood/mpp.h 2012-08-05 13:08:23.835566001 -0400
|
||||
@@ -102,6 +102,7 @@
|
||||
#define MPP11_SATA0_ACTn MPP( 11, 0x5, 0, 0, 0, 1, 1, 1, 1 )
|
||||
|
||||
@@ -454,8 +475,8 @@ diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/mpp.h linux-3.2.25/arch/arm/m
|
||||
#define MPP12_AU_SPDIF0 MPP( 12, 0xa, 0, 0, 0, 0, 0, 0, 1 )
|
||||
#define MPP12_SPI_MOSI MPP( 12, 0xb, 0, 0, 0, 0, 0, 0, 1 )
|
||||
diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/nas6210-setup.c linux-3.2.25/arch/arm/mach-kirkwood/nas6210-setup.c
|
||||
--- linux-3.2.25.org/arch/arm/mach-kirkwood/nas6210-setup.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-3.2.25/arch/arm/mach-kirkwood/nas6210-setup.c 2012-08-05 19:06:40.000000000 +0200
|
||||
--- linux-3.2.25.org/arch/arm/mach-kirkwood/nas6210-setup.c 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ linux-3.2.25/arch/arm/mach-kirkwood/nas6210-setup.c 2012-08-11 04:58:35.223186956 -0400
|
||||
@@ -0,0 +1,184 @@
|
||||
+/*
|
||||
+ * arch/arm/mach-kirkwood/nas6210-setup.c
|
||||
@@ -642,17 +663,30 @@ diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/nas6210-setup.c linux-3.2.25/
|
||||
+ .timer = &kirkwood_timer,
|
||||
+MACHINE_END
|
||||
diff -Naur linux-3.2.25.org/arch/arm/tools/mach-types linux-3.2.25/arch/arm/tools/mach-types
|
||||
--- linux-3.2.25.org/arch/arm/tools/mach-types 2012-08-02 15:38:04.000000000 +0200
|
||||
+++ linux-3.2.25/arch/arm/tools/mach-types 2012-08-05 18:39:17.218378501 +0200
|
||||
@@ -455,9 +455,9 @@
|
||||
--- linux-3.2.25.org/arch/arm/tools/mach-types 2012-08-02 09:38:04.000000000 -0400
|
||||
+++ linux-3.2.25/arch/arm/tools/mach-types 2012-08-11 10:18:52.849620229 -0400
|
||||
@@ -448,6 +448,7 @@
|
||||
riot_bei2 MACH_RIOT_BEI2 RIOT_BEI2 2576
|
||||
riot_x37 MACH_RIOT_X37 RIOT_X37 2578
|
||||
pca101 MACH_PCA101 PCA101 2595
|
||||
+guruplug MACH_GURUPLUG GURUPLUG 2601
|
||||
capc7117 MACH_CAPC7117 CAPC7117 2612
|
||||
icontrol MACH_ICONTROL ICONTROL 2624
|
||||
gplugd MACH_GPLUGD GPLUGD 2625
|
||||
@@ -455,7 +456,7 @@
|
||||
mx23evk MACH_MX23EVK MX23EVK 2629
|
||||
ap4evb MACH_AP4EVB AP4EVB 2630
|
||||
mityomapl138 MACH_MITYOMAPL138 MITYOMAPL138 2650
|
||||
-guruplug MACH_GURUPLUG GURUPLUG 2659
|
||||
+dreamplug MACH_DREAMPLUG DREAMPLUG 2659
|
||||
+dreamplug1 MACH_DREAMPLUG1 DREAMPLUG1 2659
|
||||
spear310 MACH_SPEAR310 SPEAR310 2660
|
||||
-spear320 MACH_SPEAR320 SPEAR320 2661
|
||||
+guruplug MACH_GURUPLUG GURUPLUG 2661
|
||||
spear320 MACH_SPEAR320 SPEAR320 2661
|
||||
aquila MACH_AQUILA AQUILA 2676
|
||||
sheeva_esata MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678
|
||||
msm7x30_surf MACH_MSM7X30_SURF MSM7X30_SURF 2679
|
||||
@@ -1123,6 +1124,7 @@
|
||||
thales_adc MACH_THALES_ADC THALES_ADC 3492
|
||||
ubisys_p9d_evp MACH_UBISYS_P9D_EVP UBISYS_P9D_EVP 3493
|
||||
atdgp318 MACH_ATDGP318 ATDGP318 3494
|
||||
+dreamplug MACH_DREAMPLUG DREAMPLUG 3550
|
||||
m28evk MACH_M28EVK M28EVK 3613
|
||||
smdk4212 MACH_SMDK4212 SMDK4212 3638
|
||||
smdk4412 MACH_SMDK4412 SMDK4412 3765
|
||||
|
||||
Reference in New Issue
Block a user