diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2011-04-13 04:53:20 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2011-04-13 04:53:20 +0200 |
commit | 92623154c7b3edde7bf4812530e4db9de2779283 (patch) | |
tree | 4d9a5df1ec44939ce4731af80a56471643eaf815 | |
parent | 4090002fc466e4319c95ab214c3f92ecc7b59184 (diff) | |
parent | 933e74c07231e815bbfd9ed90073308eaf253a00 (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Conflicts:
package/mpfr/Makefile
212 files changed, 9669 insertions, 3834 deletions
diff --git a/.gitignore b/.gitignore index eb1f71724..51956e85e 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ /.busyboxcfg /.rebuild.* /.defconfig +/.adkinit /all.config /target_*/ /host_*/ @@ -1,7 +1,6 @@ -- enable and test gcj -- port cacao -- port LXDE - port openjdk +- port LXDE +- toolchain rebuild when changes to config require it - add and test brcm 2.6 wireless support - man pages in ipkg/tgz packages (automatic) - automate /etc handling via conffiles diff --git a/jtools/Makefile b/jtools/Makefile index 932cd298f..5106df2e6 100644 --- a/jtools/Makefile +++ b/jtools/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk TARGETS:= ifneq ($(ADK_PACKAGE_OPENJDK),) -TARGETS+=fastjar gcj classpath jamvm ecj +TARGETS+=fastjar gcj ecj jikes jamvm classpath ant openjdk endif TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS)) diff --git a/jtools/ant/Makefile b/jtools/ant/Makefile new file mode 100644 index 000000000..666e1e8cb --- /dev/null +++ b/jtools/ant/Makefile @@ -0,0 +1,34 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= ant +PKG_VERSION:= 1.8.2 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 63220327925ace13756ae334c55a3baa +PKG_SITES:= http://www.apache.org/dist/ant/source/ + +DISTFILES:= apache-$(PKG_NAME)-$(PKG_VERSION)-src.tar.bz2 +WRKDIST= $(WRKDIR)/apache-$(PKG_NAME)-$(PKG_VERSION) + +include ../rules.mk + +install: ${STAGING_JAVA_HOST_DIR}/usr/bin/ant + +$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared + cd $(WRKBUILD)/lib/optional; wget http://openadk.org/distfiles/junit-4.9b2.jar + cp $(STAGING_JAVA_HOST_DIR)/usr/share/ecj.jar $(WRKBUILD)/lib/optional + cd ${WRKBUILD}; export BOOTJAVAC_OPTS="-bootclasspath $(STAGING_JAVA_HOST_DIR)/usr/share/classpath/glibj.zip" \ + BOOTCLASSPATH="$(STAGING_JAVA_HOST_DIR)/usr/share/jamvm/classes.zip:$(STAGING_JAVA_HOST_DIR)/usr/share/classpath/glibj.zip" \ + LD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64 \ + JAVA_HOME=$(STAGING_JAVA_HOST_DIR)/usr/lib/jvm ; \ + $(BASH) build.sh + touch $@ + +${STAGING_JAVA_HOST_DIR}/usr/bin/ant: $(WRKBUILD)/.compiled + cd $(WRKBUILD)/dist; \ + $(CP) bin/* $(STAGING_JAVA_HOST_DIR)/usr/bin ; \ + $(CP) lib/* $(STAGING_JAVA_HOST_DIR)/usr/lib + +include $(TOPDIR)/mk/tools.mk diff --git a/jtools/ant/junit-4.9b2.jar b/jtools/ant/junit-4.9b2.jar Binary files differnew file mode 100644 index 000000000..aec30a07f --- /dev/null +++ b/jtools/ant/junit-4.9b2.jar diff --git a/jtools/cacao/Makefile b/jtools/cacao/Makefile deleted file mode 100644 index 7b5262dcc..000000000 --- a/jtools/cacao/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# This file is part of the OpenADK project. OpenADK is copyrighted -# material, please see the LICENCE file in the top-level directory. - -include $(TOPDIR)/rules.mk - -PKG_NAME:= cacao -PKG_VERSION:= 0.99.4 -PKG_RELEASE:= 1 -PKG_MD5SUM:= 63220327925ace13756ae334c55a3baa -PKG_SITES:= http://www.complang.tuwien.ac.at/cacaojvm/download/$(PKG_NAME)-$(PKG_VERSION)/ - -DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2 - -include ../rules.mk - -install: ${STAGING_JAVA_HOST_DIR}/usr/bin/cacao - -$(WRKBUILD)/.configured: ${WRKDIST}/.prepared - cd $(WRKBUILD); ./configure --prefix=/usr --disable-libjvm --enable-debug \ - --with-vm-zip=$(STAGING_JAVA_HOST_DIR)/usr/share/cacao/vm.zip \ - --with-java-runtime-library=gnuclasspath \ - --with-java-runtime-library-classes=$(STAGING_JAVA_HOST_DIR)/usr/share/classpath/glibj.zip \ - --with-java-runtime-library-prefix=$(STAGING_JAVA_HOST_DIR)/usr \ - --with-jni_md_h=$(STAGING_JAVA_HOST_DIR)/usr/include \ - touch $@ - -$(WRKBUILD)/.compiled: ${WRKDIST}/.configured - ${MAKE} -C ${WRKBUILD} $(MAKE_TRACE) - touch $@ - -${STAGING_JAVA_HOST_DIR}/usr/bin/cacao: $(WRKBUILD)/.compiled - ${MAKE} -C ${WRKBUILD} DESTDIR=$(STAGING_JAVA_HOST_DIR) install $(MAKE_TRACE) - -include $(TOPDIR)/mk/tools.mk diff --git a/jtools/ecj/Makefile b/jtools/ecj/Makefile index 32cfdeb53..c4ab831e4 100644 --- a/jtools/ecj/Makefile +++ b/jtools/ecj/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:= ecj PKG_VERSION:= 1 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= 63220327925ace13756ae334c55a3baa include ../rules.mk @@ -18,9 +18,20 @@ ${STAGING_JAVA_HOST_DIR}/usr/bin/ecj: LD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64 \ PATH=$(STAGING_JAVA_HOST_DIR)/usr/bin:$$PATH \ $(STAGING_JAVA_HOST_DIR)/usr/bin/gcj -g -O2 -findirect-dispatch \ - -o ${STAGING_JAVA_HOST_DIR}/usr/bin/ecj \ + -o ${STAGING_JAVA_HOST_DIR}/usr/bin/ecj.native \ --main=org.eclipse.jdt.internal.compiler.batch.Main \ $(TOPDIR)/jtools_build/gcc-4.5.2/ecj.jar $(CP) $(TOPDIR)/jtools_build/gcc-4.5.2/ecj.jar ${STAGING_JAVA_HOST_DIR}/usr/share/ecj.jar + echo "env LD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64 ${STAGING_JAVA_HOST_DIR}/usr/bin/ecj.native \$$@" > \ + ${STAGING_JAVA_HOST_DIR}/usr/bin/ecj + chmod u+x ${STAGING_JAVA_HOST_DIR}/usr/bin/ecj + # put a wrapper for java here + echo "env LD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64 ${STAGING_JAVA_HOST_DIR}/usr/bin/gij \"\$$@\"" > \ + ${STAGING_JAVA_HOST_DIR}/usr/bin/java + chmod u+x ${STAGING_JAVA_HOST_DIR}/usr/bin/java + rm ${STAGING_JAVA_HOST_DIR}/usr/lib/jvm/bin/java + rm ${STAGING_JAVA_HOST_DIR}/usr/lib/jvm/jre/bin/java + cp ${STAGING_JAVA_HOST_DIR}/usr/bin/java ${STAGING_JAVA_HOST_DIR}/usr/lib/jvm/bin/java + cp ${STAGING_JAVA_HOST_DIR}/usr/bin/java ${STAGING_JAVA_HOST_DIR}/usr/lib/jvm/jre/bin/java include $(TOPDIR)/mk/tools.mk diff --git a/jtools/jamvm/Makefile b/jtools/jamvm/Makefile index 639b7d875..defdbd713 100644 --- a/jtools/jamvm/Makefile +++ b/jtools/jamvm/Makefile @@ -20,11 +20,11 @@ install: ${STAGING_JAVA_HOST_DIR}/usr/bin/jamvm $(WRKBUILD)/.configured: ${WRKDIST}/.prepared cd $(WRKBUILD); env \ - CC='${CC_FOR_BUILD}' \ - CXX='${CXX_FOR_BUILD}' \ - ./configure \ - --prefix=/usr \ - --with-classpath-install-dir=$(STAGING_JAVA_HOST_DIR) + CC='${CC_FOR_BUILD}' \ + CXX='${CXX_FOR_BUILD}' \ + ./configure \ + --prefix=/usr \ + --with-classpath-install-dir=$(STAGING_JAVA_HOST_DIR)/usr touch $@ $(WRKBUILD)/.compiled: ${WRKDIST}/.configured @@ -33,5 +33,7 @@ $(WRKBUILD)/.compiled: ${WRKDIST}/.configured ${STAGING_JAVA_HOST_DIR}/usr/bin/jamvm: $(WRKBUILD)/.compiled ${MAKE} -C ${WRKBUILD} DESTDIR=$(STAGING_JAVA_HOST_DIR) install $(MAKE_TRACE) + $(CP) ${STAGING_JAVA_HOST_DIR}/usr/bin/jamvm ${STAGING_JAVA_HOST_DIR}/usr/lib/jvm/bin/java + $(CP) ${STAGING_JAVA_HOST_DIR}/usr/bin/jamvm ${STAGING_JAVA_HOST_DIR}/usr/lib/jvm/jre/bin/java include $(TOPDIR)/mk/tools.mk diff --git a/jtools/jikes/Makefile b/jtools/jikes/Makefile new file mode 100644 index 000000000..c26a0f45b --- /dev/null +++ b/jtools/jikes/Makefile @@ -0,0 +1,31 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= jikes +PKG_VERSION:= 1.22 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 14d4bdfac236e347d806c6743dba48c6 +PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=jikes/Jikes/1.22/} + +DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2 + +include ../rules.mk + +install: ${STAGING_JAVA_HOST_DIR}/usr/bin/jikes + +$(WRKBUILD)/.configured: ${WRKDIST}/.prepared + (cd $(WRKBUILD); ./configure --prefix=/usr); + touch $@ + +$(WRKBUILD)/.compiled: ${WRKDIST}/.configured + ${MAKE} -C ${WRKBUILD} $(MAKE_TRACE) + touch $@ + +${STAGING_JAVA_HOST_DIR}/usr/bin/jikes: $(WRKBUILD)/.compiled + ${MAKE} -C ${WRKBUILD} DESTDIR=$(STAGING_JAVA_HOST_DIR) install $(MAKE_TRACE) + $(CP) ${STAGING_JAVA_HOST_DIR}/usr/bin/jikes ${STAGING_JAVA_HOST_DIR}/usr/lib/jvm/bin/javac + $(CP) ${STAGING_JAVA_HOST_DIR}/usr/bin/jikes ${STAGING_JAVA_HOST_DIR}/usr/lib/jvm/jre/bin/javac + +include $(TOPDIR)/mk/tools.mk diff --git a/jtools/openjdk/Makefile b/jtools/openjdk/Makefile new file mode 100644 index 000000000..17fe6bbf8 --- /dev/null +++ b/jtools/openjdk/Makefile @@ -0,0 +1,90 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= openjdk +PKG_VERSION:= 6 +PKG_EXTRAVER:= b22-28_feb_2011 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 2d2bbbb0f9b81f1fec41ec730da8a933 \ + fd3f35e8a8a2ef9a64c035ed66cea06d \ + ef7a8b3624ea904bf584bc46d79b5e75 \ + bc95c133620bd68c161cac9891592901 \ + 91adfd41e6f001add4f92ae31216b1e3 \ + d526d0848c88607ce4e3a0a4edb75d50 +PKG_DESCR:= OpenJDK Java VM +PKG_SECTION:= lang +PKG_URL:= http://openjdk.org/ +PKG_SITES:= http://download.java.net/openjdk/jdk6/promoted/b22/ \ + http://mirror.netcologne.de/apache.org/xml/xalan-j/binaries/ \ + http://icedtea.classpath.org/download/drops/ \ + http://icedtea.classpath.org/download/source/ + +# autotools infrastructure for OpenJDK +ICEDTEA_NAME:= icedtea6 +ICEDTEA_VERSION:= 1.10 + +# bootstrap JARs +XALAN_NAME= xalan-j +XALAN_VERSION= 2_7_0 + +# override generic extraction +EXTRACT_OVERRIDE:= 1 +DISTFILES:= openjdk-$(PKG_VERSION)-src-$(PKG_EXTRAVER).tar.gz \ + $(ICEDTEA_NAME)-$(ICEDTEA_VERSION).tar.gz \ + jaxp144_01.zip \ + jdk6-jaf-b20.zip \ + jdk6-jaxws-b20.zip \ + ${XALAN_NAME}_${XALAN_VERSION}-bin.tar.gz + +WRKDIST= ${WRKDIR} +WRKSRC= ${WRKDIST}/${ICEDTEA_NAME}-${ICEDTEA_VERSION} + +include ../rules.mk + +OPENJDK_NATIVE_ENV+= JAVACFLAGS="-cp ${STAGING_JAVA_HOST_DIR}/usr/share/java/libgcj-4.5.2.jar" +OPENJDK_NATIVE_ENV+= DYLD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64 +OPENJDK_NATIVE_ENV+= LD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64 +OPENJDK_NATIVE_ENV+= ADK_ECJ=$(STAGING_JAVA_HOST_DIR)/usr/bin/ecj PATH=$$PATH:$(STAGING_JAVA_HOST_DIR)/usr/bin + +install: ${STAGING_JAVA_HOST_DIR}/bootstrap-jdk/bin/java + +$(WRKDIST)/.extract: $(WRKDIST)/.extract_done + cd ${WRKDIST}; mkdir openjdk-$(PKG_VERSION); \ + tar xzf $(TOPDIR)/dl/openjdk-$(PKG_VERSION)-src-$(PKG_EXTRAVER).tar.gz -C openjdk-$(PKG_VERSION) + cd $(WRKDIST); tar xzf $(TOPDIR)/dl/$(ICEDTEA_NAME)-$(ICEDTEA_VERSION).tar.gz + cd ${WRKDIST}; tar xzf ${TOPDIR}/dl/${XALAN_NAME}_${XALAN_VERSION}-bin.tar.gz + mkdir -p ${WRKBUILD}/drops + cd ${TOPDIR}/dl; cp jaxp144_01.zip jdk6-jaf-b20.zip jdk6-jaxws-b20.zip ${WRKBUILD}/drops + cd $(WRKDIST); patch -p0 < ${TOPDIR}/jtools/openjdk/patches/*.patch + touch $@ + +$(WRKDIST)/.configured: ${WRKDIST}/.extract + cd ${WRKBUILD}; rm -rf config.{cache,status}; \ + export ${OPENJDK_NATIVE_ENV}; ./configure \ + --enable-bootstrap \ + --enable-zero \ + --disable-openjdk-cross-compilation \ + --with-openjdk-src-dir=$(WRKDIST)/$(PKG_NAME)-$(PKG_VERSION) \ + --with-jdk-home=$(STAGING_JAVA_HOST_DIR)/usr/lib/jvm \ + --with-java=$(STAGING_JAVA_HOST_DIR)/usr/bin/java \ + --with-javac=$(STAGING_JAVA_HOST_DIR)/usr/bin/ecj \ + --with-gcj=$(STAGING_JAVA_HOST_DIR)/usr/bin/gcj \ + --with-ecj-jar=${STAGING_JAVA_HOST_DIR}/usr/share/ecj.jar \ + --with-xalan2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xalan.jar \ + --with-xalan2-serializer-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/serializer.jar \ + --with-xerces2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xercesImpl.jar \ + --without-rhino \ + --disable-docs + touch $@ + +$(WRKBUILD)/.compiled: ${WRKDIST}/.configured + export ${OPENJDK_NATIVE_ENV}; $(MAKE) -C $(WRKBUILD) + touch $@ + +${STAGING_JAVA_HOST_DIR}/bootstrap-jdk/bin/java: $(WRKBUILD)/.compiled + $(CP) $(WRKSRC)/openjdk.build/j2sdk-image $(STAGING_JAVA_HOST_DIR)/bootstrap-jdk + touch $@ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/jtools/openjdk/do-extract b/jtools/openjdk/do-extract new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/jtools/openjdk/do-extract diff --git a/jtools/openjdk/patches/openjdk.patch b/jtools/openjdk/patches/openjdk.patch new file mode 100644 index 000000000..1ef7e195f --- /dev/null +++ b/jtools/openjdk/patches/openjdk.patch @@ -0,0 +1,54 @@ +diff -Nur openjdk-6.orig/Makefile openjdk-6/Makefile +--- openjdk-6.orig/Makefile 2011-02-28 17:02:07.000000000 +0100 ++++ openjdk-6/Makefile 2011-04-06 19:47:19.261818496 +0200 +@@ -25,9 +25,7 @@ + + BUILD_PARENT_DIRECTORY=. + +-ifndef TOPDIR +- TOPDIR:=. +-endif ++TOPDIR:=. + + ifndef JDK_TOPDIR + JDK_TOPDIR=$(TOPDIR)/jdk +diff -Nur icedtea6-1.10.orig/Makefile.in icedtea6-1.10/Makefile.in +--- icedtea6-1.10.orig/Makefile.in 2011-03-02 20:48:45.161291458 +0100 ++++ icedtea6-1.10/Makefile.in 2011-04-06 20:10:40.581819545 +0200 +@@ -1329,7 +1329,7 @@ + @OPENJDK_SRC_DIR_FOUND_TRUE@ cp -pPR $(OPENJDK_SRC_DIR_LINK) $(OPENJDK_SRC_DIR) openjdk ; \ + @OPENJDK_SRC_DIR_FOUND_TRUE@ fi + @OPENJDK_SRC_DIR_FOUND_FALSE@@USE_HG_TRUE@ if ! test -d openjdk ; then \ +-@OPENJDK_SRC_DIR_FOUND_FALSE@@USE_HG_TRUE@ cp -pPRl openjdk.hg openjdk ; \ ++@OPENJDK_SRC_DIR_FOUND_FALSE@@USE_HG_TRUE@ cp -pPR openjdk.hg openjdk ; \ + @OPENJDK_SRC_DIR_FOUND_FALSE@@USE_HG_TRUE@ fi + @OPENJDK_SRC_DIR_FOUND_FALSE@@USE_HG_FALSE@ set -e ; \ + @OPENJDK_SRC_DIR_FOUND_FALSE@@USE_HG_FALSE@ if ! test -d openjdk ; \ +@@ -1576,7 +1576,7 @@ + # FIXME (missing): Rename to clone-ecj. + stamps/extract-ecj.stamp: $(OPENJDK_TREE) + if ! test -d openjdk-ecj ; then \ +- cp -pPRl openjdk openjdk-ecj ; \ ++ cp -pPR openjdk openjdk-ecj ; \ + fi + mkdir -p stamps + touch stamps/extract-ecj.stamp +@@ -1643,10 +1643,14 @@ + + stamps/native-ecj.stamp: + mkdir -p stamps ; \ +- if test "x$(GCJ)" != "xno"; then \ +- $(GCJ) $(IT_CFLAGS) -Wl,-Bsymbolic -findirect-dispatch -o native-ecj \ +- --main=org.eclipse.jdt.internal.compiler.batch.Main ${ECJ_JAR} ; \ +- fi ; \ ++ if test -n "${ADK_ECJ}" && test -x "${ADK_ECJ}"; then \ ++ ln -s "${ADK_ECJ}" native-ecj; \ ++ else \ ++ if test "x$(GCJ)" != "xno"; then \ ++ $(GCJ) $(IT_CFLAGS) -Wl,-Bsymbolic -findirect-dispatch -o native-ecj \ ++ --main=org.eclipse.jdt.internal.compiler.batch.Main ${ECJ_JAR} ; \ ++ fi ; \ ++ fi; \ + touch stamps/native-ecj.stamp + + clean-native-ecj: diff --git a/mk/build.mk b/mk/build.mk index faa39e258..4774106ee 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -136,7 +136,7 @@ ifeq ($(ADK_TARGET_PACKAGE_IPKG),y) endif ${STAGING_DIR} ${STAGING_DIR}/etc ${STAGING_HOST_DIR}: - mkdir -p ${STAGING_DIR}/{bin,etc,lib,usr/include,usr/lib/pkgconfig} \ + mkdir -p ${STAGING_DIR}/{bin,etc,lib,usr/bin,usr/include,usr/lib/pkgconfig} \ ${STAGING_HOST_DIR}/{bin,lib,usr/bin,usr/lib} ${STAGING_DIR}/etc/ipkg.conf: ${STAGING_DIR}/etc @@ -186,7 +186,7 @@ switch: kernelconfig: cp $(TOPDIR)/target/$(ADK_TARGET_ARCH)/kernel.config $(BUILD_DIR)/linux/.config - ${KERNEL_MAKE_ENV} ${MAKE} ${KERNEL_MAKE_OPTS} -C $(BUILD_DIR)/linux menuconfig + ${KERNEL_MAKE_ENV} ${MAKE} ARCH=$(ARCH) ${KERNEL_MAKE_OPTS} -C $(BUILD_DIR)/linux menuconfig cp $(BUILD_DIR)/linux/.config $(TOPDIR)/target/$(ADK_TARGET_ARCH)/kernel.config # create a new package from package/.template @@ -213,7 +213,7 @@ clean: @$(TRACE) clean $(MAKE) -C $(CONFIG) clean for d in ${STAGING_PKG_DIR}; do \ - for f in $$(ls $$d/[a-z]* 2>/dev/null); do \ + for f in $$(ls $$d/[a-z]*|grep -v [A-Z] 2>/dev/null); do \ while read file ; do \ rm ${STAGING_DIR}/$$file 2>/dev/null;\ done < $$f ; \ diff --git a/mk/package.mk b/mk/package.mk index 4d8383388..0bb7ead83 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -183,7 +183,7 @@ ifeq (,$(filter noremove,$(7))) fi endif @rm -f '$${STAGING_PKG_DIR}/$(1)' - @-cd $${IDIR_$(1)}; \ + -@cd $${IDIR_$(1)}; \ x=$$$$(find tmp var -mindepth 1 2>/dev/null); if [[ -n $$$$x ]]; then \ echo 'WARNING: $${IPKG_$(1)} installs files into a' \ 'ramdisk location:' >&2; \ @@ -194,7 +194,7 @@ endif -exec echo 'WARNING: $${IPKG_$(1)} installs files in /lib -' \ ' fix this!' >&2 \; -quit 2>/dev/null; fi; \ find usr ! -type d 2>/dev/null | \ - grep -E -v -e '^usr/share' -e '^usr/man' -e '^usr/info' -e '^usr/lib/libc.so' -e '^usr/lib/pkgconfig' -e '^usr/bin/[a-z0-9-]+-config' | \ + grep -E -v -e '^usr/lib/pkgconfig' -e '^usr/share' -e '^usr/doc' -e '^usr/src' -e '^usr/man' -e '^usr/info' -e '^usr/lib/libc.so' -e '^usr/bin/[a-z0-9-]+-config' | \ tee '$${STAGING_PKG_DIR}/$(1)' | \ $(TOOLS_DIR)/cpio -padlmu '$${STAGING_DIR}' @cd '$${STAGING_DIR}'; grep 'usr/lib/.*\.la$$$$' \ @@ -230,7 +230,8 @@ ifeq (,$(filter noremove,$(7))) done <'$${STAGING_PKG_DIR}/$(1)'; \ fi endif - @rm -f '$${STAGING_PKG_DIR}/$(1)' + echo "Removing:" + rm -f '$${STAGING_PKG_DIR}/$(1)' $$(INFO_$(1)): $$(IPKG_$(1)) $(PKG_INSTALL) $$(IPKG_$(1)) diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk index 49bae85f8..0735a8c14 100644 --- a/mk/pkg-bottom.mk +++ b/mk/pkg-bottom.mk @@ -172,7 +172,7 @@ endif -exec echo 'WARNING: ${PKG_NAME} installs files in /lib -' \ ' fix this!' >&2 \; -quit 2>/dev/null; fi;\ find usr ! -type d 2>/dev/null | \ - grep -E -v -e '^usr/share' -e '^usr/man' -e '^usr/info' -e '^usr/lib/libc.so' -e '^usr/lib/pkgconfig' -e '^usr/bin/[a-z0-9-]+-config' | \ + grep -E -v -e '^usr/lib/pkgconfig' -e '^usr/share' -e '^usr/src' -e '^usr/doc' -e '^usr/local' -e '^usr/man' -e '^usr/info' -e '^usr/lib/libc.so' -e '^usr/bin/[a-z0-9-]+-config' -e '^/usr/lib/libpthread_nonshared.a' | \ tee '${STAGING_PKG_DIR}/${PKG_NAME}' | \ $(TOOLS_DIR)/cpio -padlmu '${STAGING_DIR}' @cd '${STAGING_DIR}'; grep 'usr/lib/.*\.la$$' \ diff --git a/mk/rootfs.mk b/mk/rootfs.mk index ee63d8c2d..2da69d017 100644 --- a/mk/rootfs.mk +++ b/mk/rootfs.mk @@ -27,7 +27,7 @@ endif $(eval $(call rootfs_template,cf,CF,$(ROOTFS))) $(eval $(call rootfs_template,mmc,MMC,$(ROOTFS))) -$(eval $(call rootfs_template,usb,USB,rootdelay=3)) +$(eval $(call rootfs_template,usb,USB,rootwait)) $(eval $(call rootfs_template,archive,ARCHIVE,$(ROOTFS))) $(eval $(call rootfs_template,initramfs,INITRAMFS)) $(eval $(call rootfs_template,initramfs-piggyback,INITRAMFS_PIGGYBACK)) diff --git a/mk/vars.mk b/mk/vars.mk index d9edef6e7..bb66a5e32 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -20,7 +20,7 @@ STAGING_HOST_DIR:= ${BASE_DIR}/host_${CPU_ARCH}_${ADK_TARGET_LIBC} STAGING_HOST_DIR_PFX:= ${BASE_DIR}/host_* STAGING_JAVA_HOST_DIR:= ${BASE_DIR}/jhost # use headers and foo-config from system -ifneq ($(ADK_NATIVE),) +ifeq ($(ADK_NATIVE),y) STAGING_TARGET_DIR:= SCRIPT_TARGET_DIR:= /usr/bin else @@ -93,6 +93,7 @@ endif ifneq ($(ADK_TOOLCHAIN_GCC_USE_LTO),) TARGET_CFLAGS+= -flto +TARGET_CXXFLAGS+= -flto TARGET_LDFLAGS+= -flto endif diff --git a/package/ConsoleKit/Makefile b/package/ConsoleKit/Makefile new file mode 100644 index 000000000..4480df4ef --- /dev/null +++ b/package/ConsoleKit/Makefile @@ -0,0 +1,25 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= ConsoleKit +PKG_VERSION:= 0.4.4 +PKG_RELEASE:= 1 +PKG_MD5SUM:= b57eb18eae8c4d3631d5f4f030218a29 +PKG_DESCR:= a framework for defining and tracking users, login sessions and seats +PKG_SECTION:= misc +PKG_BUILDDEP:= dbus-glib +PKG_URL:= http://www.freedesktop.org/wiki/Software/ConsoleKit +PKG_SITES:= http://www.freedesktop.org/software/ConsoleKit/dist/ + +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,CONSOLEKIT,consolekit,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +consolekit-install: + $(INSTALL_DIR) $(IDIR_CONSOLEKIT)/usr/lib + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/ConsoleKit/patches/patch-config_sub b/package/ConsoleKit/patches/patch-config_sub new file mode 100644 index 000000000..de7e0d8b1 --- /dev/null +++ b/package/ConsoleKit/patches/patch-config_sub @@ -0,0 +1,243 @@ +--- ConsoleKit-0.4.4.orig/config.sub 2011-02-17 00:44:31.000000000 +0100 ++++ ConsoleKit-0.4.4/config.sub 2010-11-26 15:32:59.100676381 +0100 +@@ -1,10 +1,10 @@ + #! /bin/sh + # Configuration validation subroutine script. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + # Free Software Foundation, Inc. + +-timestamp='2009-11-20' ++timestamp='2008-09-08' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +@@ -32,16 +32,13 @@ timestamp='2009-11-20' + + + # Please send patches to <config-patches@gnu.org>. Submit a context +-# diff and a properly formatted GNU ChangeLog entry. ++# diff and a properly formatted ChangeLog entry. + # + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. + # If it is invalid, we print an error message on stderr and exit with code 1. + # Otherwise, we print the canonical config type on stdout and succeed. + +-# You can get the latest version of this script from: +-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +- + # This file is supposed to be the same for all GNU packages + # and recognize all the CPU types, system types and aliases + # that are meaningful with *any* GNU software. +@@ -125,7 +122,6 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^- + case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ +- kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` +@@ -152,13 +148,10 @@ case $os in + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ +- -apple | -axis | -knuth | -cray | -microblaze) ++ -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; +- -bluegene*) +- os=-cnk +- ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 +@@ -251,12 +244,11 @@ case $basic_machine in + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ +- | d10v | d30v | dlx | dsp16xx \ ++ | d10v | d30v | dlx | dsp16xx | dvp \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ +- | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ +@@ -278,7 +270,6 @@ case $basic_machine in + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ +- | moxie \ + | mt \ + | msp430 \ + | nios | nios2 \ +@@ -287,22 +278,20 @@ case $basic_machine in + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ +- | rx \ + | score \ +- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ ++ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ +- | ubicom32 \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; +- m6811 | m68hc11 | m6812 | m68hc12 | picochip) ++ m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none +@@ -342,10 +331,9 @@ case $basic_machine in + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ +- | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ +- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ ++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ +@@ -373,8 +361,8 @@ case $basic_machine in + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ +- | romp-* | rs6000-* | rx-* \ +- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ ++ | romp-* | rs6000-* \ ++ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ +@@ -382,7 +370,6 @@ case $basic_machine in + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | tron-* \ +- | ubicom32-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ +@@ -456,10 +443,6 @@ case $basic_machine in + basic_machine=m68k-apollo + os=-bsd + ;; +- aros) +- basic_machine=i386-pc +- os=-aros +- ;; + aux) + basic_machine=m68k-apple + os=-aux +@@ -476,10 +459,6 @@ case $basic_machine in + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; +- bluegene*) +- basic_machine=powerpc-ibm +- os=-cnk +- ;; + c90) + basic_machine=c90-cray + os=-unicos +@@ -732,9 +711,6 @@ case $basic_machine in + basic_machine=ns32k-utek + os=-sysv + ;; +- microblaze) +- basic_machine=microblaze-xilinx +- ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 +@@ -750,6 +726,24 @@ case $basic_machine in + basic_machine=m68k-atari + os=-mint + ;; ++ mipsEE* | ee | ps2) ++ basic_machine=mips64r5900el-scei ++ case $os in ++ -linux*) ++ ;; ++ *) ++ os=-elf ++ ;; ++ esac ++ ;; ++ iop) ++ basic_machine=mipsel-scei ++ os=-irx ++ ;; ++ dvp) ++ basic_machine=dvp-scei ++ os=-elf ++ ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; +@@ -1206,7 +1200,7 @@ case $basic_machine in + we32k) + basic_machine=we32k-att + ;; +- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) ++ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) +@@ -1256,9 +1250,6 @@ case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. +- -auroraux) +- os=-auroraux +- ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; +@@ -1279,11 +1270,10 @@ case $os in + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ +- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ +- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ +- | -sym* | -kopensolaris* \ ++ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ ++ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ +- | -aos* | -aros* \ ++ | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ +@@ -1302,7 +1292,7 @@ case $os in + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ +- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) ++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) +@@ -1632,7 +1622,7 @@ case $basic_machine in + -sunos*) + vendor=sun + ;; +- -cnk*|-aix*) ++ -aix*) + vendor=ibm + ;; + -beos*) diff --git a/package/ConsoleKit/patches/patch-libck-connector_ck-connector_pc_in b/package/ConsoleKit/patches/patch-libck-connector_ck-connector_pc_in new file mode 100644 index 000000000..27ad033b7 --- /dev/null +++ b/package/ConsoleKit/patches/patch-libck-connector_ck-connector_pc_in @@ -0,0 +1,11 @@ +--- ConsoleKit-0.4.4.orig/libck-connector/ck-connector.pc.in 2011-01-20 19:21:19.000000000 +0100 ++++ ConsoleKit-0.4.4/libck-connector/ck-connector.pc.in 2011-03-17 23:08:52.363370559 +0100 +@@ -1,7 +1,7 @@ + prefix=@prefix@ + exec_prefix=@prefix@ + libdir=@libdir@ +-includedir=@prefix@/include ++includedir=${prefix}/include + libexecdir=@libexecdir@ + + Name: ck-connector diff --git a/package/DirectFB/patches/patch-include_directfb_build_h b/package/DirectFB/patches/patch-include_directfb_build_h new file mode 100644 index 000000000..87eca8617 --- /dev/null +++ b/package/DirectFB/patches/patch-include_directfb_build_h @@ -0,0 +1,11 @@ +--- DirectFB-1.4.11.orig/include/directfb_build.h 2010-11-15 22:35:45.000000000 +0100 ++++ DirectFB-1.4.11/include/directfb_build.h 2011-03-28 22:30:51.451811000 +0200 +@@ -29,7 +29,7 @@ + #ifndef __DIRECTFB_BUILD_H__ + #define __DIRECTFB_BUILD_H__ + +-#define DIRECTFB_BUILD_VOODOO (1) ++#define DIRECTFB_BUILD_VOODOO (0) + #define DIRECTFB_BUILD_PURE_VOODOO (0) + + #endif /* __DIRECTFB_BUILD_H__ */ diff --git a/package/DirectFB/patches/patch-interfaces_IDirectFBImageProvider_idirectfbimageprovider_png_c b/package/DirectFB/patches/patch-interfaces_IDirectFBImageProvider_idirectfbimageprovider_png_c new file mode 100644 index 000000000..b35c6137e --- /dev/null +++ b/package/DirectFB/patches/patch-interfaces_IDirectFBImageProvider_idirectfbimageprovider_png_c @@ -0,0 +1,138 @@ +--- DirectFB-1.4.11.orig/interfaces/IDirectFBImageProvider/idirectfbimageprovider_png.c 2010-10-31 09:49:49.000000000 +0100 ++++ DirectFB-1.4.11/interfaces/IDirectFBImageProvider/idirectfbimageprovider_png.c 2011-03-29 10:57:18.433069010 +0200 +@@ -207,7 +207,7 @@ Construct( IDirectFBImageProvider *thiz, + if (!data->png_ptr) + goto error; + +- if (setjmp( data->png_ptr->jmpbuf )) { ++ if (png_jmpbuf( data->png_ptr )) { + D_ERROR( "ImageProvider/PNG: Error reading header!\n" ); + goto error; + } +@@ -292,7 +292,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDi + rect = dst_data->area.wanted; + } + +- if (setjmp( data->png_ptr->jmpbuf )) { ++ if (png_jmpbuf( data->png_ptr )) { + D_ERROR( "ImageProvider/PNG: Error during decoding!\n" ); + + if (data->stage < STAGE_IMAGE) +@@ -327,6 +327,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDi + } + else { + CoreSurfaceBufferLock lock; ++ png_byte bit_depth = png_get_bit_depth( data->png_ptr, data->info_ptr ); + + ret = dfb_surface_lock_buffer( dst_surface, CSBR_BACK, CSAID_CPU, CSAF_WRITE, &lock ); + if (ret) +@@ -334,7 +335,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDi + + switch (data->color_type) { + case PNG_COLOR_TYPE_PALETTE: +- if (dst_surface->config.format == DSPF_LUT8 && data->info_ptr->bit_depth == 8) { ++ if (dst_surface->config.format == DSPF_LUT8 && bit_depth == 8) { + /* + * Special indexed PNG to LUT8 loading. + */ +@@ -377,7 +378,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDi + } + else { + if (data->color_type == PNG_COLOR_TYPE_GRAY) { +- int num = 1 << data->info_ptr->bit_depth; ++ int num = 1 << bit_depth; + + for (x=0; x<num; x++) { + int value = x * 255 / (num - 1); +@@ -386,7 +387,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDi + } + } + +- switch (data->info_ptr->bit_depth) { ++ switch (bit_depth) { + case 8: + for (y=0; y<data->height; y++) { + u8 *S = data->image + data->pitch * y; +@@ -441,7 +442,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDi + + default: + D_ERROR( "ImageProvider/PNG: Unsupported indexed bit depth %d!\n", +- data->info_ptr->bit_depth ); ++ bit_depth ); + } + + dfb_scale_linear_32( image_argb, data->width, data->height, +@@ -594,16 +595,26 @@ png_info_callback( png_structp png_read_ + NULL, NULL, NULL ); + + if (png_get_valid( data->png_ptr, data->info_ptr, PNG_INFO_tRNS )) { ++ png_bytep trans; ++ png_color_16p trans_color; ++ int num_trans; ++ ++ png_get_tRNS( data->png_ptr, data->info_ptr, &trans, &num_trans, &trans_color ); ++ + data->color_keyed = true; + + /* generate color key based on palette... */ + if (data->color_type == PNG_COLOR_TYPE_PALETTE) { + u32 key; +- png_colorp palette = data->info_ptr->palette; +- png_bytep trans = data->info_ptr->trans_alpha; +- int num_colors = MIN( MAXCOLORMAPSIZE, +- data->info_ptr->num_palette ); +- u8 cmap[3][num_colors]; ++ png_colorp palette; ++ int num_colors; ++ u8 *cmap[3]; ++ ++ png_get_PLTE( data->png_ptr, data->info_ptr, &palette, &num_colors ); ++ num_colors = MIN( MAXCOLORMAPSIZE, num_colors ); ++ cmap[0] = alloca (num_colors); ++ cmap[1] = alloca (num_colors); ++ cmap[2] = alloca (num_colors); + + for (i=0; i<num_colors; i++) { + cmap[0][i] = palette[i].red; +@@ -613,7 +624,7 @@ png_info_callback( png_structp png_read_ + + key = FindColorKey( num_colors, &cmap[0][0] ); + +- for (i=0; i<data->info_ptr->num_trans; i++) { ++ for (i=0; i<num_trans; i++) { + if (!trans[i]) { + palette[i].red = (key & 0xff0000) >> 16; + palette[i].green = (key & 0x00ff00) >> 8; +@@ -625,20 +636,23 @@ png_info_callback( png_structp png_read_ + } + else { + /* ...or based on trans rgb value */ +- png_color_16p trans = &data->info_ptr->trans_color; +- +- data->color_key = (((trans->red & 0xff00) << 8) | +- ((trans->green & 0xff00)) | +- ((trans->blue & 0xff00) >> 8)); ++ data->color_key = (((trans_color->red & 0xff00) << 8) | ++ ((trans_color->green & 0xff00)) | ++ ((trans_color->blue & 0xff00) >> 8)); + } + } + + switch (data->color_type) { + case PNG_COLOR_TYPE_PALETTE: { +- png_colorp palette = data->info_ptr->palette; +- png_bytep trans = data->info_ptr->trans_alpha; +- int num_trans = data->info_ptr->num_trans; +- int num_colors = MIN( MAXCOLORMAPSIZE, data->info_ptr->num_palette ); ++ png_colorp palette; ++ png_bytep trans; ++ png_color_16p trans_color; ++ int num_trans; ++ int num_colors; ++ ++ png_get_PLTE( data->png_ptr, data->info_ptr, &palette, &num_colors ); ++ num_colors = MIN( MAXCOLORMAPSIZE, num_colors ); ++ png_get_tRNS( data->png_ptr, data->info_ptr, &trans, &num_trans, &trans_color ); + + for (i=0; i<num_colors; i++) { + data->colors[i].a = (i < num_trans) ? trans[i] : 0xff; diff --git a/package/DirectFB/patches/patch-tools_directfb-csource_c b/package/DirectFB/patches/patch-tools_directfb-csource_c new file mode 100644 index 000000000..84711d86f --- /dev/null +++ b/package/DirectFB/patches/patch-tools_directfb-csource_c @@ -0,0 +1,48 @@ +--- DirectFB-1.4.11.orig/tools/directfb-csource.c 2010-10-31 09:49:49.000000000 +0100 ++++ DirectFB-1.4.11/tools/directfb-csource.c 2011-03-29 10:57:18.453068981 +0200 +@@ -338,7 +338,7 @@ static DFBResult load_image (const char + if (!png_ptr) + goto cleanup; + +- if (setjmp (png_ptr->jmpbuf)) { ++ if (setjmp (png_jmpbuf (png_ptr))) { + if (desc->preallocated[0].data) { + free (desc->preallocated[0].data); + desc->preallocated[0].data = NULL; +@@ -405,17 +405,22 @@ static DFBResult load_image (const char + } + + switch (src_format) { +- case DSPF_LUT8: +- if (info_ptr->num_palette) { ++ case DSPF_LUT8: { ++ png_colorp png_palette; ++ int num_palette; ++ ++ png_get_PLTE( png_ptr, info_ptr, &png_palette, &num_palette ); ++ ++ if (num_palette) { + png_byte *alpha; + int i, num; + +- *palette_size = MIN (info_ptr->num_palette, 256); ++ *palette_size = MIN (num_palette, 256); + for (i = 0; i < *palette_size; i++) { + palette[i].a = 0xFF; +- palette[i].r = info_ptr->palette[i].red; +- palette[i].g = info_ptr->palette[i].green; +- palette[i].b = info_ptr->palette[i].blue; ++ palette[i].r = png_palette[i].red; ++ palette[i].g = png_palette[i].green; ++ palette[i].b = png_palette[i].blue; + } + if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) { + png_get_tRNS (png_ptr, info_ptr, &alpha, &num, NULL); +@@ -424,6 +429,7 @@ static DFBResult load_image (const char + } + } + break; ++ } + case DSPF_RGB32: + png_set_filler (png_ptr, 0xFF, + #ifdef WORDS_BIGENDIAN diff --git a/package/DirectFB/patches/patch-tools_mkdfiff_c b/package/DirectFB/patches/patch-tools_mkdfiff_c new file mode 100644 index 000000000..f321f8a84 --- /dev/null +++ b/package/DirectFB/patches/patch-tools_mkdfiff_c @@ -0,0 +1,11 @@ +--- DirectFB-1.4.11.orig/tools/mkdfiff.c 2010-10-31 09:49:49.000000000 +0100 ++++ DirectFB-1.4.11/tools/mkdfiff.c 2011-03-29 10:57:18.503068913 +0200 +@@ -97,7 +97,7 @@ load_image (const char *filen + if (!png_ptr) + goto cleanup; + +- if (setjmp (png_ptr->jmpbuf)) { ++ if (setjmp (png_jmpbuf (png_ptr))) { + if (desc->preallocated[0].data) { + free (desc->preallocated[0].data); + desc->preallocated[0].data = NULL; diff --git a/package/DirectFB/patches/patch-tools_mkdgifft_cpp b/package/DirectFB/patches/patch-tools_mkdgifft_cpp new file mode 100644 index 000000000..33e8285e9 --- /dev/null +++ b/package/DirectFB/patches/patch-tools_mkdgifft_cpp @@ -0,0 +1,11 @@ +--- DirectFB-1.4.11.orig/tools/mkdgifft.cpp 2010-10-31 09:52:08.000000000 +0100 ++++ DirectFB-1.4.11/tools/mkdgifft.cpp 2011-03-29 10:57:18.581810094 +0200 +@@ -595,7 +595,7 @@ load_image (const char *filen + if (!png_ptr) + goto cleanup; + +- if (setjmp (png_ptr->jmpbuf)) { ++ if (setjmp (png_jmpbuf (png_ptr))) { + if (desc->preallocated[0].data) { + free (desc->preallocated[0].data); + desc->preallocated[0].data = NULL; diff --git a/package/ImageMagick/Makefile b/package/ImageMagick/Makefile index fce893764..3ff05701d 100644 --- a/package/ImageMagick/Makefile +++ b/package/ImageMagick/Makefile @@ -36,6 +36,7 @@ $(eval $(call PKG_template,LIBIMAGEMAGICK,libimagemagick,$(PKG_VERSION)-${PKG_RE $(eval $(call PKG_template,CONVERT,convert,$(PKG_VERSION)-${PKG_RELEASE},${PKGSS_CONVERT},${PKGSD_CONVERT},${PKGSC_CONVERT})) $(eval $(call PKG_template,DISPLAY,display,$(PKG_VERSION)-${PKG_RELEASE},${PKGSS_DISPLAY},${PKGSD_DISPLAY},${PKGSC_DISPLAY})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --with-magick-plus-plus=no \ --without-gslib \ --without-dps \ diff --git a/package/MesaLib/Makefile b/package/MesaLib/Makefile index 3ad50203f..caf9fe384 100644 --- a/package/MesaLib/Makefile +++ b/package/MesaLib/Makefile @@ -11,7 +11,7 @@ PKG_DESCR:= MESA library PKG_SECTION:= libs PKG_DEPENDS:= libxdamage libxfixes libdrm libxxf86vm PKG_BUILDDEP:= libXdamage libXfixes libXxf86vm libdrm -PKG_BUILDDEP+= dri2proto glproto expat +PKG_BUILDDEP+= dri2proto glproto expat libXext PKG_URL:= http://www.mesa3d.org/ PKG_SITES:= ftp://ftp.freedesktop.org/pub/mesa/7.8.2/ PKG_NEED_CXX:= 1 @@ -35,6 +35,8 @@ $(eval $(call PKG_template,MESALIB_DEV,mesalib-dev,$(PKG_VERSION)-${PKG_RELEASE} $(eval $(call PKG_template,GLXINFO,glxinfo,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_GLXINFO},${PKGSC_GLXINFO})) $(eval $(call PKG_template,GLXGEARS,glxgears,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_GLXGEARS},${PKGSC_GLXGEARS})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) + ifeq (${ADK_TARGET_SYSTEM_IBM_X40},y) DRI_DRIVERS:=i915 endif diff --git a/package/alsa-lib/Makefile b/package/alsa-lib/Makefile index 7ea5606fa..cddbb0e69 100644 --- a/package/alsa-lib/Makefile +++ b/package/alsa-lib/Makefile @@ -34,5 +34,7 @@ alsa-lib-dev-install: ${INSTALL_DIR} ${IDIR_ALSA_LIB_DEV}/usr/include/{sys,alsa} ${CP} ${WRKINST}/usr/include/sys/*.h ${IDIR_ALSA_LIB_DEV}/usr/include/sys ${CP} ${WRKINST}/usr/include/alsa/*.h ${IDIR_ALSA_LIB_DEV}/usr/include/alsa + ${INSTALL_DIR} ${IDIR_ALSA_LIB_DEV}/usr/lib/pkgconfig + $(CP) $(WRKINST)/usr/lib/pkgconfig/*.pc ${IDIR_ALSA_LIB_DEV}/usr/lib/pkgconfig include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/apr/Makefile b/package/apr/Makefile index 9d93e72ed..4d5f90ba2 100644 --- a/package/apr/Makefile +++ b/package/apr/Makefile @@ -25,6 +25,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,APR,apr,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,APR_DEV,apr-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_APR_DEV},${PKGSC_APR_DEV})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) + # uClibc setpgrp does not take arguments CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes CONFIGURE_ENV+= ac_cv_sizeof_size_t=4 diff --git a/package/avahi/patches/patch-ltmain_sh b/package/avahi/patches/patch-ltmain_sh new file mode 100644 index 000000000..ce05ad8f1 --- /dev/null +++ b/package/avahi/patches/patch-ltmain_sh @@ -0,0 +1,11 @@ +--- avahi-0.6.28.orig/ltmain.sh 2010-10-05 02:05:01.069018301 +0200 ++++ avahi-0.6.28/ltmain.sh 2011-03-25 18:53:20.684620818 +0100 +@@ -5091,7 +5091,7 @@ func_mode_link () + # @file GCC response files + # -tp=* Portland pgcc target processor selection + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ +- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) ++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|-fstack-protector*|-flto) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" diff --git a/package/beecrypt/Makefile b/package/beecrypt/Makefile index 333434a37..5e1e71e50 100644 --- a/package/beecrypt/Makefile +++ b/package/beecrypt/Makefile @@ -15,13 +15,14 @@ PKG_NEED_CXX:= 1 include $(TOPDIR)/mk/package.mk -$(eval $(call PKG_template,BEECRYPT,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,BEECRYPT,beecrypt,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --without-cplusplus \ --without-python \ --without-java -post-install: +beecrypt-install: $(INSTALL_DIR) $(IDIR_BEECRYPT)/usr/lib $(CP) $(WRKINST)/usr/lib/libbeecrypt*.so* \ $(IDIR_BEECRYPT)/usr/lib diff --git a/package/beecrypt/patches/patch-include_beecrypt_gnu_h b/package/beecrypt/patches/patch-include_beecrypt_gnu_h new file mode 100644 index 000000000..41b1f5953 --- /dev/null +++ b/package/beecrypt/patches/patch-include_beecrypt_gnu_h @@ -0,0 +1,11 @@ +--- beecrypt-4.2.1.orig/include/beecrypt/gnu.h 2009-07-12 09:19:44.000000000 +0200 ++++ beecrypt-4.2.1/include/beecrypt/gnu.h 2011-03-29 11:18:21.031808259 +0200 +@@ -72,7 +72,7 @@ typedef pthread_t bc_threadid_t; + * make assumptions about the size set by the configure script + */ + #if !defined(MP_WBITS) +-# define MP_WBITS 64U ++# define MP_WBITS 32U + #endif + + #endif diff --git a/package/beecrypt/patches/patch-ltmain_sh b/package/beecrypt/patches/patch-ltmain_sh new file mode 100644 index 000000000..f018ba5c1 --- /dev/null +++ b/package/beecrypt/patches/patch-ltmain_sh @@ -0,0 +1,11 @@ +--- beecrypt-4.2.1.orig/ltmain.sh 2009-07-11 18:02:10.000000000 +0200 ++++ beecrypt-4.2.1/ltmain.sh 2011-03-29 11:27:09.431818481 +0200 +@@ -4772,7 +4772,7 @@ func_mode_link () + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ +- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) ++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" diff --git a/package/bind/Makefile b/package/bind/Makefile index dd994b87e..920aba93a 100644 --- a/package/bind/Makefile +++ b/package/bind/Makefile @@ -51,6 +51,7 @@ $(eval $(call PKG_template,BIND_HOST,bind-host,${PKG_VERSION}-${PKG_RELEASE},${P $(eval $(call PKG_template,BIND_DIG,bind-dig,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_BIND_DIG},${PKGSD_BIND_DIG},${PKGSC_BIND_DIG})) $(eval $(call PKG_template,LIBBIND,libbind,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBBIND},${PKGSC_LIBBIND})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --with-randomdev=/dev/urandom \ --disable-threads \ --with-openssl=${STAGING_TARGET_DIR}/usr \ diff --git a/package/binutils/Makefile b/package/binutils/Makefile index 7bbe48e0d..96c6a4f67 100644 --- a/package/binutils/Makefile +++ b/package/binutils/Makefile @@ -19,6 +19,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,BINUTILS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBBFD,libbfd,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBBFD},${PKGSC_LIBBFD})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) TARGET_CFLAGS+= -fPIC CONFIGURE_ARGS+= --disable-werror \ --host=$(REAL_GNU_TARGET_NAME) \ diff --git a/package/bluez/Makefile b/package/bluez/Makefile index aae196ad6..509520b0c 100644 --- a/package/bluez/Makefile +++ b/package/bluez/Makefile @@ -21,6 +21,7 @@ $(eval $(call PKG_template,BLUEZ,bluez,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPEN ifeq ($(ADK_STATIC),y) XAKE_FLAGS+= CCLD="$(TARGET_CC) -all-static -pthread" endif +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ENV+= ac_cv_prog_cc_pie=no CONFIGURE_ARGS+= --enable-tools \ --enable-alsa \ diff --git a/package/cacaovm/Makefile b/package/cacaovm/Makefile deleted file mode 100644 index 1d85a420a..000000000 --- a/package/cacaovm/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# This file is part of the OpenADK project. OpenADK is copyrighted -# material, please see the LICENCE file in the top-level directory. - -include $(TOPDIR)/rules.mk - -PKG_NAME:= cacaovm -PKG_VERSION:= 0.99.4 -PKG_RELEASE:= 1 -PKG_MD5SUM:= 63220327925ace13756ae334c55a3baa -PKG_DESCR:= Java VM -PKG_SECTION:= lang -PKG_BUILDDEP:= classpath zlib -PKG_DEPENDS:= classpath zlib -PKG_URL:= http://www.cacaovm.org/ -PKG_SITES:= http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-0.99.4/ - -WRKDIST= ${WRKDIR}/cacao-${PKG_VERSION} -DISTFILES:= cacao-${PKG_VERSION}.tar.bz2 - -include $(TOPDIR)/mk/package.mk - -$(eval $(call PKG_template,CACAOVM,cacaovm,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) - -CONFIGURE_ARGS+= --with-jni_md_h=${STAGING_TARGET_DIR}/usr/include \ - --with-java-runtime-library-prefix=${STAGING_TARGET_DIR}/usr \ - --with-cacaoh=${STAGING_TARGET_DIR}/bin/cacaoh - -post-patch: - (cd ${WRKBUILD}; ./configure \ - --enable-jit \ - --with-java-runtime-library-prefix=/opt/local \ - --enable-gc=none \ - ); - $(MAKE) -C ${WRKBUILD}/src/vmcore - $(MAKE) -C ${WRKBUILD}/src/toolbox - $(MAKE) -C ${WRKBUILD}/src/cacaoh - $(CP) $(WRKBUILD)/src/cacaoh/cacaoh $(STAGING_TARGET_DIR)/bin - $(MAKE) -C ${WRKBUILD} clean - -cacaovm-install: - $(INSTALL_DIR) $(IDIR_CACAOVM)/usr/lib - $(CP) $(WRKINST)/usr/lib/libjvm.so $(IDIR_CACAOVM)/usr/lib - $(INSTALL_DIR) $(IDIR_CACAOVM)/usr/bin - $(INSTALL_BIN) $(WRKINST)/usr/bin/cacao $(IDIR_CACAOVM)/usr/bin - $(INSTALL_BIN) $(WRKINST)/usr/bin/java $(IDIR_CACAOVM)/usr/bin - $(INSTALL_DIR) $(IDIR_CACAOVM)/usr/share/cacao - $(CP) $(WRKINST)/usr/share/cacao/vm.zip \ - $(IDIR_CACAOVM)/usr/share/cacao - -include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/cacaovm/patches/patch-src_cacaoh_headers_c b/package/cacaovm/patches/patch-src_cacaoh_headers_c deleted file mode 100644 index 0e1ca0923..000000000 --- a/package/cacaovm/patches/patch-src_cacaoh_headers_c +++ /dev/null @@ -1,14 +0,0 @@ ---- cacao-0.99.4.orig/src/cacaoh/headers.c 2008-08-04 18:51:28.000000000 +0200 -+++ cacao-0.99.4/src/cacaoh/headers.c 2011-03-26 20:11:11.000000000 +0100 -@@ -35,8 +35,10 @@ - #if defined(ENABLE_THREADS) - # if defined(__DARWIN__) - # include <signal.h> -+# include <sys/ucontext.h> -+# else -+# include <ucontext.h> - # endif --# include <ucontext.h> - #endif - - #include "mm/gc-common.h" diff --git a/package/cacaovm/patches/patch-src_threads_posix_thread-posix_h b/package/cacaovm/patches/patch-src_threads_posix_thread-posix_h deleted file mode 100644 index fc43526fb..000000000 --- a/package/cacaovm/patches/patch-src_threads_posix_thread-posix_h +++ /dev/null @@ -1,14 +0,0 @@ ---- cacao-0.99.4.orig/src/threads/posix/thread-posix.h 2008-08-04 18:51:28.000000000 +0200 -+++ cacao-0.99.4/src/threads/posix/thread-posix.h 2011-03-26 20:12:13.000000000 +0100 -@@ -34,7 +34,11 @@ typedef struct threadobject threadobject - #include "config.h" - - #include <pthread.h> -+#if defined(__DARWIN__) -+#include <sys/ucontext.h> -+#else - #include <ucontext.h> -+#endif - - #include "vm/types.h" - diff --git a/package/cairo/Makefile b/package/cairo/Makefile index a3d957acd..1218e6493 100644 --- a/package/cairo/Makefile +++ b/package/cairo/Makefile @@ -4,13 +4,13 @@ include ${TOPDIR}/rules.mk PKG_NAME:= cairo -PKG_VERSION:= 1.8.10 +PKG_VERSION:= 1.10.2 PKG_RELEASE:= 1 -PKG_MD5SUM:= b60a82f405f9400bbfdcf850b1728d25 +PKG_MD5SUM:= f101a9e88b783337b20b2e26dfd26d5f PKG_DESCR:= cairo graphics library PKG_SECTION:= libs PKG_DEPENDS:= fontconfig libfreetype libpng libx11 pixman -PKG_BUILDDEP:= libpng pixman freetype fontconfig libX11 +PKG_BUILDDEP:= libpng pixman freetype fontconfig libX11 libXrender PKG_URL:= http://cairographics.org/ PKG_SITES:= http://cairographics.org/releases/ @@ -27,7 +27,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,CAIRO,cairo,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) $(eval $(call PKG_template,CAIRO_DEV,cairo-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_CAIRO_DEV},${PKGSC_CAIRO_DEV},${PKG_OPTS})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --enable-ft=yes \ + --enable-tee=yes \ --enable-xlib=yes cairo-install: diff --git a/package/cairo/patches/patch-src_cairo-features_h b/package/cairo/patches/patch-src_cairo-features_h deleted file mode 100644 index 6466deec7..000000000 --- a/package/cairo/patches/patch-src_cairo-features_h +++ /dev/null @@ -1,15 +0,0 @@ ---- cairo-1.8.10.orig/src/cairo-features.h 2010-02-19 22:34:38.000000000 +0100 -+++ cairo-1.8.10/src/cairo-features.h 2011-01-14 20:12:28.000000000 +0100 -@@ -10,11 +10,11 @@ - #define CAIRO_HAS_SVG_SURFACE 1 - #define CAIRO_HAS_USER_FONT 1 - #define CAIRO_HAS_XLIB_SURFACE 1 --#define CAIRO_HAS_XLIB_XRENDER_SURFACE 1 - - /*#undef CAIRO_HAS_QUARTZ_FONT */ - /*#undef CAIRO_HAS_QUARTZ_SURFACE */ - /*#undef CAIRO_HAS_WIN32_FONT */ - /*#undef CAIRO_HAS_WIN32_SURFACE */ -+/*#undef CAIRO_HAS_XLIB_XRENDER_SURFACE */ - - #endif diff --git a/package/ccid/Makefile b/package/ccid/Makefile index 185401e79..1dfa252c0 100644 --- a/package/ccid/Makefile +++ b/package/ccid/Makefile @@ -19,6 +19,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,CCID,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --enable-twinserial post-install: diff --git a/package/classpath/patches/patch-configure b/package/classpath/patches/patch-configure new file mode 100644 index 000000000..df2f41eae --- /dev/null +++ b/package/classpath/patches/patch-configure @@ -0,0 +1,11 @@ +--- classpath-0.98.orig/configure 2009-02-06 02:01:30.000000000 +0100 ++++ classpath-0.98/configure 2011-04-11 17:08:29.347661221 +0200 +@@ -30403,7 +30403,7 @@ fi + { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_mul_si" >&5 + $as_echo "$ac_cv_lib_gmp___gmpz_mul_si" >&6; } + if test "x$ac_cv_lib_gmp___gmpz_mul_si" = x""yes; then +- GMP_CFLAGS=-I/usr/include ++ GMP_CFLAGS= + GMP_LIBS=-lgmp + else + GMP_CFLAGS= diff --git a/package/collectd/Makefile b/package/collectd/Makefile index 277e061cf..211955af9 100644 --- a/package/collectd/Makefile +++ b/package/collectd/Makefile @@ -100,6 +100,7 @@ CONFIGURE_ARGS+= --disable-apache \ --without-libiptc \ --with-nan-emulation +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) XAKE_FLAGS+= LIBS='-lm' post-install: diff --git a/package/cryptsetup/Makefile b/package/cryptsetup/Makefile index 8ab2f397d..491814c63 100644 --- a/package/cryptsetup/Makefile +++ b/package/cryptsetup/Makefile @@ -24,6 +24,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,CRYPTSETUP,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --disable-selinux \ --disable-static diff --git a/package/cups/Makefile b/package/cups/Makefile index d57bda49a..762f1832a 100644 --- a/package/cups/Makefile +++ b/package/cups/Makefile @@ -43,7 +43,11 @@ CONFIGURE_ARGS+= --with-cups-user=cups \ --disable-ssl FAKE_FLAGS+= DSTROOT="${WRKINST}" STRIP="/bin/true" +ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y) +XAKE_FLAGS+= OPTIM='-fPIC -fstack-protector' +else XAKE_FLAGS+= OPTIM='-fPIC' +endif post-install: ${INSTALL_DIR} ${IDIR_CUPS}/usr/bin diff --git a/package/curl/Makefile b/package/curl/Makefile index f360a1e6b..d189d8704 100644 --- a/package/curl/Makefile +++ b/package/curl/Makefile @@ -30,6 +30,7 @@ $(eval $(call PKG_template,CURL,curl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS $(eval $(call PKG_template,LIBCURL,libcurl,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_LIBCURL},${PKGSD_LIBCURL},${PKGSC_LIBCURL})) $(eval $(call PKG_template,LIBCURL_DEV,libcurl-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBCURL_DEV},${PKGSC_LIBCURL_DEV})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ENV+= curl_typeof_curl_socklen_t=socklen_t CONFIGURE_ARGS+= --disable-thread \ --enable-cookies \ diff --git a/package/cxxtools/Makefile b/package/cxxtools/Makefile index 812d17ea2..916bf8c94 100644 --- a/package/cxxtools/Makefile +++ b/package/cxxtools/Makefile @@ -24,6 +24,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,CXXTOOLS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,CXXTOOLS_DEV,${PKG_NAME}-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y) TARGET_CXXFLAGS+= -fno-builtin -nostdinc++ \ -I${STAGING_TARGET_DIR}/usr/include/uClibc++ -Wl,-E diff --git a/package/cxxtools/patches/patch-ltmain_sh b/package/cxxtools/patches/patch-ltmain_sh new file mode 100644 index 000000000..e25e29b9e --- /dev/null +++ b/package/cxxtools/patches/patch-ltmain_sh @@ -0,0 +1,11 @@ +--- cxxtools-1.4.8.orig/ltmain.sh 2007-08-14 20:05:31.000000000 +0200 ++++ cxxtools-1.4.8/ltmain.sh 2011-03-28 20:40:30.691818463 +0200 +@@ -1663,7 +1663,7 @@ EOF + # -F/path gives path to uninstalled frameworks, gcc on darwin + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ +- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) ++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto) + + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. diff --git a/package/cyrus-sasl/Makefile b/package/cyrus-sasl/Makefile index c914941e9..9fd2e6f8b 100644 --- a/package/cyrus-sasl/Makefile +++ b/package/cyrus-sasl/Makefile @@ -4,13 +4,13 @@ include ${TOPDIR}/rules.mk PKG_NAME:= cyrus-sasl -PKG_VERSION:= 2.1.22 +PKG_VERSION:= 2.1.23 PKG_RELEASE:= 1 -PKG_MD5SUM:= 45dde9d19193ae9dd388eb68b2027bc9 +PKG_MD5SUM:= 2eb0e48106f0e9cd8001e654f267ecbc PKG_DESCR:= a general purpose authentication library PKG_SECTION:= libs -PKG_DEPENDS:= libopenssl PKG_BUILDDEP:= openssl +PKG_DEPENDS:= libopenssl PKG_URL:= http://asg.web.cmu.edu/sasl/ PKG_SITES:= http://ftp.andrew.cmu.edu/pub/cyrus-mail/ PKG_NOPARALLEL:= 1 @@ -24,33 +24,34 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBSASL2,libsasl2,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBSASL2_DEV,libsasl2-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBSASL2_DEV},${PKGSC_LIBSASL2_DEV})) -CONFIGURE_ARGS+= --disable-sample \ - --enable-staticdlopen \ +CONFIGURE_ARGS+= --enable-staticdlopen \ + --enable-cram \ + --enable-plain \ + --enable-anon \ + --enable-digest \ + --with-ipctype=unix \ + --with-devrandom="/dev/urandom" \ + --with-openssl="${STAGING_TARGET_DIR}/usr" \ + --disable-sample \ --disable-java \ --disable-alwaystrue \ --disable-checkapop \ - --enable-cram \ - --enable-digest \ --disable-otp \ --disable-srp \ --disable-srp-setpass \ --disable-krb4 \ --disable-gssapi \ --disable-gss_mutexes \ - --enable-plain \ - --enable-anon \ --disable-login \ --disable-ntlm \ --disable-sql \ + --disable-static \ --without-dblib \ --without-gdbm \ - --with-devrandom="/dev/urandom" \ --without-pam \ --without-saslauthd \ --without-authdaemond \ --without-pwcheck \ - --with-ipctype=unix \ - --with-openssl="${STAGING_TARGET_DIR}/usr" \ --without-des \ --without-opie \ --without-ldap \ @@ -59,8 +60,7 @@ CONFIGURE_ARGS+= --disable-sample \ --without-sqlite \ --without-rc4 \ --without-dmalloc \ - --without-sfio \ - --disable-static + --without-sfio pre-build: ${MAKE} -C ${WRKBUILD}/include \ diff --git a/package/cyrus-sasl/patches/patch-config_ltmain_sh b/package/cyrus-sasl/patches/patch-config_ltmain_sh new file mode 100644 index 000000000..01b5a992c --- /dev/null +++ b/package/cyrus-sasl/patches/patch-config_ltmain_sh @@ -0,0 +1,14 @@ +--- cyrus-sasl-2.1.23.orig/config/ltmain.sh 2003-07-02 15:29:00.000000000 +0200 ++++ cyrus-sasl-2.1.23/config/ltmain.sh 2011-03-30 21:20:59.111809629 +0200 +@@ -1081,6 +1081,11 @@ compiler." + esac + ;; + ++ -fstack-protector*|-flto*) ++ linkopts="$linkopts $arg" ++ continue ++ ;; ++ + -l*) + if test "$arg" = "-lc"; then + case "$host" in diff --git a/package/db/Makefile b/package/db/Makefile index 4b6a64643..ce03351b0 100644 --- a/package/db/Makefile +++ b/package/db/Makefile @@ -24,6 +24,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBDB,libdb,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBDB_DEV,libdb-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBDB_DEV},${PKGSC_LIBDB_DEV})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_PROG:= dist/configure CONFIGURE_ARGS+= --enable-smallbuild \ --disable-debug_rop \ diff --git a/package/dbus-glib/Makefile b/package/dbus-glib/Makefile index 3ab81d067..f998edca1 100644 --- a/package/dbus-glib/Makefile +++ b/package/dbus-glib/Makefile @@ -23,6 +23,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,DBUS_GLIB,dbus-glib,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,DBUS_GLIB_DEV,dbus-glib-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_DBUS_GLIB_DEV},${PKGSC_DBUS_GLIB_DEV})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --disable-checks CONFIGURE_ENV+= ac_cv_have_abstract_sockets=no diff --git a/package/dbus/Makefile b/package/dbus/Makefile index 1835e5a56..a86beb442 100644 --- a/package/dbus/Makefile +++ b/package/dbus/Makefile @@ -27,11 +27,13 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,DBUS,dbus,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) $(eval $(call PKG_template,DBUS_DEV,dbus-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_DBUS_DEV},${PKGSC_DBUS_DEV},${PKG_OPTS})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --disable-tests \ --disable-abstract-sockets \ --without-x \ --enable-checks \ --with-xml=expat \ + --with-session-socket-dir=/var/tmp \ --disable-dnotify \ --disable-kqueue \ --disable-xml-docs \ diff --git a/package/dbus/patches/patch-configure b/package/dbus/patches/patch-configure new file mode 100644 index 000000000..e5bce5132 --- /dev/null +++ b/package/dbus/patches/patch-configure @@ -0,0 +1,21 @@ +--- dbus-1.4.6.orig/configure 2011-02-17 21:06:57.000000000 +0100 ++++ dbus-1.4.6/configure 2011-04-13 04:47:38.000000000 +0200 +@@ -19608,18 +19608,6 @@ if test "x$GCC" = "xyes"; then + ;; + esac + +- case " $CFLAGS " in +- *[\ \ ]-fPIE[\ \ ]*) ;; +- *) if test x$dbus_win = xno && cc_supports_flag -fPIE; then +- PIE_CFLAGS="-fPIE" +- if ld_supports_flag -z,relro; then +- PIE_LDFLAGS="-pie -Wl,-z,relro" +- else +- PIE_LDFLAGS="-pie" +- fi +- fi +- ;; +- esac + + ### Disabled warnings, and compiler flag overrides + diff --git a/package/dillo/patches/patch-configure b/package/dillo/patches/patch-configure index 233acb5a8..222be7882 100644 --- a/package/dillo/patches/patch-configure +++ b/package/dillo/patches/patch-configure @@ -1,5 +1,5 @@ --- dillo-2.2.orig/configure 2010-02-11 11:19:59.000000000 +0100 -+++ dillo-2.2/configure 2011-01-07 21:35:04.000000000 +0100 ++++ dillo-2.2/configure 2011-03-28 02:30:04.373370428 +0200 @@ -5830,11 +5830,6 @@ typedef unsigned char bool_t; _______EOF @@ -12,3 +12,15 @@ for ac_func in gethostbyname do : ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +@@ -6215,9 +6210,9 @@ if test "x$enable_png" = "xyes"; then + $as_echo_n "checking for libpng-config... " >&6; } + + if test -z "$PNG_CONFIG"; then +- PNG_CONFIG=`which libpng12-config` ++ PNG_CONFIG=`which libpng-config` + if test -z "$PNG_CONFIG"; then +- PNG_CONFIG=`which libpng-config` ++ PNG_CONFIG=`which libpng15-config` + fi + if test -z "$PNG_CONFIG"; then + PNG_CONFIG=`which libpng10-config` diff --git a/package/elinks/Makefile b/package/elinks/Makefile index ee0e2798a..f3709cd27 100644 --- a/package/elinks/Makefile +++ b/package/elinks/Makefile @@ -23,6 +23,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,ELINKS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) INSTALL_STYLE:= manual +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) TARGET_CFLAGS+= -fPIC CONFIGURE_ENV+= $(shell echo ac_cv_file_./features.conf | tr [:blank:]-/. _)=yes CONFIGURE_ENV+= $(shell echo ac_cv_file_${WRKBUILD}/features.conf | tr [:blank:]-/. _)=yes diff --git a/package/faad2/Makefile b/package/faad2/Makefile index dab8ab734..9d2be1fe8 100644 --- a/package/faad2/Makefile +++ b/package/faad2/Makefile @@ -18,6 +18,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBFAAD2,libfaad2,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) # check for lrintf fails on Darwin, don't know why CONFIGURE_ENV+= ac_cv_c99_lrintf=yes CONFIGURE_ARGS+= --without-mpeg4ip \ diff --git a/package/ffmpeg/Makefile b/package/ffmpeg/Makefile index 9c7099d77..be732ea31 100644 --- a/package/ffmpeg/Makefile +++ b/package/ffmpeg/Makefile @@ -27,6 +27,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FFMPEG,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,FFPLAY,ffplay,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_FFPLAY},${PKGSD_FFPLAY},${PKGSC_FFPLAY})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) + ifeq ($(ADK_TARGET_CPU_WITH_MMX),y) CONFIGURE_CPU_OPTS:= --enable-mmx else diff --git a/package/file/patches/autotool.patch b/package/file/patches/autotool.patch index b5c145a8d..296506ea7 100644 --- a/package/file/patches/autotool.patch +++ b/package/file/patches/autotool.patch @@ -58647,7 +58647,7 @@ diff -Nur file-5.04.orig/ltmain.sh file-5.04/ltmain.sh + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) ++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" diff --git a/package/firefox/Makefile b/package/firefox/Makefile index 2053a117a..12c513504 100644 --- a/package/firefox/Makefile +++ b/package/firefox/Makefile @@ -9,11 +9,11 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= fcf8042948d91f1f3d9c33599b79cf35 PKG_DESCR:= graphical webbrowser PKG_SECTION:= x11/apps -PKG_DEPENDS:= libpthread alsa-lib dbus-glib glib libgtk libnotify -PKG_DEPENDS+= nspr nss libjpeg libatk pango cairo libxt libx11 libstdcxx +PKG_DEPENDS:= libpthread alsa-lib dbus-glib glib libgtk libpng libtiff libnotify +PKG_DEPENDS+= nspr nss libjpeg libatk pango cairo libxt libx11 libstdcxx hicolor-icon-theme PKG_DEPENDS+= libxdamage libxfixes libidl libsqlite libxcomposite gdk-pixbuf -PKG_BUILDDEP:= alsa-lib dbus-glib glib gtk+ libnotify libIDL libX11 -PKG_BUILDDEP+= nspr nss jpeg libXt fontconfig sqlite atk +PKG_BUILDDEP:= alsa-lib dbus-glib glib gtk+ libIDL libX11 MesaLib libtiff gdk-pixbuf +PKG_BUILDDEP+= nspr nss jpeg libXt fontconfig sqlite atk libpng hicolor-icon-theme libnotify PKG_URL:= http://www.mozilla.org/ PKG_SITES:= http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${PKG_VERSION}/source/ PKG_NOPARALLEL:= 1 @@ -39,7 +39,9 @@ endif CONFIGURE_ENV+= CROSS_COMPILE=1 \ HOST_CC="${CC_FOR_BUILD}" \ + HOST_CPPFLAGS="${CPPFLAGS_FOR_BUILD}" \ HOST_CFLAGS="${CFLAGS_FOR_BUILD}" \ + HOST_LDFLAGS="${LDLAGS_FOR_BUILD}" \ HOST_CXX="${CXX_FOR_BUILD}" \ HOST_CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ BUILD_LIBIDL_CONFIG="${BUILD_LIBIDL_CONFIG}" \ @@ -47,11 +49,16 @@ CONFIGURE_ENV+= CROSS_COMPILE=1 \ HOST_RANLIB="ranlib" HOST_AR="ar" \ CPPFLAGS="-I${STAGING_TARGET_DIR}/usr/include/freetype2" \ ac_cv_sqlite_secure_delete=yes \ + ac_cv_sqlite_threadsafe=yes \ + ac_cv_sqlite_enable_fts3=yes \ + ac_cv_sqlite_enable_unlock_notify=yes \ ac_cv_thread_keyword=no \ ac_cv_sizeof_int_p=4 CONFIGURE_ARGS+= --enable-application=browser \ --enable-official-branding \ --with-system-zlib \ + --with-system-cairo \ + --with-system-pixman \ --with-system-jpeg \ --with-system-png \ --with-system-nss \ @@ -60,6 +67,8 @@ CONFIGURE_ARGS+= --enable-application=browser \ --with-libIDL-prefix=${STAGING_TARGET_DIR}/usr \ --with-glib-prefix=${STAGING_TARGET_DIR}/usr \ --enable-libxul \ + --enable-libnotify \ + --enable-dbus \ --disable-tests \ --disable-libconic \ --disable-static \ @@ -72,7 +81,7 @@ CONFIGURE_ARGS+= --enable-application=browser \ --disable-jemalloc \ --disable-crashreporter -XAKE_FLAGS+= OS_RELEASE="2.6" +XAKE_FLAGS+= OS_RELEASE="2.6" HOST_CC=$(CC_FOR_BUILD) HOST_LDFLAGS=$(LDFLAGS_FOR_BUILD) XAKE_FLAGS+= ARCHFLAG="${TARGET_CFLAGS} ${TARGET_CPPFLAGS} ${TARGET_LDFLAGS}" firefox-install: diff --git a/package/fltk/Makefile b/package/fltk/Makefile index e829fcc57..59c6cdcff 100644 --- a/package/fltk/Makefile +++ b/package/fltk/Makefile @@ -9,7 +9,7 @@ PKG_RELEASE:= 3 PKG_MD5SUM:= 557544badbacca4ee1ebb2448f6e1f8a PKG_DESCR:= fast light toolkit PKG_SECTION:= libs -PKG_BUILDDEP:= libX11 libXi MesaLib freeglut +PKG_BUILDDEP:= libX11 libXi MesaLib freeglut freetype PKG_URL:= http://www.fltk.org/ PKG_SITES:= http://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/fltk/snapshots/ PKG_NEED_CXX:= 1 @@ -27,18 +27,18 @@ $(eval $(call PKG_template,LIBFLTK,libfltk,$(PKG_VERSION)-${PKG_RELEASE},${PKG_D LIBRARIES:=-nodefaultlibs -luClibc++ -lgcc -lm ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y) -LIBRARIES+=-lssp +LIBRARIES+=-lssp -lssp_nonshared endif CONFIGURE_ARGS+= --disable-xinerama ifeq ($(ADK_COMPILE_LIBFLTK_WITH_UCLIBCXX),y) -CONFIGURE_ENV+= CXXFLAGS="-fno-threadsafe-statics -fno-builtin -nostdinc++ \ +CONFIGURE_ENV+= CXXFLAGS="${TARGET_CXXFLAGS} -fno-threadsafe-statics -fno-builtin -nostdinc++ \ -I${STAGING_TARGET_DIR}/usr/include/uClibc++" \ LIBS="$(LIBRARIES)" endif -post-install: +libfltk-install: $(INSTALL_DIR) $(IDIR_LIBFLTK)/usr/lib $(CP) ${WRKINST}/usr/lib/libfltk*.so* $(IDIR_LIBFLTK)/usr/lib diff --git a/package/fltk/patches/patch-OpenGL_Makefile b/package/fltk/patches/patch-OpenGL_Makefile new file mode 100644 index 000000000..71ac77285 --- /dev/null +++ b/package/fltk/patches/patch-OpenGL_Makefile @@ -0,0 +1,11 @@ +--- fltk-2.0.x-r7513.orig/OpenGL/Makefile 2008-08-05 01:03:58.000000000 +0200 ++++ fltk-2.0.x-r7513/OpenGL/Makefile 2011-03-25 13:56:09.304620874 +0100 +@@ -102,7 +102,7 @@ include makedepend + + ../lib/$(DSONAME): $(OBJECTS) + echo $(DSOCOMMAND) $@ ... +- $(DSOCOMMAND) $@ $(OBJECTS) ++ $(DSOCOMMAND) $@ $(OBJECTS) $(LDLIBS) + $(RM) ../lib/$(DSOLINK) + $(LN) $(DSONAME) ../lib/$(DSOLINK) + diff --git a/package/fltk/patches/patch-configure b/package/fltk/patches/patch-configure index d8d16bd72..613c7b595 100644 --- a/package/fltk/patches/patch-configure +++ b/package/fltk/patches/patch-configure @@ -1,5 +1,5 @@ --- fltk-2.0.x-r7513.orig/configure 2010-04-16 10:02:53.000000000 +0200 -+++ fltk-2.0.x-r7513/configure 2010-12-05 21:10:58.000000000 +0100 ++++ fltk-2.0.x-r7513/configure 2011-03-25 13:52:41.555870814 +0100 @@ -1770,7 +1770,7 @@ FL_API_VERSION=${FL_MAJOR_VERSION}.${FL_ @@ -9,3 +9,12 @@ uversion=`uname -r | sed -e '1,$s/[^0-9]//g'` case $uname in IRIX*) +@@ -1922,7 +1922,7 @@ if test x$enable_shared = xyes; then + ;; + Linux* | *BSD*) + # DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o" +- DSOCOMMAND="\$(CXX) \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o" ++ DSOCOMMAND="\$(CXX) -shared -fPIC $DEBUGFLAG -o" + if test "$libdir" != "/usr/lib"; then + DSOLINK="-Wl,-rpath,$libdir" + fi diff --git a/package/fltk/patches/patch-images_Makefile b/package/fltk/patches/patch-images_Makefile new file mode 100644 index 000000000..ddd993d18 --- /dev/null +++ b/package/fltk/patches/patch-images_Makefile @@ -0,0 +1,11 @@ +--- fltk-2.0.x-r7513.orig/images/Makefile 2008-08-05 01:03:58.000000000 +0200 ++++ fltk-2.0.x-r7513/images/Makefile 2011-03-25 13:53:36.614620804 +0100 +@@ -109,7 +109,7 @@ include makedepend + + ../lib/$(DSONAME): $(OBJECTS) + echo $(DSOCOMMAND) $@ ... +- $(DSOCOMMAND) $@ $(OBJECTS) ++ $(DSOCOMMAND) $@ $(OBJECTS) $(LDLIBS) + $(RM) ../lib/$(DSOLINK) + $(LN) $(DSONAME) ../lib/$(DSOLINK) + diff --git a/package/fltk/patches/patch-makeinclude_in b/package/fltk/patches/patch-makeinclude_in index 7c2fd2f8b..46a7d397f 100644 --- a/package/fltk/patches/patch-makeinclude_in +++ b/package/fltk/patches/patch-makeinclude_in @@ -1,5 +1,5 @@ --- fltk-2.0.x-r7513.orig/makeinclude.in 2006-04-11 00:06:06.000000000 +0200 -+++ fltk-2.0.x-r7513/makeinclude.in 2010-06-13 17:18:11.503473158 +0200 ++++ fltk-2.0.x-r7513/makeinclude.in 2011-03-25 12:03:06.633370885 +0100 @@ -45,7 +45,7 @@ NROFF = @NROFF@ RM = rm -f RMDIR = rm -rf @@ -9,3 +9,12 @@ # compiler names: CC = @CC@ +@@ -115,7 +115,7 @@ CAT1EXT = @CAT1EXT@ + CAT3EXT = @CAT3EXT@ + + # Be quiet when building... +-.SILENT: ++#.SILENT: + + # Build commands and filename extensions... + .SUFFIXES: .0 .1 .3 .c .cxx .h .fl .man .o .z $(EXEEXT) diff --git a/package/fontconfig/Makefile b/package/fontconfig/Makefile index 691d12369..449703864 100644 --- a/package/fontconfig/Makefile +++ b/package/fontconfig/Makefile @@ -27,6 +27,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FONTCONFIG,fontconfig,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) $(eval $(call PKG_template,FONTCONFIG_DEV,fontconfig-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_FONTCONFIG_DEV},${PKGSC_FONTCONFIG_DEV},${PKG_OPTS})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) TARGET_LDFLAGS+= -liconv CONFIGURE_ARGS+= --with-arch=${ARCH} \ --disable-docs diff --git a/package/freeradius-client/Makefile b/package/freeradius-client/Makefile index eecc9f3ee..6a38be64f 100644 --- a/package/freeradius-client/Makefile +++ b/package/freeradius-client/Makefile @@ -22,6 +22,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,FREERADIUS_CLIENT,freeradius-client,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBFREERADIUS_CLIENT,libfreeradius-client,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION_LIB})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ENV+= ac_cv_func_uname=no post-install: diff --git a/package/fuse/patches/patch-include_config_h_in b/package/fuse/patches/patch-include_config_h_in new file mode 100644 index 000000000..ea12b31d2 --- /dev/null +++ b/package/fuse/patches/patch-include_config_h_in @@ -0,0 +1,25 @@ +--- fuse-2.7.4.orig/include/config.h.in 2008-07-25 20:19:18.000000000 +0200 ++++ fuse-2.7.4/include/config.h.in 2011-03-28 21:38:57.561810080 +0200 +@@ -33,10 +33,10 @@ + /* Define to 1 if you have the <string.h> header file. */ + #undef HAVE_STRING_H + +-/* Define to 1 if `st_atim' is member of `struct stat'. */ ++/* Define to 1 if `st_atim' is a member of `struct stat'. */ + #undef HAVE_STRUCT_STAT_ST_ATIM + +-/* Define to 1 if `st_atimespec' is member of `struct stat'. */ ++/* Define to 1 if `st_atimespec' is a member of `struct stat'. */ + #undef HAVE_STRUCT_STAT_ST_ATIMESPEC + + /* Define to 1 if you have the <sys/stat.h> header file. */ +@@ -76,6 +76,9 @@ + /* Define to the one symbol short name of this package. */ + #undef PACKAGE_TARNAME + ++/* Define to the home page for this package. */ ++#undef PACKAGE_URL ++ + /* Define to the version of this package. */ + #undef PACKAGE_VERSION + diff --git a/package/fuse/patches/patch-ltmain_sh b/package/fuse/patches/patch-ltmain_sh new file mode 100644 index 000000000..52c9d35f2 --- /dev/null +++ b/package/fuse/patches/patch-ltmain_sh @@ -0,0 +1,11 @@ +--- fuse-2.7.4.orig/ltmain.sh 2005-12-26 22:43:10.000000000 +0100 ++++ fuse-2.7.4/ltmain.sh 2011-03-28 21:40:27.271818746 +0200 +@@ -3292,7 +3292,7 @@ func_mode_link () + # compiler args for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ +- -t[45]*|-txscale*|@*) ++ -t[45]*|-txscale*|@*|-fstack-protector*|-flto) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + compile_command="$compile_command $arg" diff --git a/package/gcc/Makefile b/package/gcc/Makefile index fec6661e3..6158d094f 100644 --- a/package/gcc/Makefile +++ b/package/gcc/Makefile @@ -16,8 +16,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GCC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -TARGET_CFLAGS:= '' TARGET_CPPFLAGS:= '' +TARGET_CFLAGS:= '' +TARGET_CXXFLAGS:= $(filter-out -fstack-protector,$(TARGET_CXXFLAGS)) ifeq ($(ADK_LINUX_64),y) CONFIGURE_ARGS+= --with-abi=64 @@ -40,7 +41,7 @@ CONFIGURE_ARGS+= --enable-languages=c,c++ \ --enable-cxx-flags="${TARGET_LDFLAGS}" # disable honour cflags stuff -XAKE_FLAGS+= GCC_HONOUR_COPTS:=s +XAKE_FLAGS+= GCC_HONOUR_COPTS=s post-install: ${INSTALL_DIR} ${IDIR_GCC}/usr/lib/gcc ${IDIR_GCC}/usr/bin diff --git a/package/gconf/Makefile b/package/gconf/Makefile index 016ce5741..6f449ec8e 100644 --- a/package/gconf/Makefile +++ b/package/gconf/Makefile @@ -11,7 +11,7 @@ PKG_MD5SUM:= de83e70453910ac62f9ee2a86444bdab PKG_DESCR:= a system for storing application preferences PKG_SECTION:= libs PKG_BUILDDEP:= dbus dbus-glib orbit2 -PKG_DEPENDS:= dbus dbus-glib +PKG_DEPENDS:= dbus dbus-glib orbit2 PKG_URL:= http://projects.gnome.org/gconf/ PKG_SITES:= ftp://ftp.gnome.org//pub/GNOME/sources/GConf/${PKG_EXTRAVER}/ diff --git a/package/gdb/Makefile b/package/gdb/Makefile index d14a71761..c29c48e65 100644 --- a/package/gdb/Makefile +++ b/package/gdb/Makefile @@ -16,6 +16,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GDB,gdb,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) TARGET_CFLAGS+= ${TARGET_CPPFLAGS} -fPIC CONFIGURE_ARGS+= --without-uiout --enable-gdbmi \ --disable-tui --disable-gdbtk --without-x \ diff --git a/package/gdk-pixbuf/Makefile b/package/gdk-pixbuf/Makefile index da0d89f94..5b747b23c 100644 --- a/package/gdk-pixbuf/Makefile +++ b/package/gdk-pixbuf/Makefile @@ -4,12 +4,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:= gdk-pixbuf -PKG_VERSION:= 2.23.0 -PKG_RELEASE:= 2 -PKG_MD5SUM:= a7d6c5f2fe2d481149ed3ba807b5c043 +PKG_VERSION:= 2.23.1 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 74818d3ac4d7ebaf6bf24883c171a885 PKG_DESCR:= GDK pixbuf library -PKG_BUILDDEP:= jpeg libtiff PKG_SECTION:= libs +PKG_BUILDDEP:= jpeg libtiff PKG_SITES:= http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.23/ PKG_NEED_CXX:= 1 diff --git a/package/gettext/Makefile b/package/gettext/Makefile index 665115d06..14d502958 100644 --- a/package/gettext/Makefile +++ b/package/gettext/Makefile @@ -52,24 +52,24 @@ CONFIGURE_ENV+= nls_cv_use_gnu_gettext=yes \ INSTALL_STYLE:= manual -libintl-install: +post-build: + ${INSTALL_DIR} ${STAGING_DIR}/usr/include ${STAGING_DIR}/usr/lib + $(CP) $(WRKBUILD)/gettext-runtime/intl/libintl.h ${STAGING_DIR}/usr/include + ${CP} ${WRKBUILD}/gettext-runtime/intl/.libs/libintl.so* \ + ${STAGING_DIR}/usr/lib + +post-install: ${INSTALL_DIR} ${IDIR_LIBINTL}/usr/lib ${CP} ${WRKBUILD}/gettext-runtime/intl/.libs/libintl.so* \ ${IDIR_LIBINTL}/usr/lib - -libintl-dev-install: ${INSTALL_DIR} ${IDIR_LIBINTL_DEV}/usr/include ${INSTALL_DATA} ${WRKBUILD}/gettext-runtime/intl/libintl.h \ ${IDIR_LIBINTL_DEV}/usr/include - -gettext-install: ${INSTALL_DIR} ${IDIR_GETTEXT}/usr/bin $(INSTALL_BIN) $(WRKBUILD)/gettext-tools/src/.libs/xgettext \ $(IDIR_GETTEXT)/usr/bin $(INSTALL_BIN) $(WRKBUILD)/gettext-runtime/src/.libs/gettext \ $(IDIR_GETTEXT)/usr/bin - -msgfmt-install: ${INSTALL_DIR} ${IDIR_MSGFMT}/usr/bin ${INSTALL_DIR} ${IDIR_MSGFMT}/usr/lib ${CP} ${WRKBUILD}/gettext-tools/libgettextpo/.libs/libgettextpo.so* \ diff --git a/package/giflib/Makefile b/package/giflib/Makefile new file mode 100644 index 000000000..1259c92f9 --- /dev/null +++ b/package/giflib/Makefile @@ -0,0 +1,24 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= giflib +PKG_VERSION:= 4.1.6 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 4ff2ecec336b9724c5190f06e8a40f9e +PKG_DESCR:= GIF graphics library +PKG_SECTION:= libs +PKG_URL:= http://sourceforge.net/projects/giflib/ +PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=giflib/giflib%204.x/$(PKG_NAME)-$(PKG_VERSION)/} + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,GIFLIB,giflib,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +giflib-install: + $(INSTALL_DIR) $(IDIR_GIFLIB)/usr/lib + $(INSTALL_BIN) $(WRKINST)/usr/lib/libgif.so* \ + $(IDIR_GIFLIB)/usr/lib + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/glib/Makefile b/package/glib/Makefile index e0b0d1dc6..4bd99944c 100644 --- a/package/glib/Makefile +++ b/package/glib/Makefile @@ -28,6 +28,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GLIB,glib,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) $(eval $(call PKG_template,GLIB_DEV,glib-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_GLIB_DEV},${PKGSC_GLIB_DEV},${PKG_OPTS})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --enable-debug=no \ --disable-mem-pools \ --disable-rebuilds \ @@ -45,7 +46,6 @@ pre-configure: ifneq ($(OStype),Darwin) (cd ${WRKBUILD}; rm -rf config.{cache,status}; \ ./configure --prefix=$(STAGING_HOST_DIR) \ - --with-libiconv=gnu \ ); ${MAKE} -C ${WRKBUILD} V=1 $(CP) ${WRKBUILD}/gio/.libs/glib-compile-schemas ${STAGING_HOST_DIR}/bin diff --git a/package/glibc/Makefile b/package/glibc/Makefile index d428a58ec..be5d21e46 100644 --- a/package/glibc/Makefile +++ b/package/glibc/Makefile @@ -46,7 +46,7 @@ ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y) $(CP) $(STAGING_TARGET_DIR)/lib/libssp.so* $(IDIR_GLIBC)/lib endif $(CP) $(STAGING_TARGET_DIR)/lib/ld*.so* $(IDIR_GLIBC)/lib - -for file in libc libcrypt libdl libm libresolv librt libutil libnss_compat libnss_dns libnss_files; do \ + for file in libc libcrypt libdl libm libnsl libresolv librt libutil libnss_compat libnss_dns libnss_files; do \ $(CP) $(STAGING_TARGET_DIR)/lib/$$file.so* $(IDIR_GLIBC)/lib; \ $(CP) $(STAGING_TARGET_DIR)/lib/$$file-$(PKG_VERSION).so $(IDIR_GLIBC)/lib; \ done diff --git a/package/gmp/patches/autotool.patch b/package/gmp/patches/autotool.patch index 07f04f08f..fe7b9eddd 100644 --- a/package/gmp/patches/autotool.patch +++ b/package/gmp/patches/autotool.patch @@ -78350,7 +78350,7 @@ diff -Nur gmp-4.3.2.orig/ltmain.sh gmp-4.3.2/ltmain.sh + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) ++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" diff --git a/package/gnutls/Makefile b/package/gnutls/Makefile index 2257a1596..bd4fc9f81 100644 --- a/package/gnutls/Makefile +++ b/package/gnutls/Makefile @@ -31,6 +31,7 @@ $(eval $(call PKG_template,GNUTLS_UTILS,gnutls-utils,${PKG_VERSION}-${PKG_RELEAS $(eval $(call PKG_template,LIBGNUTLS_EXTRA,libgnutls-extra,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKGSC_LIBGNUTLS_EXTRA})) $(eval $(call PKG_template,LIBGNUTLS_OPENSSL,libgnutls-openssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKGSC_LIBGNUTLS_OPENSSL})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --without-libopencdk-prefix \ --disable-camellia \ --with-libgcrypt-prefix=${STAGING_TARGET_DIR}/usr \ diff --git a/package/gpsd/Makefile b/package/gpsd/Makefile index 49660d151..397460f67 100644 --- a/package/gpsd/Makefile +++ b/package/gpsd/Makefile @@ -25,6 +25,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,GPSD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,GPSD_CLIENTS,gpsd-clients,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_GPSD_CLIENTS},${PKG_SECTION})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ENV+= EGREP="grep -E" \ CPP="$(TARGET_CC) -E" \ ac_cv_func_strlcpy=no \ diff --git a/package/gtk+/Makefile b/package/gtk+/Makefile index 47fad3fa0..3b88cf9e5 100644 --- a/package/gtk+/Makefile +++ b/package/gtk+/Makefile @@ -4,15 +4,15 @@ include ${TOPDIR}/rules.mk PKG_NAME:= gtk+ -PKG_VERSION:= 2.18.6 -PKG_EXTRAVER:= 2.18 -PKG_RELEASE:= 2 -PKG_MD5SUM:= f98617af9f6be3065f64248f78dae2b7 +PKG_VERSION:= 2.24.3 +PKG_EXTRAVER:= 2.24 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 2c9f2dc5768480bedf26c6dfc3f7c254 PKG_DESCR:= GTK+ library PKG_SECTION:= libs PKG_DEPENDS:= glib PKG_BUILDDEP:= cairo atk pango libXext renderproto libXrender -PKG_BUILDDEP+= gdk-pixbuf libXcomposite +PKG_BUILDDEP+= gdk-pixbuf libXcomposite libXdamage PKG_URL:= http://www.gtk.org/ PKG_SITES:= http://ftp.gnome.org/pub/gnome/sources/gtk+/$(PKG_EXTRAVER)/ PKG_NEED_CXX:= 1 diff --git a/package/gtk+/patches/patch-Makefile_in b/package/gtk+/patches/patch-Makefile_in index 5f732adc4..01b7c66da 100644 --- a/package/gtk+/patches/patch-Makefile_in +++ b/package/gtk+/patches/patch-Makefile_in @@ -1,13 +1,13 @@ ---- gtk+-2.18.6.orig/Makefile.in 2010-01-11 22:11:32.000000000 +0100 -+++ gtk+-2.18.6/Makefile.in 2011-01-19 15:27:36.616158611 +0100 -@@ -467,8 +467,8 @@ XVFB_START = \ +--- gtk+-2.24.3.orig/Makefile.in 2011-03-14 18:10:47.000000000 +0100 ++++ gtk+-2.24.3/Makefile.in 2011-03-18 00:48:15.433370501 +0100 +@@ -457,8 +457,8 @@ XVFB_START = \ || { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; } \ && DISPLAY=:$$XID && export DISPLAY --SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests perf contrib --SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros -+SRC_SUBDIRS = gdk-pixbuf gdk gtk modules -+SUBDIRS = po po-properties $(SRC_SUBDIRS) m4macros +-SRC_SUBDIRS = gdk gtk modules demos tests perf +-SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build ++SRC_SUBDIRS = gdk gtk modules perf ++SUBDIRS = po po-properties $(SRC_SUBDIRS) m4macros build # require automake 1.4 AUTOMAKE_OPTIONS = 1.7 diff --git a/package/gtk+/patches/patch-ltmain_sh b/package/gtk+/patches/patch-ltmain_sh index 77ed2f207..8104e4837 100644 --- a/package/gtk+/patches/patch-ltmain_sh +++ b/package/gtk+/patches/patch-ltmain_sh @@ -1,11 +1,11 @@ ---- gtk+-2.18.6.orig/ltmain.sh 2009-12-02 12:35:38.000000000 +0100 -+++ gtk+-2.18.6/ltmain.sh 2011-01-19 15:27:06.368658496 +0100 -@@ -4765,7 +4765,7 @@ func_mode_link () - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files +--- gtk+-2.24.3.orig/ltmain.sh 2011-02-08 13:25:07.000000000 +0100 ++++ gtk+-2.24.3/ltmain.sh 2011-03-18 00:44:15.143369818 +0100 +@@ -5840,7 +5840,7 @@ func_mode_link () + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto) + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ +- -O*|-flto*|-fwhopr*|-fuse-linker-plugin) ++ -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" diff --git a/package/heimdal/Makefile b/package/heimdal/Makefile index 68d329112..785dfeefb 100644 --- a/package/heimdal/Makefile +++ b/package/heimdal/Makefile @@ -38,6 +38,7 @@ $(eval $(call PKG_template,HEIMDAL_SERVER,heimdal-server,$(PKG_VERSION)-${PKG_RE $(eval $(call PKG_template,LIBHEIMDAL,libheimdal,$(PKG_VERSION)-${PKG_RELEASE},,${PKGSD_LIBHEIMDAL},${PKGSC_LIBHEIMDAL})) $(eval $(call PKG_template,LIBHEIMDAL_CLIENT,libheimdal-client,$(PKG_VERSION)-${PKG_RELEASE},,${PKGSD_LIBHEIMDAL_CLIENT},${PKGSC_LIBHEIMDAL_CLIENT})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_OPTS:= --with-hdbdir=/etc/heimdal \ --disable-otp \ --disable-ndbm-db \ diff --git a/package/hicolor-icon-theme/Makefile b/package/hicolor-icon-theme/Makefile new file mode 100644 index 000000000..8a8c7f658 --- /dev/null +++ b/package/hicolor-icon-theme/Makefile @@ -0,0 +1,24 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= hicolor-icon-theme +PKG_VERSION:= 0.12 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 55cafbcef8bcf7107f6d502149eb4d87 +PKG_DESCR:= Hicolor Icon Theme +PKG_SECTION:= x11/misc +PKG_URL:= http://icon-theme.freedesktop.org/ +PKG_SITES:= http://icon-theme.freedesktop.org/releases/ + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,HICOLOR_ICON_THEME,hicolor-icon-theme,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +hicolor-icon-theme-install: + $(INSTALL_DIR) $(IDIR_HICOLOR_ICON_THEME)/usr/share/icons + $(CP) $(WRKINST)/usr/share/icons/* \ + $(IDIR_HICOLOR_ICON_THEME)/usr/share/icons + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/imlib2/Makefile b/package/imlib2/Makefile index 166d9cd40..12deefa5f 100644 --- a/package/imlib2/Makefile +++ b/package/imlib2/Makefile @@ -16,9 +16,11 @@ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=enlightenment/} include $(TOPDIR)/mk/package.mk -$(eval $(call PKG_template,IMLIB2,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,IMLIB2,imlib2,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -post-install: +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) + +imlib2-install: $(INSTALL_DIR) $(IDIR_IMLIB2)/usr/lib/imlib2/{filters,loaders} ${CP} $(WRKINST)/usr/lib/libImlib2.so* $(IDIR_IMLIB2)/usr/lib ${CP} $(WRKINST)/usr/lib/imlib2/filters/*.so \ diff --git a/package/imlib2/patches/patch-src_modules_loaders_loader_png_c b/package/imlib2/patches/patch-src_modules_loaders_loader_png_c new file mode 100644 index 000000000..b5bfacbf6 --- /dev/null +++ b/package/imlib2/patches/patch-src_modules_loaders_loader_png_c @@ -0,0 +1,72 @@ +--- imlib2-1.4.4.orig/src/modules/loaders/loader_png.c 2010-02-11 21:02:11.000000000 +0100 ++++ imlib2-1.4.4/src/modules/loaders/loader_png.c 2011-03-29 21:33:23.221818699 +0200 +@@ -58,7 +58,7 @@ load(ImlibImage * im, ImlibProgressFunct + fclose(f); + return 0; + } +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + fclose(f); +@@ -238,7 +238,7 @@ save(ImlibImage * im, ImlibProgressFunct + png_structp png_ptr; + png_infop info_ptr; + DATA32 *ptr; +- int x, y, j; ++ int x, y, j, interlace; + png_bytep row_ptr, data = NULL; + png_color_8 sig_bit; + int pl = 0; +@@ -265,7 +265,7 @@ save(ImlibImage * im, ImlibProgressFunct + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); + return 0; + } +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + fclose(f); + png_destroy_write_struct(&png_ptr, (png_infopp) & info_ptr); +@@ -274,11 +274,11 @@ save(ImlibImage * im, ImlibProgressFunct + } + + /* check whether we should use interlacing */ ++ interlace = PNG_INTERLACE_NONE; + if ((tag = __imlib_GetTag(im, "interlacing")) && tag->val) + { + #ifdef PNG_WRITE_INTERLACING_SUPPORTED +- png_ptr->interlaced = PNG_INTERLACE_ADAM7; +- num_passes = png_set_interlace_handling(png_ptr); ++ interlace = PNG_INTERLACE_ADAM7; + #endif + } + +@@ -286,7 +286,7 @@ save(ImlibImage * im, ImlibProgressFunct + if (im->flags & F_HAS_ALPHA) + { + png_set_IHDR(png_ptr, info_ptr, im->w, im->h, 8, +- PNG_COLOR_TYPE_RGB_ALPHA, png_ptr->interlaced, ++ PNG_COLOR_TYPE_RGB_ALPHA, interlace, + PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + #ifdef WORDS_BIGENDIAN + png_set_swap_alpha(png_ptr); +@@ -297,7 +297,7 @@ save(ImlibImage * im, ImlibProgressFunct + else + { + png_set_IHDR(png_ptr, info_ptr, im->w, im->h, 8, PNG_COLOR_TYPE_RGB, +- png_ptr->interlaced, PNG_COMPRESSION_TYPE_BASE, ++ interlace, PNG_COMPRESSION_TYPE_BASE, + PNG_FILTER_TYPE_BASE); + data = malloc(im->w * 3 * sizeof(char)); + } +@@ -344,6 +344,10 @@ save(ImlibImage * im, ImlibProgressFunct + png_set_shift(png_ptr, &sig_bit); + png_set_packing(png_ptr); + ++#ifdef PNG_WRITE_INTERLACING_SUPPORTED ++ num_passes = png_set_interlace_handling(png_ptr); ++#endif ++ + for (pass = 0; pass < num_passes; pass++) + { + ptr = im->data; diff --git a/package/iperf/Makefile b/package/iperf/Makefile index b2d01f86d..154175fc5 100644 --- a/package/iperf/Makefile +++ b/package/iperf/Makefile @@ -19,6 +19,9 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,IPERF,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) +TARGET_CXXFLAGS:= $(filter-out -flto,$(TARGET_CXXFLAGS)) + ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y) TARGET_LDFLAGS+= -lssp endif diff --git a/package/ipsec-tools/Makefile b/package/ipsec-tools/Makefile index f3ed9dfa8..54f155f89 100644 --- a/package/ipsec-tools/Makefile +++ b/package/ipsec-tools/Makefile @@ -4,13 +4,13 @@ include ${TOPDIR}/rules.mk PKG_NAME:= ipsec-tools -PKG_VERSION:= 0.7.2 +PKG_VERSION:= 0.8.0 PKG_RELEASE:= 1 -PKG_MD5SUM:= 72861f005746ee27984b2ee715ecc629 +PKG_MD5SUM:= b79aae3055a51f8de5c0f1b8ca6cf619 PKG_DESCR:= IPsec management tools PKG_SECTION:= net/security -PKG_DEPENDS:= libopenssl PKG_BUILDDEP:= openssl +PKG_DEPENDS:= libopenssl PKG_URL:= http://ipsec-tools.sourceforge.net/ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=ipsec-tools/} @@ -24,6 +24,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,IPSEC_TOOLS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --with-kernel-headers="${LINUX_DIR}/include" \ --without-readline \ --disable-security-context \ diff --git a/package/ipsec-tools/patches/patch-configure b/package/ipsec-tools/patches/patch-configure index 29e65cf5b..87bfb96a4 100644 --- a/package/ipsec-tools/patches/patch-configure +++ b/package/ipsec-tools/patches/patch-configure @@ -1,7 +1,6 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- ipsec-tools-0.7.2.orig/configure 2009-04-21 16:41:45.000000000 +0200 -+++ ipsec-tools-0.7.2/configure 2009-05-29 15:28:06.991791782 +0200 -@@ -11963,7 +11963,7 @@ echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } +--- ipsec-tools-0.8.0.orig/configure 2011-03-18 14:27:41.000000000 +0100 ++++ ipsec-tools-0.8.0/configure 2011-03-31 13:16:18.091819156 +0200 +@@ -11535,7 +11535,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } @@ -10,3 +9,30 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ case $host in *netbsd*) +@@ -12286,7 +12286,7 @@ $as_echo "$as_me: WARNING: Using a gener + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if printf accepts %z" >&5 + $as_echo_n "checking if printf accepts %z... " >&6; } + saved_CFLAGS=$CFLAGS +-CFLAGS="$CFLAGS -Wall -Werror" ++CFLAGS="$CFLAGS -Wall" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -13739,7 +13739,7 @@ $as_echo "#define HAVE_LIBLDAP /**/" >>c + LIBS="$LIBS -L$libldap_dir/lib -R$libldap_dir/lib -lldap" + + saved_CFLAGS=$CFLAGS +- CFLAGS="$CFLAGS -Wall -Werror" ++ CFLAGS="$CFLAGS -Wall" + saved_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $CPPFLAGS_ADD" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -13852,7 +13852,7 @@ $as_echo "#define HAVE_GSSAPI /**/" >>co + + # Check if iconv 2nd argument needs const + saved_CFLAGS=$CFLAGS +- CFLAGS="$CFLAGS -Wall -Werror" ++ CFLAGS="$CFLAGS -Wall" + saved_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $CPPFLAGS_ADD" + ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" diff --git a/package/ipsec-tools/patches/patch-ltmain_sh b/package/ipsec-tools/patches/patch-ltmain_sh index f0e98067d..9771c2407 100644 --- a/package/ipsec-tools/patches/patch-ltmain_sh +++ b/package/ipsec-tools/patches/patch-ltmain_sh @@ -1,6 +1,6 @@ ---- ipsec-tools-0.7.2.orig/ltmain.sh 2009-04-21 16:41:43.000000000 +0200 -+++ ipsec-tools-0.7.2/ltmain.sh 2011-01-15 21:50:23.000000000 +0100 -@@ -4238,7 +4238,7 @@ func_mode_link () +--- ipsec-tools-0.8.0.orig/ltmain.sh 2011-03-18 14:27:39.000000000 +0100 ++++ ipsec-tools-0.8.0/ltmain.sh 2011-03-31 13:16:42.511821748 +0200 +@@ -4765,7 +4765,7 @@ func_mode_link () # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ diff --git a/package/ipsec-tools/patches/patch-src_racoon_algorithm_c b/package/ipsec-tools/patches/patch-src_racoon_algorithm_c index 351ce1771..82a3d057b 100644 --- a/package/ipsec-tools/patches/patch-src_racoon_algorithm_c +++ b/package/ipsec-tools/patches/patch-src_racoon_algorithm_c @@ -1,6 +1,5 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- ipsec-tools-0.7.2.orig/src/racoon/algorithm.c 2006-10-06 14:02:27.000000000 +0200 -+++ ipsec-tools-0.7.2/src/racoon/algorithm.c 2009-05-29 15:51:03.662094000 +0200 +--- ipsec-tools-0.8.0.orig/src/racoon/algorithm.c 2006-10-06 14:02:27.000000000 +0200 ++++ ipsec-tools-0.8.0/src/racoon/algorithm.c 2011-03-31 13:22:28.381818558 +0200 @@ -111,9 +111,11 @@ static struct enc_algorithm oakley_encde eay_idea_encrypt, eay_idea_decrypt, eay_idea_weakkey, eay_idea_keylen, }, diff --git a/package/ipsec-tools/patches/patch-src_racoon_cftoken_c b/package/ipsec-tools/patches/patch-src_racoon_cftoken_c deleted file mode 100644 index 29bdf1a77..000000000 --- a/package/ipsec-tools/patches/patch-src_racoon_cftoken_c +++ /dev/null @@ -1,2026 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- ipsec-tools-0.7.2.orig/src/racoon/cftoken.c 2008-07-23 13:49:19.000000000 +0200 -+++ ipsec-tools-0.7.2/src/racoon/cftoken.c 2009-05-29 15:50:16.982910033 +0200 -@@ -8,7 +8,7 @@ - #define FLEX_SCANNER - #define YY_FLEX_MAJOR_VERSION 2 - #define YY_FLEX_MINOR_VERSION 5 --#define YY_FLEX_SUBMINOR_VERSION 34 -+#define YY_FLEX_SUBMINOR_VERSION 35 - #if YY_FLEX_SUBMINOR_VERSION > 0 - #define FLEX_BETA - #endif -@@ -178,13 +178,6 @@ extern FILE *yyin, *yyout; - - #define unput(c) yyunput( c, (yytext_ptr) ) - --/* The following is because we cannot portably get our hands on size_t -- * (without autoconf's help, which isn't available because we want -- * flex-generated scanners to compile on their own). -- * Given that the standard has decreed that size_t exists since 1989, -- * I guess we can afford to depend on it. Manoj. -- */ -- - #ifndef YY_TYPEDEF_YY_SIZE_T - #define YY_TYPEDEF_YY_SIZE_T - typedef size_t yy_size_t; -@@ -1634,6 +1627,7 @@ static struct include_stack { - static int incstackp = 0; - - static int yy_first_time = 1; -+int yywrap(void) { return 1; } - /* common seciton */ - /*octet (([01]?{digit}?{digit})|((2([0-4]{digit}))|(25[0-5]))) */ - -@@ -1642,7 +1636,7 @@ static int yy_first_time = 1; - - - --#line 1646 "cftoken.c" -+#line 1640 "cftoken.c" - - #define INITIAL 0 - #define S_INI 1 -@@ -1679,6 +1673,35 @@ static int yy_first_time = 1; - - static int yy_init_globals (void ); - -+/* Accessor methods to globals. -+ These are made visible to non-reentrant scanners for convenience. */ -+ -+int yylex_destroy (void ); -+ -+int yyget_debug (void ); -+ -+void yyset_debug (int debug_flag ); -+ -+YY_EXTRA_TYPE yyget_extra (void ); -+ -+void yyset_extra (YY_EXTRA_TYPE user_defined ); -+ -+FILE *yyget_in (void ); -+ -+void yyset_in (FILE * in_str ); -+ -+FILE *yyget_out (void ); -+ -+void yyset_out (FILE * out_str ); -+ -+int yyget_leng (void ); -+ -+char *yyget_text (void ); -+ -+int yyget_lineno (void ); -+ -+void yyset_lineno (int line_number ); -+ - /* Macros after this point can all be overridden by user definitions in - * section 1. - */ -@@ -1814,7 +1837,7 @@ YY_DECL - register char *yy_cp, *yy_bp; - register int yy_act; - --#line 142 "cftoken.l" -+#line 143 "cftoken.l" - - - if (yy_first_time) { -@@ -1824,7 +1847,7 @@ YY_DECL - - - /* privsep */ --#line 1828 "cftoken.c" -+#line 1851 "cftoken.c" - - if ( !(yy_init) ) - { -@@ -1915,1028 +1938,1028 @@ do_action: /* This label is used only to - - case 1: - YY_RULE_SETUP --#line 151 "cftoken.l" -+#line 152 "cftoken.l" - { BEGIN S_PRIV; YYDB; return(PRIVSEP); } - YY_BREAK - case 2: - YY_RULE_SETUP --#line 152 "cftoken.l" -+#line 153 "cftoken.l" - { return(BOC); } - YY_BREAK - case 3: - YY_RULE_SETUP --#line 153 "cftoken.l" -+#line 154 "cftoken.l" - { YYD; return(USER); } - YY_BREAK - case 4: - YY_RULE_SETUP --#line 154 "cftoken.l" -+#line 155 "cftoken.l" - { YYD; return(GROUP); } - YY_BREAK - case 5: - YY_RULE_SETUP --#line 155 "cftoken.l" -+#line 156 "cftoken.l" - { YYD; return(CHROOT); } - YY_BREAK - case 6: - YY_RULE_SETUP --#line 156 "cftoken.l" -+#line 157 "cftoken.l" - { BEGIN S_INI; return(EOC); } - YY_BREAK - /* path */ - case 7: - YY_RULE_SETUP --#line 159 "cftoken.l" -+#line 160 "cftoken.l" - { BEGIN S_PTH; YYDB; return(PATH); } - YY_BREAK - case 8: - YY_RULE_SETUP --#line 160 "cftoken.l" -+#line 161 "cftoken.l" - { YYD; yylval.num = LC_PATHTYPE_INCLUDE; - return(PATHTYPE); } - YY_BREAK - case 9: - YY_RULE_SETUP --#line 162 "cftoken.l" -+#line 163 "cftoken.l" - { YYD; yylval.num = LC_PATHTYPE_PSK; - return(PATHTYPE); } - YY_BREAK - case 10: - YY_RULE_SETUP --#line 164 "cftoken.l" -+#line 165 "cftoken.l" - { YYD; yylval.num = LC_PATHTYPE_CERT; - return(PATHTYPE); } - YY_BREAK - case 11: - YY_RULE_SETUP --#line 166 "cftoken.l" -+#line 167 "cftoken.l" - { YYD; yylval.num = LC_PATHTYPE_SCRIPT; - return(PATHTYPE); } - YY_BREAK - case 12: - YY_RULE_SETUP --#line 168 "cftoken.l" -+#line 169 "cftoken.l" - { YYD; yylval.num = LC_PATHTYPE_BACKUPSA; - return(PATHTYPE); } - YY_BREAK - case 13: - YY_RULE_SETUP --#line 170 "cftoken.l" -+#line 171 "cftoken.l" - { YYD; yylval.num = LC_PATHTYPE_PIDFILE; - return(PATHTYPE); } - YY_BREAK - case 14: - YY_RULE_SETUP --#line 172 "cftoken.l" -+#line 173 "cftoken.l" - { BEGIN S_INI; YYDB; return(EOS); } - YY_BREAK - /* include */ - case 15: - YY_RULE_SETUP --#line 175 "cftoken.l" -+#line 176 "cftoken.l" - { YYDB; return(INCLUDE); } - YY_BREAK - /* self information */ - case 16: - YY_RULE_SETUP --#line 178 "cftoken.l" -+#line 179 "cftoken.l" - { BEGIN S_INF; YYDB; yywarn("it is obsoleted. use \"my_identifier\" in each remote directives."); return(IDENTIFIER); } - YY_BREAK - case 17: - YY_RULE_SETUP --#line 179 "cftoken.l" -+#line 180 "cftoken.l" - { BEGIN S_INI; return(EOS); } - YY_BREAK - /* special */ - case 18: - YY_RULE_SETUP --#line 182 "cftoken.l" -+#line 183 "cftoken.l" - { YYDB; return(COMPLEX_BUNDLE); } - YY_BREAK - /* logging */ - case 19: - YY_RULE_SETUP --#line 185 "cftoken.l" -+#line 186 "cftoken.l" - { BEGIN S_LOG; YYDB; return(LOGGING); } - YY_BREAK - case 20: - YY_RULE_SETUP --#line 186 "cftoken.l" -+#line 187 "cftoken.l" - { YYD; yylval.num = LLV_ERROR; return(LOGLEV); } - YY_BREAK - case 21: - YY_RULE_SETUP --#line 187 "cftoken.l" -+#line 188 "cftoken.l" - { YYD; yylval.num = LLV_WARNING; return(LOGLEV); } - YY_BREAK - case 22: - YY_RULE_SETUP --#line 188 "cftoken.l" -+#line 189 "cftoken.l" - { YYD; yylval.num = LLV_NOTIFY; return(LOGLEV); } - YY_BREAK - case 23: - YY_RULE_SETUP --#line 189 "cftoken.l" -+#line 190 "cftoken.l" - { YYD; yylval.num = LLV_INFO; return(LOGLEV); } - YY_BREAK - case 24: - YY_RULE_SETUP --#line 190 "cftoken.l" -+#line 191 "cftoken.l" - { YYD; yylval.num = LLV_DEBUG; return(LOGLEV); } - YY_BREAK - case 25: - YY_RULE_SETUP --#line 191 "cftoken.l" -+#line 192 "cftoken.l" - { YYD; yylval.num = LLV_DEBUG2; return(LOGLEV); } - YY_BREAK - case 26: - YY_RULE_SETUP --#line 192 "cftoken.l" -+#line 193 "cftoken.l" - { YYD; yywarn("it is obsoleted. use \"debug2\""); yylval.num = LLV_DEBUG2; return(LOGLEV); } - YY_BREAK - case 27: - YY_RULE_SETUP --#line 193 "cftoken.l" -+#line 194 "cftoken.l" - { YYD; yywarn("it is obsoleted. use \"debug2\""); yylval.num = LLV_DEBUG2; return(LOGLEV); } - YY_BREAK - case 28: - YY_RULE_SETUP --#line 194 "cftoken.l" -+#line 195 "cftoken.l" - { BEGIN S_INI; return(EOS); } - YY_BREAK - /* padding */ - case 29: - YY_RULE_SETUP --#line 197 "cftoken.l" -+#line 198 "cftoken.l" - { BEGIN S_PAD; YYDB; return(PADDING); } - YY_BREAK - case 30: - YY_RULE_SETUP --#line 198 "cftoken.l" -+#line 199 "cftoken.l" - { return(BOC); } - YY_BREAK - case 31: - YY_RULE_SETUP --#line 199 "cftoken.l" -+#line 200 "cftoken.l" - { YYD; return(PAD_RANDOMIZE); } - YY_BREAK - case 32: - YY_RULE_SETUP --#line 200 "cftoken.l" -+#line 201 "cftoken.l" - { YYD; return(PAD_RANDOMIZELEN); } - YY_BREAK - case 33: - YY_RULE_SETUP --#line 201 "cftoken.l" -+#line 202 "cftoken.l" - { YYD; return(PAD_MAXLEN); } - YY_BREAK - case 34: - YY_RULE_SETUP --#line 202 "cftoken.l" -+#line 203 "cftoken.l" - { YYD; return(PAD_STRICT); } - YY_BREAK - case 35: - YY_RULE_SETUP --#line 203 "cftoken.l" -+#line 204 "cftoken.l" - { YYD; return(PAD_EXCLTAIL); } - YY_BREAK - case 36: - YY_RULE_SETUP --#line 204 "cftoken.l" -+#line 205 "cftoken.l" - { BEGIN S_INI; return(EOC); } - YY_BREAK - /* listen */ - case 37: - YY_RULE_SETUP --#line 207 "cftoken.l" -+#line 208 "cftoken.l" - { BEGIN S_LST; YYDB; return(LISTEN); } - YY_BREAK - case 38: - YY_RULE_SETUP --#line 208 "cftoken.l" -+#line 209 "cftoken.l" - { return(BOC); } - YY_BREAK - case 39: - YY_RULE_SETUP --#line 209 "cftoken.l" -+#line 210 "cftoken.l" - { YYD; return(X_ISAKMP); } - YY_BREAK - case 40: - YY_RULE_SETUP --#line 210 "cftoken.l" -+#line 211 "cftoken.l" - { YYD; return(X_ISAKMP_NATT); } - YY_BREAK - case 41: - YY_RULE_SETUP --#line 211 "cftoken.l" -+#line 212 "cftoken.l" - { YYD; return(X_ADMIN); } - YY_BREAK - case 42: - YY_RULE_SETUP --#line 212 "cftoken.l" -+#line 213 "cftoken.l" - { YYD; return(ADMINSOCK); } - YY_BREAK - case 43: - YY_RULE_SETUP --#line 213 "cftoken.l" -+#line 214 "cftoken.l" - { YYD; return(DISABLED); } - YY_BREAK - case 44: - YY_RULE_SETUP --#line 214 "cftoken.l" -+#line 215 "cftoken.l" - { YYD; return(STRICT_ADDRESS); } - YY_BREAK - case 45: - YY_RULE_SETUP --#line 215 "cftoken.l" -+#line 216 "cftoken.l" - { BEGIN S_INI; return(EOC); } - YY_BREAK - /* ldap config */ - case 46: - YY_RULE_SETUP --#line 218 "cftoken.l" -+#line 219 "cftoken.l" - { BEGIN S_LDAP; YYDB; return(LDAPCFG); } - YY_BREAK - case 47: - YY_RULE_SETUP --#line 219 "cftoken.l" -+#line 220 "cftoken.l" - { return(BOC); } - YY_BREAK - case 48: - YY_RULE_SETUP --#line 220 "cftoken.l" -+#line 221 "cftoken.l" - { YYD; return(LDAP_PVER); } - YY_BREAK - case 49: - YY_RULE_SETUP --#line 221 "cftoken.l" -+#line 222 "cftoken.l" - { YYD; return(LDAP_HOST); } - YY_BREAK - case 50: - YY_RULE_SETUP --#line 222 "cftoken.l" -+#line 223 "cftoken.l" - { YYD; return(LDAP_PORT); } - YY_BREAK - case 51: - YY_RULE_SETUP --#line 223 "cftoken.l" -+#line 224 "cftoken.l" - { YYD; return(LDAP_BASE); } - YY_BREAK - case 52: - YY_RULE_SETUP --#line 224 "cftoken.l" -+#line 225 "cftoken.l" - { YYD; return(LDAP_SUBTREE); } - YY_BREAK - case 53: - YY_RULE_SETUP --#line 225 "cftoken.l" -+#line 226 "cftoken.l" - { YYD; return(LDAP_BIND_DN); } - YY_BREAK - case 54: - YY_RULE_SETUP --#line 226 "cftoken.l" -+#line 227 "cftoken.l" - { YYD; return(LDAP_BIND_PW); } - YY_BREAK - case 55: - YY_RULE_SETUP --#line 227 "cftoken.l" -+#line 228 "cftoken.l" - { YYD; return(LDAP_ATTR_USER); } - YY_BREAK - case 56: - YY_RULE_SETUP --#line 228 "cftoken.l" -+#line 229 "cftoken.l" - { YYD; return(LDAP_ATTR_ADDR); } - YY_BREAK - case 57: - YY_RULE_SETUP --#line 229 "cftoken.l" -+#line 230 "cftoken.l" - { YYD; return(LDAP_ATTR_MASK); } - YY_BREAK - case 58: - YY_RULE_SETUP --#line 230 "cftoken.l" -+#line 231 "cftoken.l" - { YYD; return(LDAP_ATTR_GROUP); } - YY_BREAK - case 59: - YY_RULE_SETUP --#line 231 "cftoken.l" -+#line 232 "cftoken.l" - { YYD; return(LDAP_ATTR_MEMBER); } - YY_BREAK - case 60: - YY_RULE_SETUP --#line 232 "cftoken.l" -+#line 233 "cftoken.l" - { BEGIN S_INI; return(EOC); } - YY_BREAK - /* mode_cfg */ - case 61: - YY_RULE_SETUP --#line 235 "cftoken.l" -+#line 236 "cftoken.l" - { BEGIN S_CFG; YYDB; return(MODECFG); } - YY_BREAK - case 62: - YY_RULE_SETUP --#line 236 "cftoken.l" -+#line 237 "cftoken.l" - { return(BOC); } - YY_BREAK - case 63: - YY_RULE_SETUP --#line 237 "cftoken.l" -+#line 238 "cftoken.l" - { YYD; return(CFG_NET4); } - YY_BREAK - case 64: - YY_RULE_SETUP --#line 238 "cftoken.l" -+#line 239 "cftoken.l" - { YYD; return(CFG_MASK4); } - YY_BREAK - case 65: - YY_RULE_SETUP --#line 239 "cftoken.l" -+#line 240 "cftoken.l" - { YYD; return(CFG_DNS4); } - YY_BREAK - case 66: - YY_RULE_SETUP --#line 240 "cftoken.l" -+#line 241 "cftoken.l" - { YYD; return(CFG_NBNS4); } - YY_BREAK - case 67: - YY_RULE_SETUP --#line 241 "cftoken.l" -+#line 242 "cftoken.l" - { YYD; return(CFG_NBNS4); } - YY_BREAK - case 68: - YY_RULE_SETUP --#line 242 "cftoken.l" -+#line 243 "cftoken.l" - { YYD; return(CFG_DEFAULT_DOMAIN); } - YY_BREAK - case 69: - YY_RULE_SETUP --#line 243 "cftoken.l" -+#line 244 "cftoken.l" - { YYD; return(CFG_AUTH_SOURCE); } - YY_BREAK - case 70: - YY_RULE_SETUP --#line 244 "cftoken.l" -+#line 245 "cftoken.l" - { YYD; return(CFG_AUTH_GROUPS); } - YY_BREAK - case 71: - YY_RULE_SETUP --#line 245 "cftoken.l" -+#line 246 "cftoken.l" - { YYD; return(CFG_GROUP_SOURCE); } - YY_BREAK - case 72: - YY_RULE_SETUP --#line 246 "cftoken.l" -+#line 247 "cftoken.l" - { YYD; return(CFG_CONF_SOURCE); } - YY_BREAK - case 73: - YY_RULE_SETUP --#line 247 "cftoken.l" -+#line 248 "cftoken.l" - { YYD; return(CFG_ACCOUNTING); } - YY_BREAK - case 74: - YY_RULE_SETUP --#line 248 "cftoken.l" -+#line 249 "cftoken.l" - { YYD; return(CFG_SYSTEM); } - YY_BREAK - case 75: - YY_RULE_SETUP --#line 249 "cftoken.l" -+#line 250 "cftoken.l" - { YYD; return(CFG_LOCAL); } - YY_BREAK - case 76: - YY_RULE_SETUP --#line 250 "cftoken.l" -+#line 251 "cftoken.l" - { YYD; return(CFG_NONE); } - YY_BREAK - case 77: - YY_RULE_SETUP --#line 251 "cftoken.l" -+#line 252 "cftoken.l" - { YYD; return(CFG_RADIUS); } - YY_BREAK - case 78: - YY_RULE_SETUP --#line 252 "cftoken.l" -+#line 253 "cftoken.l" - { YYD; return(CFG_PAM); } - YY_BREAK - case 79: - YY_RULE_SETUP --#line 253 "cftoken.l" -+#line 254 "cftoken.l" - { YYD; return(CFG_LDAP); } - YY_BREAK - case 80: - YY_RULE_SETUP --#line 254 "cftoken.l" -+#line 255 "cftoken.l" - { YYD; return(CFG_POOL_SIZE); } - YY_BREAK - case 81: - YY_RULE_SETUP --#line 255 "cftoken.l" -+#line 256 "cftoken.l" - { YYD; return(CFG_MOTD); } - YY_BREAK - case 82: - YY_RULE_SETUP --#line 256 "cftoken.l" -+#line 257 "cftoken.l" - { YYD; return(CFG_AUTH_THROTTLE); } - YY_BREAK - case 83: - YY_RULE_SETUP --#line 257 "cftoken.l" -+#line 258 "cftoken.l" - { YYD; return(CFG_SPLIT_NETWORK); } - YY_BREAK - case 84: - YY_RULE_SETUP --#line 258 "cftoken.l" -+#line 259 "cftoken.l" - { YYD; return(CFG_SPLIT_LOCAL); } - YY_BREAK - case 85: - YY_RULE_SETUP --#line 259 "cftoken.l" -+#line 260 "cftoken.l" - { YYD; return(CFG_SPLIT_INCLUDE); } - YY_BREAK - case 86: - YY_RULE_SETUP --#line 260 "cftoken.l" -+#line 261 "cftoken.l" - { YYD; return(CFG_SPLIT_DNS); } - YY_BREAK - case 87: - YY_RULE_SETUP --#line 261 "cftoken.l" -+#line 262 "cftoken.l" - { YYD; return(CFG_PFS_GROUP); } - YY_BREAK - case 88: - YY_RULE_SETUP --#line 262 "cftoken.l" -+#line 263 "cftoken.l" - { YYD; return(CFG_SAVE_PASSWD); } - YY_BREAK - case 89: - YY_RULE_SETUP --#line 263 "cftoken.l" -+#line 264 "cftoken.l" - { YYD; return(COMMA); } - YY_BREAK - case 90: - YY_RULE_SETUP --#line 264 "cftoken.l" -+#line 265 "cftoken.l" - { BEGIN S_INI; return(EOC); } - YY_BREAK - /* timer */ - case 91: - YY_RULE_SETUP --#line 267 "cftoken.l" -+#line 268 "cftoken.l" - { BEGIN S_RTRY; YYDB; return(RETRY); } - YY_BREAK - case 92: - YY_RULE_SETUP --#line 268 "cftoken.l" -+#line 269 "cftoken.l" - { return(BOC); } - YY_BREAK - case 93: - YY_RULE_SETUP --#line 269 "cftoken.l" -+#line 270 "cftoken.l" - { YYD; return(RETRY_COUNTER); } - YY_BREAK - case 94: - YY_RULE_SETUP --#line 270 "cftoken.l" -+#line 271 "cftoken.l" - { YYD; return(RETRY_INTERVAL); } - YY_BREAK - case 95: - YY_RULE_SETUP --#line 271 "cftoken.l" -+#line 272 "cftoken.l" - { YYD; return(RETRY_PERSEND); } - YY_BREAK - case 96: - YY_RULE_SETUP --#line 272 "cftoken.l" -+#line 273 "cftoken.l" - { YYD; return(RETRY_PHASE1); } - YY_BREAK - case 97: - YY_RULE_SETUP --#line 273 "cftoken.l" -+#line 274 "cftoken.l" - { YYD; return(RETRY_PHASE2); } - YY_BREAK - case 98: - YY_RULE_SETUP --#line 274 "cftoken.l" -+#line 275 "cftoken.l" - { YYD; return(NATT_KA); } - YY_BREAK - case 99: - YY_RULE_SETUP --#line 275 "cftoken.l" -+#line 276 "cftoken.l" - { BEGIN S_INI; return(EOC); } - YY_BREAK - /* sainfo */ - case 100: - YY_RULE_SETUP --#line 278 "cftoken.l" -+#line 279 "cftoken.l" - { BEGIN S_SAINF; YYDB; return(SAINFO); } - YY_BREAK - case 101: - YY_RULE_SETUP --#line 279 "cftoken.l" -+#line 280 "cftoken.l" - { YYD; return(ANONYMOUS); } - YY_BREAK - case 102: - YY_RULE_SETUP --#line 280 "cftoken.l" -+#line 281 "cftoken.l" - { YYD; return(PORTANY); } - YY_BREAK - case 103: - YY_RULE_SETUP --#line 281 "cftoken.l" -+#line 282 "cftoken.l" - { YYD; return(ANY); } - YY_BREAK - case 104: - YY_RULE_SETUP --#line 282 "cftoken.l" -+#line 283 "cftoken.l" - { YYD; return(FROM); } - YY_BREAK - case 105: - YY_RULE_SETUP --#line 283 "cftoken.l" -+#line 284 "cftoken.l" - { YYD; return(GROUP); } - YY_BREAK - /* sainfo spec */ - case 106: - YY_RULE_SETUP --#line 285 "cftoken.l" -+#line 286 "cftoken.l" - { BEGIN S_SAINFS; return(BOC); } - YY_BREAK - case 107: - YY_RULE_SETUP --#line 286 "cftoken.l" -+#line 287 "cftoken.l" - { BEGIN S_INI; return(EOS); } - YY_BREAK - case 108: - YY_RULE_SETUP --#line 287 "cftoken.l" -+#line 288 "cftoken.l" - { BEGIN S_INI; return(EOC); } - YY_BREAK - case 109: - YY_RULE_SETUP --#line 288 "cftoken.l" -+#line 289 "cftoken.l" - { YYD; return(PFS_GROUP); } - YY_BREAK - case 110: - YY_RULE_SETUP --#line 289 "cftoken.l" -+#line 290 "cftoken.l" - { YYD; return(REMOTEID); } - YY_BREAK - case 111: - YY_RULE_SETUP --#line 290 "cftoken.l" -+#line 291 "cftoken.l" - { YYD; yywarn("it is obsoleted. use \"my_identifier\"."); return(IDENTIFIER); } - YY_BREAK - case 112: - YY_RULE_SETUP --#line 291 "cftoken.l" -+#line 292 "cftoken.l" - { YYD; return(MY_IDENTIFIER); } - YY_BREAK - case 113: - YY_RULE_SETUP --#line 292 "cftoken.l" -+#line 293 "cftoken.l" - { YYD; return(LIFETIME); } - YY_BREAK - case 114: - YY_RULE_SETUP --#line 293 "cftoken.l" -+#line 294 "cftoken.l" - { YYD; return(LIFETYPE_TIME); } - YY_BREAK - case 115: - YY_RULE_SETUP --#line 294 "cftoken.l" -+#line 295 "cftoken.l" - { YYD; return(LIFETYPE_BYTE); } - YY_BREAK - case 116: - YY_RULE_SETUP --#line 295 "cftoken.l" -+#line 296 "cftoken.l" - { YYD; yylval.num = algclass_ipsec_enc; return(ALGORITHM_CLASS); } - YY_BREAK - case 117: - YY_RULE_SETUP --#line 296 "cftoken.l" -+#line 297 "cftoken.l" - { YYD; yylval.num = algclass_ipsec_auth; return(ALGORITHM_CLASS); } - YY_BREAK - case 118: - YY_RULE_SETUP --#line 297 "cftoken.l" -+#line 298 "cftoken.l" - { YYD; yylval.num = algclass_ipsec_comp; return(ALGORITHM_CLASS); } - YY_BREAK - case 119: - YY_RULE_SETUP --#line 298 "cftoken.l" -+#line 299 "cftoken.l" - { YYD; return(COMMA); } - YY_BREAK - /* remote */ - case 120: - YY_RULE_SETUP --#line 301 "cftoken.l" -+#line 302 "cftoken.l" - { BEGIN S_RMT; YYDB; return(REMOTE); } - YY_BREAK - case 121: - YY_RULE_SETUP --#line 302 "cftoken.l" -+#line 303 "cftoken.l" - { YYD; return(ANONYMOUS); } - YY_BREAK - case 122: - YY_RULE_SETUP --#line 303 "cftoken.l" -+#line 304 "cftoken.l" - { YYD; return(INHERIT); } - YY_BREAK - /* remote spec */ - case 123: - YY_RULE_SETUP --#line 305 "cftoken.l" -+#line 306 "cftoken.l" - { BEGIN S_RMTS; return(BOC); } - YY_BREAK - case 124: - YY_RULE_SETUP --#line 306 "cftoken.l" -+#line 307 "cftoken.l" - { BEGIN S_INI; return(EOC); } - YY_BREAK - case 125: - YY_RULE_SETUP --#line 307 "cftoken.l" -+#line 308 "cftoken.l" - { YYD; return(EXCHANGE_MODE); } - YY_BREAK - case 126: - YY_RULE_SETUP --#line 308 "cftoken.l" -+#line 309 "cftoken.l" - { YYD; /* XXX ignored, but to be handled. */ ; } - YY_BREAK - case 127: - YY_RULE_SETUP --#line 309 "cftoken.l" -+#line 310 "cftoken.l" - { YYD; yylval.num = ISAKMP_ETYPE_BASE; return(EXCHANGETYPE); } - YY_BREAK - case 128: - YY_RULE_SETUP --#line 310 "cftoken.l" -+#line 311 "cftoken.l" - { YYD; yylval.num = ISAKMP_ETYPE_IDENT; return(EXCHANGETYPE); } - YY_BREAK - case 129: - YY_RULE_SETUP --#line 311 "cftoken.l" -+#line 312 "cftoken.l" - { YYD; yylval.num = ISAKMP_ETYPE_AGG; return(EXCHANGETYPE); } - YY_BREAK - case 130: - YY_RULE_SETUP --#line 312 "cftoken.l" -+#line 313 "cftoken.l" - { YYD; return(DOI); } - YY_BREAK - case 131: - YY_RULE_SETUP --#line 313 "cftoken.l" -+#line 314 "cftoken.l" - { YYD; yylval.num = IPSEC_DOI; return(DOITYPE); } - YY_BREAK - case 132: - YY_RULE_SETUP --#line 314 "cftoken.l" -+#line 315 "cftoken.l" - { YYD; return(SITUATION); } - YY_BREAK - case 133: - YY_RULE_SETUP --#line 315 "cftoken.l" -+#line 316 "cftoken.l" - { YYD; yylval.num = IPSECDOI_SIT_IDENTITY_ONLY; return(SITUATIONTYPE); } - YY_BREAK - case 134: - YY_RULE_SETUP --#line 316 "cftoken.l" -+#line 317 "cftoken.l" - { YYD; yylval.num = IPSECDOI_SIT_SECRECY; return(SITUATIONTYPE); } - YY_BREAK - case 135: - YY_RULE_SETUP --#line 317 "cftoken.l" -+#line 318 "cftoken.l" - { YYD; yylval.num = IPSECDOI_SIT_INTEGRITY; return(SITUATIONTYPE); } - YY_BREAK - case 136: - YY_RULE_SETUP --#line 318 "cftoken.l" -+#line 319 "cftoken.l" - { YYD; yywarn("it is obsoleted. use \"my_identifier\"."); return(IDENTIFIER); } - YY_BREAK - case 137: - YY_RULE_SETUP --#line 319 "cftoken.l" -+#line 320 "cftoken.l" - { YYD; return(MY_IDENTIFIER); } - YY_BREAK - case 138: - YY_RULE_SETUP --#line 320 "cftoken.l" -+#line 321 "cftoken.l" - { YYD; return(XAUTH_LOGIN); /* formerly identifier type login */ } - YY_BREAK - case 139: - YY_RULE_SETUP --#line 321 "cftoken.l" -+#line 322 "cftoken.l" - { YYD; return(PEERS_IDENTIFIER); } - YY_BREAK - case 140: - YY_RULE_SETUP --#line 322 "cftoken.l" -+#line 323 "cftoken.l" - { YYD; return(VERIFY_IDENTIFIER); } - YY_BREAK - case 141: - YY_RULE_SETUP --#line 323 "cftoken.l" -+#line 324 "cftoken.l" - { YYD; return(CERTIFICATE_TYPE); } - YY_BREAK - case 142: - YY_RULE_SETUP --#line 324 "cftoken.l" -+#line 325 "cftoken.l" - { YYD; return(CA_TYPE); } - YY_BREAK - case 143: - YY_RULE_SETUP --#line 325 "cftoken.l" -+#line 326 "cftoken.l" - { YYD; yylval.num = ISAKMP_CERT_X509SIGN; return(CERT_X509); } - YY_BREAK - case 144: - YY_RULE_SETUP --#line 326 "cftoken.l" -+#line 327 "cftoken.l" - { YYD; yylval.num = ISAKMP_CERT_PLAINRSA; return(CERT_PLAINRSA); } - YY_BREAK - case 145: - YY_RULE_SETUP --#line 327 "cftoken.l" -+#line 328 "cftoken.l" - { YYD; return(PEERS_CERTFILE); } - YY_BREAK - case 146: - YY_RULE_SETUP --#line 328 "cftoken.l" -+#line 329 "cftoken.l" - { YYD; return(DNSSEC); } - YY_BREAK - case 147: - YY_RULE_SETUP --#line 329 "cftoken.l" -+#line 330 "cftoken.l" - { YYD; return(VERIFY_CERT); } - YY_BREAK - case 148: - YY_RULE_SETUP --#line 330 "cftoken.l" -+#line 331 "cftoken.l" - { YYD; return(SEND_CERT); } - YY_BREAK - case 149: - YY_RULE_SETUP --#line 331 "cftoken.l" -+#line 332 "cftoken.l" - { YYD; return(SEND_CR); } - YY_BREAK - case 150: - YY_RULE_SETUP --#line 332 "cftoken.l" -+#line 333 "cftoken.l" - { YYD; return(DH_GROUP); } - YY_BREAK - case 151: - YY_RULE_SETUP --#line 333 "cftoken.l" -+#line 334 "cftoken.l" - { YYD; return(NONCE_SIZE); } - YY_BREAK - case 152: - YY_RULE_SETUP --#line 334 "cftoken.l" -+#line 335 "cftoken.l" - { YYD; return(GENERATE_POLICY); } - YY_BREAK - case 153: - YY_RULE_SETUP --#line 335 "cftoken.l" -+#line 336 "cftoken.l" - { YYD; yylval.num = GENERATE_POLICY_UNIQUE; return(GENERATE_LEVEL); } - YY_BREAK - case 154: - YY_RULE_SETUP --#line 336 "cftoken.l" -+#line 337 "cftoken.l" - { YYD; yylval.num = GENERATE_POLICY_REQUIRE; return(GENERATE_LEVEL); } - YY_BREAK - case 155: - YY_RULE_SETUP --#line 337 "cftoken.l" -+#line 338 "cftoken.l" - { YYD; yywarn("it is obsoleted. use \"support_proxy\"."); return(SUPPORT_PROXY); } - YY_BREAK - case 156: - YY_RULE_SETUP --#line 338 "cftoken.l" -+#line 339 "cftoken.l" - { YYD; return(SUPPORT_PROXY); } - YY_BREAK - case 157: - YY_RULE_SETUP --#line 339 "cftoken.l" -+#line 340 "cftoken.l" - { YYD; return(INITIAL_CONTACT); } - YY_BREAK - case 158: - YY_RULE_SETUP --#line 340 "cftoken.l" -+#line 341 "cftoken.l" - { YYD; return(NAT_TRAVERSAL); } - YY_BREAK - case 159: - YY_RULE_SETUP --#line 341 "cftoken.l" -+#line 342 "cftoken.l" - { YYD; return(REMOTE_FORCE_LEVEL); } - YY_BREAK - case 160: - YY_RULE_SETUP --#line 342 "cftoken.l" -+#line 343 "cftoken.l" - { YYD; return(PROPOSAL_CHECK); } - YY_BREAK - case 161: - YY_RULE_SETUP --#line 343 "cftoken.l" -+#line 344 "cftoken.l" - { YYD; yylval.num = PROP_CHECK_OBEY; return(PROPOSAL_CHECK_LEVEL); } - YY_BREAK - case 162: - YY_RULE_SETUP --#line 344 "cftoken.l" -+#line 345 "cftoken.l" - { YYD; yylval.num = PROP_CHECK_STRICT; return(PROPOSAL_CHECK_LEVEL); } - YY_BREAK - case 163: - YY_RULE_SETUP --#line 345 "cftoken.l" -+#line 346 "cftoken.l" - { YYD; yylval.num = PROP_CHECK_EXACT; return(PROPOSAL_CHECK_LEVEL); } - YY_BREAK - case 164: - YY_RULE_SETUP --#line 346 "cftoken.l" -+#line 347 "cftoken.l" - { YYD; yylval.num = PROP_CHECK_CLAIM; return(PROPOSAL_CHECK_LEVEL); } - YY_BREAK - case 165: - YY_RULE_SETUP --#line 347 "cftoken.l" -+#line 348 "cftoken.l" - { YYD; return(KEEPALIVE); } - YY_BREAK - case 166: - YY_RULE_SETUP --#line 348 "cftoken.l" -+#line 349 "cftoken.l" - { YYD; return(PASSIVE); } - YY_BREAK - case 167: - YY_RULE_SETUP --#line 349 "cftoken.l" -+#line 350 "cftoken.l" - { YYD; return(LIFETIME); } - YY_BREAK - case 168: - YY_RULE_SETUP --#line 350 "cftoken.l" -+#line 351 "cftoken.l" - { YYD; return(LIFETYPE_TIME); } - YY_BREAK - case 169: - YY_RULE_SETUP --#line 351 "cftoken.l" -+#line 352 "cftoken.l" - { YYD; return(LIFETYPE_BYTE); } - YY_BREAK - case 170: - YY_RULE_SETUP --#line 352 "cftoken.l" -+#line 353 "cftoken.l" - { YYD; return(DPD); } - YY_BREAK - case 171: - YY_RULE_SETUP --#line 353 "cftoken.l" -+#line 354 "cftoken.l" - { YYD; return(DPD_DELAY); } - YY_BREAK - case 172: - YY_RULE_SETUP --#line 354 "cftoken.l" -+#line 355 "cftoken.l" - { YYD; return(DPD_RETRY); } - YY_BREAK - case 173: - YY_RULE_SETUP --#line 355 "cftoken.l" -+#line 356 "cftoken.l" - { YYD; return(DPD_MAXFAIL); } - YY_BREAK - case 174: - YY_RULE_SETUP --#line 356 "cftoken.l" -+#line 357 "cftoken.l" - { YYD; return(PH1ID); } - YY_BREAK - case 175: - YY_RULE_SETUP --#line 357 "cftoken.l" -+#line 358 "cftoken.l" - { YYD; return(IKE_FRAG); } - YY_BREAK - case 176: - YY_RULE_SETUP --#line 358 "cftoken.l" -+#line 359 "cftoken.l" - { YYD; return(ESP_FRAG); } - YY_BREAK - case 177: - YY_RULE_SETUP --#line 359 "cftoken.l" -+#line 360 "cftoken.l" - { YYD; return(SCRIPT); } - YY_BREAK - case 178: - YY_RULE_SETUP --#line 360 "cftoken.l" -+#line 361 "cftoken.l" - { YYD; return(PHASE1_UP); } - YY_BREAK - case 179: - YY_RULE_SETUP --#line 361 "cftoken.l" -+#line 362 "cftoken.l" - { YYD; return(PHASE1_DOWN); } - YY_BREAK - case 180: - YY_RULE_SETUP --#line 362 "cftoken.l" -+#line 363 "cftoken.l" - { YYD; return(MODE_CFG); } - YY_BREAK - case 181: - YY_RULE_SETUP --#line 363 "cftoken.l" -+#line 364 "cftoken.l" - { YYD; return(WEAK_PHASE1_CHECK); } - YY_BREAK - /* remote proposal */ - case 182: - YY_RULE_SETUP --#line 365 "cftoken.l" -+#line 366 "cftoken.l" - { BEGIN S_RMTP; YYDB; return(PROPOSAL); } - YY_BREAK - case 183: - YY_RULE_SETUP --#line 366 "cftoken.l" -+#line 367 "cftoken.l" - { return(BOC); } - YY_BREAK - case 184: - YY_RULE_SETUP --#line 367 "cftoken.l" -+#line 368 "cftoken.l" - { BEGIN S_RMTS; return(EOC); } - YY_BREAK - case 185: - YY_RULE_SETUP --#line 368 "cftoken.l" -+#line 369 "cftoken.l" - { YYD; return(LIFETIME); } - YY_BREAK - case 186: - YY_RULE_SETUP --#line 369 "cftoken.l" -+#line 370 "cftoken.l" - { YYD; return(LIFETYPE_TIME); } - YY_BREAK - case 187: - YY_RULE_SETUP --#line 370 "cftoken.l" -+#line 371 "cftoken.l" - { YYD; return(LIFETYPE_BYTE); } - YY_BREAK - case 188: - YY_RULE_SETUP --#line 371 "cftoken.l" -+#line 372 "cftoken.l" - { YYD; yylval.num = algclass_isakmp_enc; return(ALGORITHM_CLASS); } - YY_BREAK - case 189: - YY_RULE_SETUP --#line 372 "cftoken.l" -+#line 373 "cftoken.l" - { YYD; yylval.num = algclass_isakmp_ameth; return(ALGORITHM_CLASS); } - YY_BREAK - case 190: - YY_RULE_SETUP --#line 373 "cftoken.l" -+#line 374 "cftoken.l" - { YYD; yylval.num = algclass_isakmp_hash; return(ALGORITHM_CLASS); } - YY_BREAK - case 191: - YY_RULE_SETUP --#line 374 "cftoken.l" -+#line 375 "cftoken.l" - { YYD; return(DH_GROUP); } - YY_BREAK - case 192: - YY_RULE_SETUP --#line 375 "cftoken.l" -+#line 376 "cftoken.l" - { YYD; return(GSS_ID); } - YY_BREAK - case 193: - YY_RULE_SETUP --#line 376 "cftoken.l" -+#line 377 "cftoken.l" - { YYD; return(GSS_ID); } /* for back compatibility */ - YY_BREAK - /* GSS ID encoding type (global) */ - case 194: - YY_RULE_SETUP --#line 379 "cftoken.l" -+#line 380 "cftoken.l" - { BEGIN S_GSSENC; YYDB; return(GSS_ID_ENC); } - YY_BREAK - case 195: - YY_RULE_SETUP --#line 380 "cftoken.l" -+#line 381 "cftoken.l" - { YYD; yylval.num = LC_GSSENC_LATIN1; - return(GSS_ID_ENCTYPE); } - YY_BREAK - case 196: - YY_RULE_SETUP --#line 382 "cftoken.l" -+#line 383 "cftoken.l" - { YYD; yylval.num = LC_GSSENC_UTF16LE; - return(GSS_ID_ENCTYPE); } - YY_BREAK - case 197: - YY_RULE_SETUP --#line 384 "cftoken.l" -+#line 385 "cftoken.l" - { BEGIN S_INI; YYDB; return(EOS); } - YY_BREAK - /* parameter */ - case 198: - YY_RULE_SETUP --#line 387 "cftoken.l" -+#line 388 "cftoken.l" - { YYD; yylval.num = TRUE; return(SWITCH); } - YY_BREAK - case 199: - YY_RULE_SETUP --#line 388 "cftoken.l" -+#line 389 "cftoken.l" - { YYD; yylval.num = FALSE; return(SWITCH); } - YY_BREAK - /* prefix */ - case 200: - YY_RULE_SETUP --#line 391 "cftoken.l" -+#line 392 "cftoken.l" - { - YYD; - yytext++; -@@ -2947,7 +2970,7 @@ YY_RULE_SETUP - /* port number */ - case 201: - YY_RULE_SETUP --#line 399 "cftoken.l" -+#line 400 "cftoken.l" - { - char *p = yytext; - YYD; -@@ -2961,7 +2984,7 @@ YY_RULE_SETUP - /* address range */ - case 202: - YY_RULE_SETUP --#line 410 "cftoken.l" -+#line 411 "cftoken.l" - { - YYD; - yytext++; -@@ -2977,318 +3000,318 @@ YY_RULE_SETUP - /* upper protocol */ - case 203: - YY_RULE_SETUP --#line 423 "cftoken.l" -+#line 424 "cftoken.l" - { YYD; yylval.num = IPPROTO_ESP; return(UL_PROTO); } - YY_BREAK - case 204: - YY_RULE_SETUP --#line 424 "cftoken.l" -+#line 425 "cftoken.l" - { YYD; yylval.num = IPPROTO_AH; return(UL_PROTO); } - YY_BREAK - case 205: - YY_RULE_SETUP --#line 425 "cftoken.l" -+#line 426 "cftoken.l" - { YYD; yylval.num = IPPROTO_IPCOMP; return(UL_PROTO); } - YY_BREAK - case 206: - YY_RULE_SETUP --#line 426 "cftoken.l" -+#line 427 "cftoken.l" - { YYD; yylval.num = IPPROTO_ICMP; return(UL_PROTO); } - YY_BREAK - case 207: - YY_RULE_SETUP --#line 427 "cftoken.l" -+#line 428 "cftoken.l" - { YYD; yylval.num = IPPROTO_ICMPV6; return(UL_PROTO); } - YY_BREAK - case 208: - YY_RULE_SETUP --#line 428 "cftoken.l" -+#line 429 "cftoken.l" - { YYD; yylval.num = IPPROTO_TCP; return(UL_PROTO); } - YY_BREAK - case 209: - YY_RULE_SETUP --#line 429 "cftoken.l" -+#line 430 "cftoken.l" - { YYD; yylval.num = IPPROTO_UDP; return(UL_PROTO); } - YY_BREAK - /* algorithm type */ - case 210: - YY_RULE_SETUP --#line 432 "cftoken.l" -+#line 433 "cftoken.l" - { YYD; yylval.num = algtype_des_iv64; return(ALGORITHMTYPE); } - YY_BREAK - case 211: - YY_RULE_SETUP --#line 433 "cftoken.l" -+#line 434 "cftoken.l" - { YYD; yylval.num = algtype_des; return(ALGORITHMTYPE); } - YY_BREAK - case 212: - YY_RULE_SETUP --#line 434 "cftoken.l" -+#line 435 "cftoken.l" - { YYD; yylval.num = algtype_3des; return(ALGORITHMTYPE); } - YY_BREAK - case 213: - YY_RULE_SETUP --#line 435 "cftoken.l" -+#line 436 "cftoken.l" - { YYD; yylval.num = algtype_rc5; return(ALGORITHMTYPE); } - YY_BREAK - case 214: - YY_RULE_SETUP --#line 436 "cftoken.l" -+#line 437 "cftoken.l" - { YYD; yylval.num = algtype_idea; return(ALGORITHMTYPE); } - YY_BREAK - case 215: - YY_RULE_SETUP --#line 437 "cftoken.l" -+#line 438 "cftoken.l" - { YYD; yylval.num = algtype_cast128; return(ALGORITHMTYPE); } - YY_BREAK - case 216: - YY_RULE_SETUP --#line 438 "cftoken.l" -+#line 439 "cftoken.l" - { YYD; yylval.num = algtype_blowfish; return(ALGORITHMTYPE); } - YY_BREAK - case 217: - YY_RULE_SETUP --#line 439 "cftoken.l" -+#line 440 "cftoken.l" - { YYD; yylval.num = algtype_3idea; return(ALGORITHMTYPE); } - YY_BREAK - case 218: - YY_RULE_SETUP --#line 440 "cftoken.l" -+#line 441 "cftoken.l" - { YYD; yylval.num = algtype_des_iv32; return(ALGORITHMTYPE); } - YY_BREAK - case 219: - YY_RULE_SETUP --#line 441 "cftoken.l" -+#line 442 "cftoken.l" - { YYD; yylval.num = algtype_rc4; return(ALGORITHMTYPE); } - YY_BREAK - case 220: - YY_RULE_SETUP --#line 442 "cftoken.l" -+#line 443 "cftoken.l" - { YYD; yylval.num = algtype_null_enc; return(ALGORITHMTYPE); } - YY_BREAK - case 221: - YY_RULE_SETUP --#line 443 "cftoken.l" -+#line 444 "cftoken.l" - { YYD; yylval.num = algtype_null_enc; return(ALGORITHMTYPE); } - YY_BREAK - case 222: - YY_RULE_SETUP --#line 444 "cftoken.l" -+#line 445 "cftoken.l" - { YYD; yylval.num = algtype_aes; return(ALGORITHMTYPE); } - YY_BREAK - case 223: - YY_RULE_SETUP --#line 445 "cftoken.l" -+#line 446 "cftoken.l" - { YYD; yylval.num = algtype_aes; return(ALGORITHMTYPE); } - YY_BREAK - case 224: - YY_RULE_SETUP --#line 446 "cftoken.l" -+#line 447 "cftoken.l" - { YYD; yylval.num = algtype_twofish; return(ALGORITHMTYPE); } - YY_BREAK - case 225: - YY_RULE_SETUP --#line 447 "cftoken.l" -+#line 448 "cftoken.l" - { YYD; yylval.num = algtype_camellia; return(ALGORITHMTYPE); } - YY_BREAK - case 226: - YY_RULE_SETUP --#line 448 "cftoken.l" -+#line 449 "cftoken.l" - { YYD; yylval.num = algtype_non_auth; return(ALGORITHMTYPE); } - YY_BREAK - case 227: - YY_RULE_SETUP --#line 449 "cftoken.l" -+#line 450 "cftoken.l" - { YYD; yylval.num = algtype_hmac_md5; return(ALGORITHMTYPE); } - YY_BREAK - case 228: - YY_RULE_SETUP --#line 450 "cftoken.l" -+#line 451 "cftoken.l" - { YYD; yylval.num = algtype_hmac_sha1; return(ALGORITHMTYPE); } - YY_BREAK - case 229: - YY_RULE_SETUP --#line 451 "cftoken.l" -+#line 452 "cftoken.l" - { YYD; yylval.num = algtype_hmac_sha2_256; return(ALGORITHMTYPE); } - YY_BREAK - case 230: - YY_RULE_SETUP --#line 452 "cftoken.l" -+#line 453 "cftoken.l" - { YYD; yylval.num = algtype_hmac_sha2_256; return(ALGORITHMTYPE); } - YY_BREAK - case 231: - YY_RULE_SETUP --#line 453 "cftoken.l" -+#line 454 "cftoken.l" - { YYD; yylval.num = algtype_hmac_sha2_384; return(ALGORITHMTYPE); } - YY_BREAK - case 232: - YY_RULE_SETUP --#line 454 "cftoken.l" -+#line 455 "cftoken.l" - { YYD; yylval.num = algtype_hmac_sha2_384; return(ALGORITHMTYPE); } - YY_BREAK - case 233: - YY_RULE_SETUP --#line 455 "cftoken.l" -+#line 456 "cftoken.l" - { YYD; yylval.num = algtype_hmac_sha2_512; return(ALGORITHMTYPE); } - YY_BREAK - case 234: - YY_RULE_SETUP --#line 456 "cftoken.l" -+#line 457 "cftoken.l" - { YYD; yylval.num = algtype_hmac_sha2_512; return(ALGORITHMTYPE); } - YY_BREAK - case 235: - YY_RULE_SETUP --#line 457 "cftoken.l" -+#line 458 "cftoken.l" - { YYD; yylval.num = algtype_des_mac; return(ALGORITHMTYPE); } - YY_BREAK - case 236: - YY_RULE_SETUP --#line 458 "cftoken.l" -+#line 459 "cftoken.l" - { YYD; yylval.num = algtype_kpdk; return(ALGORITHMTYPE); } - YY_BREAK - case 237: - YY_RULE_SETUP --#line 459 "cftoken.l" -+#line 460 "cftoken.l" - { YYD; yylval.num = algtype_md5; return(ALGORITHMTYPE); } - YY_BREAK - case 238: - YY_RULE_SETUP --#line 460 "cftoken.l" -+#line 461 "cftoken.l" - { YYD; yylval.num = algtype_sha1; return(ALGORITHMTYPE); } - YY_BREAK - case 239: - YY_RULE_SETUP --#line 461 "cftoken.l" -+#line 462 "cftoken.l" - { YYD; yylval.num = algtype_tiger; return(ALGORITHMTYPE); } - YY_BREAK - case 240: - YY_RULE_SETUP --#line 462 "cftoken.l" -+#line 463 "cftoken.l" - { YYD; yylval.num = algtype_sha2_256; return(ALGORITHMTYPE); } - YY_BREAK - case 241: - YY_RULE_SETUP --#line 463 "cftoken.l" -+#line 464 "cftoken.l" - { YYD; yylval.num = algtype_sha2_256; return(ALGORITHMTYPE); } - YY_BREAK - case 242: - YY_RULE_SETUP --#line 464 "cftoken.l" -+#line 465 "cftoken.l" - { YYD; yylval.num = algtype_sha2_384; return(ALGORITHMTYPE); } - YY_BREAK - case 243: - YY_RULE_SETUP --#line 465 "cftoken.l" -+#line 466 "cftoken.l" - { YYD; yylval.num = algtype_sha2_384; return(ALGORITHMTYPE); } - YY_BREAK - case 244: - YY_RULE_SETUP --#line 466 "cftoken.l" -+#line 467 "cftoken.l" - { YYD; yylval.num = algtype_sha2_512; return(ALGORITHMTYPE); } - YY_BREAK - case 245: - YY_RULE_SETUP --#line 467 "cftoken.l" -+#line 468 "cftoken.l" - { YYD; yylval.num = algtype_sha2_512; return(ALGORITHMTYPE); } - YY_BREAK - case 246: - YY_RULE_SETUP --#line 468 "cftoken.l" -+#line 469 "cftoken.l" - { YYD; yylval.num = algtype_oui; return(ALGORITHMTYPE); } - YY_BREAK - case 247: - YY_RULE_SETUP --#line 469 "cftoken.l" -+#line 470 "cftoken.l" - { YYD; yylval.num = algtype_deflate; return(ALGORITHMTYPE); } - YY_BREAK - case 248: - YY_RULE_SETUP --#line 470 "cftoken.l" -+#line 471 "cftoken.l" - { YYD; yylval.num = algtype_lzs; return(ALGORITHMTYPE); } - YY_BREAK - case 249: - YY_RULE_SETUP --#line 471 "cftoken.l" -+#line 472 "cftoken.l" - { YYD; yylval.num = algtype_modp768; return(ALGORITHMTYPE); } - YY_BREAK - case 250: - YY_RULE_SETUP --#line 472 "cftoken.l" -+#line 473 "cftoken.l" - { YYD; yylval.num = algtype_modp1024; return(ALGORITHMTYPE); } - YY_BREAK - case 251: - YY_RULE_SETUP --#line 473 "cftoken.l" -+#line 474 "cftoken.l" - { YYD; yylval.num = algtype_modp1536; return(ALGORITHMTYPE); } - YY_BREAK - case 252: - YY_RULE_SETUP --#line 474 "cftoken.l" -+#line 475 "cftoken.l" - { YYD; yylval.num = algtype_ec2n155; return(ALGORITHMTYPE); } - YY_BREAK - case 253: - YY_RULE_SETUP --#line 475 "cftoken.l" -+#line 476 "cftoken.l" - { YYD; yylval.num = algtype_ec2n185; return(ALGORITHMTYPE); } - YY_BREAK - case 254: - YY_RULE_SETUP --#line 476 "cftoken.l" -+#line 477 "cftoken.l" - { YYD; yylval.num = algtype_modp2048; return(ALGORITHMTYPE); } - YY_BREAK - case 255: - YY_RULE_SETUP --#line 477 "cftoken.l" -+#line 478 "cftoken.l" - { YYD; yylval.num = algtype_modp3072; return(ALGORITHMTYPE); } - YY_BREAK - case 256: - YY_RULE_SETUP --#line 478 "cftoken.l" -+#line 479 "cftoken.l" - { YYD; yylval.num = algtype_modp4096; return(ALGORITHMTYPE); } - YY_BREAK - case 257: - YY_RULE_SETUP --#line 479 "cftoken.l" -+#line 480 "cftoken.l" - { YYD; yylval.num = algtype_modp6144; return(ALGORITHMTYPE); } - YY_BREAK - case 258: - YY_RULE_SETUP --#line 480 "cftoken.l" -+#line 481 "cftoken.l" - { YYD; yylval.num = algtype_modp8192; return(ALGORITHMTYPE); } - YY_BREAK - case 259: - YY_RULE_SETUP --#line 481 "cftoken.l" -+#line 482 "cftoken.l" - { YYD; yylval.num = algtype_psk; return(ALGORITHMTYPE); } - YY_BREAK - case 260: - YY_RULE_SETUP --#line 482 "cftoken.l" -+#line 483 "cftoken.l" - { YYD; yylval.num = algtype_rsasig; return(ALGORITHMTYPE); } - YY_BREAK - case 261: - YY_RULE_SETUP --#line 483 "cftoken.l" -+#line 484 "cftoken.l" - { YYD; yylval.num = algtype_dsssig; return(ALGORITHMTYPE); } - YY_BREAK - case 262: - YY_RULE_SETUP --#line 484 "cftoken.l" -+#line 485 "cftoken.l" - { YYD; yylval.num = algtype_rsaenc; return(ALGORITHMTYPE); } - YY_BREAK - case 263: - YY_RULE_SETUP --#line 485 "cftoken.l" -+#line 486 "cftoken.l" - { YYD; yylval.num = algtype_rsarev; return(ALGORITHMTYPE); } - YY_BREAK - case 264: - YY_RULE_SETUP --#line 486 "cftoken.l" -+#line 487 "cftoken.l" - { YYD; yylval.num = algtype_gssapikrb; return(ALGORITHMTYPE); } - YY_BREAK - case 265: - YY_RULE_SETUP --#line 487 "cftoken.l" -+#line 488 "cftoken.l" - { - #ifdef ENABLE_HYBRID - YYD; yylval.num = algtype_hybrid_rsa_s; return(ALGORITHMTYPE); -@@ -3299,7 +3322,7 @@ YY_RULE_SETUP - YY_BREAK - case 266: - YY_RULE_SETUP --#line 494 "cftoken.l" -+#line 495 "cftoken.l" - { - #ifdef ENABLE_HYBRID - YYD; yylval.num = algtype_hybrid_dss_s; return(ALGORITHMTYPE); -@@ -3310,7 +3333,7 @@ YY_RULE_SETUP - YY_BREAK - case 267: - YY_RULE_SETUP --#line 501 "cftoken.l" -+#line 502 "cftoken.l" - { - #ifdef ENABLE_HYBRID - YYD; yylval.num = algtype_hybrid_rsa_c; return(ALGORITHMTYPE); -@@ -3321,7 +3344,7 @@ YY_RULE_SETUP - YY_BREAK - case 268: - YY_RULE_SETUP --#line 508 "cftoken.l" -+#line 509 "cftoken.l" - { - #ifdef ENABLE_HYBRID - YYD; yylval.num = algtype_hybrid_dss_c; return(ALGORITHMTYPE); -@@ -3332,7 +3355,7 @@ YY_RULE_SETUP - YY_BREAK - case 269: - YY_RULE_SETUP --#line 515 "cftoken.l" -+#line 516 "cftoken.l" - { - #ifdef ENABLE_HYBRID - YYD; yylval.num = algtype_xauth_psk_s; return(ALGORITHMTYPE); -@@ -3343,7 +3366,7 @@ YY_RULE_SETUP - YY_BREAK - case 270: - YY_RULE_SETUP --#line 522 "cftoken.l" -+#line 523 "cftoken.l" - { - #ifdef ENABLE_HYBRID - YYD; yylval.num = algtype_xauth_psk_c; return(ALGORITHMTYPE); -@@ -3354,7 +3377,7 @@ YY_RULE_SETUP - YY_BREAK - case 271: - YY_RULE_SETUP --#line 529 "cftoken.l" -+#line 530 "cftoken.l" - { - #ifdef ENABLE_HYBRID - YYD; yylval.num = algtype_xauth_rsa_s; return(ALGORITHMTYPE); -@@ -3365,7 +3388,7 @@ YY_RULE_SETUP - YY_BREAK - case 272: - YY_RULE_SETUP --#line 536 "cftoken.l" -+#line 537 "cftoken.l" - { - #ifdef ENABLE_HYBRID - YYD; yylval.num = algtype_xauth_rsa_c; return(ALGORITHMTYPE); -@@ -3377,105 +3400,105 @@ YY_RULE_SETUP - /* identifier type */ - case 273: - YY_RULE_SETUP --#line 546 "cftoken.l" -+#line 547 "cftoken.l" - { YYD; yywarn("it is obsoleted."); return(VENDORID); } - YY_BREAK - case 274: - YY_RULE_SETUP --#line 547 "cftoken.l" -+#line 548 "cftoken.l" - { YYD; yylval.num = IDTYPE_USERFQDN; return(IDENTIFIERTYPE); } - YY_BREAK - case 275: - YY_RULE_SETUP --#line 548 "cftoken.l" -+#line 549 "cftoken.l" - { YYD; yylval.num = IDTYPE_FQDN; return(IDENTIFIERTYPE); } - YY_BREAK - case 276: - YY_RULE_SETUP --#line 549 "cftoken.l" -+#line 550 "cftoken.l" - { YYD; yylval.num = IDTYPE_KEYID; return(IDENTIFIERTYPE); } - YY_BREAK - case 277: - YY_RULE_SETUP --#line 550 "cftoken.l" -+#line 551 "cftoken.l" - { YYD; yylval.num = IDTYPE_ADDRESS; return(IDENTIFIERTYPE); } - YY_BREAK - case 278: - YY_RULE_SETUP --#line 551 "cftoken.l" -+#line 552 "cftoken.l" - { YYD; yylval.num = IDTYPE_SUBNET; return(IDENTIFIERTYPE); } - YY_BREAK - case 279: - YY_RULE_SETUP --#line 552 "cftoken.l" -+#line 553 "cftoken.l" - { YYD; yylval.num = IDTYPE_ASN1DN; return(IDENTIFIERTYPE); } - YY_BREAK - case 280: - YY_RULE_SETUP --#line 553 "cftoken.l" -+#line 554 "cftoken.l" - { YYD; yywarn("certname will be obsoleted in near future."); yylval.num = IDTYPE_ASN1DN; return(IDENTIFIERTYPE); } - YY_BREAK - /* identifier qualifier */ - case 281: - YY_RULE_SETUP --#line 556 "cftoken.l" -+#line 557 "cftoken.l" - { YYD; yylval.num = IDQUAL_TAG; return(IDENTIFIERQUAL); } - YY_BREAK - case 282: - YY_RULE_SETUP --#line 557 "cftoken.l" -+#line 558 "cftoken.l" - { YYD; yylval.num = IDQUAL_FILE; return(IDENTIFIERQUAL); } - YY_BREAK - /* units */ - case 283: - YY_RULE_SETUP --#line 560 "cftoken.l" -+#line 561 "cftoken.l" - { YYD; return(UNITTYPE_BYTE); } - YY_BREAK - case 284: - YY_RULE_SETUP --#line 561 "cftoken.l" -+#line 562 "cftoken.l" - { YYD; return(UNITTYPE_KBYTES); } - YY_BREAK - case 285: - YY_RULE_SETUP --#line 562 "cftoken.l" -+#line 563 "cftoken.l" - { YYD; return(UNITTYPE_MBYTES); } - YY_BREAK - case 286: - YY_RULE_SETUP --#line 563 "cftoken.l" -+#line 564 "cftoken.l" - { YYD; return(UNITTYPE_TBYTES); } - YY_BREAK - case 287: - YY_RULE_SETUP --#line 564 "cftoken.l" -+#line 565 "cftoken.l" - { YYD; return(UNITTYPE_SEC); } - YY_BREAK - case 288: - YY_RULE_SETUP --#line 565 "cftoken.l" -+#line 566 "cftoken.l" - { YYD; return(UNITTYPE_MIN); } - YY_BREAK - case 289: - YY_RULE_SETUP --#line 566 "cftoken.l" -+#line 567 "cftoken.l" - { YYD; return(UNITTYPE_HOUR); } - YY_BREAK - /* boolean */ - case 290: - YY_RULE_SETUP --#line 569 "cftoken.l" -+#line 570 "cftoken.l" - { YYD; yylval.num = TRUE; return(BOOLEAN); } - YY_BREAK - case 291: - YY_RULE_SETUP --#line 570 "cftoken.l" -+#line 571 "cftoken.l" - { YYD; yylval.num = FALSE; return(BOOLEAN); } - YY_BREAK - case 292: - YY_RULE_SETUP --#line 572 "cftoken.l" -+#line 573 "cftoken.l" - { - char *bp; - -@@ -3486,7 +3509,7 @@ YY_RULE_SETUP - YY_BREAK - case 293: - YY_RULE_SETUP --#line 580 "cftoken.l" -+#line 581 "cftoken.l" - { - char *p; - -@@ -3512,7 +3535,7 @@ YY_RULE_SETUP - case 294: - /* rule 294 can match eol */ - YY_RULE_SETUP --#line 602 "cftoken.l" -+#line 603 "cftoken.l" - { - char *p = yytext; - -@@ -3532,7 +3555,7 @@ YY_RULE_SETUP - YY_BREAK - case 295: - YY_RULE_SETUP --#line 619 "cftoken.l" -+#line 620 "cftoken.l" - { - YYD; - -@@ -3566,7 +3589,7 @@ case YY_STATE_EOF(S_RMTS): - case YY_STATE_EOF(S_RMTP): - case YY_STATE_EOF(S_SA): - case YY_STATE_EOF(S_GSSENC): --#line 632 "cftoken.l" -+#line 633 "cftoken.l" - { - yy_delete_buffer(YY_CURRENT_BUFFER); - incstackp--; -@@ -3594,36 +3617,36 @@ case YY_STATE_EOF(S_GSSENC): - /* ... */ - case 296: - YY_RULE_SETUP --#line 657 "cftoken.l" -+#line 658 "cftoken.l" - { ; } - YY_BREAK - case 297: - /* rule 297 can match eol */ - YY_RULE_SETUP --#line 658 "cftoken.l" -+#line 659 "cftoken.l" - { incstack[incstackp].lineno++; } - YY_BREAK - case 298: - YY_RULE_SETUP --#line 659 "cftoken.l" -+#line 660 "cftoken.l" - { YYD; } - YY_BREAK - case 299: - YY_RULE_SETUP --#line 660 "cftoken.l" -+#line 661 "cftoken.l" - { return(EOS); } - YY_BREAK - case 300: - YY_RULE_SETUP --#line 661 "cftoken.l" -+#line 662 "cftoken.l" - { yymore(); } - YY_BREAK - case 301: - YY_RULE_SETUP --#line 663 "cftoken.l" -+#line 664 "cftoken.l" - ECHO; - YY_BREAK --#line 3627 "cftoken.c" -+#line 3650 "cftoken.c" - - case YY_END_OF_BUFFER: - { -@@ -4171,9 +4194,19 @@ static void yy_load_buffer_state (void) - yyfree((void *) b ); - } - --#ifndef __cplusplus -+#ifndef _UNISTD_H /* assume unistd.h has isatty() for us */ -+#ifdef __cplusplus -+extern "C" { -+#endif -+#ifdef __THROW /* this is a gnuism */ -+extern int isatty (int ) __THROW; -+#else - extern int isatty (int ); --#endif /* __cplusplus */ -+#endif -+#ifdef __cplusplus -+} -+#endif -+#endif - - /* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, -@@ -4619,7 +4652,7 @@ void yyfree (void * ptr ) - - #define YYTABLES_NAME "yytables" - --#line 663 "cftoken.l" -+#line 664 "cftoken.l" - - - diff --git a/package/ipsec-tools/patches/patch-src_racoon_cftoken_l b/package/ipsec-tools/patches/patch-src_racoon_cftoken_l deleted file mode 100644 index 8ada6f602..000000000 --- a/package/ipsec-tools/patches/patch-src_racoon_cftoken_l +++ /dev/null @@ -1,11 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- ipsec-tools-0.7.2.orig/src/racoon/cftoken.l 2007-09-03 20:07:29.000000000 +0200 -+++ ipsec-tools-0.7.2/src/racoon/cftoken.l 2009-05-29 15:46:06.836399719 +0200 -@@ -104,6 +104,7 @@ static struct include_stack { - static int incstackp = 0; - - static int yy_first_time = 1; -+int yywrap(void) { return 1; } - %} - - /* common seciton */ diff --git a/package/ipsec-tools/patches/patch-src_racoon_crypto_openssl_c b/package/ipsec-tools/patches/patch-src_racoon_crypto_openssl_c index 76c6a62cc..cc10bca3b 100644 --- a/package/ipsec-tools/patches/patch-src_racoon_crypto_openssl_c +++ b/package/ipsec-tools/patches/patch-src_racoon_crypto_openssl_c @@ -1,6 +1,5 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- ipsec-tools-0.7.2.orig/src/racoon/crypto_openssl.c 2009-04-20 15:33:30.000000000 +0200 -+++ ipsec-tools-0.7.2/src/racoon/crypto_openssl.c 2009-05-29 15:31:04.728378359 +0200 +--- ipsec-tools-0.8.0.orig/src/racoon/crypto_openssl.c 2010-10-20 15:40:02.000000000 +0200 ++++ ipsec-tools-0.8.0/src/racoon/crypto_openssl.c 2011-03-31 13:22:18.821818767 +0200 @@ -63,8 +63,12 @@ #ifdef HAVE_OPENSSL_ENGINE_H #include <openssl/engine.h> @@ -14,7 +13,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ #include <openssl/err.h> #ifdef HAVE_OPENSSL_RC5_H #include <openssl/rc5.h> -@@ -1347,6 +1351,7 @@ eay_idea_keylen(len) +@@ -1405,6 +1409,7 @@ eay_idea_keylen(len) } #endif @@ -22,7 +21,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ /* * BLOWFISH-CBC */ -@@ -1381,6 +1386,7 @@ eay_bf_keylen(len) +@@ -1439,6 +1444,7 @@ eay_bf_keylen(len) return -1; return len; } @@ -30,7 +29,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ #ifdef HAVE_OPENSSL_RC5_H /* -@@ -1492,6 +1498,7 @@ eay_3des_keylen(len) +@@ -1550,6 +1556,7 @@ eay_3des_keylen(len) return 192; } @@ -38,7 +37,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ /* * CAST-CBC */ -@@ -1526,6 +1533,7 @@ eay_cast_keylen(len) +@@ -1584,6 +1591,7 @@ eay_cast_keylen(len) return -1; return len; } diff --git a/package/ipsec-tools/patches/patch-src_racoon_eaytest_c b/package/ipsec-tools/patches/patch-src_racoon_eaytest_c index a7d7807c4..86a5ff77e 100644 --- a/package/ipsec-tools/patches/patch-src_racoon_eaytest_c +++ b/package/ipsec-tools/patches/patch-src_racoon_eaytest_c @@ -1,7 +1,6 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- ipsec-tools-0.7.2.orig/src/racoon/eaytest.c 2008-07-16 10:50:02.000000000 +0200 -+++ ipsec-tools-0.7.2/src/racoon/eaytest.c 2009-05-29 15:33:04.286374004 +0200 -@@ -683,19 +683,23 @@ ciphertest(ac, av) +--- ipsec-tools-0.8.0.orig/src/racoon/eaytest.c 2010-01-18 00:02:48.000000000 +0100 ++++ ipsec-tools-0.8.0/src/racoon/eaytest.c 2011-03-31 13:23:53.361808366 +0200 +@@ -684,19 +684,23 @@ ciphertest(ac, av) eay_aes_encrypt, eay_aes_decrypt) < 0) return -1; diff --git a/package/ipsec-tools/patches/patch-src_racoon_isakmp_xauth_c b/package/ipsec-tools/patches/patch-src_racoon_isakmp_xauth_c index 7b612f035..63825a34d 100644 --- a/package/ipsec-tools/patches/patch-src_racoon_isakmp_xauth_c +++ b/package/ipsec-tools/patches/patch-src_racoon_isakmp_xauth_c @@ -1,7 +1,6 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- ipsec-tools-0.7.2.orig/src/racoon/isakmp_xauth.c 2009-04-20 15:35:36.000000000 +0200 -+++ ipsec-tools-0.7.2/src/racoon/isakmp_xauth.c 2009-05-29 15:56:30.460377529 +0200 -@@ -585,7 +585,7 @@ PAM_conv(msg_count, msg, rsp, dontcare) +--- ipsec-tools-0.8.0.orig/src/racoon/isakmp_xauth.c 2011-03-14 16:50:36.000000000 +0100 ++++ ipsec-tools-0.8.0/src/racoon/isakmp_xauth.c 2011-03-31 13:23:58.351808486 +0200 +@@ -655,7 +655,7 @@ PAM_conv(msg_count, msg, rsp, dontcare) if ((reply = racoon_malloc(sizeof(*reply) * msg_count)) == NULL) return PAM_CONV_ERR; diff --git a/package/ipsec-tools/patches/patch-src_racoon_pfkey_c b/package/ipsec-tools/patches/patch-src_racoon_pfkey_c index cedbc5cdd..d0c416d83 100644 --- a/package/ipsec-tools/patches/patch-src_racoon_pfkey_c +++ b/package/ipsec-tools/patches/patch-src_racoon_pfkey_c @@ -1,7 +1,6 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- ipsec-tools-0.7.2.orig/src/racoon/pfkey.c 2008-12-08 07:06:24.000000000 +0100 -+++ ipsec-tools-0.7.2/src/racoon/pfkey.c 2009-05-29 15:48:49.201433105 +0200 -@@ -3008,12 +3008,12 @@ addnewsp(mhp) +--- ipsec-tools-0.8.0.orig/src/racoon/pfkey.c 2011-03-15 14:20:14.000000000 +0100 ++++ ipsec-tools-0.8.0/src/racoon/pfkey.c 2011-03-31 13:24:03.781819000 +0200 +@@ -3855,12 +3855,12 @@ addnewsp(mhp, local, remote) struct sockaddr *paddr; paddr = (struct sockaddr *)(xisr + 1); diff --git a/package/ipsec-tools/patches/patch-src_racoon_privsep_c b/package/ipsec-tools/patches/patch-src_racoon_privsep_c index c69abd264..e8f678186 100644 --- a/package/ipsec-tools/patches/patch-src_racoon_privsep_c +++ b/package/ipsec-tools/patches/patch-src_racoon_privsep_c @@ -1,7 +1,6 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- ipsec-tools-0.7.2.orig/src/racoon/privsep.c 2008-12-08 07:06:24.000000000 +0100 -+++ ipsec-tools-0.7.2/src/racoon/privsep.c 2009-05-29 15:55:47.787585131 +0200 -@@ -323,7 +323,7 @@ privsep_init(void) +--- ipsec-tools-0.8.0.orig/src/racoon/privsep.c 2011-03-06 09:28:10.000000000 +0100 ++++ ipsec-tools-0.8.0/src/racoon/privsep.c 2011-03-31 13:24:07.981813178 +0200 +@@ -359,7 +359,7 @@ privsep_init(void) strerror(errno)); goto out; } @@ -10,7 +9,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ reply->hdr.ac_cmd = combuf->hdr.ac_cmd; reply->hdr.ac_len = sizeof(*reply); -@@ -421,7 +421,7 @@ privsep_init(void) +@@ -457,7 +457,7 @@ privsep_init(void) strerror(errno)); goto out; } @@ -19,7 +18,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ /* -@@ -716,7 +716,7 @@ privsep_eay_get_pkcs1privkey(path) +@@ -903,7 +903,7 @@ privsep_eay_get_pkcs1privkey(path) "Cannot allocate memory: %s\n", strerror(errno)); return NULL; } @@ -28,7 +27,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ msg->hdr.ac_cmd = PRIVSEP_EAY_GET_PKCS1PRIVKEY; msg->hdr.ac_len = len; msg->bufs.buflen[0] = len - sizeof(*msg); -@@ -797,7 +797,7 @@ privsep_script_exec(script, name, envp) +@@ -953,7 +953,7 @@ privsep_script_exec(script, name, envp) return -1; } @@ -37,7 +36,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ msg->hdr.ac_cmd = PRIVSEP_SCRIPT_EXEC; msg->hdr.ac_len = sizeof(*msg); -@@ -906,7 +906,7 @@ privsep_getpsk(str, keylen) +@@ -1062,7 +1062,7 @@ privsep_getpsk(str, keylen) "Cannot allocate memory: %s\n", strerror(errno)); return NULL; } @@ -46,7 +45,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ msg->hdr.ac_cmd = PRIVSEP_GETPSK; msg->hdr.ac_len = len; -@@ -960,7 +960,7 @@ privsep_xauth_login_system(usr, pwd) +@@ -1334,7 +1334,7 @@ privsep_xauth_login_system(usr, pwd) "Cannot allocate memory: %s\n", strerror(errno)); return -1; } @@ -55,7 +54,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ msg->hdr.ac_cmd = PRIVSEP_XAUTH_LOGIN_SYSTEM; msg->hdr.ac_len = len; -@@ -1014,7 +1014,7 @@ privsep_accounting_system(port, raddr, u +@@ -1389,7 +1389,7 @@ privsep_accounting_system(port, raddr, u "Cannot allocate memory: %s\n", strerror(errno)); return -1; } @@ -64,7 +63,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ msg->hdr.ac_cmd = PRIVSEP_ACCOUNTING_SYSTEM; msg->hdr.ac_len = len; msg->bufs.buflen[0] = sizeof(port); -@@ -1187,7 +1187,7 @@ privsep_accounting_pam(port, inout) +@@ -1643,7 +1643,7 @@ privsep_accounting_pam(port, inout) "Cannot allocate memory: %s\n", strerror(errno)); return -1; } @@ -73,7 +72,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ msg->hdr.ac_cmd = PRIVSEP_ACCOUNTING_PAM; msg->hdr.ac_len = len; msg->bufs.buflen[0] = sizeof(port); -@@ -1248,7 +1248,7 @@ privsep_xauth_login_pam(port, raddr, usr +@@ -1705,7 +1705,7 @@ privsep_xauth_login_pam(port, raddr, usr "Cannot allocate memory: %s\n", strerror(errno)); return -1; } @@ -82,7 +81,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ msg->hdr.ac_cmd = PRIVSEP_XAUTH_LOGIN_PAM; msg->hdr.ac_len = len; msg->bufs.buflen[0] = sizeof(port); -@@ -1312,7 +1312,7 @@ privsep_cleanup_pam(port) +@@ -1770,7 +1770,7 @@ privsep_cleanup_pam(port) "Cannot allocate memory: %s\n", strerror(errno)); return; } diff --git a/package/ipsec-tools/patches/patch-src_racoon_racoonctl_c b/package/ipsec-tools/patches/patch-src_racoon_racoonctl_c index d5d6267c6..3b998fe24 100644 --- a/package/ipsec-tools/patches/patch-src_racoon_racoonctl_c +++ b/package/ipsec-tools/patches/patch-src_racoon_racoonctl_c @@ -1,7 +1,6 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- ipsec-tools-0.7.2.orig/src/racoon/racoonctl.c 2009-04-20 15:32:57.000000000 +0200 -+++ ipsec-tools-0.7.2/src/racoon/racoonctl.c 2009-05-29 15:57:45.600377208 +0200 -@@ -785,7 +785,7 @@ f_vpnc(ac, av) +--- ipsec-tools-0.8.0.orig/src/racoon/racoonctl.c 2010-11-12 10:08:26.000000000 +0100 ++++ ipsec-tools-0.8.0/src/racoon/racoonctl.c 2011-03-31 13:24:13.201808233 +0200 +@@ -693,7 +693,7 @@ f_vpnc(ac, av) errx(1, "cannot read source address"); /* We get "ip[port]" strip the port */ diff --git a/package/ipsec-tools/patches/patch-src_setkey_token_c b/package/ipsec-tools/patches/patch-src_setkey_token_c deleted file mode 100644 index 1c0231885..000000000 --- a/package/ipsec-tools/patches/patch-src_setkey_token_c +++ /dev/null @@ -1,707 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- ipsec-tools-0.7.2.orig/src/setkey/token.c 2008-07-23 10:26:58.000000000 +0200 -+++ ipsec-tools-0.7.2/src/setkey/token.c 2009-05-29 15:26:39.126303087 +0200 -@@ -8,7 +8,7 @@ - #define FLEX_SCANNER - #define YY_FLEX_MAJOR_VERSION 2 - #define YY_FLEX_MINOR_VERSION 5 --#define YY_FLEX_SUBMINOR_VERSION 34 -+#define YY_FLEX_SUBMINOR_VERSION 35 - #if YY_FLEX_SUBMINOR_VERSION > 0 - #define FLEX_BETA - #endif -@@ -178,13 +178,6 @@ extern FILE *yyin, *yyout; - - #define unput(c) yyunput( c, (yytext_ptr) ) - --/* The following is because we cannot portably get our hands on size_t -- * (without autoconf's help, which isn't available because we want -- * flex-generated scanners to compile on their own). -- * Given that the standard has decreed that size_t exists since 1989, -- * I guess we can afford to depend on it. Manoj. -- */ -- - #ifndef YY_TYPEDEF_YY_SIZE_T - #define YY_TYPEDEF_YY_SIZE_T - typedef size_t yy_size_t; -@@ -1069,9 +1062,10 @@ char *yytext; - #if defined(SADB_X_EALG_AES) && ! defined(SADB_X_EALG_AESCBC) - #define SADB_X_EALG_AESCBC SADB_X_EALG_AES - #endif -+int yywrap(void) { return 1; } - /* common section */ - --#line 1075 "token.c" -+#line 1069 "token.c" - - #define INITIAL 0 - #define S_PL 1 -@@ -1092,6 +1086,35 @@ char *yytext; - - static int yy_init_globals (void ); - -+/* Accessor methods to globals. -+ These are made visible to non-reentrant scanners for convenience. */ -+ -+int yylex_destroy (void ); -+ -+int yyget_debug (void ); -+ -+void yyset_debug (int debug_flag ); -+ -+YY_EXTRA_TYPE yyget_extra (void ); -+ -+void yyset_extra (YY_EXTRA_TYPE user_defined ); -+ -+FILE *yyget_in (void ); -+ -+void yyset_in (FILE * in_str ); -+ -+FILE *yyget_out (void ); -+ -+void yyset_out (FILE * out_str ); -+ -+int yyget_leng (void ); -+ -+char *yyget_text (void ); -+ -+int yyget_lineno (void ); -+ -+void yyset_lineno (int line_number ); -+ - /* Macros after this point can all be overridden by user definitions in - * section 1. - */ -@@ -1227,10 +1250,10 @@ YY_DECL - register char *yy_cp, *yy_bp; - register int yy_act; - --#line 114 "token.l" -+#line 115 "token.l" - - --#line 1234 "token.c" -+#line 1257 "token.c" - - if ( !(yy_init) ) - { -@@ -1321,84 +1344,84 @@ do_action: /* This label is used only to - - case 1: - YY_RULE_SETUP --#line 116 "token.l" -+#line 117 "token.l" - { return(ADD); } - YY_BREAK - case 2: - YY_RULE_SETUP --#line 117 "token.l" -+#line 118 "token.l" - { return(DELETE); } - YY_BREAK - case 3: - YY_RULE_SETUP --#line 118 "token.l" -+#line 119 "token.l" - { return(DELETEALL); } - YY_BREAK - case 4: - YY_RULE_SETUP --#line 119 "token.l" -+#line 120 "token.l" - { return(GET); } - YY_BREAK - case 5: - YY_RULE_SETUP --#line 120 "token.l" -+#line 121 "token.l" - { return(FLUSH); } - YY_BREAK - case 6: - YY_RULE_SETUP --#line 121 "token.l" -+#line 122 "token.l" - { return(DUMP); } - YY_BREAK - case 7: - YY_RULE_SETUP --#line 122 "token.l" -+#line 123 "token.l" - { return(EXIT); } - YY_BREAK - case 8: - YY_RULE_SETUP --#line 123 "token.l" -+#line 124 "token.l" - { return(EXIT); } - YY_BREAK - case 9: - YY_RULE_SETUP --#line 124 "token.l" -+#line 125 "token.l" - { return(EXIT); } - YY_BREAK - /* for management SPD */ - case 10: - YY_RULE_SETUP --#line 127 "token.l" -+#line 128 "token.l" - { return(SPDADD); } - YY_BREAK - case 11: - YY_RULE_SETUP --#line 128 "token.l" -+#line 129 "token.l" - { return(SPDDELETE); } - YY_BREAK - case 12: - YY_RULE_SETUP --#line 129 "token.l" -+#line 130 "token.l" - { return(SPDDUMP); } - YY_BREAK - case 13: - YY_RULE_SETUP --#line 130 "token.l" -+#line 131 "token.l" - { return(SPDFLUSH); } - YY_BREAK - case 14: - YY_RULE_SETUP --#line 131 "token.l" -+#line 132 "token.l" - { return(TAGGED); } - YY_BREAK - case 15: - YY_RULE_SETUP --#line 132 "token.l" -+#line 133 "token.l" - { BEGIN S_PL; return(F_POLICY); } - YY_BREAK - case 16: - /* rule 16 can match eol */ - YY_RULE_SETUP --#line 133 "token.l" -+#line 134 "token.l" - { - yymore(); - -@@ -1420,13 +1443,13 @@ YY_RULE_SETUP - YY_BREAK - case 17: - YY_RULE_SETUP --#line 151 "token.l" -+#line 152 "token.l" - { BEGIN INITIAL; return(EOT); } - YY_BREAK - /* address resolution flags */ - case 18: - YY_RULE_SETUP --#line 154 "token.l" -+#line 155 "token.l" - { - yylval.val.len = strlen(yytext); - yylval.val.buf = strdup(yytext); -@@ -1438,37 +1461,37 @@ YY_RULE_SETUP - /* security protocols */ - case 19: - YY_RULE_SETUP --#line 163 "token.l" -+#line 164 "token.l" - { yylval.num = 0; return(PR_AH); } - YY_BREAK - case 20: - YY_RULE_SETUP --#line 164 "token.l" -+#line 165 "token.l" - { yylval.num = 0; return(PR_ESP); } - YY_BREAK - case 21: - YY_RULE_SETUP --#line 165 "token.l" -+#line 166 "token.l" - { yylval.num = 1; return(PR_AH); } - YY_BREAK - case 22: - YY_RULE_SETUP --#line 166 "token.l" -+#line 167 "token.l" - { yylval.num = 1; return(PR_ESP); } - YY_BREAK - case 23: - YY_RULE_SETUP --#line 167 "token.l" -+#line 168 "token.l" - { yylval.num = 0; return(PR_ESPUDP); } - YY_BREAK - case 24: - YY_RULE_SETUP --#line 168 "token.l" -+#line 169 "token.l" - { yylval.num = 0; return(PR_IPCOMP); } - YY_BREAK - case 25: - YY_RULE_SETUP --#line 169 "token.l" -+#line 170 "token.l" - { - yylval.num = 0; return(PR_TCP); - } -@@ -1476,72 +1499,72 @@ YY_RULE_SETUP - /* authentication alogorithm */ - case 26: - YY_RULE_SETUP --#line 174 "token.l" -+#line 175 "token.l" - { BEGIN S_AUTHALG; return(F_AUTH); } - YY_BREAK - case 27: - YY_RULE_SETUP --#line 175 "token.l" -+#line 176 "token.l" - { yylval.num = SADB_AALG_MD5HMAC; BEGIN INITIAL; return(ALG_AUTH); } - YY_BREAK - case 28: - YY_RULE_SETUP --#line 176 "token.l" -+#line 177 "token.l" - { yylval.num = SADB_AALG_SHA1HMAC; BEGIN INITIAL; return(ALG_AUTH); } - YY_BREAK - case 29: - YY_RULE_SETUP --#line 177 "token.l" -+#line 178 "token.l" - { yylval.num = SADB_X_AALG_MD5; BEGIN INITIAL; return(ALG_AUTH); } - YY_BREAK - case 30: - YY_RULE_SETUP --#line 178 "token.l" -+#line 179 "token.l" - { yylval.num = SADB_X_AALG_SHA; BEGIN INITIAL; return(ALG_AUTH); } - YY_BREAK - case 31: - YY_RULE_SETUP --#line 179 "token.l" -+#line 180 "token.l" - { yylval.num = SADB_X_AALG_SHA2_256; BEGIN INITIAL; return(ALG_AUTH); } - YY_BREAK - case 32: - YY_RULE_SETUP --#line 180 "token.l" -+#line 181 "token.l" - { yylval.num = SADB_X_AALG_SHA2_256; BEGIN INITIAL; return(ALG_AUTH); } - YY_BREAK - case 33: - YY_RULE_SETUP --#line 181 "token.l" -+#line 182 "token.l" - { yylval.num = SADB_X_AALG_SHA2_384; BEGIN INITIAL; return(ALG_AUTH); } - YY_BREAK - case 34: - YY_RULE_SETUP --#line 182 "token.l" -+#line 183 "token.l" - { yylval.num = SADB_X_AALG_SHA2_384; BEGIN INITIAL; return(ALG_AUTH); } - YY_BREAK - case 35: - YY_RULE_SETUP --#line 183 "token.l" -+#line 184 "token.l" - { yylval.num = SADB_X_AALG_SHA2_512; BEGIN INITIAL; return(ALG_AUTH); } - YY_BREAK - case 36: - YY_RULE_SETUP --#line 184 "token.l" -+#line 185 "token.l" - { yylval.num = SADB_X_AALG_SHA2_512; BEGIN INITIAL; return(ALG_AUTH); } - YY_BREAK - case 37: - YY_RULE_SETUP --#line 185 "token.l" -+#line 186 "token.l" - { yylval.num = SADB_X_AALG_RIPEMD160HMAC; BEGIN INITIAL; return(ALG_AUTH); } - YY_BREAK - case 38: - YY_RULE_SETUP --#line 186 "token.l" -+#line 187 "token.l" - { yylval.num = SADB_X_AALG_AES_XCBC_MAC; BEGIN INITIAL; return(ALG_AUTH); } - YY_BREAK - case 39: - YY_RULE_SETUP --#line 187 "token.l" -+#line 188 "token.l" - { - #ifdef SADB_X_AALG_TCP_MD5 - yylval.num = SADB_X_AALG_TCP_MD5; -@@ -1552,63 +1575,63 @@ YY_RULE_SETUP - YY_BREAK - case 40: - YY_RULE_SETUP --#line 194 "token.l" -+#line 195 "token.l" - { yylval.num = SADB_X_AALG_NULL; BEGIN INITIAL; return(ALG_AUTH_NOKEY); } - YY_BREAK - /* encryption alogorithm */ - case 41: - YY_RULE_SETUP --#line 197 "token.l" -+#line 198 "token.l" - { BEGIN S_ENCALG; return(F_ENC); } - YY_BREAK - case 42: - YY_RULE_SETUP --#line 198 "token.l" -+#line 199 "token.l" - { yylval.num = SADB_EALG_DESCBC; BEGIN INITIAL; return(ALG_ENC); } - YY_BREAK - case 43: - YY_RULE_SETUP --#line 199 "token.l" -+#line 200 "token.l" - { yylval.num = SADB_EALG_3DESCBC; BEGIN INITIAL; return(ALG_ENC); } - YY_BREAK - case 44: - YY_RULE_SETUP --#line 200 "token.l" -+#line 201 "token.l" - { yylval.num = SADB_EALG_NULL; BEGIN INITIAL; return(ALG_ENC_NOKEY); } - YY_BREAK - case 45: - YY_RULE_SETUP --#line 201 "token.l" -+#line 202 "token.l" - { yylval.num = SADB_EALG_NULL; BEGIN INITIAL; return(ALG_ENC_OLD); } - YY_BREAK - case 46: - YY_RULE_SETUP --#line 202 "token.l" -+#line 203 "token.l" - { yylval.num = SADB_X_EALG_BLOWFISHCBC; BEGIN INITIAL; return(ALG_ENC); } - YY_BREAK - case 47: - YY_RULE_SETUP --#line 203 "token.l" -+#line 204 "token.l" - { yylval.num = SADB_X_EALG_CAST128CBC; BEGIN INITIAL; return(ALG_ENC); } - YY_BREAK - case 48: - YY_RULE_SETUP --#line 204 "token.l" -+#line 205 "token.l" - { yylval.num = SADB_EALG_DESCBC; BEGIN INITIAL; return(ALG_ENC_DESDERIV); } - YY_BREAK - case 49: - YY_RULE_SETUP --#line 205 "token.l" -+#line 206 "token.l" - { yylval.num = SADB_EALG_DESCBC; BEGIN INITIAL; return(ALG_ENC_DES32IV); } - YY_BREAK - case 50: - YY_RULE_SETUP --#line 206 "token.l" -+#line 207 "token.l" - { yylval.num = SADB_X_EALG_TWOFISHCBC; BEGIN INITIAL; return(ALG_ENC); } - YY_BREAK - case 51: - YY_RULE_SETUP --#line 207 "token.l" -+#line 208 "token.l" - { - #ifdef SADB_X_EALG_AESCBC - yylval.num = SADB_X_EALG_AESCBC; BEGIN INITIAL; return(ALG_ENC); -@@ -1617,7 +1640,7 @@ YY_RULE_SETUP - YY_BREAK - case 52: - YY_RULE_SETUP --#line 212 "token.l" -+#line 213 "token.l" - { - #ifdef SADB_X_EALG_AESCBC - yylval.num = SADB_X_EALG_AESCBC; BEGIN INITIAL; return(ALG_ENC); -@@ -1626,12 +1649,12 @@ YY_RULE_SETUP - YY_BREAK - case 53: - YY_RULE_SETUP --#line 217 "token.l" -+#line 218 "token.l" - { yylval.num = SADB_X_EALG_AESCTR; BEGIN INITIAL; return(ALG_ENC); } - YY_BREAK - case 54: - YY_RULE_SETUP --#line 218 "token.l" -+#line 219 "token.l" - { - #ifdef SADB_X_EALG_CAMELLIACBC - yylval.num = SADB_X_EALG_CAMELLIACBC; BEGIN INITIAL; return(ALG_ENC); -@@ -1641,152 +1664,152 @@ YY_RULE_SETUP - /* compression algorithms */ - case 55: - YY_RULE_SETUP --#line 225 "token.l" -+#line 226 "token.l" - { return(F_COMP); } - YY_BREAK - case 56: - YY_RULE_SETUP --#line 226 "token.l" -+#line 227 "token.l" - { yylval.num = SADB_X_CALG_OUI; return(ALG_COMP); } - YY_BREAK - case 57: - YY_RULE_SETUP --#line 227 "token.l" -+#line 228 "token.l" - { yylval.num = SADB_X_CALG_DEFLATE; return(ALG_COMP); } - YY_BREAK - case 58: - YY_RULE_SETUP --#line 228 "token.l" -+#line 229 "token.l" - { yylval.num = SADB_X_CALG_LZS; return(ALG_COMP); } - YY_BREAK - case 59: - YY_RULE_SETUP --#line 229 "token.l" -+#line 230 "token.l" - { return(F_RAWCPI); } - YY_BREAK - /* extension */ - case 60: - YY_RULE_SETUP --#line 232 "token.l" -+#line 233 "token.l" - { return(F_MODE); } - YY_BREAK - case 61: - YY_RULE_SETUP --#line 233 "token.l" -+#line 234 "token.l" - { yylval.num = IPSEC_MODE_TRANSPORT; return(MODE); } - YY_BREAK - case 62: - YY_RULE_SETUP --#line 234 "token.l" -+#line 235 "token.l" - { yylval.num = IPSEC_MODE_TUNNEL; return(MODE); } - YY_BREAK - case 63: - YY_RULE_SETUP --#line 235 "token.l" -+#line 236 "token.l" - { return(F_REQID); } - YY_BREAK - case 64: - YY_RULE_SETUP --#line 236 "token.l" -+#line 237 "token.l" - { return(F_EXT); } - YY_BREAK - case 65: - YY_RULE_SETUP --#line 237 "token.l" -+#line 238 "token.l" - { yylval.num = SADB_X_EXT_PRAND; return(EXTENSION); } - YY_BREAK - case 66: - YY_RULE_SETUP --#line 238 "token.l" -+#line 239 "token.l" - { yylval.num = SADB_X_EXT_PSEQ; return(EXTENSION); } - YY_BREAK - case 67: - YY_RULE_SETUP --#line 239 "token.l" -+#line 240 "token.l" - { yylval.num = SADB_X_EXT_PZERO; return(EXTENSION); } - YY_BREAK - case 68: - YY_RULE_SETUP --#line 240 "token.l" -+#line 241 "token.l" - { return(NOCYCLICSEQ); } - YY_BREAK - case 69: - YY_RULE_SETUP --#line 241 "token.l" -+#line 242 "token.l" - { return(F_REPLAY); } - YY_BREAK - case 70: - YY_RULE_SETUP --#line 242 "token.l" -+#line 243 "token.l" - { return(F_LIFETIME_HARD); } - YY_BREAK - case 71: - YY_RULE_SETUP --#line 243 "token.l" -+#line 244 "token.l" - { return(F_LIFETIME_SOFT); } - YY_BREAK - case 72: - YY_RULE_SETUP --#line 244 "token.l" -+#line 245 "token.l" - { return(F_LIFEBYTE_HARD); } - YY_BREAK - case 73: - YY_RULE_SETUP --#line 245 "token.l" -+#line 246 "token.l" - { return(F_LIFEBYTE_SOFT); } - YY_BREAK - case 74: - YY_RULE_SETUP --#line 246 "token.l" -+#line 247 "token.l" - { return(SECURITY_CTX); } - YY_BREAK - /* ... */ - case 75: - YY_RULE_SETUP --#line 249 "token.l" -+#line 250 "token.l" - { return(ANY); } - YY_BREAK - case 76: - YY_RULE_SETUP --#line 250 "token.l" -+#line 251 "token.l" - { } - YY_BREAK - case 77: - /* rule 77 can match eol */ - YY_RULE_SETUP --#line 251 "token.l" -+#line 252 "token.l" - { lineno++; } - YY_BREAK - case 78: - YY_RULE_SETUP --#line 252 "token.l" -+#line 253 "token.l" - - YY_BREAK - case 79: - YY_RULE_SETUP --#line 253 "token.l" -+#line 254 "token.l" - { return(EOT); } - YY_BREAK - /* for address parameters: /prefix, [port] */ - case 80: - YY_RULE_SETUP --#line 256 "token.l" -+#line 257 "token.l" - { return SLASH; } - YY_BREAK - case 81: - YY_RULE_SETUP --#line 257 "token.l" -+#line 258 "token.l" - { return BLCL; } - YY_BREAK - case 82: - YY_RULE_SETUP --#line 258 "token.l" -+#line 259 "token.l" - { return ELCL; } - YY_BREAK - /* parameter */ - case 83: - YY_RULE_SETUP --#line 261 "token.l" -+#line 262 "token.l" - { - char *bp; - -@@ -1796,7 +1819,7 @@ YY_RULE_SETUP - YY_BREAK - case 84: - YY_RULE_SETUP --#line 268 "token.l" -+#line 269 "token.l" - { - yylval.val.buf = strdup(yytext + 2); - if (!yylval.val.buf) -@@ -1809,7 +1832,7 @@ YY_RULE_SETUP - case 85: - /* rule 85 can match eol */ - YY_RULE_SETUP --#line 277 "token.l" -+#line 278 "token.l" - { - char *p = yytext; - while (*++p != '"') ; -@@ -1825,7 +1848,7 @@ YY_RULE_SETUP - YY_BREAK - case 86: - YY_RULE_SETUP --#line 290 "token.l" -+#line 291 "token.l" - { - yylval.val.len = yyleng; - yylval.val.buf = strdup(yytext); -@@ -1836,7 +1859,7 @@ YY_RULE_SETUP - YY_BREAK - case 87: - YY_RULE_SETUP --#line 298 "token.l" -+#line 299 "token.l" - { - yylval.val.len = yyleng; - yylval.val.buf = strdup(yytext); -@@ -1847,7 +1870,7 @@ YY_RULE_SETUP - YY_BREAK - case 88: - YY_RULE_SETUP --#line 306 "token.l" -+#line 307 "token.l" - { - yyfatal("Syntax error"); - /*NOTREACHED*/ -@@ -1855,10 +1878,10 @@ YY_RULE_SETUP - YY_BREAK - case 89: - YY_RULE_SETUP --#line 311 "token.l" -+#line 312 "token.l" - ECHO; - YY_BREAK --#line 1862 "token.c" -+#line 1885 "token.c" - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(S_PL): - case YY_STATE_EOF(S_AUTHALG): -@@ -2411,9 +2434,19 @@ static void yy_load_buffer_state (void) - yyfree((void *) b ); - } - --#ifndef __cplusplus -+#ifndef _UNISTD_H /* assume unistd.h has isatty() for us */ -+#ifdef __cplusplus -+extern "C" { -+#endif -+#ifdef __THROW /* this is a gnuism */ -+extern int isatty (int ) __THROW; -+#else - extern int isatty (int ); --#endif /* __cplusplus */ -+#endif -+#ifdef __cplusplus -+} -+#endif -+#endif - - /* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, -@@ -2859,7 +2892,7 @@ void yyfree (void * ptr ) - - #define YYTABLES_NAME "yytables" - --#line 311 "token.l" -+#line 312 "token.l" - - - diff --git a/package/ipsec-tools/patches/patch-src_setkey_token_l b/package/ipsec-tools/patches/patch-src_setkey_token_l deleted file mode 100644 index e0697835c..000000000 --- a/package/ipsec-tools/patches/patch-src_setkey_token_l +++ /dev/null @@ -1,11 +0,0 @@ -$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ ---- ipsec-tools-0.7.2.orig/src/setkey/token.l 2007-08-01 13:52:23.000000000 +0200 -+++ ipsec-tools-0.7.2/src/setkey/token.l 2009-05-29 15:25:54.760377400 +0200 -@@ -86,6 +86,7 @@ - #if defined(SADB_X_EALG_AES) && ! defined(SADB_X_EALG_AESCBC) - #define SADB_X_EALG_AESCBC SADB_X_EALG_AES - #endif -+int yywrap(void) { return 1; } - %} - - /* common section */ diff --git a/package/iptraf/Makefile b/package/iptraf/Makefile index ef289ae37..9c167c60b 100644 --- a/package/iptraf/Makefile +++ b/package/iptraf/Makefile @@ -22,6 +22,8 @@ CONFIG_STYLE:= manual BUILD_STYLE:= manual INSTALL_STYLE:= manual +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) + do-build: ${MAKE} -C ${WRKBUILD}/src \ ${TARGET_CONFIGURE_OPTS} \ diff --git a/package/jpeg/Makefile b/package/jpeg/Makefile index 4f12836d5..d91f59ea4 100644 --- a/package/jpeg/Makefile +++ b/package/jpeg/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= jpeg -PKG_VERSION:= 8b +PKG_VERSION:= 8c PKG_RELEASE:= 1 -PKG_MD5SUM:= e022acbc5b36cd2cb70785f5b575661e +PKG_MD5SUM:= a2c10c04f396a9ce72894beb18b4e1f9 PKG_DESCR:= The Independent JPEG Groups JPEG runtime library PKG_SECTION:= libs PKG_URL:= http://www.ijg.org/ diff --git a/package/jpeg/patches/patch-ltmain_sh b/package/jpeg/patches/patch-ltmain_sh index 3b71ada5f..9ac6b5178 100644 --- a/package/jpeg/patches/patch-ltmain_sh +++ b/package/jpeg/patches/patch-ltmain_sh @@ -1,11 +1,11 @@ ---- jpeg-8b.orig/ltmain.sh 2010-05-02 18:49:25.000000000 +0200 -+++ jpeg-8b/ltmain.sh 2011-01-14 00:16:39.000000000 +0100 -@@ -4765,7 +4765,7 @@ func_mode_link () - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files +--- jpeg-8c.orig/ltmain.sh 2010-11-17 22:41:29.000000000 +0100 ++++ jpeg-8c/ltmain.sh 2011-04-07 11:28:48.000000000 +0200 +@@ -5840,7 +5840,7 @@ func_mode_link () + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto) + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ +- -O*|-flto*|-fwhopr*|-fuse-linker-plugin) ++ -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" diff --git a/package/lame/Makefile b/package/lame/Makefile index 4f18aa165..f0a17f483 100644 --- a/package/lame/Makefile +++ b/package/lame/Makefile @@ -19,12 +19,16 @@ PKGSC_LIBLAME:= libs include $(TOPDIR)/mk/package.mk -$(eval $(call PKG_template,LAME,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,LAME,lame,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBLAME,liblame,$(PKG_VERSION)-${PKG_RELEASE},,${PKGSD_LIBLAME},${PKGSC_LIBLAME})) -post-install: +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) + +lame-install: $(INSTALL_DIR) $(IDIR_LAME)/usr/bin - $(INSTALL_BIN) $(WRKINST)/usr/bin/lame $(IDIR_LAME)/usr/bin/ + $(INSTALL_BIN) $(WRKINST)/usr/bin/lame $(IDIR_LAME)/usr/bin + +liblame-install: $(INSTALL_DIR) $(IDIR_LIBLAME)/usr/lib $(CP) $(WRKINST)/usr/lib/libmp3lame.so* $(IDIR_LIBLAME)/usr/lib diff --git a/package/libICE/Makefile b/package/libICE/Makefile index 183543a2c..eb4cf1740 100644 --- a/package/libICE/Makefile +++ b/package/libICE/Makefile @@ -21,6 +21,8 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBICE,libice,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBICE_DEV,libice-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBICE_DEV},${PKGSC_LIBICE_DEV})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) + libice-install: ${INSTALL_DIR} ${IDIR_LIBICE}/usr/lib ${CP} ${WRKINST}/usr/lib/libICE.so* ${IDIR_LIBICE}/usr/lib diff --git a/package/libXext/Makefile b/package/libXext/Makefile index 6caddfc93..d99bb7247 100644 --- a/package/libXext/Makefile +++ b/package/libXext/Makefile @@ -9,7 +9,7 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 9beee7f603907840de9d9e73172e74d0 PKG_DESCR:= X client interface to extensions of the X protocol PKG_SECTION:= x11/libs -PKG_BUILDDEP:= libX11 +PKG_BUILDDEP:= libX11 xextproto PKG_SITES:= ${MASTER_SITE_XORG} PKG_SUBPKGS:= LIBXEXT LIBXEXT_DEV diff --git a/package/libXft/Makefile b/package/libXft/Makefile index 50f3fc68d..89a513cb3 100644 --- a/package/libXft/Makefile +++ b/package/libXft/Makefile @@ -21,6 +21,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBXFT,libxft,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBXFT_DEV,libxft-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBXFT_DEV},${PKGSC_LIBXFT_DEV})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --disable-malloc0returnsnull \ --disable-install-makestrs diff --git a/package/libXinerama/Makefile b/package/libXinerama/Makefile new file mode 100644 index 000000000..08b9a0ed0 --- /dev/null +++ b/package/libXinerama/Makefile @@ -0,0 +1,37 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= libXinerama +PKG_VERSION:= 1.1 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 42b9fc01984c452ee416076c0977b0b3 +PKG_DESCR:= Xinerama library +PKG_SECTION:= x11/libs +PKG_BUILDDEP:= xineramaproto +PKG_SITES:= ${MASTER_SITE_XORG} + +PKG_SUBPKGS:= LIBXINERAMA LIBXINERAMA_DEV +PKGSD_LIBXINERAMA_DEV:= Xinerama headers +PKGSC_LIBXINERAMA_DEV:= x11/devel + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,LIBXINERAMA,libxinerama,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,LIBXINERAMA_DEV,libxinerama-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBXINERAMA_DEV},${PKGSC_LIBXINERAMA_DEV})) + +CONFIGURE_ARGS+= --disable-malloc0returnsnull + +libxinerama-install: + ${INSTALL_DIR} ${IDIR_LIBXINERAMA}/usr/lib + ${CP} ${WRKINST}/usr/lib/libXinerama.so* ${IDIR_LIBXINERAMA}/usr/lib + +libxinerama-dev-install: + ${INSTALL_DIR} ${IDIR_LIBXINERAMA_DEV}/usr/include + ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBXINERAMA_DEV}/usr/include + ${INSTALL_DIR} ${IDIR_LIBXINERAMA_DEV}/usr/lib/pkgconfig + ${INSTALL_DATA} ${WRKINST}/usr/lib/pkgconfig/*.pc \ + ${IDIR_LIBXINERAMA_DEV}/usr/lib/pkgconfig + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libXp/Makefile b/package/libXp/Makefile new file mode 100644 index 000000000..d01c734a0 --- /dev/null +++ b/package/libXp/Makefile @@ -0,0 +1,35 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= libXp +PKG_VERSION:= 1.0.1 +PKG_RELEASE:= 1 +PKG_MD5SUM:= a960c831f11e6b4249fde78a5b969000 +PKG_DESCR:= X Print library +PKG_SECTION:= x11/libs +PKG_BUILDDEP:= libXext printproto +PKG_SITES:= ${MASTER_SITE_XORG} + +PKG_SUBPKGS:= LIBXP LIBXP_DEV +PKGSD_LIBXP_DEV:= X Print headers +PKGSC_LIBXP_DEV:= x11/devel + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,LIBXP,libpt,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,LIBXP_DEV,libpt-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBXP_DEV},${PKGSC_LIBXP_DEV})) + +libxp-install: + ${INSTALL_DIR} ${IDIR_LIBXP}/usr/lib + ${CP} ${WRKINST}/usr/lib/libXp.so* ${IDIR_LIBXP}/usr/lib + +libxp-dev-install: + ${INSTALL_DIR} ${IDIR_LIBXP_DEV}/usr/include + ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBXP_DEV}/usr/include + ${INSTALL_DIR} ${IDIR_LIBXP_DEV}/usr/lib/pkgconfig + ${INSTALL_DATA} ${WRKINST}/usr/lib/pkgconfig/*.pc \ + ${IDIR_LIBXP_DEV}/usr/lib/pkgconfig + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libXt/Makefile b/package/libXt/Makefile index 559c19521..325e829ca 100644 --- a/package/libXt/Makefile +++ b/package/libXt/Makefile @@ -21,6 +21,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBXT,libxt,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBXT_DEV,libxt-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBXT_DEV},${PKGSC_LIBXT_DEV})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --disable-malloc0returnsnull libxt-install: diff --git a/package/libXtst/Makefile b/package/libXtst/Makefile new file mode 100644 index 000000000..821bf5dee --- /dev/null +++ b/package/libXtst/Makefile @@ -0,0 +1,37 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= libXtst +PKG_VERSION:= 1.2.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= fd94ddca70e10eef4640e1f57b0301ee +PKG_DESCR:= Xtst library +PKG_SECTION:= x11/libs +PKG_BUILDDEP:= recordproto libXi +PKG_SITES:= ${MASTER_SITE_XORG} + +PKG_SUBPKGS:= LIBXTST LIBXTST_DEV +PKGSD_LIBXTST_DEV:= Xtst headers +PKGSC_LIBXTST_DEV:= x11/devel + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,LIBXTST,libxtst,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,LIBXTST_DEV,libxtst-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBXTST_DEV},${PKGSC_LIBXTST_DEV})) + +CONFIGURE_ARGS+= --disable-malloc0returnsnull + +libxtst-install: + ${INSTALL_DIR} ${IDIR_LIBXTST}/usr/lib + ${CP} ${WRKINST}/usr/lib/libXtst.so* ${IDIR_LIBXTST}/usr/lib + +libxtst-dev-install: + ${INSTALL_DIR} ${IDIR_LIBXTST_DEV}/usr/include + ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBXTST_DEV}/usr/include + ${INSTALL_DIR} ${IDIR_LIBXTST_DEV}/usr/lib/pkgconfig + ${INSTALL_DATA} ${WRKINST}/usr/lib/pkgconfig/*.pc \ + ${IDIR_LIBXTST_DEV}/usr/lib/pkgconfig + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libdnet/Makefile b/package/libdnet/Makefile index aaaf74aff..78e218cd4 100644 --- a/package/libdnet/Makefile +++ b/package/libdnet/Makefile @@ -21,6 +21,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBDNET,libdnet,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBDNET_DEV,libdnet-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBDNET_DEV},${PKGSC_LIBDNET_DEV})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ENV+= ac_cv_dnet_bsd_bpf=no CONFIGURE_ARGS+= --without-check diff --git a/package/libevent/Makefile b/package/libevent/Makefile index 43452e092..4b6077b5d 100644 --- a/package/libevent/Makefile +++ b/package/libevent/Makefile @@ -21,6 +21,8 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,LIBEVENT,libevent,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBEVENT_DEV,libevent-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBEVENT_DEV},${PKGSC_LIBEVENT_DEV})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) + libevent-install: $(INSTALL_DIR) $(IDIR_LIBEVENT)/usr/lib $(CP) $(WRKINST)/usr/lib/libevent*.so* $(IDIR_LIBEVENT)/usr/lib diff --git a/package/libgcj/Makefile b/package/libgcj/Makefile deleted file mode 100644 index 7be43c3e1..000000000 --- a/package/libgcj/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# This file is part of the OpenADK project. OpenADK is copyrighted -# material, please see the LICENCE file in the top-level directory. - -include ${TOPDIR}/rules.mk -include ${TOPDIR}/toolchain/gcc/Makefile.inc - -PKG_NAME:= libgcj -PKG_DESCR:= GCJ runtime library -PKG_SECTION:= libs - -NO_DISTFILES:= 1 - -include ${TOPDIR}/mk/package.mk - -$(eval $(call PKG_template,LIBGCJ,libgcj,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) - -CONFIG_STYLE:= manual -BUILD_STYLE:= manual -INSTALL_STYLE:= manual - -libgcj-install: -ifeq ($(ADK_NATIVE),) - ${INSTALL_DIR} ${IDIR_LIBGCJ}/lib - ${CP} ${STAGING_TARGET_DIR}/lib/libgcj*.so* ${IDIR_LIBGCJ}/lib -endif - -include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libgd/patches/patch-config_hin b/package/libgd/patches/patch-config_hin new file mode 100644 index 000000000..e5752c060 --- /dev/null +++ b/package/libgd/patches/patch-config_hin @@ -0,0 +1,12 @@ +--- gd-2.0.35.orig/config.hin 2006-10-09 16:22:22.000000000 +0200 ++++ gd-2.0.35/config.hin 2011-04-01 13:40:40.551811181 +0200 +@@ -99,6 +99,9 @@ + /* Define to the one symbol short name of this package. */ + #undef PACKAGE_TARNAME + ++/* Define to the home page for this package. */ ++#undef PACKAGE_URL ++ + /* Define to the version of this package. */ + #undef PACKAGE_VERSION + diff --git a/package/libgd/patches/patch-config_ltmain_sh b/package/libgd/patches/patch-config_ltmain_sh new file mode 100644 index 000000000..9e40639f8 --- /dev/null +++ b/package/libgd/patches/patch-config_ltmain_sh @@ -0,0 +1,11 @@ +--- gd-2.0.35.orig/config/ltmain.sh 2006-10-09 16:22:22.000000000 +0200 ++++ gd-2.0.35/config/ltmain.sh 2011-04-01 14:15:35.561818573 +0200 +@@ -1671,7 +1671,7 @@ EOF + # -pg pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ +- -t[45]*|-txscale*|@*) ++ -t[45]*|-txscale*|@*|-fstack-protector*|-flto*) + + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. diff --git a/package/libiconv/Makefile b/package/libiconv/Makefile index f27df06c1..645cf3338 100644 --- a/package/libiconv/Makefile +++ b/package/libiconv/Makefile @@ -25,6 +25,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBICONV,libiconv,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) $(eval $(call PKG_template,LIBICONV_DEV,libiconv-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBICONV_DEV},${PKGSC_LIBICONV_DEV})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) TARGET_CFLAGS+= -fPIC FAKE_FLAGS+= libdir="${WRKINST}/usr/lib" \ includedir="${WRKINST}/usr/include" \ diff --git a/package/libnet/Makefile b/package/libnet/Makefile index 7023e0b40..9e6b7663f 100644 --- a/package/libnet/Makefile +++ b/package/libnet/Makefile @@ -24,6 +24,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBNET,libnet,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBNET_DEV,libnet-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBNET_DEV},${PKGSC_LIBNET_DEV})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) ENDIAN:=lil ifeq (${CPU_ARCH},mips) ENDIAN:=big diff --git a/package/libnfsidmap/patches/patch-ltmain_sh b/package/libnfsidmap/patches/patch-ltmain_sh new file mode 100644 index 000000000..9f0a7c0d7 --- /dev/null +++ b/package/libnfsidmap/patches/patch-ltmain_sh @@ -0,0 +1,11 @@ +--- libnfsidmap-0.24.orig/ltmain.sh 2010-12-08 19:02:47.000000000 +0100 ++++ libnfsidmap-0.24/ltmain.sh 2011-04-01 14:32:08.651808966 +0200 +@@ -5091,7 +5091,7 @@ func_mode_link () + # @file GCC response files + # -tp=* Portland pgcc target processor selection + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ +- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) ++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|-fstack-protector*|-flto*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" diff --git a/package/libpng/Makefile b/package/libpng/Makefile index ed5808ecf..f1d420899 100644 --- a/package/libpng/Makefile +++ b/package/libpng/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= libpng PKG_VERSION:= 1.2.44 -PKG_RELEASE:= 3 +PKG_RELEASE:= 1 PKG_MD5SUM:= 89b62f8daaeeab1342e307d6d1411ff1 PKG_DESCR:= A library for reading/writing PNG images PKG_SECTION:= libs @@ -27,14 +27,15 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBPNG,libpng,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) $(eval $(call PKG_template,LIBPNG_DEV,libpng-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBPNG_DEV},${PKGSC_LIBPNG_DEV},${PKG_OPTS})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) + libpng-install: ${INSTALL_DIR} ${IDIR_LIBPNG}/usr/lib - ${CP} ${WRKINST}/usr/lib/libpng{,12}.so* ${IDIR_LIBPNG}/usr/lib + ${CP} ${WRKINST}/usr/lib/libpng*.so* ${IDIR_LIBPNG}/usr/lib libpng-dev-install: - ${INSTALL_DIR} ${IDIR_LIBPNG_DEV}/usr/include/libpng12 - ${CP} ${WRKINST}/usr/include/*.h ${IDIR_LIBPNG_DEV}/usr/include - ${CP} ${WRKINST}/usr/include/libpng12/*.h ${IDIR_LIBPNG_DEV}/usr/include/libpng12 + ${INSTALL_DIR} ${IDIR_LIBPNG_DEV}/usr/include + ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBPNG_DEV}/usr/include ${INSTALL_DIR} ${IDIR_LIBPNG_DEV}/usr/lib/pkgconfig ${CP} ${WRKINST}/usr/lib/pkgconfig/*.pc \ ${IDIR_LIBPNG_DEV}/usr/lib/pkgconfig diff --git a/package/libpri/patches/patch-Makefile b/package/libpri/patches/patch-Makefile index 743924088..811ef59a9 100644 --- a/package/libpri/patches/patch-Makefile +++ b/package/libpri/patches/patch-Makefile @@ -1,5 +1,5 @@ --- libpri-1.4.10.2.orig/Makefile 2008-08-06 20:20:51.000000000 +0200 -+++ libpri-1.4.10.2/Makefile 2011-01-21 14:32:08.278658337 +0100 ++++ libpri-1.4.10.2/Makefile 2011-04-01 14:39:42.851818751 +0200 @@ -31,8 +31,8 @@ CC=gcc GREP=grep AWK=awk @@ -30,11 +30,13 @@ %.lo: %.c $(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $< -@@ -146,7 +147,6 @@ $(STATIC_LIBRARY): $(STATIC_OBJS) +@@ -145,8 +146,7 @@ $(STATIC_LIBRARY): $(STATIC_OBJS) + ranlib $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS) - $(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS) +- $(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS) - $(LDCONFIG) $(LDCONFIG_FLAGS) . ++ $(CC) -shared $(SOFLAGS) $(LDFLAGS) -o $@ $(DYNAMIC_OBJS) ln -sf libpri.so.$(SONAME) libpri.so version.c: FORCE diff --git a/package/libpthread/Makefile b/package/libpthread/Makefile index 169db676a..4d61d570a 100644 --- a/package/libpthread/Makefile +++ b/package/libpthread/Makefile @@ -20,19 +20,21 @@ endif PKG_NAME:= libpthread PKG_DESCR:= POSIX threading library PKG_SECTION:= libs +PKG_OPTS:= noremove NO_DISTFILES:= 1 PKG_SUBPKGS:= LIBPTHREAD LIBPTHREAD_DEV +PKGSC_LIBPTHREAD_DEV:= devel ifeq ($(ADK_STATIC),y) -PKG_OPTS:= libonly +PKG_OPTS+= libonly endif include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,LIBPTHREAD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -$(eval $(call PKG_template,LIBPTHREAD_DEV,${PKG_NAME}-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) +$(eval $(call PKG_template,LIBPTHREAD,libpthread,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) +$(eval $(call PKG_template,LIBPTHREAD_DEV,libpthread-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKGSC_LIBPTHREAD_DEV},${PKG_OPTS})) CONFIG_STYLE:= manual BUILD_STYLE:= manual @@ -46,9 +48,9 @@ endif libpthread-dev-install: ifeq ($(ADK_NATIVE),) - ${INSTALL_DIR} ${IDIR_LIBPTHREAD}/usr/lib - ${CP} ./files/libpthread.so.$(ARCH) ${IDIR_LIBPTHREAD}/usr/lib/libpthread.so - ${CP} ${STAGING_TARGET_DIR}/usr/lib/libpthread_nonshared.a ${IDIR_LIBPTHREAD}/usr/lib + ${INSTALL_DIR} ${IDIR_LIBPTHREAD_DEV}/usr/lib + ${CP} ./files/libpthread.so.$(ARCH) ${IDIR_LIBPTHREAD_DEV}/usr/lib/libpthread.so + ${CP} ${STAGING_TARGET_DIR}/usr/lib/libpthread_nonshared.a ${IDIR_LIBPTHREAD_DEV}/usr/lib endif include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libtiff/Makefile b/package/libtiff/Makefile index 68d1b442c..896b4073a 100644 --- a/package/libtiff/Makefile +++ b/package/libtiff/Makefile @@ -26,6 +26,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBTIFF,libtiff,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) $(eval $(call PKG_template,LIBTIFF_DEV,libtiff-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBTIFF_DEV},${PKGSC_LIBTIFF_DEV},${PKG_OPTS})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --disable-cxx \ --disable-rpath diff --git a/package/libtool/patches/patch-libltdl_config_ltmain_m4sh b/package/libtool/patches/patch-libltdl_config_ltmain_m4sh new file mode 100644 index 000000000..a1650449e --- /dev/null +++ b/package/libtool/patches/patch-libltdl_config_ltmain_m4sh @@ -0,0 +1,11 @@ +--- libtool-2.4.orig/libltdl/config/ltmain.m4sh 2010-09-22 16:45:18.000000000 +0200 ++++ libtool-2.4/libltdl/config/ltmain.m4sh 2011-03-29 22:49:51.801818754 +0200 +@@ -5051,7 +5051,7 @@ func_mode_link () + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ +- -O*|-flto*|-fwhopr*|-fuse-linker-plugin) ++ -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" diff --git a/package/libtool/patches/patch-libltdl_config_ltmain_sh b/package/libtool/patches/patch-libltdl_config_ltmain_sh deleted file mode 100644 index bc46ecca5..000000000 --- a/package/libtool/patches/patch-libltdl_config_ltmain_sh +++ /dev/null @@ -1,31 +0,0 @@ ---- libtool-2.4.orig/libltdl/config/ltmain.sh 2010-09-22 16:45:43.000000000 +0200 -+++ libtool-2.4/libltdl/config/ltmain.sh 2011-01-15 12:03:36.000000000 +0100 -@@ -136,15 +136,15 @@ progpath="$0" - - : ${CP="cp -f"} - test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} --: ${EGREP="grep -E"} --: ${FGREP="grep -F"} --: ${GREP="grep"} -+: ${EGREP="/usr/bin/grep -E"} -+: ${FGREP="/usr/bin/grep -F"} -+: ${GREP="/usr/bin/grep"} - : ${LN_S="ln -s"} - : ${MAKE="make"} - : ${MKDIR="mkdir"} - : ${MV="mv -f"} - : ${RM="rm -f"} --: ${SED="sed"} -+: ${SED="/Volumes/adk/openadk/scripts/sed"} - : ${SHELL="${CONFIG_SHELL-/bin/sh}"} - : ${Xsed="$SED -e 1s/^X//"} - -@@ -5840,7 +5840,7 @@ func_mode_link () - # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -- -O*|-flto*|-fwhopr*|-fuse-linker-plugin) -+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" diff --git a/package/libupnp/Makefile b/package/libupnp/Makefile index 3726fd926..44352b17b 100644 --- a/package/libupnp/Makefile +++ b/package/libupnp/Makefile @@ -24,6 +24,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBUPNP,libupnp,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBUPNP_DEV,libupnp-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBUPNP_DEV},${PKGSC_LIBUPNP_DEV})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) TARGET_CFLAGS+= -fPIC CONFIGURE_ARGS+= --disable-samples diff --git a/package/libxcb/Makefile b/package/libxcb/Makefile index a50dec13f..cf292f384 100644 --- a/package/libxcb/Makefile +++ b/package/libxcb/Makefile @@ -24,11 +24,12 @@ $(eval $(call PKG_template,LIBXCB_DEV,${PKG_NAME}-dev,${PKG_VERSION}-${PKG_RELEA include $(TOPDIR)/mk/python.mk +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ENV+= PYTHON=$(PYTHON) libxcb-install: ${INSTALL_DIR} ${IDIR_LIBXCB}/usr/lib - ${CP} ${WRKINST}/usr/lib/libxcb*.so* ${IDIR_LIBXCB}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libxcb*.so* ${IDIR_LIBXCB}/usr/lib libxcb-dev-install: ${INSTALL_DIR} ${IDIR_LIBXCB_DEV}/usr/include diff --git a/package/libxml2/Makefile b/package/libxml2/Makefile index 19f12828d..01d4ba466 100644 --- a/package/libxml2/Makefile +++ b/package/libxml2/Makefile @@ -23,6 +23,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBXML2,libxml2,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,LIBXML2_DEV,libxml2-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBXML2_DEV},${PKGSC_LIBXML2_DEV})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --without-c14n \ --without-catalog \ --without-debug \ diff --git a/package/links/patches/patch-png_c b/package/links/patches/patch-png_c new file mode 100644 index 000000000..ff067ba86 --- /dev/null +++ b/package/links/patches/patch-png_c @@ -0,0 +1,38 @@ +--- links-2.2.orig/png.c 2005-01-02 20:03:34.000000000 +0100 ++++ links-2.2/png.c 2011-04-01 15:01:25.801818815 +0200 +@@ -48,7 +48,7 @@ void img_my_png_warning(png_structp a, p + /* Error for from-web PNG images. */ + void img_my_png_error(png_structp png_ptr, png_const_charp error_string) + { +- longjmp(png_ptr->jmpbuf,1); ++ longjmp(png_jmpbuf(png_ptr),1); + } + + void png_info_callback(png_structp png_ptr, png_infop info_ptr) +@@ -203,7 +203,7 @@ void png_start(struct cached_image *cimg + #ifdef DEBUG + if (!info_ptr) internal ("png_create_info_struct failed\n"); + #endif /* #ifdef DEBUG */ +- if (setjmp(png_ptr->jmpbuf)){ ++ if (setjmp(png_jmpbuf(png_ptr))){ + error: + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); +@@ -213,7 +213,7 @@ error: + png_set_progressive_read_fn(png_ptr, NULL, + png_info_callback, png_row_callback, + png_end_callback); +- if (setjmp(png_ptr->jmpbuf)) goto error; ++ if (setjmp(png_jmpbuf(png_ptr))) goto error; + decoder=mem_alloc(sizeof(*decoder)); + decoder->png_ptr=png_ptr; + decoder->info_ptr=info_ptr; +@@ -232,7 +232,7 @@ void png_restart(struct cached_image *ci + png_ptr=((struct png_decoder *)(cimg->decoder))->png_ptr; + info_ptr=((struct png_decoder *)(cimg->decoder))->info_ptr; + end_callback_hit=0; +- if (setjmp(png_ptr->jmpbuf)){ ++ if (setjmp(png_jmpbuf(png_ptr))){ + img_end(cimg); + return; + } diff --git a/package/lxappearance/Makefile b/package/lxappearance/Makefile new file mode 100644 index 000000000..7dea43fe5 --- /dev/null +++ b/package/lxappearance/Makefile @@ -0,0 +1,26 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= lxappearance +PKG_VERSION:= 0.5.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 7eabab6f4a358dbc6a84e260a0e7f6c2 +PKG_DESCR:= LXDE ... +PKG_SECTION:= x11/lxde +PKG_URL:= http://lxde.org/ +PKG_SITES:= http://netcologne.dl.sourceforge.net/project/lxde/LXAppearance/ + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,LXAPPEARANCE,lxappearance,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +XAKE_FLAGS+= CPPFLAGS_FOR_BUILD="-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include" + +lxappearance-install: + $(INSTALL_DIR) $(IDIR_LXAPPEARANCE)/usr/bin + $(INSTALL_BIN) $(WRKINST)/usr/bin/lxappearance \ + $(IDIR_LXAPPEARANCE)/usr/bin + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/lxappearance/patches/patch-src_Makefile_in b/package/lxappearance/patches/patch-src_Makefile_in new file mode 100644 index 000000000..409681df8 --- /dev/null +++ b/package/lxappearance/patches/patch-src_Makefile_in @@ -0,0 +1,36 @@ +--- lxappearance-0.5.0.orig/src/Makefile.in 2010-10-12 17:20:51.000000000 +0200 ++++ lxappearance-0.5.0/src/Makefile.in 2011-03-18 00:11:21.983370811 +0100 +@@ -68,8 +68,8 @@ lxappearance_LINK = $(CCLD) $(lxappearan + am_xml_purge_OBJECTS = xml_purge-xml-purge.$(OBJEXT) + xml_purge_OBJECTS = $(am_xml_purge_OBJECTS) + xml_purge_DEPENDENCIES = $(am__DEPENDENCIES_1) +-xml_purge_LINK = $(CCLD) $(xml_purge_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ +- $(LDFLAGS) -o $@ ++xml_purge_LINK = $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \ ++ -o $@ + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles +@@ -347,7 +347,7 @@ lxappearance$(EXEEXT): $(lxappearance_OB + $(lxappearance_LINK) $(lxappearance_OBJECTS) $(lxappearance_LDADD) $(LIBS) + xml-purge$(EXEEXT): $(xml_purge_OBJECTS) $(xml_purge_DEPENDENCIES) + @rm -f xml-purge$(EXEEXT) +- $(xml_purge_LINK) $(xml_purge_OBJECTS) $(xml_purge_LDADD) $(LIBS) ++ $(xml_purge_LINK) $(xml_purge_OBJECTS) $(LIBS) -lgmodule-2.0 -lglib-2.0 + + mostlyclean-compile: + -rm -f *.$(OBJEXT) +@@ -492,11 +492,11 @@ lxappearance-plugin.obj: plugin.c + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lxappearance_CFLAGS) $(CFLAGS) -c -o lxappearance-plugin.obj `if test -f 'plugin.c'; then $(CYGPATH_W) 'plugin.c'; else $(CYGPATH_W) '$(srcdir)/plugin.c'; fi` + + xml_purge-xml-purge.o: $(top_srcdir)/src/xml-purge.c +-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xml_purge_CFLAGS) $(CFLAGS) -MT xml_purge-xml-purge.o -MD -MP -MF $(DEPDIR)/xml_purge-xml-purge.Tpo -c -o xml_purge-xml-purge.o `test -f '$(top_srcdir)/src/xml-purge.c' || echo '$(srcdir)/'`$(top_srcdir)/src/xml-purge.c ++@am__fastdepCC_TRUE@ $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -MT xml_purge-xml-purge.o -MD -MP -MF $(DEPDIR)/xml_purge-xml-purge.Tpo -c -o xml_purge-xml-purge.o `test -f '$(top_srcdir)/src/xml-purge.c' || echo '$(srcdir)/'`$(top_srcdir)/src/xml-purge.c + @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xml_purge-xml-purge.Tpo $(DEPDIR)/xml_purge-xml-purge.Po + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/src/xml-purge.c' object='xml_purge-xml-purge.o' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xml_purge_CFLAGS) $(CFLAGS) -c -o xml_purge-xml-purge.o `test -f '$(top_srcdir)/src/xml-purge.c' || echo '$(srcdir)/'`$(top_srcdir)/src/xml-purge.c ++@am__fastdepCC_FALSE@ $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c -o xml_purge-xml-purge.o `test -f '$(top_srcdir)/src/xml-purge.c' || echo '$(srcdir)/'`$(top_srcdir)/src/xml-purge.c + + xml_purge-xml-purge.obj: $(top_srcdir)/src/xml-purge.c + @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xml_purge_CFLAGS) $(CFLAGS) -MT xml_purge-xml-purge.obj -MD -MP -MF $(DEPDIR)/xml_purge-xml-purge.Tpo -c -o xml_purge-xml-purge.obj `if test -f '$(top_srcdir)/src/xml-purge.c'; then $(CYGPATH_W) '$(top_srcdir)/src/xml-purge.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/xml-purge.c'; fi` diff --git a/package/lxdm/Makefile b/package/lxdm/Makefile new file mode 100644 index 000000000..f809888d8 --- /dev/null +++ b/package/lxdm/Makefile @@ -0,0 +1,34 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= lxdm +PKG_VERSION:= 0.3.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 1d0688e088edab7c3c563263eb2f9654 +PKG_DESCR:= LXDE display manager +PKG_SECTION:= x11/lxde +PKG_BUILDDEP:= libX11 glib gtk+ ConsoleKit +PKG_DEPENDS:= libx11 glib libgtk consolekit +PKG_URL:= http://lxde.org/ +PKG_SITES:= http://openadk.org/distfiles/ + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,LXDM,lxdm,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +lxdm-install: + $(INSTALL_DIR) $(IDIR_LXDM)/etc + $(CP) $(WRKINST)/etc/* $(IDIR_LXDM)/etc + $(INSTALL_DIR) $(IDIR_LXDM)/usr/libexec + $(CP) $(WRKINST)/usr/libexec/* \ + $(IDIR_LXDM)/usr/libexec + $(INSTALL_DIR) $(IDIR_LXDM)/usr/sbin + $(INSTALL_BIN) $(WRKINST)/usr/sbin/lxdm* \ + $(IDIR_LXDM)/usr/sbin + $(INSTALL_DIR) $(IDIR_LXDM)/usr/share/lxdm/themes + $(CP) $(WRKINST)/usr/share/lxdm/themes/* \ + $(IDIR_LXDM)/usr/share/lxdm/themes + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/lxdm/patches/patch-src_lxdm_c b/package/lxdm/patches/patch-src_lxdm_c new file mode 100644 index 000000000..b5eeaa4de --- /dev/null +++ b/package/lxdm/patches/patch-src_lxdm_c @@ -0,0 +1,43 @@ +--- lxdm-0.3.0.orig/src/lxdm.c 2010-09-24 17:43:49.000000000 +0200 ++++ lxdm-0.3.0/src/lxdm.c 2011-03-17 23:15:35.093370316 +0100 +@@ -51,8 +51,6 @@ + #include <sys/ioctl.h> + #include <sys/stat.h> + +-#include <execinfo.h> +- + #include <utmp.h> + + #if HAVE_LIBPAM +@@ -150,6 +148,7 @@ void stop_pid(int pid) + while( waitpid(-1, 0, WNOHANG) > 0 ) ; + } + ++#if HAVE_LIBPAM + static void close_pam_session(pam_handle_t *pamh) + { + int err; +@@ -159,6 +158,7 @@ static void close_pam_session(pam_handle + pam_end(pamh, err); + pamh = NULL; + } ++#endif + + static LXSession *lxsession_find_greeter(void) + { +@@ -1480,6 +1480,7 @@ int lxdm_do_auto_login(void) + + static void log_sigsegv(void) + { ++/* + void *array[40]; + size_t size; + char **bt_strs; +@@ -1492,6 +1493,7 @@ static void log_sigsegv(void) + fprintf(stderr, "%s\n", bt_strs[i]); + + free(bt_strs); ++*/ + } + + static void sigsegv_handler(int sig) diff --git a/package/lxsession/Makefile b/package/lxsession/Makefile new file mode 100644 index 000000000..cfdc47ddc --- /dev/null +++ b/package/lxsession/Makefile @@ -0,0 +1,27 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= lxsession +PKG_VERSION:= 0.4.5 +PKG_RELEASE:= 1 +PKG_MD5SUM:= d5cd0cb733748191b2c7371c9efda155 +PKG_DESCR:= LXDE session manager +PKG_SECTION:= x11/lxde +PKG_URL:= http://lxde.org/ +PKG_SITES:= http://sourceforge.net/projects/lxde/files/LXSession%20%28session%20manager%29/LXSession%200.4.5/ + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,LXSESSION,lxsession,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +lxsession-install: + $(INSTALL_DIR) $(IDIR_LXSESSION)/usr/bin + $(INSTALL_BIN) $(WRKINST)/usr/bin/lxsession* \ + $(IDIR_LXSESSION)/usr/bin + $(INSTALL_DIR) $(IDIR_LXSESSION)/usr/share/lxsession/images + $(CP) $(WRKINST)/usr/share/lxsession/images/* \ + $(IDIR_LXSESSION)/usr/share/lxsession/images + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/lxterminal/Makefile b/package/lxterminal/Makefile new file mode 100644 index 000000000..80ce979d3 --- /dev/null +++ b/package/lxterminal/Makefile @@ -0,0 +1,26 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= lxterminal +PKG_VERSION:= 0.1.9 +PKG_RELEASE:= 1 +PKG_MD5SUM:= cb10cc667611dce3c141294712049c43 +PKG_DESCR:= LXDE terminal +PKG_SECTION:= x11/lxde +PKG_BUILDDEP:= vte +PKG_DEPENDS:= vte +PKG_URL:= http://lxde.org/ +PKG_SITES:= http://netcologne.dl.sourceforge.net/project/lxde/LXTerminal%20%28terminal%20emulator%29/LXTerminal%200.1.9/ + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,LXTERMINAL,lxterminal,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +lxterminal-install: + $(INSTALL_DIR) $(IDIR_LXTERMINAL)/usr/bin + $(INSTALL_BIN) $(WRKINST)/usr/bin/lxterminal \ + $(IDIR_LXTERMINAL)/usr/bin + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/lxterminal/patches/patch-src_Makefile_in b/package/lxterminal/patches/patch-src_Makefile_in new file mode 100644 index 000000000..f9285dc4a --- /dev/null +++ b/package/lxterminal/patches/patch-src_Makefile_in @@ -0,0 +1,45 @@ +--- lxterminal-0.1.9.orig/src/Makefile.in 2010-09-01 14:23:17.000000000 +0200 ++++ lxterminal-0.1.9/src/Makefile.in 2011-03-18 11:44:58.343370425 +0100 +@@ -55,8 +55,8 @@ lxterminal_DEPENDENCIES = $(am__DEPENDEN + am_xml_purge_OBJECTS = xml_purge-xml-purge.$(OBJEXT) + xml_purge_OBJECTS = $(am_xml_purge_OBJECTS) + xml_purge_DEPENDENCIES = +-xml_purge_LINK = $(CCLD) $(xml_purge_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ +- $(LDFLAGS) -o $@ ++xml_purge_LINK = $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \ ++ -o $@ + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles +@@ -215,8 +215,6 @@ lxterminal_LDADD = \ + $(INTLLIBS) + + xml_purge_SOURCES = xml-purge.c +-xml_purge_CFLAGS = @CFLAGS@ +-xml_purge_LDADD = @LIBS@ + all: all-am + + .SUFFIXES: +@@ -296,7 +294,7 @@ lxterminal$(EXEEXT): $(lxterminal_OBJECT + $(LINK) $(lxterminal_OBJECTS) $(lxterminal_LDADD) $(LIBS) + xml-purge$(EXEEXT): $(xml_purge_OBJECTS) $(xml_purge_DEPENDENCIES) + @rm -f xml-purge$(EXEEXT) +- $(xml_purge_LINK) $(xml_purge_OBJECTS) $(xml_purge_LDADD) $(LIBS) ++ $(xml_purge_LINK) $(xml_purge_OBJECTS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) +@@ -325,11 +323,11 @@ distclean-compile: + @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + + xml_purge-xml-purge.o: xml-purge.c +-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xml_purge_CFLAGS) $(CFLAGS) -MT xml_purge-xml-purge.o -MD -MP -MF $(DEPDIR)/xml_purge-xml-purge.Tpo -c -o xml_purge-xml-purge.o `test -f 'xml-purge.c' || echo '$(srcdir)/'`xml-purge.c ++@am__fastdepCC_TRUE@ $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -MT xml_purge-xml-purge.o -MD -MP -MF $(DEPDIR)/xml_purge-xml-purge.Tpo -c -o xml_purge-xml-purge.o `test -f 'xml-purge.c' || echo '$(srcdir)/'`xml-purge.c + @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xml_purge-xml-purge.Tpo $(DEPDIR)/xml_purge-xml-purge.Po + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xml-purge.c' object='xml_purge-xml-purge.o' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xml_purge_CFLAGS) $(CFLAGS) -c -o xml_purge-xml-purge.o `test -f 'xml-purge.c' || echo '$(srcdir)/'`xml-purge.c ++@am__fastdepCC_FALSE@ $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c -o xml_purge-xml-purge.o `test -f 'xml-purge.c' || echo '$(srcdir)/'`xml-purge.c + + xml_purge-xml-purge.obj: xml-purge.c + @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xml_purge_CFLAGS) $(CFLAGS) -MT xml_purge-xml-purge.obj -MD -MP -MF $(DEPDIR)/xml_purge-xml-purge.Tpo -c -o xml_purge-xml-purge.obj `if test -f 'xml-purge.c'; then $(CYGPATH_W) 'xml-purge.c'; else $(CYGPATH_W) '$(srcdir)/xml-purge.c'; fi` diff --git a/package/mpfr/Makefile b/package/mpfr/Makefile index a3d91b707..f4bc9982e 100644 --- a/package/mpfr/Makefile +++ b/package/mpfr/Makefile @@ -16,7 +16,13 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MPFR,mpfr,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) $(eval $(call PKG_template,MPFR_DEV,mpfr-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_MPFR_DEV},${PKGSC_MPFR_DEV})) +<<<<<<< HEAD mpfr-install: +======= +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) + +post-install: +>>>>>>> ed73ed80fe75787a18a3ecf2335ff62d799eba01 ${INSTALL_DIR} ${IDIR_MPFR}/usr/lib ${CP} ${WRKINST}/usr/lib/libmpfr.so* ${IDIR_MPFR}/usr/lib diff --git a/package/mplayer/Makefile b/package/mplayer/Makefile index 7ccde9e74..3b08057da 100644 --- a/package/mplayer/Makefile +++ b/package/mplayer/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= mplayer -PKG_VERSION:= 1.0-32749 -PKG_RELEASE:= 2 -PKG_MD5SUM:= aadc5d8cca503c8b18b3ed00b3a52cf5 +PKG_VERSION:= 1.0rc4 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 1699c94de39da9c4c5d34e8f58e418f0 PKG_DESCR:= popular video player PKG_SECTION:= multimedia PKG_DEPENDS:= alsa-lib libjpeg libfaad2 libmad libncurses @@ -15,7 +15,11 @@ PKG_DEPENDS+= libx11 libxau libxdmcp libxext libxv zlib PKG_BUILDDEP:= alsa-lib libmad libvorbis faad2 ncurses zlib PKG_BUILDDEP+= libX11 libXv libpng libXext PKG_URL:= http://www.mplayerhq.hu/ -PKG_SITES:= http://openadk.org/distfiles/ +#PKG_SITES:= http://openadk.org/distfiles/ +PKG_SITES:= http://www.mplayerhq.hu/MPlayer/releases/ + +DISTFILES:= MPlayer-$(PKG_VERSION).tar.bz2 +WRKDIST= ${WRKDIR}/MPlayer-$(PKG_VERSION) PKG_ARCH_DEPENDS:= x86 x86_64 mips mipsel mips64 mips64el diff --git a/package/mplayer/patches/patch-Makefile b/package/mplayer/patches/patch-Makefile index 3f57255db..9c8e32783 100644 --- a/package/mplayer/patches/patch-Makefile +++ b/package/mplayer/patches/patch-Makefile @@ -1,11 +1,11 @@ ---- mplayer-1.0-32749.orig/Makefile 2011-01-03 11:27:11.000000000 +0100 -+++ mplayer-1.0-32749/Makefile 2011-02-05 18:20:49.000000000 +0100 -@@ -816,7 +816,7 @@ mencoder$(EXESUF) mplayer$(EXESUF): +--- MPlayer-1.0rc4.orig/Makefile 2010-07-29 19:08:19.000000000 +0200 ++++ MPlayer-1.0rc4/Makefile 2011-04-01 16:14:58.571818417 +0200 +@@ -851,7 +851,7 @@ mencoder$(EXESUF) mplayer$(EXESUF): $(CC) -o $@ $^ $(EXTRALIBS) codec-cfg$(EXESUF): codec-cfg.c codec-cfg.h help_mp.h -- $(HOST_CC) -O -DCODECS2HTML -I. -Iffmpeg -o $@ $< -+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -O -DCODECS2HTML -I. -Iffmpeg -o $@ $< +- $(HOST_CC) -O -DCODECS2HTML -I. -o $@ $< ++ $(CC_FOR_BUILD) -O -DCODECS2HTML -I. -o $@ $< codecs.conf.h: codec-cfg$(EXESUF) etc/codecs.conf ./$^ > $@ diff --git a/package/mplayer/patches/patch-configure b/package/mplayer/patches/patch-configure index eb33a8720..2fe0e1e10 100644 --- a/package/mplayer/patches/patch-configure +++ b/package/mplayer/patches/patch-configure @@ -1,6 +1,6 @@ ---- mplayer-1.0-32749.orig/configure 2011-01-03 11:27:11.000000000 +0100 -+++ mplayer-1.0-32749/configure 2011-01-09 00:35:20.000000000 +0100 -@@ -2554,7 +2554,7 @@ else +--- MPlayer-1.0rc4.orig/configure 2010-07-29 02:31:57.000000000 +0200 ++++ MPlayer-1.0rc4/configure 2011-04-01 16:12:17.224319163 +0200 +@@ -2556,7 +2556,7 @@ else fi cflag_check -mno-omit-leaf-frame-pointer && cflags_no_omit_leaf_frame_pointer="-mno-omit-leaf-frame-pointer" diff --git a/package/mplayer/patches/patch-libmpcodecs_vd_mpng_c b/package/mplayer/patches/patch-libmpcodecs_vd_mpng_c new file mode 100644 index 000000000..c783ec100 --- /dev/null +++ b/package/mplayer/patches/patch-libmpcodecs_vd_mpng_c @@ -0,0 +1,39 @@ +--- MPlayer-1.0rc4.orig/libmpcodecs/vd_mpng.c 2010-02-26 16:01:37.000000000 +0100 ++++ MPlayer-1.0rc4/libmpcodecs/vd_mpng.c 2011-04-01 16:23:04.381818599 +0200 +@@ -74,7 +74,7 @@ static int pngLength; + + static void pngReadFN( png_structp pngstr,png_bytep buffer,png_size_t size ) + { +- char * p = pngstr->io_ptr; ++ char * p = png_get_io_ptr(pngstr); + if(size>pngLength-pngPointer && pngLength>=pngPointer) size=pngLength-pngPointer; + fast_memcpy( buffer,(char *)&p[pngPointer],size ); + pngPointer+=size; +@@ -90,6 +90,7 @@ static mp_image_t* decode(sh_video_t *sh + png_uint_32 png_width=0,png_height=0; + int depth,color; + png_uint_32 i; ++ png_byte color_type; + mp_image_t* mpi; + + int cols; +@@ -111,7 +112,9 @@ static mp_image_t* decode(sh_video_t *sh + png_get_IHDR( png,info,&png_width,&png_height,&depth,&color,NULL,NULL,NULL ); + png_set_bgr( png ); + +- switch( info->color_type ) { ++ color_type=png_get_color_type(png, info); ++ ++ switch( color_type ) { + case PNG_COLOR_TYPE_GRAY_ALPHA: + mp_msg( MSGT_DECVIDEO,MSGL_INFO,"Sorry gray scaled png with alpha channel not supported at moment.\n" ); + break; +@@ -128,7 +131,7 @@ static mp_image_t* decode(sh_video_t *sh + out_fmt=IMGFMT_BGR24; + break; + default: +- mp_msg( MSGT_DECVIDEO,MSGL_INFO,"Sorry, unsupported PNG colorspace: %d.\n" ,info->color_type); ++ mp_msg( MSGT_DECVIDEO,MSGL_INFO,"Sorry, unsupported PNG colorspace: %d.\n" ,color_type); + } + + // (re)init libvo if image parameters changed (width/height/colorspace) diff --git a/package/ncurses/Makefile b/package/ncurses/Makefile index a89ea7c91..e9aaddf9a 100644 --- a/package/ncurses/Makefile +++ b/package/ncurses/Makefile @@ -64,7 +64,7 @@ pre-configure: find ${WRKBUILD} -name *.o -exec rm {} \; find ${WRKBUILD} -name *.a -exec rm {} \; -post-install: +libncurses-install: # this is installed as libncurses - make libcurses a "link" rm -f ${WRKINST}/usr/lib/libcurses.so* echo 'GROUP(-lncurses)' >${WRKINST}/usr/lib/libcurses.so diff --git a/package/nss/Makefile b/package/nss/Makefile index 6d6dccdf7..7455b1d37 100644 --- a/package/nss/Makefile +++ b/package/nss/Makefile @@ -6,6 +6,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:= nss PKG_VERSION:= 3.12.9 PKG_RELEASE:= 1 +PKG_MAJ_VERSION:= 3 +PKG_MIN_VERSION:= 12 +PKG_PATCH_VERSION:= 9 PKG_MD5SUM:= bd32f183ca28440c1744650be31a9ccc PKG_DESCR:= Network Security Services (NSS) library PKG_SECTION:= libs @@ -37,16 +40,27 @@ TARGET_LDFLAGS+= -ldl -pthread XAKE_FLAGS+= SOURCE_MD_DIR=${WRKDIST}/dist DIST=${WRKDIST}/dist XAKE_FLAGS+= ARCHFLAG="${TARGET_CFLAGS} ${TARGET_CPPFLAGS} ${TARGET_LDFLAGS}" -XAKE_FLAGS+= OS_TEST=${CPU_ARCH} NSS_DISABLE_DBM=1 OS_TARGET=Linux OS_RELEASE=2.6 OS_ARCH=Linux +XAKE_FLAGS+= NSS_DISABLE_DBM=1 OS_TEST=${CPU_ARCH} OS_TARGET=Linux OS_RELEASE=2.6 OS_ARCH=Linux XAKE_FLAGS+= ARTOOL="${TARGET_CROSS}ar" RANLIB="${TARGET_CROSS}ranlib" ALL_TARGET:= build_coreconf all post-install: + $(INSTALL_DIR) $(WRKINST)/usr/lib/pkgconfig + sed 's/@VERSION@/$(PKG_VERSION)/' ./files/nss.pc.in > $(WRKINST)/usr/lib/pkgconfig/nss.pc + $(INSTALL_DIR) $(WRKINST)/usr/bin + sed -e 's/@MOD_MAJOR_VERSION@/$(PKG_MAJ_VERSION)/' \ + -e 's/@MOD_MINOR_VERSION@/$(PKG_MIN_VERSION)/' \ + -e 's/@MOD_PATCH_VERSION@/$(PKG_PATCH_VERSION)/' \ + ./files/nss-config.in > $(WRKINST)/usr/bin/nss-config $(INSTALL_DIR) $(IDIR_NSS)/usr/lib ${INSTALL_DATA} ${WRKDIST}/dist/lib/lib{ssl3,smime3,nss3,nssutil3}.so \ $(IDIR_NSS)/usr/lib ${INSTALL_DIR} ${STAGING_TARGET_DIR}/usr/include/nss ${INSTALL_DATA} ${WRKDIST}/mozilla/dist/public/nss/* \ ${STAGING_TARGET_DIR}/usr/include/nss + # needed for firefox 4 + ${INSTALL_DIR} ${STAGING_TARGET_DIR}/usr/lib + $(INSTALL_DATA) ${WRKDIST}/dist/lib/libcrmf.a \ + ${STAGING_TARGET_DIR}/usr/lib include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/nss/files/nss-config.in b/package/nss/files/nss-config.in new file mode 100644 index 000000000..d47cddc06 --- /dev/null +++ b/package/nss/files/nss-config.in @@ -0,0 +1,145 @@ +#!/bin/sh + +prefix=/usr + +major_version=@MOD_MAJOR_VERSION@ +minor_version=@MOD_MINOR_VERSION@ +patch_version=@MOD_PATCH_VERSION@ + +usage() +{ + cat <<EOF +Usage: nss-config [OPTIONS] [LIBRARIES] +Options: + [--prefix[=DIR]] + [--exec-prefix[=DIR]] + [--includedir[=DIR]] + [--libdir[=DIR]] + [--version] + [--libs] + [--cflags] +Dynamic Libraries: + nss + nssutil + ssl + smime +EOF + exit $1 +} + +if test $# -eq 0; then + usage 1 1>&2 +fi + +lib_ssl=yes +lib_smime=yes +lib_nss=yes +lib_nssutil=yes + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --prefix=*) + prefix=$optarg + ;; + --prefix) + echo_prefix=yes + ;; + --exec-prefix=*) + exec_prefix=$optarg + ;; + --exec-prefix) + echo_exec_prefix=yes + ;; + --includedir=*) + includedir=$optarg + ;; + --includedir) + echo_includedir=yes + ;; + --libdir=*) + libdir=$optarg + ;; + --libdir) + echo_libdir=yes + ;; + --version) + echo ${major_version}.${minor_version}.${patch_version} + ;; + --cflags) + echo_cflags=yes + ;; + --libs) + echo_libs=yes + ;; + ssl) + lib_ssl=yes + ;; + smime) + lib_smime=yes + ;; + nss) + lib_nss=yes + ;; + nssutil) + lib_nssutil=yes + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + +# Set variables that may be dependent upon other variables +if test -z "$exec_prefix"; then + exec_prefix=${prefix} +fi +if test -z "$includedir"; then + includedir=${prefix}/include/nss +fi +if test -z "$libdir"; then + libdir=${exec_prefix}/lib +fi + +if test "$echo_prefix" = "yes"; then + echo $prefix +fi + +if test "$echo_exec_prefix" = "yes"; then + echo $exec_prefix +fi + +if test "$echo_includedir" = "yes"; then + echo $includedir +fi + +if test "$echo_libdir" = "yes"; then + echo $libdir +fi + +if test "$echo_cflags" = "yes"; then + echo -I$includedir +fi + +if test "$echo_libs" = "yes"; then + libdirs="-L$libdir" + if test -n "$lib_ssl"; then + libdirs="$libdirs -lssl${major_version}" + fi + if test -n "$lib_smime"; then + libdirs="$libdirs -lsmime${major_version}" + fi + if test -n "$lib_nss"; then + libdirs="$libdirs -lnss${major_version}" + fi + if test -n "$lib_nssutil"; then + libdirs="$libdirs -lnssutil${major_version}" + fi + echo $libdirs +fi + diff --git a/package/nss/files/nss.pc.in b/package/nss/files/nss.pc.in new file mode 100644 index 000000000..e27783f64 --- /dev/null +++ b/package/nss/files/nss.pc.in @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/nss + +Name: NSS +Description: Mozilla Network Security Services +Version: @VERSION@ +Requires: nspr +Libs: -L${libdir} -lnss3 -lnssutil3 -lsmime3 -lssl3 +Cflags: -I${includedir} diff --git a/package/opencdk/Makefile b/package/opencdk/Makefile index aa3373cc5..96a11c03a 100644 --- a/package/opencdk/Makefile +++ b/package/opencdk/Makefile @@ -22,6 +22,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBOPENCDK,libopencdk,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --with-libgcrypt-prefix='${STAGING_TARGET_DIR}/usr' post-install: diff --git a/package/openjdk/Makefile b/package/openjdk/Makefile index 20c231abe..46f38abb6 100644 --- a/package/openjdk/Makefile +++ b/package/openjdk/Makefile @@ -15,7 +15,9 @@ PKG_MD5SUM:= 2d2bbbb0f9b81f1fec41ec730da8a933 \ d526d0848c88607ce4e3a0a4edb75d50 PKG_DESCR:= OpenJDK Java VM PKG_SECTION:= lang -PKG_BUILDDEP:= xproto jpeg zlib libX11 libpng freetype +PKG_BUILDDEP:= alsa-lib xproto jpeg zlib giflib libpng freetype cups +PKG_BUILDDEP+= libX11 libXt libXp libXinerama libXrender libXtst +PKG_DEPENDS:= zlib libstdcxx libffi libpthread PKG_URL:= http://openjdk.org/ PKG_SITES:= http://download.java.net/openjdk/jdk6/promoted/b22/ \ http://mirror.netcologne.de/apache.org/xml/xalan-j/binaries/ \ @@ -43,8 +45,6 @@ WRKDIST= ${WRKDIR} WRKSRC= ${WRKDIST}/${ICEDTEA_NAME}-${ICEDTEA_VERSION} PKG_SUBPKGS:= OPENJDK -PKG_CFLINE_OPENJDK:= select ADK_TOOLCHAIN_GCC_JAVA - PKG_CHOICES_OPENJDK:= ZERO SHARK CACAO JAMVM PKGCD_ZERO:= zero-assembly backend PKGCD_SHARK:= JIT backend @@ -55,68 +55,104 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,OPENJDK,openjdk,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_CFLAGS:= $(filter-out -fhonour-copts,$(TARGET_CFLAGS)) +BOOTSTRAPJDK:= ${STAGING_JAVA_HOST_DIR}/bootstrap-jdk ifeq ($(ADK_PACKAGE_OPENJDK_ZERO),y) -CONFIGURE_ARGS+= --enable-zero +CONFIGURE_BACKEND:= --enable-zero endif ifeq ($(ADK_PACKAGE_OPENJDK_SHARK),y) -CONFIGURE_ARGS+= --enable-shark +CONFIGURE_BACKEND:= --enable-shark +endif +ifeq ($(ADK_PACKAGE_OPENJDK_CACAO),y) +CONFIGURE_BACKEND:= --enable-cacao +endif +ifeq ($(ADK_PACKAGE_OPENJDK_JAMVM),y) +CONFIGURE_BACKEND:= --enable-jamvm endif +CONFIGURE_ARGS+= $(CONFIGURE_BACKEND) CONFIGURE_ARGS+= --disable-docs \ - --enable-bootstrap \ + --disable-bootstrap \ --enable-openjdk-cross-compilation \ - --with-jdk-home=${STAGING_JAVA_HOST_DIR}/usr/lib/jvm \ - --with-java=$(STAGING_JAVA_HOST_DIR)/usr/bin/jamvm \ - --with-javac=$(STAGING_JAVA_HOST_DIR)/usr/bin/ecj \ - --with-gcj=$(STAGING_JAVA_HOST_DIR)/usr/bin/gcj \ --with-openjdk-src-dir=$(WRKDIST)/$(PKG_NAME)-$(PKG_VERSION) \ --with-xalan2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xalan.jar \ --with-xalan2-serializer-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/serializer.jar \ --with-xerces2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xercesImpl.jar \ - --with-ecj-jar=${STAGING_JAVA_HOST_DIR}/usr/share/ecj.jar \ - --without-rhino \ - --disable-xrender \ - --disable-nss - -OPENJDK_BUILD_ENV+= JAVACFLAGS="-cp ${STAGING_JAVA_HOST_DIR}/usr/share/java/libgcj-4.5.2.jar" -OPENJDK_BUILD_ENV+= DYLD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64 -OPENJDK_BUILD_ENV+= LD_LIBRARY_PATH=$(STAGING_JAVA_HOST_DIR)/usr/lib:$(STAGING_JAVA_HOST_DIR)/usr/lib64 -OPENJDK_BUILD_ENV+= ADK_ECJ=$(STAGING_JAVA_HOST_DIR)/usr/bin/ecj -CONFIGURE_ENV+= ${OPENJDK_BUILD_ENV} -MAKE_ENV+= ${OPENJDK_BUILD_ENV} + --with-jdk-home=$(BOOTSTRAPJDK) \ + --with-java=$(BOOTSTRAPJDK)/bin/java \ + --with-javac=$(BOOTSTRAPJDK)/bin/javac \ + --with-javah=$(BOOTSTRAPJDK)/bin/javah \ + --with-jar=$(BOOTSTRAPJDK)/bin/jar \ + --with-rmic=$(BOOTSTRAPJDK)/bin/rmic \ + --with-native2ascii=$(BOOTSTRAPJDK)/bin/native2ascii \ + --without-rhino + +MAKE_ENV+= ALT_COMPILER_PATH=$(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME) \ + GCC_HONOUR_COPTS=s CROSS_COMPILE_ARCH=$(ARCH) + +OPENJDK_NATIVE_ENV+= ALT_COMPILER_PATH=$(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME) \ + GCC_HONOUR_COPTS=s CROSS_COMPILE_ARCH=$(ARCH) \ + TARGET_ALIAS=$(GNU_TARGET_NAME) BUILD_ALIAS=$(GNU_HOST_NAME) HOST_ALIAS=$(GNU_TARGET_NAME) +ALL_TARGET:= icedtea do-extract: - cd ${WRKDIST}; mkdir $(PKG_NAME)-$(PKG_VERSION) ; \ + cd ${WRKDIST}; mkdir $(PKG_NAME)-$(PKG_VERSION); \ tar xzf $(TOPDIR)/dl/$(PKG_NAME)-$(PKG_VERSION)-src-$(PKG_EXTRAVER).tar.gz -C $(PKG_NAME)-$(PKG_VERSION) cd $(WRKDIST); tar xzf $(TOPDIR)/dl/$(ICEDTEA_NAME)-$(ICEDTEA_VERSION).tar.gz cd ${WRKDIST}; tar xzf ${TOPDIR}/dl/${XALAN_NAME}_${XALAN_VERSION}-bin.tar.gz mkdir -p ${WRKBUILD}/drops - cd ${TOPDIR}/dl; cp jaxp144_01.zip jdk6-jaf-b20.zip jdk6-jaxws-b20.zip \ - ${WRKBUILD}/drops + cd ${TOPDIR}/dl; cp jaxp144_01.zip jdk6-jaf-b20.zip jdk6-jaxws-b20.zip ${WRKBUILD}/drops pre-configure: cd ${WRKBUILD}; rm -rf config.{cache,status}; \ - export ${OPENJDK_BUILD_ENV}; ./configure \ - --enable-bootstrap \ - --enable-zero \ - --with-jdk-home=$(STAGING_JAVA_HOST_DIR)/usr/lib/jvm \ - --with-java=$(STAGING_JAVA_HOST_DIR)/usr/bin/jamvm \ - --with-javac=$(STAGING_JAVA_HOST_DIR)/usr/bin/ecj \ - --with-gcj=$(STAGING_JAVA_HOST_DIR)/usr/bin/gcj \ - --with-openjdk-src-dir=$(WRKDIST)/$(PKG_NAME)-$(PKG_VERSION) \ - --with-ecj-jar=${STAGING_JAVA_HOST_DIR}/usr/share/ecj.jar \ - --disable-docs \ - --disable-openjdk-cross-compilation \ - --with-xalan2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xalan.jar \ - --with-xalan2-serializer-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/serializer.jar \ - --with-xerces2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xercesImpl.jar \ - --without-rhino \ - --disable-xrender \ - --disable-nss \ - && ${MAKE} + export ${OPENJDK_NATIVE_ENV} $(MAKE_ENV) ; ./configure \ + ${CONFIGURE_TRIPLE} \ + $(CONFIGURE_BACKEND) \ + --prefix=/usr \ + --bindir=/usr/bin \ + --datadir=/usr/share \ + --mandir=/usr/share/man \ + --libexecdir=/usr/libexec \ + --localstatedir=/var \ + --sysconfdir=/etc \ + --enable-bootstrap \ + --enable-openjdk-cross-compilation \ + --with-openjdk-src-dir=$(WRKDIST)/$(PKG_NAME)-$(PKG_VERSION) \ + --with-xalan2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xalan.jar \ + --with-xalan2-serializer-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/serializer.jar \ + --with-xerces2-jar=${WRKDIST}/${XALAN_NAME}_${XALAN_VERSION}/xercesImpl.jar \ + --with-jdk-home=$(BOOTSTRAPJDK) \ + --with-java=$(BOOTSTRAPJDK)/bin/java \ + --with-javac=$(BOOTSTRAPJDK)/bin/javac \ + --with-javah=$(BOOTSTRAPJDK)/bin/javah \ + --with-jar=$(BOOTSTRAPJDK)/bin/jar \ + --with-rmic=$(BOOTSTRAPJDK)/bin/rmic \ + --with-native2ascii=$(BOOTSTRAPJDK)/bin/native2ascii \ + --without-rhino ;\ + mkdir -p $(WRKBUILD)/generated/sun/awt/X11/generator/ ; \ + cp $(JTOOLS_BUILD_DIR)/icedtea6-1.10/generated/sun/awt/X11/generator/sizes.32 \ + $(WRKBUILD)/generated/sun/awt/X11/generator/sizes.32 ; \ + cp $(JTOOLS_BUILD_DIR)/icedtea6-1.10/generated/sun/awt/X11/generator/sizer.32 \ + $(WRKBUILD)/generated/sun/awt/X11/generator/sizer.32 ; \ + cp $(JTOOLS_BUILD_DIR)/icedtea6-1.10/generated/sun/awt/X11/generator/sizer.32 \ + $(WRKBUILD)/openjdk.build/gensrc/sun/awt/X11/generator/sizer.32 ; \ + $(MAKE) icedtea-ecj + # fixup symlinks to bootstrap jdk + ln -sf $(BOOTSTRAPJDK)/bin/java $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/java + ln -sf $(BOOTSTRAPJDK)/bin/javac $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/javac + ln -sf $(BOOTSTRAPJDK)/bin/javah $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/javah + ln -sf $(BOOTSTRAPJDK)/bin/jar $(WRKBUILD)/openjdk.build-ecj/j2sdk-image/bin/jar + cp $(JTOOLS_BUILD_DIR)/icedtea6-1.10/generated/sun/awt/X11/generator/sizes.32 \ + $(WRKBUILD)/generated/sun/awt/X11/generator/sizes.32 + cp $(JTOOLS_BUILD_DIR)/icedtea6-1.10/generated/sun/awt/X11/generator/sizer.32 \ + $(WRKBUILD)/generated/sun/awt/X11/generator/sizer.32 + mkdir -p $(WRKBUILD)/openjdk.build/gensrc/sun/awt/X11/generator + cp $(JTOOLS_BUILD_DIR)/icedtea6-1.10/generated/sun/awt/X11/generator/sizer.32 \ + $(WRKBUILD)/openjdk.build/gensrc/sun/awt/X11/generator/sizer.32 openjdk-install: - $(INSTALL_DIR) $(IDIR_OPENJDK)/usr/bin + $(INSTALL_DIR) $(IDIR_OPENJDK)/usr + $(CP) $(WRKBUILD)/openjdk.build/j2re-image/* $(IDIR_OPENJDK)/usr include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/openjdk/patches/debug-javac.patch b/package/openjdk/patches/debug-javac.patch new file mode 100644 index 000000000..f130325ef --- /dev/null +++ b/package/openjdk/patches/debug-javac.patch @@ -0,0 +1,18 @@ +--- w-openjdk-6-1.orig/icedtea6-1.10.orig/javac.in 2011-02-23 23:32:18.635149341 +0100 ++++ w-openjdk-6-1/icedtea6-1.10/javac.in 2011-04-05 16:27:04.291962749 +0200 +@@ -37,6 +37,7 @@ + if ( -e "@abs_top_builddir@/native-ecj" ) + { + my @ecj_args = gen_ecj_opts( \@ARGV ); ++ print 'Using native ecj'; + exec '@abs_top_builddir@/native-ecj', @ecj_parms, @ecj_args ; + } + elsif ( -e "@ECJ_JAR@" ) +@@ -45,6 +46,7 @@ + my @CLASSPATH = ('@ECJ_JAR@'); + push @CLASSPATH, split /:/, $ENV{"CLASSPATH"} if exists $ENV{"CLASSPATH"}; + $ENV{"CLASSPATH"} = join ':', @CLASSPATH; ++ print 'Using ecj with java'; + exec '@JAVA@', 'org.eclipse.jdt.internal.compiler.batch.Main', @ecj_parms, @ecj_args; + } + else diff --git a/package/openjdk/patches/disable-backtrace.patch b/package/openjdk/patches/disable-backtrace.patch new file mode 100644 index 000000000..bd335a914 --- /dev/null +++ b/package/openjdk/patches/disable-backtrace.patch @@ -0,0 +1,11 @@ +--- w-openjdk-6-1.orig/openjdk-6/jdk/src/solaris/native/sun/xawt/XToolkit.c 2011-02-28 17:06:50.000000000 +0100 ++++ w-openjdk-6-1/openjdk-6/jdk/src/solaris/native/sun/xawt/XToolkit.c 2011-04-10 22:33:28.481412674 +0200 +@@ -689,7 +689,7 @@ + return ret; + } + +-#ifdef __linux__ ++#if 0 + void print_stack(void) + { + void *array[10]; diff --git a/package/openjdk/patches/disable-freetype-check.patch b/package/openjdk/patches/disable-freetype-check.patch new file mode 100644 index 000000000..5f5f6cf83 --- /dev/null +++ b/package/openjdk/patches/disable-freetype-check.patch @@ -0,0 +1,11 @@ +--- w-openjdk-6-1.orig/openjdk-6.orig/jdk/make/common/shared/Sanity.gmk 2011-02-28 17:06:10.000000000 +0100 ++++ w-openjdk-6-1/openjdk-6/jdk/make/common/shared/Sanity.gmk 2011-04-05 14:05:29.691807661 +0200 +@@ -793,7 +793,7 @@ + # Check for availability of FreeType (OpenJDK specific) + ###################################################### + +-ifdef OPENJDK ++ifdef OPENJDK_DISABLED + + #name of test program that prints out "Failed" if freetype is not good enough + FREETYPE_VERSION_CHECK_NAME = freetype_versioncheck diff --git a/package/openjdk/patches/disable-gamma.patch b/package/openjdk/patches/disable-gamma.patch new file mode 100644 index 000000000..92a80b3be --- /dev/null +++ b/package/openjdk/patches/disable-gamma.patch @@ -0,0 +1,16 @@ +--- w-openjdk-6-1.orig/openjdk-6/hotspot/make/linux/makefiles/buildtree.make 2011-02-28 17:03:13.000000000 +0100 ++++ w-openjdk-6-1/openjdk-6/hotspot/make/linux/makefiles/buildtree.make 2011-04-11 12:47:31.000000000 +0200 +@@ -352,12 +352,8 @@ + echo "if [ -z \$$JAVA_HOME ]; then { $(NO_JAVA_HOME_MSG); exit 0; }; fi"; \ + echo "if ! \$${JAVA_HOME}/bin/java $(JAVA_FLAG) -fullversion 2>&1 > /dev/null"; \ + echo "then"; \ +- echo " $(WRONG_DATA_MODE_MSG); exit 0;"; \ ++ echo " exit 0;"; \ + echo "fi"; \ +- echo "rm -f Queens.class"; \ +- echo "\$${JAVA_HOME}/bin/javac -d . $(GAMMADIR)/make/test/Queens.java"; \ +- echo '[ -f gamma_g ] && { gamma=gamma_g; }'; \ +- echo './$${gamma:-gamma} $(TESTFLAGS) Queens < /dev/null'; \ + ) > $@ + $(QUIETLY) chmod +x $@ + diff --git a/package/openjdk/patches/disable-sizers.patch b/package/openjdk/patches/disable-sizers.patch new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/package/openjdk/patches/disable-sizers.patch diff --git a/package/openjdk/patches/patch-icedtea6-1_10_Makefile_in b/package/openjdk/patches/patch-icedtea6-1_10_Makefile_in index 50667a68a..0f49fe67a 100644 --- a/package/openjdk/patches/patch-icedtea6-1_10_Makefile_in +++ b/package/openjdk/patches/patch-icedtea6-1_10_Makefile_in @@ -1,5 +1,32 @@ --- w-openjdk-6-1.orig/icedtea6-1.10/Makefile.in 2011-03-02 20:48:45.000000000 +0100 +++ w-openjdk-6-1/icedtea6-1.10/Makefile.in 2011-04-02 23:33:17.000000000 +0200 +@@ -328,7 +328,7 @@ + am__untar = @am__untar@ + bindir = @bindir@ + build = @build@ +-build_alias = @build_alias@ ++build_alias = ${BUILD_ALIAS} + build_cpu = @build_cpu@ + build_os = @build_os@ + build_vendor = @build_vendor@ +@@ -339,7 +339,7 @@ + dvidir = @dvidir@ + exec_prefix = @exec_prefix@ + host = @host@ +-host_alias = @host_alias@ ++host_alias = ${HOST_ALIAS} + host_cpu = @host_cpu@ + host_os = @host_os@ + host_vendor = @host_vendor@ +@@ -362,7 +362,7 @@ + sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ + sysconfdir = @sysconfdir@ +-target_alias = @target_alias@ ++target_alias = ${TARGET_ALIAS} + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ @@ -1329,7 +1329,7 @@ stamps/extract-openjdk.stamp: stamps/dow @OPENJDK_SRC_DIR_FOUND_TRUE@ cp -pPR $(OPENJDK_SRC_DIR_LINK) $(OPENJDK_SRC_DIR) openjdk ; \ @OPENJDK_SRC_DIR_FOUND_TRUE@ fi diff --git a/package/openjdk/patches/patch-icedtea6-1_10_configure b/package/openjdk/patches/patch-icedtea6-1_10_configure deleted file mode 100644 index d9b96d1d4..000000000 --- a/package/openjdk/patches/patch-icedtea6-1_10_configure +++ /dev/null @@ -1,479 +0,0 @@ ---- w-openjdk-6-1.orig/icedtea6-1.10/configure 2011-03-02 20:48:44.321157333 +0100 -+++ w-openjdk-6-1/icedtea6-1.10/configure 2011-03-28 15:30:08.791808629 +0200 -@@ -10805,22 +10805,6 @@ fi - - - --for ac_header in cups/cups.h cups/ppd.h --do : -- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` --ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" --if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : -- cat >>confdefs.h <<_ACEOF --#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 --_ACEOF -- -- --else -- as_fn_error $? "\"CUPS headers were not found - -- try installing cups-devel.\"" "$LINENO" 5 --fi -- --done - - for ac_header in X11/X.h - do : -@@ -10879,46 +10863,6 @@ else - as_fn_error $? "\"libjpeg not found - try installing libjpeg-devel\"" "$LINENO" 5 - fi - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5 --$as_echo_n "checking for main in -lgif... " >&6; } --if ${ac_cv_lib_gif_main+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lgif $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- -- --int --main () --{ --return main (); -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_gif_main=yes --else -- ac_cv_lib_gif_main=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5 --$as_echo "$ac_cv_lib_gif_main" >&6; } --if test "x$ac_cv_lib_gif_main" = xyes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_LIBGIF 1 --_ACEOF -- -- LIBS="-lgif $LIBS" -- --else -- as_fn_error $? "\"giflib not found - try installing giflib-devel\"" "$LINENO" 5 --fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lz" >&5 - $as_echo_n "checking for main in -lz... " >&6; } -@@ -11040,156 +10984,9 @@ fi - - - --pkg_failed=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XT" >&5 --$as_echo_n "checking for XT... " >&6; } -- --if test -n "$XT_CFLAGS"; then -- pkg_cv_XT_CFLAGS="$XT_CFLAGS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xt\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "xt") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_XT_CFLAGS=`$PKG_CONFIG --cflags "xt" 2>/dev/null` --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi --if test -n "$XT_LIBS"; then -- pkg_cv_XT_LIBS="$XT_LIBS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xt\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "xt") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_XT_LIBS=`$PKG_CONFIG --libs "xt" 2>/dev/null` --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi -- -- -- --if test $pkg_failed = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- --if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -- _pkg_short_errors_supported=yes --else -- _pkg_short_errors_supported=no --fi -- if test $_pkg_short_errors_supported = yes; then -- XT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xt" 2>&1` -- else -- XT_PKG_ERRORS=`$PKG_CONFIG --print-errors "xt" 2>&1` -- fi -- # Put the nasty error message in config.log where it belongs -- echo "$XT_PKG_ERRORS" >&5 -- -- XT_FOUND=no --elif test $pkg_failed = untried; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- XT_FOUND=no --else -- XT_CFLAGS=$pkg_cv_XT_CFLAGS -- XT_LIBS=$pkg_cv_XT_LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- XT_FOUND=yes --fi --if test "x${XT_FOUND}" = xno --then -- as_fn_error $? "Could not find Xt - \ -- Try installing libXt-devel." "$LINENO" 5 --fi -- -- -- -- --pkg_failed=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XP" >&5 --$as_echo_n "checking for XP... " >&6; } -- --if test -n "$XP_CFLAGS"; then -- pkg_cv_XP_CFLAGS="$XP_CFLAGS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xp\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "xp") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_XP_CFLAGS=`$PKG_CONFIG --cflags "xp" 2>/dev/null` --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi --if test -n "$XP_LIBS"; then -- pkg_cv_XP_LIBS="$XP_LIBS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xp\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "xp") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_XP_LIBS=`$PKG_CONFIG --libs "xp" 2>/dev/null` --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi -- -- - --if test $pkg_failed = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } - --if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -- _pkg_short_errors_supported=yes --else -- _pkg_short_errors_supported=no --fi -- if test $_pkg_short_errors_supported = yes; then -- XP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xp" 2>&1` -- else -- XP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xp" 2>&1` -- fi -- # Put the nasty error message in config.log where it belongs -- echo "$XP_PKG_ERRORS" >&5 - -- XP_FOUND=no --elif test $pkg_failed = untried; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- XP_FOUND=no --else -- XP_CFLAGS=$pkg_cv_XP_CFLAGS -- XP_LIBS=$pkg_cv_XP_LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- XP_FOUND=yes --fi --if test "x${XP_FOUND}" = xno --then -- as_fn_error $? "Could not find Xp - \ -- Try installing libXp-devel." "$LINENO" 5 --fi - - - -@@ -11271,83 +11068,6 @@ fi - - - --pkg_failed=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINERAMA" >&5 --$as_echo_n "checking for XINERAMA... " >&6; } -- --if test -n "$XINERAMA_CFLAGS"; then -- pkg_cv_XINERAMA_CFLAGS="$XINERAMA_CFLAGS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xinerama\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "xinerama") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_XINERAMA_CFLAGS=`$PKG_CONFIG --cflags "xinerama" 2>/dev/null` --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi --if test -n "$XINERAMA_LIBS"; then -- pkg_cv_XINERAMA_LIBS="$XINERAMA_LIBS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xinerama\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "xinerama") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_XINERAMA_LIBS=`$PKG_CONFIG --libs "xinerama" 2>/dev/null` --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi -- -- -- --if test $pkg_failed = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- --if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -- _pkg_short_errors_supported=yes --else -- _pkg_short_errors_supported=no --fi -- if test $_pkg_short_errors_supported = yes; then -- XINERAMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xinerama" 2>&1` -- else -- XINERAMA_PKG_ERRORS=`$PKG_CONFIG --print-errors "xinerama" 2>&1` -- fi -- # Put the nasty error message in config.log where it belongs -- echo "$XINERAMA_PKG_ERRORS" >&5 -- -- XINERAMA_FOUND=no --elif test $pkg_failed = untried; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- XINERAMA_FOUND=no --else -- XINERAMA_CFLAGS=$pkg_cv_XINERAMA_CFLAGS -- XINERAMA_LIBS=$pkg_cv_XINERAMA_LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- XINERAMA_FOUND=yes -- --fi --if test "x${XINERAMA_FOUND}" = xno --then -- as_fn_error $? "Could not find Xinerama - \ -- Try installing libXinerama-devel." "$LINENO" 5 --fi -- -- -- - if test "x${ENABLE_XRENDER}" = "xyes" - then - -@@ -11610,79 +11330,6 @@ fi - - - --pkg_failed=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XTST" >&5 --$as_echo_n "checking for XTST... " >&6; } -- --if test -n "$XTST_CFLAGS"; then -- pkg_cv_XTST_CFLAGS="$XTST_CFLAGS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xtst\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "xtst") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_XTST_CFLAGS=`$PKG_CONFIG --cflags "xtst" 2>/dev/null` --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi --if test -n "$XTST_LIBS"; then -- pkg_cv_XTST_LIBS="$XTST_LIBS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xtst\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "xtst") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_XTST_LIBS=`$PKG_CONFIG --libs "xtst" 2>/dev/null` --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi -- -- -- --if test $pkg_failed = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- --if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -- _pkg_short_errors_supported=yes --else -- _pkg_short_errors_supported=no --fi -- if test $_pkg_short_errors_supported = yes; then -- XTST_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xtst" 2>&1` -- else -- XTST_PKG_ERRORS=`$PKG_CONFIG --print-errors "xtst" 2>&1` -- fi -- # Put the nasty error message in config.log where it belongs -- echo "$XTST_PKG_ERRORS" >&5 -- -- XTST_FOUND=no --elif test $pkg_failed = untried; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- XTST_FOUND=no --else -- XTST_CFLAGS=$pkg_cv_XTST_CFLAGS -- XTST_LIBS=$pkg_cv_XTST_LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- XTST_FOUND=yes --fi --if test "x${XTST_FOUND}" = xno --then -- as_fn_error $? "Could not find Xtst - \ -- Try installing libXtst-devel." "$LINENO" 5 --fi - - - -@@ -11764,85 +11411,6 @@ fi - - - --if test "x${BUILD_OS_DIR}" = "xlinux" --then -- --pkg_failed=no --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5 --$as_echo_n "checking for ALSA... " >&6; } -- --if test -n "$ALSA_CFLAGS"; then -- pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null` --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi --if test -n "$ALSA_LIBS"; then -- pkg_cv_ALSA_LIBS="$ALSA_LIBS" -- elif test -n "$PKG_CONFIG"; then -- if test -n "$PKG_CONFIG" && \ -- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5 -- ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then -- pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null` --else -- pkg_failed=yes --fi -- else -- pkg_failed=untried --fi -- -- -- --if test $pkg_failed = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- --if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -- _pkg_short_errors_supported=yes --else -- _pkg_short_errors_supported=no --fi -- if test $_pkg_short_errors_supported = yes; then -- ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1` -- else -- ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1` -- fi -- # Put the nasty error message in config.log where it belongs -- echo "$ALSA_PKG_ERRORS" >&5 -- -- ALSA_FOUND=no --elif test $pkg_failed = untried; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- ALSA_FOUND=no --else -- ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS -- ALSA_LIBS=$pkg_cv_ALSA_LIBS -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- ALSA_FOUND=yes --fi -- if test "x${ALSA_FOUND}" = xno -- then -- as_fn_error $? "Could not find alsa - \ -- Try installing alsa-lib-devel." "$LINENO" 5 -- fi -- -- --fi - - if test "x${enable_pulse_java}" = "xyes" - then diff --git a/package/openjdk/patches/remove-libnsl.patch b/package/openjdk/patches/remove-libnsl.patch new file mode 100644 index 000000000..9c086843e --- /dev/null +++ b/package/openjdk/patches/remove-libnsl.patch @@ -0,0 +1,69 @@ +--- w-openjdk-6-1.orig/openjdk-6/jdk/make/java/hpi/hpi_common.gmk 2011-02-28 17:06:10.000000000 +0100 ++++ w-openjdk-6-1/openjdk-6/jdk/make/java/hpi/hpi_common.gmk 2011-04-10 20:05:01.417672476 +0200 +@@ -86,5 +86,5 @@ + # Things that must be linked in. + # + ifneq ($(PLATFORM), windows) +-OTHER_LDLIBS += $(LIBSOCKET) -lnsl $(LIBM) -ldl ++OTHER_LDLIBS += $(LIBSOCKET) $(LIBM) -ldl + endif +--- w-openjdk-6-1.orig/openjdk-6/jdk/make/java/java/Makefile 2011-02-28 17:06:10.000000000 +0100 ++++ w-openjdk-6-1/openjdk-6/jdk/make/java/java/Makefile 2011-04-10 20:05:20.637673621 +0200 +@@ -205,7 +205,7 @@ + OTHER_LDLIBS += $(JVMLIB) -libpath:$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) fdlibm.lib \ + -libpath:$(OBJDIR)/../../../verify/$(OBJDIRNAME) verify.lib + else +-OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) -lnsl -ldl \ ++OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) -ldl \ + -L$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) -lfdlibm.$(ARCH) + endif + +--- w-openjdk-6-1.orig/openjdk-6/jdk/make/java/net/Makefile 2011-02-28 17:06:10.000000000 +0100 ++++ w-openjdk-6-1/openjdk-6/jdk/make/java/net/Makefile 2011-04-10 20:05:39.537672169 +0200 +@@ -97,7 +97,7 @@ + # Will not compile at warning level 3 if warnings are fatal + COMPILER_WARNINGS_FATAL=false + else +- OTHER_LDLIBS = $(LIBSOCKET) -lnsl -ldl $(JVMLIB) ++ OTHER_LDLIBS = $(LIBSOCKET) -ldl $(JVMLIB) + endif + ifeq ($(PLATFORM), linux) + OTHER_LDLIBS += -lpthread +--- w-openjdk-6-1.orig/openjdk-6/jdk/make/jpda/transport/socket/Makefile 2011-02-28 17:06:11.000000000 +0100 ++++ w-openjdk-6-1/openjdk-6/jdk/make/jpda/transport/socket/Makefile 2011-04-10 20:06:06.037672449 +0200 +@@ -42,11 +42,11 @@ + endif + + ifeq ($(PLATFORM), linux) +- OTHER_LDLIBS += -lnsl $(LIBSOCKET) -lpthread ++ OTHER_LDLIBS += $(LIBSOCKET) -lpthread + endif + + ifeq ($(PLATFORM), solaris) +- OTHER_LDLIBS += -lnsl $(LIBSOCKET) ++ OTHER_LDLIBS += $(LIBSOCKET) + endif + + ifeq ($(PLATFORM), windows) +--- w-openjdk-6-1.orig/openjdk-6/jdk/make/java/java_hprof_demo/Makefile 2011-02-28 17:06:10.000000000 +0100 ++++ w-openjdk-6-1/openjdk-6/jdk/make/java/java_hprof_demo/Makefile 2011-04-10 20:28:43.287672398 +0200 +@@ -83,7 +83,7 @@ + ifeq ($(PLATFORM), windows) + OTHER_LDLIBS += wsock32.lib winmm.lib + else +- OTHER_LDLIBS += $(LIBSOCKET) -lnsl -ldl ++ OTHER_LDLIBS += $(LIBSOCKET) -ldl + endif + + # +--- w-openjdk-6-1.orig/openjdk-6/jdk/make/mkdemo/jvmti/hprof/Makefile 2011-02-28 17:06:11.000000000 +0100 ++++ w-openjdk-6-1/openjdk-6/jdk/make/mkdemo/jvmti/hprof/Makefile 2011-04-11 10:23:11.538911604 +0200 +@@ -42,7 +42,7 @@ + OTHER_LDLIBS += $(LIBSOCKET) -lnsl -ldl + endif + ifeq ($(PLATFORM), linux) +- OTHER_LDLIBS += $(LIBSOCKET) -lnsl -ldl -lpthread ++ OTHER_LDLIBS += $(LIBSOCKET) -ldl -lpthread + endif + + # diff --git a/package/openldap/Makefile b/package/openldap/Makefile index a935994cb..bd2492ad0 100644 --- a/package/openldap/Makefile +++ b/package/openldap/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= openldap -PKG_VERSION:= 2.4.24 +PKG_VERSION:= 2.4.25 PKG_RELEASE:= 1 -PKG_MD5SUM:= 116fe1e23a7b67686d5e62274367e6c0 +PKG_MD5SUM:= ec63f9c2add59f323a0459128846905b PKG_DESCR:= OpenLDAP client libraries PKG_SECTION:= libs PKG_DEPENDS:= libopenssl libsasl2 diff --git a/package/openldap/patches/patch-build_ltmain_sh b/package/openldap/patches/patch-build_ltmain_sh index 5876849e1..3b48ef1c9 100644 --- a/package/openldap/patches/patch-build_ltmain_sh +++ b/package/openldap/patches/patch-build_ltmain_sh @@ -1,6 +1,6 @@ ---- openldap-2.4.23.orig/build/ltmain.sh 2010-04-13 22:22:21.000000000 +0200 -+++ openldap-2.4.23/build/ltmain.sh 2011-01-15 12:35:41.000000000 +0100 -@@ -1668,7 +1668,7 @@ EOF +--- openldap-2.4.25.orig/build/ltmain.sh 2011-01-05 00:49:25.000000000 +0100 ++++ openldap-2.4.25/build/ltmain.sh 2011-03-30 18:26:08.621808325 +0200 +@@ -1668,7 +1672,7 @@ EOF # -pg pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ diff --git a/package/pango/Makefile b/package/pango/Makefile index 9224f3d9e..e60684cc8 100644 --- a/package/pango/Makefile +++ b/package/pango/Makefile @@ -26,6 +26,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PANGO,pango,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) $(eval $(call PKG_template,PANGO_DEV,pango-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_PANGO_DEV},${PKGSC_PANGO_DEV},${PKG_OPTS})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) + pango-install: $(INSTALL_DIR) $(IDIR_PANGO)/etc/pango $(INSTALL_DIR) $(IDIR_PANGO)/usr/lib $(IDIR_PANGO)/usr/lib/pango/1.6.0/modules diff --git a/package/pcc-libs/Makefile b/package/pcc-libs/Makefile new file mode 100644 index 000000000..9533b97c9 --- /dev/null +++ b/package/pcc-libs/Makefile @@ -0,0 +1,29 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= pcc-libs +PKG_VERSION:= 1.0.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= a8dfcd6d3be512bc3f16f96c9abf132e +PKG_DESCR:= Runtime for the Portable C Compiler +PKG_SECTION:= lang +PKG_URL:= http://pcc.ludd.ltu.se/ +PKG_SITES:= http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/ + +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tgz + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,PCC_LIBS,pcc-libs,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +# we cross-compile a native compiler for the target system +CONFIGURE_ARGS+= --host=${REAL_GNU_TARGET_NAME} +CONFIGURE_ARGS+= --target=${REAL_GNU_TARGET_NAME} + +pcc-libs-install: + $(INSTALL_DIR) $(IDIR_PCC_LIBS)/usr/bin + cd ${WRKINST} && cp -r * ${IDIR_PCC_LIBS}/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/pcc-libs/patches/100-adk.patch b/package/pcc-libs/patches/100-adk.patch new file mode 100644 index 000000000..a588900d9 --- /dev/null +++ b/package/pcc-libs/patches/100-adk.patch @@ -0,0 +1,12 @@ +diff -pur pcc-libs-1.0.0~/csu/linux/Makefile pcc-libs-1.0.0/csu/linux/Makefile +--- pcc-libs-1.0.0.orig/csu/linux/Makefile 2009-08-13 11:16:46.000000000 +0200 ++++ pcc-libs-1.0.0/csu/linux/Makefile 2011-04-07 20:36:10.068600370 +0200 +@@ -4,7 +4,7 @@ VERSION ?= 0.9.9 + PCCLIBDIR ?= /usr/local/lib/pcc/$(TARGET)/$(VERSION)/lib + SRCDIR ?= . + +-CFLAGS = -I$(SRCDIR)/$(MACH) -I$(SRCDIR) -Wall -Wstrict-prototypes -Wmissing-prototypes ++CFLAGS += -I$(SRCDIR)/$(MACH) -I$(SRCDIR) -Wall -Wstrict-prototypes -Wmissing-prototypes + + OBJS = crt0.o crt1.o gcrt1.o crti.o crtn.o crtbegin.o crtend.o + diff --git a/package/pcc-libs/patches/patch-csu_linux_crtbegin_c b/package/pcc-libs/patches/patch-csu_linux_crtbegin_c new file mode 100644 index 000000000..a4f9777b3 --- /dev/null +++ b/package/pcc-libs/patches/patch-csu_linux_crtbegin_c @@ -0,0 +1,35 @@ +--- pcc-libs-1.0.0.orig/csu/linux/crtbegin.c 2009-08-17 01:07:07.000000000 +0200 ++++ pcc-libs-1.0.0/csu/linux/crtbegin.c 2011-04-12 08:36:48.951412645 +0200 +@@ -1,4 +1,4 @@ +-/* $Id: crtbegin.c,v 1.6 2009/08/16 23:07:07 gmcgarry Exp $ */ ++/* $Id: crtbegin.c,v 1.7 2011/04/12 04:44:19 gmcgarry Exp $ */ + /*- + * Copyright (c) 1998, 2001, 2002 The NetBSD Foundation, Inc. + * All rights reserved. +@@ -40,16 +40,16 @@ void __do_global_dtors_aux(void); + extern void (*__CTOR_LIST__[1])(void); + extern void (*__DTOR_LIST__[1])(void); + +-asm( " .section .ctors\n" +- " .align 2\n" ++asm( " .section .ctors,\"aw\",@progbits\n" ++ " .align 4\n" + "__CTOR_LIST__:\n" + #ifdef __x86_64__ + " .quad -1\n" + #else + " .long -1\n" + #endif +- " .section .dtors\n" +- " .align 2\n" ++ " .section .dtors,\"aw\",@progbits\n" ++ " .align 4\n" + "__DTOR_LIST__:\n" + #ifdef __x86_64__ + " .quad -1\n" +@@ -120,4 +120,4 @@ void __call_##func(void) \ + MD_CALL_STATIC_FUNCTION(.init, __do_global_ctors_aux) + MD_CALL_STATIC_FUNCTION(.fini, __do_global_dtors_aux) + +-IDENT("$Id: crtbegin.c,v 1.6 2009/08/16 23:07:07 gmcgarry Exp $"); ++IDENT("$Id: crtbegin.c,v 1.7 2011/04/12 04:44:19 gmcgarry Exp $"); diff --git a/package/pcc-libs/patches/patch-csu_linux_crtend_c b/package/pcc-libs/patches/patch-csu_linux_crtend_c new file mode 100644 index 000000000..257f7138f --- /dev/null +++ b/package/pcc-libs/patches/patch-csu_linux_crtend_c @@ -0,0 +1,32 @@ +--- pcc-libs-1.0.0.orig/csu/linux/crtend.c 2009-08-17 01:07:07.000000000 +0200 ++++ pcc-libs-1.0.0/csu/linux/crtend.c 2011-04-12 08:36:48.951412645 +0200 +@@ -1,4 +1,4 @@ +-/* $Id: crtend.c,v 1.3 2009/08/16 23:07:07 gmcgarry Exp $ */ ++/* $Id: crtend.c,v 1.4 2011/04/12 04:44:19 gmcgarry Exp $ */ + /*- + * Copyright (c) 2008 Gregory McGarry <g.mcgarry@ieee.org> + * +@@ -17,7 +17,7 @@ + + #include "common.h" + +-asm( " .section .ctors\n" ++asm( " .section .ctors,\"aw\",@progbits\n" + #ifdef __x86_64__ + " .quad 0\n" + #else +@@ -25,7 +25,7 @@ asm( " .section .ctors\n" + #endif + ); + +-asm( " .section .dtors\n" ++asm( " .section .dtors,\"aw\",@progbits\n" + #ifdef __x86_64__ + " .quad 0\n" + #else +@@ -33,4 +33,4 @@ asm( " .section .dtors\n" + #endif + ); + +-IDENT("$Id: crtend.c,v 1.3 2009/08/16 23:07:07 gmcgarry Exp $"); ++IDENT("$Id: crtend.c,v 1.4 2011/04/12 04:44:19 gmcgarry Exp $"); diff --git a/package/pcc/Makefile b/package/pcc/Makefile new file mode 100644 index 000000000..a20d3dece --- /dev/null +++ b/package/pcc/Makefile @@ -0,0 +1,46 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= pcc +PKG_VERSION:= 1.0.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 6e5d851ee57fe58702fe4e80ecd1f852 +PKG_DESCR:= Portable C Compiler +PKG_SECTION:= lang +PKG_DEPENDS:= pcc-libs +# binutils +PKG_URL:= http://pcc.ludd.ltu.se/ +PKG_SITES:= http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/ +PKG_NOPARALLEL:= 1 + +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tgz + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,PCC,pcc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +# we cross-compile a native compiler for the target system +CONFIGURE_ARGS+= --host=${REAL_GNU_TARGET_NAME} +CONFIGURE_ARGS+= --target=${REAL_GNU_TARGET_NAME} +CONFIGURE_ARGS+= --with-assembler=/usr/bin/as +CONFIGURE_ARGS+= --with-linker=/usr/bin/ld + +ifeq ($(ADK_TARGET_LIB_GLIBC),y) +TARGET_CPPFLAGS+= -DADK_FOR_GLIBC +else +ifeq ($(ADK_TARGET_LIB_EGLIBC),y) +TARGET_CPPFLAGS+= -DADK_FOR_GLIBC +else +ifeq ($(ADK_TARGET_LIB_UCLIBC),y) +TARGET_CPPFLAGS+= -DADK_FOR_UCLIBC +endif +endif +endif + +pcc-install: + $(INSTALL_DIR) $(IDIR_PCC) + cd ${WRKINST} && cp -r * ${IDIR_PCC}/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/pcc/patches/100-adk.patch b/package/pcc/patches/100-adk.patch new file mode 100644 index 000000000..fe2143dd8 --- /dev/null +++ b/package/pcc/patches/100-adk.patch @@ -0,0 +1,23 @@ +Index: os/linux/ccconfig.h +=================================================================== +RCS file: /cvsroot/pcc/os/linux/ccconfig.h,v +retrieving revision 1.19 +diff -u -p -r1.19 ccconfig.h +--- a/os/linux/ccconfig.h 9 Nov 2010 08:40:50 -0000 1.19 ++++ b/os/linux/ccconfig.h 2 Apr 2011 14:19:17 -0000 +@@ -67,6 +67,15 @@ + #error defines for arch missing + #endif + ++#ifdef ADK_FOR_UCLIBC ++#undef DYNLINKER ++#define DYNLINKER { "-dynamic-linker", "/lib/ld-uClibc.so.0", NULL } ++#elif defined(ADK_FOR_GLIBC) ++/* see above */ ++#else ++#error What now? ++#endif ++ + #ifndef LIBDIR + #define LIBDIR "/usr/lib/" + #endif diff --git a/package/pcc/patches/200-cc_ccom_Makefile_in.patch b/package/pcc/patches/200-cc_ccom_Makefile_in.patch new file mode 100644 index 000000000..31e051edd --- /dev/null +++ b/package/pcc/patches/200-cc_ccom_Makefile_in.patch @@ -0,0 +1,33 @@ +$MirOS: ports/lang/pcc/patches/patch-cc_ccom_Makefile_in,v 1.4 2011/04/02 17:45:46 tg Exp $ + + • fix missing @CPPFLAGS@ + • fix cross-compiling + +--- a/cc/ccom/Makefile.in.orig Sun Apr 11 15:00:40 2010 ++++ b/cc/ccom/Makefile.in Sat Apr 2 17:43:44 2011 +@@ -11,9 +11,14 @@ XFL=-DPCC_DEBUG + CC = @CC@ + EXEEXT = @EXEEXT@ + CC_FOR_BUILD = @CC_FOR_BUILD@ ++CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ ++CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ -D_ISOC99_SOURCE \ ++ @ADD_CPPFLAGS@ ${XFL} -Dos_${TARGOS} -Dmach_${TARGMACH} \ ++ -I${srcdir} -I${builddir} -I${top_builddir} -I${MIPDIR} -I${MDIR} \ ++ -I${top_srcdir}/os/${TARGOS} + _CFLAGS = @CFLAGS@ + CFLAGS = $(_CFLAGS) @ADD_CFLAGS@ +-CPPFLAGS = @ADD_CPPFLAGS@ ${XFL} -Dos_${TARGOS} -Dmach_${TARGMACH} \ ++CPPFLAGS = @CPPFLAGS@ @ADD_CPPFLAGS@ ${XFL} -Dos_${TARGOS} -Dmach_${TARGMACH} \ + -D_ISOC99_SOURCE \ + -I${srcdir} -I${builddir} -I${top_builddir} -I${MIPDIR} -I${MDIR} \ + -I${top_srcdir}/os/${TARGOS} +@@ -92,7 +97,8 @@ compat.o: $(MIPDIR)/compat.c external.h + $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(MIPDIR)/compat.c + + external.h external.c: ${MIPDIR}/mkext.c $(MDIR)/table.c +- $(CC_FOR_BUILD) $(DEFS) $(CPPFLAGS) $(CFLAGS) -DMKEXT -o mkext \ ++ $(CC_FOR_BUILD) $(DEFS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) \ ++ -DMKEXT -o mkext \ + ${MIPDIR}/mkext.c $(MDIR)/table.c ${MIPDIR}/common.c + ./mkext + diff --git a/package/pcc/patches/999-autoconf.patch b/package/pcc/patches/999-autoconf.patch new file mode 100644 index 000000000..531b5291b --- /dev/null +++ b/package/pcc/patches/999-autoconf.patch @@ -0,0 +1,38 @@ +--- a/configure Fri Apr 1 13:58:07 2011 ++++ b/configure Sat Apr 2 19:21:15 2011 +@@ -672,6 +672,8 @@ ac_ct_CC + EXEEXT + OBJEXT + CC_FOR_BUILD ++CPPFLAGS_FOR_BUILD ++CFLAGS_FOR_BUILD + CPP + GREP + EGREP +@@ -3292,6 +3294,8 @@ else + echo "${ECHO_T}not cross compiling" >&6; } + CC_FOR_BUILD=${CC-cc} + ++ test -n "$CPPFLAGS_FOR_BUILD" || CPPFLAGS_FOR_BUILD=$CPPFLAGS ++ test -n "$CFLAGS_FOR_BUILD" || CFLAGS_FOR_BUILD=$CFLAGS + fi + + +@@ -5765,6 +5769,8 @@ ac_ct_CC!$ac_ct_CC$ac_delim + EXEEXT!$EXEEXT$ac_delim + OBJEXT!$OBJEXT$ac_delim + CC_FOR_BUILD!$CC_FOR_BUILD$ac_delim ++CPPFLAGS_FOR_BUILD!$CPPFLAGS_FOR_BUILD$ac_delim ++CFLAGS_FOR_BUILD!$CFLAGS_FOR_BUILD$ac_delim + CPP!$CPP$ac_delim + GREP!$GREP$ac_delim + EGREP!$EGREP$ac_delim +@@ -5787,7 +5793,7 @@ LIBOBJS!$LIBOBJS$ac_delim + LTLIBOBJS!$LTLIBOBJS$ac_delim + _ACEOF + +- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 78; then ++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 80; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/package/php/Makefile b/package/php/Makefile index 14e037a30..04167069a 100644 --- a/package/php/Makefile +++ b/package/php/Makefile @@ -4,9 +4,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:= php -PKG_VERSION:= 5.3.5 +PKG_VERSION:= 5.3.6 PKG_RELEASE:= 1 -PKG_MD5SUM:= fb727a3ac72bf0ce37e1a20468a7bb81 +PKG_MD5SUM:= 88a2b00047bc53afbbbdf10ebe28a57e PKG_DESCR:= PHP language interpreter PKG_SECTION:= lang PKG_DEPENDS:= libopenssl zlib @@ -19,15 +19,16 @@ PKG_SUBPKGS:= PHP PHP_CLI PHP_FASTCGI PKGSD_PHP_FASTCGI:= PHP for FastCGI usage PKGSD_PHP_CLI:= PHP CLI -PKG_FLAVOURS_PHP:= MOD_CURL MOD_GD MOD_GMP MOD_LDAP MOD_MYSQL +#PKG_FLAVOURS_PHP:= MOD_CURL MOD_GD MOD_GMP MOD_LDAP MOD_MYSQL +PKG_FLAVOURS_PHP:= MOD_CURL MOD_GMP MOD_LDAP MOD_MYSQL PKG_FLAVOURS_PHP+= MOD_PGSQL MOD_SQLITE MOD_XML PKGFD_MOD_CURL:= Curl support PKGFB_MOD_CURL:= curl PKGFS_MOD_CURL:= libcurl -PKGFD_MOD_GD:= Gd support -PKGFB_MOD_GD:= libgd libpng -PKGFS_MOD_GD:= libgd libpng +#PKGFD_MOD_GD:= Gd support +#PKGFB_MOD_GD:= libgd libpng +#PKGFS_MOD_GD:= libgd libpng PKGFD_MOD_GMP:= GMP support PKGFB_MOD_GMP:= gmp PKGFS_MOD_GMP:= libgmp @@ -106,9 +107,9 @@ PKG_CONFIGURE_OPTS+= --with-curl=shared,"$(STAGING_TARGET_DIR)/usr" else PKG_CONFIGURE_OPTS+= --without-curl endif -ifneq ($(ADK_PACKAGE_PHP_MOD_GD),) -PKG_CONFIGURE_OPTS+= --with-gd=shared,"$(STAGING_TARGET_DIR)/usr" \ - --with-jpeg-dir="$(STAGING_TARGET_DIR)/usr" \ +#ifneq ($(ADK_PACKAGE_PHP_MOD_GD),) +#PKG_CONFIGURE_OPTS+= --with-gd=shared,"$(STAGING_TARGET_DIR)/usr" \ + --without-jpeg-dir \ --with-png-dir="$(STAGING_TARGET_DIR)/usr" \ --without-freetype-dir \ --without-xpm-dir \ @@ -116,9 +117,9 @@ PKG_CONFIGURE_OPTS+= --with-gd=shared,"$(STAGING_TARGET_DIR)/usr" \ --without-t1lib \ --enable-gd-native-ttf \ --disable-gd-jis-conv -else +#else PKG_CONFIGURE_OPTS+= --without-gd -endif +#endif ifneq ($(ADK_PACKAGE_PHP_MOD_GMP),) PKG_CONFIGURE_OPTS+= --with-gmp=shared,"$(STAGING_TARGET_DIR)/usr" else diff --git a/package/php/patches/patch-ext_standard_php_crypt_r_c b/package/php/patches/patch-ext_standard_php_crypt_r_c deleted file mode 100644 index 1c47df417..000000000 --- a/package/php/patches/patch-ext_standard_php_crypt_r_c +++ /dev/null @@ -1,11 +0,0 @@ ---- php-5.3.4.orig/ext/standard/php_crypt_r.c 2010-06-17 12:22:03.000000000 +0200 -+++ php-5.3.4/ext/standard/php_crypt_r.c 2010-12-30 12:53:12.000000000 +0100 -@@ -94,7 +94,7 @@ void _crypt_extended_init_r(void) - if (!initialized) { - #ifdef PHP_WIN32 - InterlockedIncrement(&initialized); --#elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR >= 2)) -+#elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR >= 2)) || defined(__UCLIBC__) - __sync_fetch_and_add(&initialized, 1); - #elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */ - membar_producer(); diff --git a/package/pixman/Makefile b/package/pixman/Makefile index 50b61a3a9..2b136ec07 100644 --- a/package/pixman/Makefile +++ b/package/pixman/Makefile @@ -4,11 +4,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:= pixman -PKG_VERSION:= 0.16.2 +PKG_VERSION:= 0.20.2 PKG_RELEASE:= 1 -PKG_MD5SUM:= 02bd3669f53c404c19980d5efb6f86fb +PKG_MD5SUM:= a923c20af88e469ac29ba42cfedb88c2 PKG_DESCR:= Pixel manipulation library PKG_SECTION:= x11/libs +PKG_BUILDDEP:= libpng PKG_SITES:= http://www.cairographics.org/releases/ PKG_SUBPKGS:= PIXMAN PIXMAN_DEV @@ -24,9 +25,11 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,PIXMAN,pixman,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) $(eval $(call PKG_template,PIXMAN_DEV,pixman-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_PIXMAN_DEV},${PKGSC_PIXMAN_DEV},${PKG_OPTS})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) + pixman-install: ${INSTALL_DIR} ${IDIR_PIXMAN}/usr/lib - ${CP} ${WRKINST}/usr/lib/libpixman-1.so* ${IDIR_PIXMAN}/usr/lib/ + ${CP} ${WRKINST}/usr/lib/libpixman-1.so* ${IDIR_PIXMAN}/usr/lib pixman-dev-install: ${INSTALL_DIR} ${IDIR_PIXMAN_DEV}/usr/include diff --git a/package/pixman/patches/patch-ltmain_sh b/package/pixman/patches/patch-ltmain_sh index b38645c65..73aa1dfdd 100644 --- a/package/pixman/patches/patch-ltmain_sh +++ b/package/pixman/patches/patch-ltmain_sh @@ -1,11 +1,11 @@ ---- pixman-0.16.2.orig/ltmain.sh 2009-04-23 02:27:43.000000000 +0200 -+++ pixman-0.16.2/ltmain.sh 2011-01-14 20:10:48.000000000 +0100 -@@ -4765,7 +4765,7 @@ func_mode_link () - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files +--- pixman-0.20.2.orig/ltmain.sh 2010-10-30 23:18:32.000000000 +0200 ++++ pixman-0.20.2/ltmain.sh 2011-04-07 15:05:45.000000000 +0200 +@@ -5091,7 +5091,7 @@ func_mode_link () + # @file GCC response files + # -tp=* Portland pgcc target processor selection -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto) +- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) ++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|-fstack-protector*|-flto*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" diff --git a/package/printproto/Makefile b/package/printproto/Makefile new file mode 100644 index 000000000..63a09d3d6 --- /dev/null +++ b/package/printproto/Makefile @@ -0,0 +1,25 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= printproto +PKG_VERSION:= 1.0.5 +PKG_RELEASE:= 1 +PKG_DESCR:= X Print Extension headers +PKG_SECTION:= x11/devel +PKG_MD5SUM:= 5afeb3a7de8a14b417239a14ea724268 +PKG_SITES:= http://xorg.freedesktop.org/releases/individual/proto/ + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,PRINTPROTO,printproto,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) + +post-install: + ${INSTALL_DIR} ${IDIR_PRINTPROTO}/usr/include + ${CP} ${WRKINST}/usr/include/X11 ${IDIR_PRINTPROTO}/usr/include + ${INSTALL_DIR} ${IDIR_PRINTPROTO}/usr/lib/pkgconfig + ${INSTALL_DATA} ${WRKINST}/usr/lib/pkgconfig/*.pc \ + ${IDIR_PRINTPROTO}/usr/lib/pkgconfig + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/qemu/Makefile b/package/qemu/Makefile index cd3fdbe2e..f82e852b8 100644 --- a/package/qemu/Makefile +++ b/package/qemu/Makefile @@ -6,13 +6,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:= qemu PKG_VERSION:= 0.14.0 PKG_RELEASE:= 1 -PKG_MD5SUM:= 397a0d665da8ba9d3b9583629f3d6421 +PKG_MD5SUM:= f9d145d5c09de9f0984ffe9bd1229970 PKG_DESCR:= cpu and system emulator PKG_SECTION:= misc -PKG_DEPENDS:= zlib libSDL +PKG_DEPENDS:= zlib libsdl PKG_BUILDDEP:= zlib sdl PKG_URL:= http://wwww.qemu.org/ -PKG_SITES:= http://wiki.qemu.org/download/ +PKG_SITES:= http://download.savannah.gnu.org/releases/qemu/ PKG_ARCH_DEPENDS:= native x86 x86_64 @@ -20,9 +20,9 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,QEMU,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIG_STYLE:= minimal CONFIGURE_ARGS+= --host-cc=$(CC_FOR_BUILD) \ - --cross-prefix=$(TARGET_CROSS) \ --disable-user \ --prefix=/usr \ --sysconfdir=/etc \ diff --git a/package/qemu/patches/patch-configure b/package/qemu/patches/patch-configure deleted file mode 100644 index 963c407fe..000000000 --- a/package/qemu/patches/patch-configure +++ /dev/null @@ -1,11 +0,0 @@ ---- qemu-0.13.0.orig/configure 2010-10-15 22:56:09.000000000 +0200 -+++ qemu-0.13.0/configure 2011-01-12 22:34:59.000000000 +0100 -@@ -136,7 +136,7 @@ QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_C - QEMU_CFLAGS="-I. -I\$(SRC_PATH) $QEMU_CFLAGS" - LDFLAGS="-g $LDFLAGS" - --gcc_flags="-Wold-style-declaration -Wold-style-definition -fstack-protector-all" -+gcc_flags="-Wold-style-declaration -Wold-style-definition" - cat > $TMPC << EOF - int main(void) { return 0; } - EOF diff --git a/package/qemu/patches/patch-hw_vhost_c b/package/qemu/patches/patch-hw_vhost_c deleted file mode 100644 index 71eccb83f..000000000 --- a/package/qemu/patches/patch-hw_vhost_c +++ /dev/null @@ -1,10 +0,0 @@ ---- qemu-0.13.0.orig/hw/vhost.c 2010-10-15 22:56:09.000000000 +0200 -+++ qemu-0.13.0/hw/vhost.c 2011-01-12 21:27:10.000000000 +0100 -@@ -11,7 +11,6 @@ - */ - - #include <sys/ioctl.h> --#include <sys/eventfd.h> - #include "vhost.h" - #include "hw/hw.h" - /* For range_get_last */ diff --git a/package/qemu/patches/patch-hw_vhost_net_c b/package/qemu/patches/patch-hw_vhost_net_c deleted file mode 100644 index 325d5a940..000000000 --- a/package/qemu/patches/patch-hw_vhost_net_c +++ /dev/null @@ -1,10 +0,0 @@ ---- qemu-0.13.0.orig/hw/vhost_net.c 2010-10-15 22:56:09.000000000 +0200 -+++ qemu-0.13.0/hw/vhost_net.c 2011-01-12 21:27:20.000000000 +0100 -@@ -20,7 +20,6 @@ - - #ifdef CONFIG_VHOST_NET - #include <linux/vhost.h> --#include <sys/eventfd.h> - #include <sys/socket.h> - #include <linux/kvm.h> - #include <fcntl.h> diff --git a/package/sdl-image/patches/patch-IMG_png_c b/package/sdl-image/patches/patch-IMG_png_c new file mode 100644 index 000000000..315c1f676 --- /dev/null +++ b/package/sdl-image/patches/patch-IMG_png_c @@ -0,0 +1,160 @@ +--- SDL_image-1.2.10.orig/IMG_png.c 2009-11-08 11:55:32.000000000 +0100 ++++ SDL_image-1.2.10/IMG_png.c 2011-04-01 20:26:38.981819248 +0200 +@@ -71,6 +71,10 @@ + #endif + #include <png.h> + ++/* Check for the older version of libpng */ ++#if (PNG_LIBPNG_VER_MAJOR == 1) && (PNG_LIBPNG_VER_MINOR < 4) ++#define LIBPNG_VERSION_12 ++#endif + + static struct { + int loaded; +@@ -80,6 +84,8 @@ static struct { + void (*png_destroy_read_struct) (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr); + png_uint_32 (*png_get_IHDR) (png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_method, int *compression_method, int *filter_method); + png_voidp (*png_get_io_ptr) (png_structp png_ptr); ++ png_byte (*png_get_channels) (png_structp png_ptr, png_infop info_ptr); ++ png_uint_32 (*png_get_PLTE) (png_structp png_ptr, png_infop info_ptr, png_colorp *palette, int *num_palette); + png_uint_32 (*png_get_tRNS) (png_structp png_ptr, png_infop info_ptr, png_bytep *trans, int *num_trans, png_color_16p *trans_values); + png_uint_32 (*png_get_valid) (png_structp png_ptr, png_infop info_ptr, png_uint_32 flag); + void (*png_read_image) (png_structp png_ptr, png_bytepp image); +@@ -91,6 +97,9 @@ static struct { + void (*png_set_read_fn) (png_structp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn); + void (*png_set_strip_16) (png_structp png_ptr); + int (*png_sig_cmp) (png_bytep sig, png_size_t start, png_size_t num_to_check); ++#ifndef LIBPNG_VERSION_12 ++ jmp_buf* (*png_set_longjmp_fn) (png_structp, png_longjmp_ptr, size_t); ++#endif + } lib; + + #ifdef LOAD_PNG_DYNAMIC +@@ -129,6 +138,13 @@ int IMG_InitPNG() + SDL_UnloadObject(lib.handle); + return -1; + } ++ lib.png_get_channels = ++ (png_byte (*) (png_structp, png_infop)) ++ SDL_LoadFunction(lib.handle, "png_get_channels"); ++ if ( lib.png_get_channels == NULL ) { ++ SDL_UnloadObject(lib.handle); ++ return -1; ++ } + lib.png_get_io_ptr = + (png_voidp (*) (png_structp)) + SDL_LoadFunction(lib.handle, "png_get_io_ptr"); +@@ -136,6 +152,13 @@ int IMG_InitPNG() + SDL_UnloadObject(lib.handle); + return -1; + } ++ lib.png_get_PLTE = ++ (png_uint_32 (*) (png_structp, png_infop, png_colorp *, int *)) ++ SDL_LoadFunction(lib.handle, "png_get_PLTE"); ++ if ( lib.png_get_PLTE == NULL ) { ++ SDL_UnloadObject(lib.handle); ++ return -1; ++ } + lib.png_get_tRNS = + (png_uint_32 (*) (png_structp, png_infop, png_bytep *, int *, png_color_16p *)) + SDL_LoadFunction(lib.handle, "png_get_tRNS"); +@@ -213,6 +236,15 @@ int IMG_InitPNG() + SDL_UnloadObject(lib.handle); + return -1; + } ++#ifndef LIBPNG_VERSION_12 ++ lib.png_set_longjmp_fn = ++ (jmp_buf * (*) (png_structp, png_longjmp_ptr, size_t)) ++ SDL_LoadFunction(lib.handle, "png_set_longjmp_fn"); ++ if ( lib.png_set_longjmp_fn == NULL ) { ++ SDL_UnloadObject(lib.handle); ++ return -1; ++ } ++#endif + } + ++lib.loaded; + +@@ -236,7 +268,9 @@ int IMG_InitPNG() + lib.png_create_read_struct = png_create_read_struct; + lib.png_destroy_read_struct = png_destroy_read_struct; + lib.png_get_IHDR = png_get_IHDR; ++ lib.png_get_channels = png_get_channels; + lib.png_get_io_ptr = png_get_io_ptr; ++ lib.png_get_PLTE = png_get_PLTE; + lib.png_get_tRNS = png_get_tRNS; + lib.png_get_valid = png_get_valid; + lib.png_read_image = png_read_image; +@@ -248,6 +282,9 @@ int IMG_InitPNG() + lib.png_set_read_fn = png_set_read_fn; + lib.png_set_strip_16 = png_set_strip_16; + lib.png_sig_cmp = png_sig_cmp; ++#ifndef LIBPNG_VERSION_12 ++ lib.png_set_longjmp_fn = png_set_longjmp_fn; ++#endif + } + ++lib.loaded; + +@@ -347,7 +384,12 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s + * the normal method of doing things with libpng). REQUIRED unless you + * set up your own error handlers in png_create_read_struct() earlier. + */ +- if ( setjmp(png_ptr->jmpbuf) ) { ++#ifndef LIBPNG_VERSION_12 ++ if ( setjmp(*lib.png_set_longjmp_fn(png_ptr, longjmp, sizeof (jmp_buf))) ) ++#else ++ if ( setjmp(png_ptr->jmpbuf) ) ++#endif ++ { + error = "Error reading the PNG file."; + goto done; + } +@@ -416,9 +458,9 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s + Rmask = 0x000000FF; + Gmask = 0x0000FF00; + Bmask = 0x00FF0000; +- Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0; ++ Amask = (lib.png_get_channels(png_ptr, info_ptr) == 4) ? 0xFF000000 : 0; + } else { +- int s = (info_ptr->channels == 4) ? 0 : 8; ++ int s = (lib.png_get_channels(png_ptr, info_ptr) == 4) ? 0 : 8; + Rmask = 0xFF000000 >> s; + Gmask = 0x00FF0000 >> s; + Bmask = 0x0000FF00 >> s; +@@ -426,7 +468,7 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s + } + } + surface = SDL_AllocSurface(SDL_SWSURFACE, width, height, +- bit_depth*info_ptr->channels, Rmask,Gmask,Bmask,Amask); ++ bit_depth*lib.png_get_channels(png_ptr, info_ptr), Rmask,Gmask,Bmask,Amask); + if ( surface == NULL ) { + error = "Out of memory"; + goto done; +@@ -467,6 +509,9 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s + /* Load the palette, if any */ + palette = surface->format->palette; + if ( palette ) { ++ int png_num_palette; ++ png_colorp png_palette; ++ lib.png_get_PLTE(png_ptr, info_ptr, &png_palette, &png_num_palette); + if(color_type == PNG_COLOR_TYPE_GRAY) { + palette->ncolors = 256; + for(i = 0; i < 256; i++) { +@@ -474,12 +519,12 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s + palette->colors[i].g = i; + palette->colors[i].b = i; + } +- } else if (info_ptr->num_palette > 0 ) { +- palette->ncolors = info_ptr->num_palette; +- for( i=0; i<info_ptr->num_palette; ++i ) { +- palette->colors[i].b = info_ptr->palette[i].blue; +- palette->colors[i].g = info_ptr->palette[i].green; +- palette->colors[i].r = info_ptr->palette[i].red; ++ } else if (png_num_palette > 0 ) { ++ palette->ncolors = png_num_palette; ++ for( i=0; i<png_num_palette; ++i ) { ++ palette->colors[i].b = png_palette[i].blue; ++ palette->colors[i].g = png_palette[i].green; ++ palette->colors[i].r = png_palette[i].red; + } + } + } diff --git a/package/section.lst b/package/section.lst index 36bcde679..4648fc04d 100644 --- a/package/section.lst +++ b/package/section.lst @@ -39,9 +39,11 @@ admin System Administration utils Utilities www HTTP / FTP wifi Wireless +x11/lxde Lightweight X Desktop Environment x11/apps X applications x11/drivers X drivers x11/server X server x11/libs X libraries +x11/misc X Misc x11/fonts X fonts x11/devel X headers diff --git a/package/snort/Makefile b/package/snort/Makefile index 6321ac2f5..d8d1fc185 100644 --- a/package/snort/Makefile +++ b/package/snort/Makefile @@ -33,19 +33,19 @@ CONFIGURE_ARGS+= --disable-flexresp \ post-install: ${INSTALL_DIR} ${IDIR_SNORT}/usr/bin ${INSTALL_DIR} ${IDIR_SNORT}/etc/snort - ${INSTALL_DATA} ${WRKBUILD}/etc/snort.conf ${IDIR_SNORT}/etc/snort/ + ${INSTALL_DATA} ${WRKBUILD}/etc/snort.conf ${IDIR_SNORT}/etc/snort ${INSTALL_DATA} ${WRKBUILD}/etc/classification.config \ - ${IDIR_SNORT}/etc/snort/ + ${IDIR_SNORT}/etc/snort ${INSTALL_DATA} ${WRKBUILD}/etc/gen-msg.map \ - ${IDIR_SNORT}/etc/snort/ + ${IDIR_SNORT}/etc/snort ${INSTALL_DATA} ${WRKBUILD}/etc/reference.config \ - ${IDIR_SNORT}/etc/snort/ + ${IDIR_SNORT}/etc/snort ${INSTALL_DATA} ${WRKBUILD}/etc/sid-msg.map \ - ${IDIR_SNORT}/etc/snort/ + ${IDIR_SNORT}/etc/snort ${INSTALL_DATA} ${WRKBUILD}/etc/threshold.conf \ - ${IDIR_SNORT}/etc/snort/ + ${IDIR_SNORT}/etc/snort ${INSTALL_DATA} ${WRKBUILD}/etc/unicode.map \ - ${IDIR_SNORT}/etc/snort/ + ${IDIR_SNORT}/etc/snort ${INSTALL_BIN} ${WRKINST}/usr/bin/snort ${IDIR_SNORT}/usr/bin include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/speex/Makefile b/package/speex/Makefile index 873ad347a..db3b2bcc4 100644 --- a/package/speex/Makefile +++ b/package/speex/Makefile @@ -18,6 +18,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBSPEEX,libspeex,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ARGS+= --without-ogg --disable-oggtest --enable-fixed-point XAKE_FLAGS+= bin_PROGRAMS="" diff --git a/package/sqlite/Makefile b/package/sqlite/Makefile index 2b6c0fc4a..c9eab7a52 100644 --- a/package/sqlite/Makefile +++ b/package/sqlite/Makefile @@ -24,6 +24,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBSQLITE,libsqlite,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBSQLITE},${PKG_SECTION})) $(eval $(call PKG_template,SQLITE_CLI,sqlite-cli,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) CONFIGURE_ENV+= config_BUILD_CC="${CC_FOR_BUILD}" \ config_BUILD_CFLAGS="${CFLAGS_FOR_BUILD}" \ config_TARGET_CC="${TARGET_CC}" \ @@ -32,7 +33,7 @@ CONFIGURE_ENV+= config_BUILD_CC="${CC_FOR_BUILD}" \ config_TARGET_READLINE_LIBS="-L${STAGING_TARGET_DIR}/usr/lib -lreadline -lncurses" MAKE_FLAGS+= LIBPTHREAD=-lm -TARGET_CPPFLAGS+= -DSQLITE_SECURE_DELETE=1 +TARGET_CPPFLAGS+= -DSQLITE_SECURE_DELETE=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 libsqlite-install: ${INSTALL_DIR} ${IDIR_LIBSQLITE}/usr/lib diff --git a/package/uclibc/Makefile b/package/uclibc/Makefile index b15604125..b2d7c4dc1 100644 --- a/package/uclibc/Makefile +++ b/package/uclibc/Makefile @@ -46,11 +46,11 @@ endif done uclibc-dev-install: - ${INSTALL_DIR} ${IDIR_UCLIBC_DEV}/usr/lib + ${INSTALL_DIR} ${IDIR_UCLIBC_DEV}/usr/lib ${IDIR_UCLIBC_DEV}/lib ${CP} ${STAGING_TARGET_DIR}/usr/lib/libc.so ${IDIR_UCLIBC_DEV}/usr/lib ${CP} ${STAGING_TARGET_DIR}/usr/lib/uclibc_nonshared.a ${IDIR_UCLIBC_DEV}/usr/lib - ${CP} ${STAGING_TARGET_DIR}/usr/lib/crt* ${IDIR_UCLIBC_DEV}/usr/lib - -for file in libc libcrypt libdl libm libresolv librt libutil; do \ + ${CP} ${STAGING_TARGET_DIR}/usr/lib/crt*.o ${IDIR_UCLIBC_DEV}/usr/lib + for file in libcrypt libdl libm libresolv librt libutil; do \ cd $(IDIR_UCLIBC_DEV)/lib/; ln -sf $$file-$(PKG_VERSION).so $$file.so; \ done $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-linux-$(KERNEL_VERSION)-$(KERNEL_RELEASE)/linux-$(KERNEL_VERSION) ARCH=$(ARCH) V=1 \ diff --git a/package/vte/Makefile b/package/vte/Makefile new file mode 100644 index 000000000..931fc5344 --- /dev/null +++ b/package/vte/Makefile @@ -0,0 +1,27 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= vte +PKG_VERSION:= 0.27.5 +PKG_EXTRAVER:= 0.27 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 7155e90b78fb80f4ede9adf959931ef9 +PKG_DESCR:= an experimental terminal emulator widget +PKG_SECTION:= libs +PKG_BUILDDEP:= ncurses +PKG_URL:= http://www.gnome.org/ +PKG_SITES:= http://ftp.gnome.org/pub/GNOME/sources/vte/$(PKG_EXTRAVER)/ + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,VTE,vte,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +vte-install: + $(INSTALL_DIR) $(IDIR_VTE)/usr/lib + $(CP) $(WRKINST)/usr/lib/libvte*.so* $(IDIR_VTE)/usr/lib + $(INSTALL_DIR) $(IDIR_VTE)/usr/bin + $(INSTALL_BIN) $(WRKINST)/usr/bin/vte $(IDIR_VTE)/usr/bin + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/vte/patches/patch-config_sub b/package/vte/patches/patch-config_sub new file mode 100644 index 000000000..65d84a780 --- /dev/null +++ b/package/vte/patches/patch-config_sub @@ -0,0 +1,243 @@ +--- vte-0.27.5.orig/config.sub 2011-02-02 08:15:27.000000000 +0100 ++++ vte-0.27.5/config.sub 2010-11-26 15:32:59.100676381 +0100 +@@ -1,10 +1,10 @@ + #! /bin/sh + # Configuration validation subroutine script. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + # Free Software Foundation, Inc. + +-timestamp='2009-11-20' ++timestamp='2008-09-08' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +@@ -32,16 +32,13 @@ timestamp='2009-11-20' + + + # Please send patches to <config-patches@gnu.org>. Submit a context +-# diff and a properly formatted GNU ChangeLog entry. ++# diff and a properly formatted ChangeLog entry. + # + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. + # If it is invalid, we print an error message on stderr and exit with code 1. + # Otherwise, we print the canonical config type on stdout and succeed. + +-# You can get the latest version of this script from: +-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +- + # This file is supposed to be the same for all GNU packages + # and recognize all the CPU types, system types and aliases + # that are meaningful with *any* GNU software. +@@ -125,7 +122,6 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^- + case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ +- kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` +@@ -152,13 +148,10 @@ case $os in + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ +- -apple | -axis | -knuth | -cray | -microblaze) ++ -apple | -axis | -knuth | -cray) + os= + basic_machine=$1 + ;; +- -bluegene*) +- os=-cnk +- ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 +@@ -251,12 +244,11 @@ case $basic_machine in + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ +- | d10v | d30v | dlx | dsp16xx \ ++ | d10v | d30v | dlx | dsp16xx | dvp \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ +- | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ +@@ -278,7 +270,6 @@ case $basic_machine in + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ +- | moxie \ + | mt \ + | msp430 \ + | nios | nios2 \ +@@ -287,22 +278,20 @@ case $basic_machine in + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ +- | rx \ + | score \ +- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ ++ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ +- | ubicom32 \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; +- m6811 | m68hc11 | m6812 | m68hc12 | picochip) ++ m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none +@@ -342,10 +331,9 @@ case $basic_machine in + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ +- | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ +- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ ++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ +@@ -373,8 +361,8 @@ case $basic_machine in + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ +- | romp-* | rs6000-* | rx-* \ +- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ ++ | romp-* | rs6000-* \ ++ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ +@@ -382,7 +370,6 @@ case $basic_machine in + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | tron-* \ +- | ubicom32-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ +@@ -456,10 +443,6 @@ case $basic_machine in + basic_machine=m68k-apollo + os=-bsd + ;; +- aros) +- basic_machine=i386-pc +- os=-aros +- ;; + aux) + basic_machine=m68k-apple + os=-aux +@@ -476,10 +459,6 @@ case $basic_machine in + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; +- bluegene*) +- basic_machine=powerpc-ibm +- os=-cnk +- ;; + c90) + basic_machine=c90-cray + os=-unicos +@@ -732,9 +711,6 @@ case $basic_machine in + basic_machine=ns32k-utek + os=-sysv + ;; +- microblaze) +- basic_machine=microblaze-xilinx +- ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 +@@ -750,6 +726,24 @@ case $basic_machine in + basic_machine=m68k-atari + os=-mint + ;; ++ mipsEE* | ee | ps2) ++ basic_machine=mips64r5900el-scei ++ case $os in ++ -linux*) ++ ;; ++ *) ++ os=-elf ++ ;; ++ esac ++ ;; ++ iop) ++ basic_machine=mipsel-scei ++ os=-irx ++ ;; ++ dvp) ++ basic_machine=dvp-scei ++ os=-elf ++ ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; +@@ -1206,7 +1200,7 @@ case $basic_machine in + we32k) + basic_machine=we32k-att + ;; +- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) ++ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) +@@ -1256,9 +1250,6 @@ case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. +- -auroraux) +- os=-auroraux +- ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; +@@ -1279,11 +1270,10 @@ case $os in + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ +- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ +- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ +- | -sym* | -kopensolaris* \ ++ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ ++ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ +- | -aos* | -aros* \ ++ | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ +@@ -1302,7 +1292,7 @@ case $os in + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ +- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) ++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) +@@ -1632,7 +1622,7 @@ case $basic_machine in + -sunos*) + vendor=sun + ;; +- -cnk*|-aix*) ++ -aix*) + vendor=ibm + ;; + -beos*) diff --git a/package/vte/patches/patch-ltmain_sh b/package/vte/patches/patch-ltmain_sh new file mode 100644 index 000000000..e7a7ff760 --- /dev/null +++ b/package/vte/patches/patch-ltmain_sh @@ -0,0 +1,11 @@ +--- vte-0.27.5.orig/ltmain.sh 2011-02-02 08:15:19.000000000 +0100 ++++ vte-0.27.5/ltmain.sh 2011-03-18 11:30:26.133370623 +0100 +@@ -5840,7 +5840,7 @@ func_mode_link () + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ +- -O*|-flto*|-fwhopr*|-fuse-linker-plugin) ++ -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" diff --git a/package/xcb-proto/Makefile b/package/xcb-proto/Makefile index 93d8e8128..56b3db65a 100644 --- a/package/xcb-proto/Makefile +++ b/package/xcb-proto/Makefile @@ -23,9 +23,12 @@ include $(TOPDIR)/mk/python.mk CONFIGURE_ENV+= PYTHON=$(PYTHON) -post-build: +post-install: ${INSTALL_DIR} ${STAGING_DIR}/usr/share/xcb + $(INSTALL_DIR) ${STAGING_DIR}/usr/lib/python${PYTHON_VERSION}/site-packages/xcbgen ${CP} ${WRKBUILD}/src/*.xml ${STAGING_DIR}/usr/share/xcb + ${CP} ${WRKINST}/usr/lib/python${PYTHON_VERSION}/site-packages/xcbgen/*.py \ + ${STAGING_DIR}/usr/lib/python${PYTHON_VERSION}/site-packages/xcbgen xcb-proto-install: ${INSTALL_DIR} ${IDIR_XCB_PROTO}/usr/share diff --git a/package/xfsprogs/patches/patch-ltmain_sh b/package/xfsprogs/patches/patch-ltmain_sh new file mode 100644 index 000000000..6c5c11607 --- /dev/null +++ b/package/xfsprogs/patches/patch-ltmain_sh @@ -0,0 +1,11 @@ +--- xfsprogs-3.1.4.orig/ltmain.sh 2010-11-11 18:38:26.000000000 +0100 ++++ xfsprogs-3.1.4/ltmain.sh 2011-04-01 20:20:00.951819025 +0200 +@@ -4765,7 +4765,7 @@ func_mode_link () + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ +- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) ++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" diff --git a/package/xineramaproto/Makefile b/package/xineramaproto/Makefile new file mode 100644 index 000000000..9f920d70b --- /dev/null +++ b/package/xineramaproto/Makefile @@ -0,0 +1,25 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= xineramaproto +PKG_VERSION:= 1.2 +PKG_RELEASE:= 1 +PKG_DESCR:= Xinerama Extension headers +PKG_SECTION:= x11/devel +PKG_MD5SUM:= 1e98484ffa9b0eb6ab9d00cd53bfe74f +PKG_SITES:= http://xorg.freedesktop.org/releases/individual/proto/ + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,XINERAMAPROTO,xineramaproto,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) + +post-install: + ${INSTALL_DIR} ${IDIR_XINERAMAPROTO}/usr/include + ${CP} ${WRKINST}/usr/include/X11 ${IDIR_XINERAMAPROTO}/usr/include + ${INSTALL_DIR} ${IDIR_XINERAMAPROTO}/usr/lib/pkgconfig + ${INSTALL_DATA} ${WRKINST}/usr/lib/pkgconfig/*.pc \ + ${IDIR_XINERAMAPROTO}/usr/lib/pkgconfig + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/xset/Makefile b/package/xset/Makefile index fcba46b58..f82bd95ed 100644 --- a/package/xset/Makefile +++ b/package/xset/Makefile @@ -9,6 +9,7 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 9d8da492fc8f050c5de711d592d3c797 PKG_DESCR:= X set utility PKG_SECTION:= x11/apps +PKG_BUILDDEP:= libXmu PKG_URL:= http://xorg.freedesktop.org/ PKG_SITES:= ${MASTER_SITE_XORG} diff --git a/package/xterm/Makefile b/package/xterm/Makefile index 6c336d952..a7f267a81 100644 --- a/package/xterm/Makefile +++ b/package/xterm/Makefile @@ -9,8 +9,8 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 3945ab70cfa2a9e95804157ee1b0f8e8 PKG_DESCR:= Terminal Emulator for X Windows PKG_SECTION:= x11/apps -PKG_DEPENDS:= libxaw libxt -PKG_BUILDDEP:= libXt libXmu libXaw +PKG_DEPENDS:= libxaw libxt libncurses +PKG_BUILDDEP:= ncurses libXt libXmu libXaw PKG_URL:= http://invisible-island.net/xterm/xterm.html PKG_SITES:= ftp://invisible-island.net/xterm/ diff --git a/package/yasm/Makefile b/package/yasm/Makefile new file mode 100644 index 000000000..7567b5d9b --- /dev/null +++ b/package/yasm/Makefile @@ -0,0 +1,23 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= yasm +PKG_VERSION:= 1.1.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 8392e5f2235c2c2a981e1a633f2698cb +PKG_DESCR:= Modular Assembler Project +PKG_SECTION:= misc +PKG_URL:= http://www.tortall.net/projects/yasm/ +PKG_SITES:= http://www.tortall.net/projects/yasm/releases/ + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,YASM,yasm,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +yasm-install: + $(INSTALL_DIR) $(IDIR_YASM)/usr/bin + $(INSTALL_BIN) $(WRKINST)/usr/bin/yasm $(IDIR_YASM)/usr/bin + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/scripts/scan-pkgs.sh b/scripts/scan-pkgs.sh index 36f861d67..2faa334b6 100644 --- a/scripts/scan-pkgs.sh +++ b/scripts/scan-pkgs.sh @@ -66,6 +66,7 @@ if [[ -n $ADK_PACKAGE_GPSD ]]; then fi if [[ -n $ADK_PACKAGE_FIREFOX ]]; then + NEED_YASM="$NEED_YASM firefox" NEED_LIBIDL="$NEED_LIBIDL firefox" NEED_PYTHON="$NEED_PYTHON firefox" fi @@ -332,6 +333,13 @@ if [[ -n $NEED_FLEX ]]; then fi fi +if [[ -n $NEED_YASM ]]; then + if ! which yasm >/dev/null 2>&1; then + echo >&2 You need yasm to build $NEED_YASM + out=1 + fi +fi + if [[ -n $NEED_XSLTPROC ]]; then if ! which xsltproc >/dev/null 2>&1; then echo >&2 You need xsltproc to build $NEED_XSLTPROC diff --git a/target/config/Config.in b/target/config/Config.in index 7dd6c1947..33ae6f44f 100644 --- a/target/config/Config.in +++ b/target/config/Config.in @@ -180,6 +180,8 @@ config ADK_TARGET_CFLAGS config ADK_TARGET_CMDLINE string + default "console=tty no_auto_cmd" if ADK_TARGET_SYSTEM_LEMOTE_YEELONG + default "console=ttyS0,9600" if ADK_TARGET_SYSTEM_FON_FON2100 default "console=ttyS0,38400" if ADK_TARGET_SYSTEM_PCENGINES_WRAP default "console=ttyS0,115200 console=tty0 geodewdt.nowayout=1" if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C default "console=ttyS0,115200 console=tty0" if ADK_TARGET_SYSTEM_IBM_X40 @@ -285,6 +287,7 @@ default ADK_TARGET_ROOTFS_ARCHIVE config ADK_TARGET_ROOTFS_INITRAMFS bool "initramfs filesystem" depends on \ + ADK_LINUX_MIPS64EL || \ ADK_LINUX_PPC || \ ADK_LINUX_SPARC || \ ADK_LINUX_X86 || \ @@ -298,6 +301,7 @@ config ADK_TARGET_ROOTFS_INITRAMFS_PIGGYBACK bool "initramfs filesystem included into kernel image" select ADK_LINUX_INITRAMFS_BUILTIN depends on \ + ADK_LINUX_MIPS64EL || \ ADK_LINUX_PPC || \ ADK_LINUX_SPARC || \ ADK_LINUX_X86 || \ diff --git a/target/linux/Config.in b/target/linux/Config.in index 6d482b1ab..cf4890059 100644 --- a/target/linux/Config.in +++ b/target/linux/Config.in @@ -17,6 +17,7 @@ source target/linux/config/Config.in.bluetooth source target/linux/config/Config.in.watchdog source target/linux/config/Config.in.leds source target/linux/config/Config.in.misc +source target/linux/config/Config.in.mips source target/linux/config/Config.in.lib source target/linux/config/Config.in.pm source target/linux/config/Config.in.kvm diff --git a/target/linux/config/Config.in.block b/target/linux/config/Config.in.block index 1019477c1..a6f26dc71 100644 --- a/target/linux/config/Config.in.block +++ b/target/linux/config/Config.in.block @@ -97,6 +97,7 @@ config ADK_KERNEL_PATA_AMD default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D2 default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13 default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C + default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default n config ADK_KERNEL_PATA_SC1200 diff --git a/target/linux/config/Config.in.graphics b/target/linux/config/Config.in.graphics index b6834005f..1aafdf85f 100644 --- a/target/linux/config/Config.in.graphics +++ b/target/linux/config/Config.in.graphics @@ -10,6 +10,13 @@ config ADK_KERNEL_VT_CONSOLE default y if ADK_TARGET_WITH_VGA default n +config ADK_KERNEL_FONTS + boolean + +config ADK_KERNEL_FONT_8x16 + boolean + select ADK_KERNEL_FONTS + config ADK_KERNEL_FB boolean @@ -48,6 +55,18 @@ config ADK_KERNEL_FB_GEODE_LX help Framebuffer support for ALIX boards with VGA. +config ADK_KERNEL_FB_SM7XX + prompt "................................ Framebuffer support for Lemote Yeelong" + tristate + select ADK_KERNEL_FB + select ADK_KERNEL_FRAMEBUFFER_CONSOLE + select ADK_KERNEL_FONT_8x16 + default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG + default n + depends on ADK_TARGET_SYSTEM_LEMOTE_YEELONG + help + Framebuffer support for Lemote Yeelong. + config ADK_HARDWARE_GRAPHICS_INTEL_I915 prompt "................................ Support for Intel graphic cards (AGP/DRM/KMS)" boolean diff --git a/target/linux/config/Config.in.input b/target/linux/config/Config.in.input index 754cf7340..429c2ad73 100644 --- a/target/linux/config/Config.in.input +++ b/target/linux/config/Config.in.input @@ -5,6 +5,7 @@ config ADK_KERNEL_INPUT boolean default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C default y if ADK_TARGET_SYSTEM_IBM_X40 + default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default y if ADK_TARGET_SYSTEM_SHUTTLE_SA76G2 default n @@ -12,6 +13,7 @@ config ADK_KERNEL_INPUT_KEYBOARD boolean default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C default y if ADK_TARGET_SYSTEM_IBM_X40 + default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default y if ADK_TARGET_SYSTEM_SHUTTLE_SA76G2 default n @@ -19,6 +21,7 @@ config ADK_KERNEL_KEYBOARD_ATKBD boolean default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C default y if ADK_TARGET_SYSTEM_IBM_X40 + default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default y if ADK_TARGET_SYSTEM_SHUTTLE_SA76G2 default n @@ -26,6 +29,7 @@ config ADK_KERNEL_INPUT_MOUSE boolean default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C default y if ADK_TARGET_SYSTEM_IBM_X40 + default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default y if ADK_TARGET_SYSTEM_SHUTTLE_SA76G2 default n @@ -33,6 +37,7 @@ config ADK_KERNEL_INPUT_MOUSEDEV boolean default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C default y if ADK_TARGET_SYSTEM_IBM_X40 + default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default y if ADK_TARGET_SYSTEM_SHUTTLE_SA76G2 default n diff --git a/target/linux/config/Config.in.mips b/target/linux/config/Config.in.mips new file mode 100644 index 000000000..0b0d1ea4f --- /dev/null +++ b/target/linux/config/Config.in.mips @@ -0,0 +1,16 @@ +menu "MIPS devices support" + +config ADK_KERNEL_MIPS_PLATFORM_DEVICES + boolean + +config ADK_KERNEL_LEMOTE_YEELOONG2F + prompt ".................................. RTC support for PC CMOS" + boolean + select ADK_KERNEL_MIPS_PLATFORM_DEVICES + default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG + default n + depends on ADK_TARGET_SYSTEM_LEMOTE_YEELONG + help + Embedded controller suppport. + +endmenu diff --git a/target/linux/config/Config.in.netdevice b/target/linux/config/Config.in.netdevice index 6c30397a4..bbd2990e9 100644 --- a/target/linux/config/Config.in.netdevice +++ b/target/linux/config/Config.in.netdevice @@ -7,6 +7,9 @@ config ADK_KERNEL_NETDEVICES config ADK_KERNEL_NET_ETHERNET boolean +config ADK_KERNEL_PHYLIB + boolean + config ADK_KERNEL_MII boolean @@ -49,6 +52,17 @@ config ADK_KERNEL_NATSEMI default n help +config ADK_KERNEL_8139TOO + boolean + select ADK_KERNEL_NETDEVICES + select ADK_KERNEL_NET_ETHERNET + select ADK_KERNEL_NET_PCI + select ADK_KERNEL_MII + default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG + default n + help + + config ADK_KERNEL_VIA_RHINE boolean select ADK_KERNEL_NETDEVICES @@ -62,6 +76,17 @@ config ADK_KERNEL_VIA_RHINE default n help +config ADK_KERNEL_AR231X_ETHERNET + boolean + select ADK_KERNEL_NETDEVICES + select ADK_KERNEL_NET_ETHERNET + select ADK_KERNEL_NET_PCI + select ADK_KERNEL_MII + select ADK_KERNEL_PHYLIB + default y if ADK_TARGET_SYSTEM_FON_FON2100 + default n + help + config ADK_KERNEL_KORINA boolean select ADK_KERNEL_NETDEVICES diff --git a/target/linux/config/Config.in.systems b/target/linux/config/Config.in.systems index 5ded9d0cf..d744e45a1 100644 --- a/target/linux/config/Config.in.systems +++ b/target/linux/config/Config.in.systems @@ -1,4 +1,7 @@ # mips systems +config ADK_KERNEL_ATHEROS_AR231X + boolean + config ADK_KERNEL_MIPS_MALTA boolean @@ -17,6 +20,13 @@ config ADK_KERNEL_ATHEROS_AR71XX config ADK_KERNEL_AR71XX_MACH_RB4XX boolean +# mips64 systems +config ADK_KERNEL_MACH_LOONGSON + boolean + +config ADK_KERNEL_LEMOTE_MACH2F + boolean + # arm systems config ADK_KERNEL_ARCH_AT91 boolean diff --git a/target/linux/config/Config.in.usb b/target/linux/config/Config.in.usb index 52eb92864..e7905b531 100644 --- a/target/linux/config/Config.in.usb +++ b/target/linux/config/Config.in.usb @@ -21,6 +21,10 @@ config ADK_KERNEL_USB_UHCI_HCD boolean select ADK_PACKAGE_KMOD_USB_CONTROLLER +config ADK_KERNEL_USB_OHCI_HCD + boolean + select ADK_PACKAGE_KMOD_USB_CONTROLLER + config ADK_KPACKAGE_KMOD_USB prompt "kmod-usb......................... USB support" tristate @@ -30,6 +34,7 @@ config ADK_KPACKAGE_KMOD_USB default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D2 default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13 default y if ADK_TARGET_SYSTEM_IBM_X40 + default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default y if ADK_TARGET_SYSTEM_ACMESYSTEMS_FOXG20 default n help @@ -69,6 +74,7 @@ config ADK_KPACKAGE_KMOD_USB_UHCI_HCD depends on !ADK_KERNEL_USB_UHCI_HCD depends on !ADK_TARGET_SYSTEM_ACMESYSTEMS_FOXG20 default y if ADK_TARGET_SYSTEM_IBM_X40 + default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default n help The Universal Host Controller Interface is a standard by Intel for @@ -138,6 +144,7 @@ config ADK_KPACKAGE_KMOD_USB_EHCI_HCD default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D2 default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13 default y if ADK_TARGET_SYSTEM_IBM_X40 + default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default n help The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0 diff --git a/target/linux/patches/2.6.37/atheros.patch b/target/linux/patches/2.6.37/atheros.patch new file mode 100644 index 000000000..ee5184a00 --- /dev/null +++ b/target/linux/patches/2.6.37/atheros.patch @@ -0,0 +1,6332 @@ +diff -Nur linux-2.6.37.orig/arch/mips/Kbuild.platforms linux-2.6.37/arch/mips/Kbuild.platforms +--- linux-2.6.37.orig/arch/mips/Kbuild.platforms 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/arch/mips/Kbuild.platforms 2011-04-12 08:12:01.000000000 +0200 +@@ -5,6 +5,7 @@ + platforms += bcm47xx + platforms += bcm63xx + platforms += cavium-octeon ++platforms += ar231x + platforms += cobalt + platforms += dec + platforms += emma +diff -Nur linux-2.6.37.orig/arch/mips/Kconfig linux-2.6.37/arch/mips/Kconfig +--- linux-2.6.37.orig/arch/mips/Kconfig 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/arch/mips/Kconfig 2011-04-12 08:12:01.000000000 +0200 +@@ -102,6 +102,20 @@ + help + Support for BCM63XX based boards + ++config ATHEROS_AR231X ++ bool "Atheros 231x/531x SoC support" ++ select CEVT_R4K ++ select CSRC_R4K ++ select DMA_NONCOHERENT ++ select IRQ_CPU ++ select SYS_HAS_CPU_MIPS32_R1 ++ select SYS_SUPPORTS_BIG_ENDIAN ++ select SYS_SUPPORTS_32BIT_KERNEL ++ select GENERIC_GPIO ++ select SYS_HAS_EARLY_PRINTK ++ help ++ Support for AR231x and AR531x based boards ++ + config MIPS_COBALT + bool "Cobalt Server" + select CEVT_R4K +@@ -716,6 +730,7 @@ + + endchoice + ++source "arch/mips/ar231x/Kconfig" + source "arch/mips/alchemy/Kconfig" + source "arch/mips/bcm63xx/Kconfig" + source "arch/mips/jazz/Kconfig" +diff -Nur linux-2.6.37.orig/arch/mips/ar231x/Kconfig linux-2.6.37/arch/mips/ar231x/Kconfig +--- linux-2.6.37.orig/arch/mips/ar231x/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar231x/Kconfig 2011-04-12 08:12:33.000000000 +0200 +@@ -0,0 +1,27 @@ ++config ATHEROS_AR5312 ++ bool "Atheros 5312/2312+ support" ++ depends on ATHEROS_AR231X ++ default y ++ ++config ATHEROS_AR2315 ++ bool "Atheros 2315+ support" ++ depends on ATHEROS_AR231X ++ select DMA_NONCOHERENT ++ select CEVT_R4K ++ select CSRC_R4K ++ select IRQ_CPU ++ select SYS_HAS_CPU_MIPS32_R1 ++ select SYS_SUPPORTS_32BIT_KERNEL ++ select SYS_SUPPORTS_BIG_ENDIAN ++ select GENERIC_GPIO ++ default y ++ ++config ATHEROS_AR2315_PCI ++ bool "PCI support" ++ depends on ATHEROS_AR2315 ++ select HW_HAS_PCI ++ select PCI ++ select USB_ARCH_HAS_HCD ++ select USB_ARCH_HAS_OHCI ++ select USB_ARCH_HAS_EHCI ++ default y +diff -Nur linux-2.6.37.orig/arch/mips/ar231x/Makefile linux-2.6.37/arch/mips/ar231x/Makefile +--- linux-2.6.37.orig/arch/mips/ar231x/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar231x/Makefile 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,17 @@ ++# ++# This file is subject to the terms and conditions of the GNU General Public ++# License. See the file "COPYING" in the main directory of this archive ++# for more details. ++# ++# Copyright (C) 2006 FON Technology, SL. ++# Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org> ++# Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org> ++# ++ ++obj-y += board.o prom.o devices.o ++ ++obj-$(CONFIG_EARLY_PRINTK) += early_printk.o ++ ++obj-$(CONFIG_ATHEROS_AR5312) += ar5312.o ++obj-$(CONFIG_ATHEROS_AR2315) += ar2315.o ++obj-$(CONFIG_ATHEROS_AR2315_PCI) += pci.o +diff -Nur linux-2.6.37.orig/arch/mips/ar231x/Platform linux-2.6.37/arch/mips/ar231x/Platform +--- linux-2.6.37.orig/arch/mips/ar231x/Platform 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar231x/Platform 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,6 @@ ++# ++# Atheros AR5312/AR2312 WiSoC ++# ++platform-$(CONFIG_ATHEROS_AR231X) += ar231x/ ++cflags-$(CONFIG_ATHEROS_AR231X) += -I$(srctree)/arch/mips/include/asm/mach-ar231x ++load-$(CONFIG_ATHEROS_AR231X) += 0xffffffff80041000 +diff -Nur linux-2.6.37.orig/arch/mips/ar231x/ar2315.c linux-2.6.37/arch/mips/ar231x/ar2315.c +--- linux-2.6.37.orig/arch/mips/ar231x/ar2315.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar231x/ar2315.c 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,683 @@ ++/* ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright (C) 2003 Atheros Communications, Inc., All Rights Reserved. ++ * Copyright (C) 2006 FON Technology, SL. ++ * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org> ++ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> ++ */ ++ ++/* ++ * Platform devices for Atheros SoCs ++ */ ++ ++#include <generated/autoconf.h> ++#include <linux/init.h> ++#include <linux/module.h> ++#include <linux/types.h> ++#include <linux/string.h> ++#include <linux/platform_device.h> ++#include <linux/kernel.h> ++#include <linux/reboot.h> ++#include <linux/delay.h> ++#include <linux/leds.h> ++#include <asm/bootinfo.h> ++#include <asm/reboot.h> ++#include <asm/time.h> ++#include <asm/irq.h> ++#include <asm/io.h> ++#include <asm/gpio.h> ++ ++#include <ar231x_platform.h> ++#include <ar2315_regs.h> ++#include <ar231x.h> ++#include "devices.h" ++#include "ar2315.h" ++ ++static u32 gpiointmask = 0, gpiointval = 0; ++ ++static inline void ar2315_gpio_irq(void) ++{ ++ u32 pend; ++ int bit = -1; ++ ++ /* only do one gpio interrupt at a time */ ++ pend = (ar231x_read_reg(AR2315_GPIO_DI) ^ gpiointval) & gpiointmask; ++ ++ if (pend) { ++ bit = fls(pend) - 1; ++ pend &= ~(1 << bit); ++ gpiointval ^= (1 << bit); ++ } ++ ++ if (!pend) ++ ar231x_write_reg(AR2315_ISR, AR2315_ISR_GPIO); ++ ++ /* Enable interrupt with edge detection */ ++ if ((ar231x_read_reg(AR2315_GPIO_CR) & AR2315_GPIO_CR_M(bit)) != AR2315_GPIO_CR_I(bit)) ++ return; ++ ++ if (bit >= 0) ++ do_IRQ(AR531X_GPIO_IRQ_BASE + bit); ++} ++ ++#ifdef CONFIG_ATHEROS_AR2315_PCI ++static inline void pci_abort_irq(void) ++{ ++ ar231x_write_reg(AR2315_PCI_INT_STATUS, AR2315_PCI_ABORT_INT); ++} ++ ++static inline void pci_ack_irq(void) ++{ ++ ar231x_write_reg(AR2315_PCI_INT_STATUS, AR2315_PCI_EXT_INT); ++} ++ ++void ar2315_pci_irq(int irq) ++{ ++ if (ar231x_read_reg(AR2315_PCI_INT_STATUS) == AR2315_PCI_ABORT_INT) ++ pci_abort_irq(); ++ else { ++ do_IRQ(irq); ++ pci_ack_irq(); ++ } ++} ++#endif /* CONFIG_ATHEROS_AR2315_PCI */ ++ ++/* ++ * Called when an interrupt is received, this function ++ * determines exactly which interrupt it was, and it ++ * invokes the appropriate handler. ++ * ++ * Implicitly, we also define interrupt priority by ++ * choosing which to dispatch first. ++ */ ++static asmlinkage void ++ar2315_irq_dispatch(void) ++{ ++ int pending = read_c0_status() & read_c0_cause(); ++ ++ if (pending & CAUSEF_IP3) ++ do_IRQ(AR2315_IRQ_WLAN0_INTRS); ++ else if (pending & CAUSEF_IP4) ++ do_IRQ(AR2315_IRQ_ENET0_INTRS); ++#ifdef CONFIG_ATHEROS_AR2315_PCI ++ else if (pending & CAUSEF_IP5) ++ ar2315_pci_irq(AR2315_IRQ_LCBUS_PCI); ++#endif ++ else if (pending & CAUSEF_IP2) { ++ unsigned int misc_intr = ar231x_read_reg(AR2315_ISR) & ar231x_read_reg(AR2315_IMR); ++ ++ if (misc_intr & AR2315_ISR_SPI) ++ do_IRQ(AR531X_MISC_IRQ_SPI); ++ else if (misc_intr & AR2315_ISR_TIMER) ++ do_IRQ(AR531X_MISC_IRQ_TIMER); ++ else if (misc_intr & AR2315_ISR_AHB) ++ do_IRQ(AR531X_MISC_IRQ_AHB_PROC); ++ else if (misc_intr & AR2315_ISR_GPIO) ++ ar2315_gpio_irq(); ++ else if (misc_intr & AR2315_ISR_UART0) ++ do_IRQ(AR531X_MISC_IRQ_UART0); ++ else if (misc_intr & AR2315_ISR_WD) ++ do_IRQ(AR531X_MISC_IRQ_WATCHDOG); ++ else ++ do_IRQ(AR531X_MISC_IRQ_NONE); ++ } else if (pending & CAUSEF_IP7) ++ do_IRQ(AR531X_IRQ_CPU_CLOCK); ++} ++ ++static void ar2315_set_gpiointmask(int gpio, int level) ++{ ++ u32 reg; ++ ++ reg = ar231x_read_reg(AR2315_GPIO_INT); ++ reg &= ~(AR2315_GPIO_INT_M | AR2315_GPIO_INT_LVL_M); ++ reg |= gpio | AR2315_GPIO_INT_LVL(level); ++ ar231x_write_reg(AR2315_GPIO_INT, reg); ++} ++ ++static void ar2315_gpio_intr_enable(unsigned int irq) ++{ ++ unsigned int gpio = irq - AR531X_GPIO_IRQ_BASE; ++ ++ /* Enable interrupt with edge detection */ ++ if ((ar231x_read_reg(AR2315_GPIO_CR) & AR2315_GPIO_CR_M(gpio)) != AR2315_GPIO_CR_I(gpio)) ++ return; ++ ++ gpiointmask |= (1 << gpio); ++ ar2315_set_gpiointmask(gpio, 3); ++} ++ ++static unsigned int ar2315_gpio_intr_startup(unsigned int irq) ++{ ++ unsigned int gpio = irq - AR531X_GPIO_IRQ_BASE; ++ ++ /* reconfigure GPIO line as input */ ++ ar231x_mask_reg(AR2315_GPIO_CR, AR2315_GPIO_CR_M(gpio), AR2315_GPIO_CR_I(gpio)); ++ ar2315_gpio_intr_enable(irq); ++ return 0; ++} ++ ++static void ar2315_gpio_intr_disable(unsigned int irq) ++{ ++ unsigned int gpio = irq - AR531X_GPIO_IRQ_BASE; ++ ++ /* Disable interrupt */ ++ gpiointmask &= ~(1 << gpio); ++ ar2315_set_gpiointmask(gpio, 0); ++} ++ ++static void ++ar2315_gpio_intr_end(unsigned int irq) ++{ ++ if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) ++ ar2315_gpio_intr_enable(irq); ++} ++ ++static struct irq_chip ar2315_gpio_intr_controller = { ++ .name = "AR2315-GPIO", ++ .startup = ar2315_gpio_intr_startup, ++ .ack = ar2315_gpio_intr_disable, ++ .mask_ack = ar2315_gpio_intr_disable, ++ .mask = ar2315_gpio_intr_disable, ++ .unmask = ar2315_gpio_intr_enable, ++ .end = ar2315_gpio_intr_end, ++}; ++ ++static void ++ar2315_misc_intr_enable(unsigned int irq) ++{ ++ unsigned int imr; ++ ++ imr = ar231x_read_reg(AR2315_IMR); ++ switch(irq) { ++ case AR531X_MISC_IRQ_SPI: ++ imr |= AR2315_ISR_SPI; ++ break; ++ case AR531X_MISC_IRQ_TIMER: ++ imr |= AR2315_ISR_TIMER; ++ break; ++ case AR531X_MISC_IRQ_AHB_PROC: ++ imr |= AR2315_ISR_AHB; ++ break; ++ case AR531X_MISC_IRQ_GPIO: ++ imr |= AR2315_ISR_GPIO; ++ break; ++ case AR531X_MISC_IRQ_UART0: ++ imr |= AR2315_ISR_UART0; ++ break; ++ case AR531X_MISC_IRQ_WATCHDOG: ++ imr |= AR2315_ISR_WD; ++ break; ++ default: ++ break; ++ } ++ ar231x_write_reg(AR2315_IMR, imr); ++} ++ ++static void ++ar2315_misc_intr_disable(unsigned int irq) ++{ ++ unsigned int imr; ++ ++ imr = ar231x_read_reg(AR2315_IMR); ++ switch(irq) { ++ case AR531X_MISC_IRQ_SPI: ++ imr &= ~AR2315_ISR_SPI; ++ break; ++ case AR531X_MISC_IRQ_TIMER: ++ imr &= ~AR2315_ISR_TIMER; ++ break; ++ case AR531X_MISC_IRQ_AHB_PROC: ++ imr &= ~AR2315_ISR_AHB; ++ break; ++ case AR531X_MISC_IRQ_GPIO: ++ imr &= ~AR2315_ISR_GPIO; ++ break; ++ case AR531X_MISC_IRQ_UART0: ++ imr &= ~AR2315_ISR_UART0; ++ break; ++ case AR531X_MISC_IRQ_WATCHDOG: ++ imr &= ~AR2315_ISR_WD; ++ break; ++ default: ++ break; ++ } ++ ar231x_write_reg(AR2315_IMR, imr); ++} ++ ++static void ++ar2315_misc_intr_end(unsigned int irq) ++{ ++ if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) ++ ar2315_misc_intr_enable(irq); ++} ++ ++ ++static struct irq_chip ar2315_misc_intr_controller = { ++ .name = "AR2315-MISC", ++ .ack = ar2315_misc_intr_disable, ++ .mask_ack = ar2315_misc_intr_disable, ++ .mask = ar2315_misc_intr_disable, ++ .unmask = ar2315_misc_intr_enable, ++ .end = ar2315_misc_intr_end, ++}; ++ ++static irqreturn_t ar2315_ahb_proc_handler(int cpl, void *dev_id) ++{ ++ ar231x_write_reg(AR2315_AHB_ERR0, AHB_ERROR_DET); ++ ar231x_read_reg(AR2315_AHB_ERR1); ++ ++ printk(KERN_ERR "AHB fatal error\n"); ++ machine_restart("AHB error"); /* Catastrophic failure */ ++ ++ return IRQ_HANDLED; ++} ++ ++static struct irqaction ar2315_ahb_proc_interrupt = { ++ .handler = ar2315_ahb_proc_handler, ++ .flags = IRQF_DISABLED, ++ .name = "ar2315_ahb_proc_interrupt", ++}; ++ ++static struct irqaction cascade = { ++ .handler = no_action, ++ .flags = IRQF_DISABLED, ++ .name = "cascade", ++}; ++ ++void ++ar2315_irq_init(void) ++{ ++ int i; ++ ++ if (!is_2315()) ++ return; ++ ++ ar231x_irq_dispatch = ar2315_irq_dispatch; ++ gpiointval = ar231x_read_reg(AR2315_GPIO_DI); ++ for (i = 0; i < AR531X_MISC_IRQ_COUNT; i++) { ++ int irq = AR531X_MISC_IRQ_BASE + i; ++ set_irq_chip_and_handler(irq, &ar2315_misc_intr_controller, ++ handle_level_irq); ++ } ++ for (i = 0; i < AR531X_GPIO_IRQ_COUNT; i++) { ++ int irq = AR531X_GPIO_IRQ_BASE + i; ++ set_irq_chip_and_handler(irq, &ar2315_gpio_intr_controller, ++ handle_level_irq); ++ } ++ setup_irq(AR531X_MISC_IRQ_GPIO, &cascade); ++ setup_irq(AR531X_MISC_IRQ_AHB_PROC, &ar2315_ahb_proc_interrupt); ++ setup_irq(AR2315_IRQ_MISC_INTRS, &cascade); ++} ++ ++const struct ar231x_gpiodev ar2315_gpiodev; ++ ++static u32 ++ar2315_gpio_get_output(void) ++{ ++ u32 reg; ++ reg = ar231x_read_reg(AR2315_GPIO_CR); ++ reg &= ar2315_gpiodev.valid_mask; ++ return reg; ++} ++ ++static u32 ++ar2315_gpio_set_output(u32 mask, u32 val) ++{ ++ u32 reg; ++ ++ reg = ar231x_read_reg(AR2315_GPIO_CR); ++ reg &= ~mask; ++ reg |= val; ++ ar231x_write_reg(AR2315_GPIO_CR, reg); ++ return reg; ++} ++ ++static u32 ++ar2315_gpio_get(void) ++{ ++ u32 reg; ++ reg = ar231x_read_reg(AR2315_GPIO_DI); ++ reg &= ar2315_gpiodev.valid_mask; ++ return reg; ++} ++ ++static u32 ++ar2315_gpio_set(u32 mask, u32 value) ++{ ++ u32 reg; ++ reg = ar231x_read_reg(AR2315_GPIO_DO); ++ reg &= ~mask; ++ reg |= value; ++ ar231x_write_reg(AR2315_GPIO_DO, reg); ++ return reg; ++} ++ ++const struct ar231x_gpiodev ar2315_gpiodev = { ++ .valid_mask = (1 << 22) - 1, ++ .get_output = ar2315_gpio_get_output, ++ .set_output = ar2315_gpio_set_output, ++ .get = ar2315_gpio_get, ++ .set = ar2315_gpio_set, ++}; ++ ++static struct ar231x_eth ar2315_eth_data = { ++ .reset_base = AR2315_RESET, ++ .reset_mac = AR2315_RESET_ENET0, ++ .reset_phy = AR2315_RESET_EPHY0, ++ .phy_base = AR2315_ENET0, ++ .config = &ar231x_board, ++}; ++ ++static struct resource ar2315_spiflash_res[] = { ++ { ++ .name = "flash_base", ++ .flags = IORESOURCE_MEM, ++ .start = KSEG1ADDR(AR2315_SPI_READ), ++ .end = KSEG1ADDR(AR2315_SPI_READ) + 0x1000000 - 1, ++ }, ++ { ++ .name = "flash_regs", ++ .flags = IORESOURCE_MEM, ++ .start = 0x11300000, ++ .end = 0x11300012, ++ }, ++}; ++ ++static struct platform_device ar2315_spiflash = { ++ .id = 0, ++ .name = "spiflash", ++ .resource = ar2315_spiflash_res, ++ .num_resources = ARRAY_SIZE(ar2315_spiflash_res) ++}; ++ ++static struct platform_device ar2315_wdt = { ++ .id = 0, ++ .name = "ar2315_wdt", ++}; ++ ++#define SPI_FLASH_CTL 0x00 ++#define SPI_FLASH_OPCODE 0x04 ++#define SPI_FLASH_DATA 0x08 ++ ++static inline u32 ++spiflash_read_reg(int reg) ++{ ++ return ar231x_read_reg(KSEG1ADDR(AR2315_SPI) + reg); ++} ++ ++static inline void ++spiflash_write_reg(int reg, u32 data) ++{ ++ ar231x_write_reg(KSEG1ADDR(AR2315_SPI) + reg, data); ++} ++ ++static u32 ++spiflash_wait_status(void) ++{ ++ u32 reg; ++ ++ do { ++ reg = spiflash_read_reg(SPI_FLASH_CTL); ++ } while (reg & SPI_CTL_BUSY); ++ ++ return reg; ++} ++ ++static u8 ++spiflash_probe(void) ++{ ++ u32 reg; ++ ++ reg = spiflash_wait_status(); ++ reg &= ~SPI_CTL_TX_RX_CNT_MASK; ++ reg |= (1 << 4) | 4 | SPI_CTL_START; ++ ++ spiflash_write_reg(SPI_FLASH_OPCODE, 0xab); ++ spiflash_write_reg(SPI_FLASH_CTL, reg); ++ ++ reg = spiflash_wait_status(); ++ reg = spiflash_read_reg(SPI_FLASH_DATA); ++ reg &= 0xff; ++ ++ return (u8) reg; ++} ++ ++ ++#define STM_8MBIT_SIGNATURE 0x13 ++#define STM_16MBIT_SIGNATURE 0x14 ++#define STM_32MBIT_SIGNATURE 0x15 ++#define STM_64MBIT_SIGNATURE 0x16 ++#define STM_128MBIT_SIGNATURE 0x17 ++ ++static u8 __init * ++ar2315_flash_limit(void) ++{ ++ u32 flash_size = 0; ++ ++ /* probe the flash chip size */ ++ switch(spiflash_probe()) { ++ case STM_8MBIT_SIGNATURE: ++ flash_size = 0x00100000; ++ break; ++ case STM_16MBIT_SIGNATURE: ++ flash_size = 0x00200000; ++ break; ++ case STM_32MBIT_SIGNATURE: ++ flash_size = 0x00400000; ++ break; ++ case STM_64MBIT_SIGNATURE: ++ flash_size = 0x00800000; ++ break; ++ case STM_128MBIT_SIGNATURE: ++ flash_size = 0x01000000; ++ break; ++ } ++ ++ ar2315_spiflash_res[0].end = ar2315_spiflash_res[0].start + ++ flash_size - 1; ++ return (u8 *) ar2315_spiflash_res[0].end + 1; ++} ++ ++#ifdef CONFIG_LEDS_GPIO ++static struct gpio_led ar2315_leds[6]; ++static struct gpio_led_platform_data ar2315_led_data = { ++ .leds = (void *) ar2315_leds, ++}; ++ ++static struct platform_device ar2315_gpio_leds = { ++ .name = "leds-gpio", ++ .id = -1, ++ .dev = { ++ .platform_data = (void *) &ar2315_led_data, ++ } ++}; ++ ++static void __init ++ar2315_init_gpio(void) ++{ ++ static char led_names[6][6]; ++ int i, led = 0; ++ ++ ar2315_led_data.num_leds = 0; ++ for(i = 1; i < 8; i++) ++ { ++ if((i == AR2315_RESET_GPIO) || ++ (i == ar231x_board.config->resetConfigGpio)) ++ continue; ++ ++ if(i == ar231x_board.config->sysLedGpio) ++ strcpy(led_names[led], "wlan"); ++ else ++ sprintf(led_names[led], "gpio%d", i); ++ ++ ar2315_leds[led].name = led_names[led]; ++ ar2315_leds[led].gpio = i; ++ ar2315_leds[led].active_low = 0; ++ led++; ++ } ++ ar2315_led_data.num_leds = led; ++ platform_device_register(&ar2315_gpio_leds); ++} ++#else ++static inline void ar2315_init_gpio(void) ++{ ++} ++#endif ++ ++int __init ++ar2315_init_devices(void) ++{ ++ if (!is_2315()) ++ return 0; ++ ++ /* Find board configuration */ ++ ar231x_find_config(ar2315_flash_limit()); ++ ar2315_eth_data.macaddr = ar231x_board.config->enet0_mac; ++ ++ ar2315_init_gpio(); ++ platform_device_register(&ar2315_wdt); ++ platform_device_register(&ar2315_spiflash); ++ ar231x_add_ethernet(0, AR2315_ENET0, AR2315_IRQ_ENET0_INTRS, ++ &ar2315_eth_data); ++ ar231x_add_wmac(0, AR2315_WLAN0, AR2315_IRQ_WLAN0_INTRS); ++ ++ return 0; ++} ++ ++static void ++ar2315_restart(char *command) ++{ ++ void (*mips_reset_vec)(void) = (void *) 0xbfc00000; ++ ++ local_irq_disable(); ++ ++ /* try reset the system via reset control */ ++ ar231x_write_reg(AR2315_COLD_RESET,AR2317_RESET_SYSTEM); ++ ++ /* Cold reset does not work on the AR2315/6, use the GPIO reset bits a workaround. ++ * give it some time to attempt a gpio based hardware reset ++ * (atheros reference design workaround) */ ++ gpio_direction_output(AR2315_RESET_GPIO, 0); ++ mdelay(100); ++ ++ /* Some boards (e.g. Senao EOC-2610) don't implement the reset logic ++ * workaround. Attempt to jump to the mips reset location - ++ * the boot loader itself might be able to recover the system */ ++ mips_reset_vec(); ++} ++ ++ ++/* ++ * This table is indexed by bits 5..4 of the CLOCKCTL1 register ++ * to determine the predevisor value. ++ */ ++static int __initdata CLOCKCTL1_PREDIVIDE_TABLE[4] = { 1, 2, 4, 5 }; ++static int __initdata PLLC_DIVIDE_TABLE[5] = { 2, 3, 4, 6, 3 }; ++ ++static unsigned int __init ++ar2315_sys_clk(unsigned int clockCtl) ++{ ++ unsigned int pllcCtrl,cpuDiv; ++ unsigned int pllcOut,refdiv,fdiv,divby2; ++ unsigned int clkDiv; ++ ++ pllcCtrl = ar231x_read_reg(AR2315_PLLC_CTL); ++ refdiv = (pllcCtrl & PLLC_REF_DIV_M) >> PLLC_REF_DIV_S; ++ refdiv = CLOCKCTL1_PREDIVIDE_TABLE[refdiv]; ++ fdiv = (pllcCtrl & PLLC_FDBACK_DIV_M) >> PLLC_FDBACK_DIV_S; ++ divby2 = (pllcCtrl & PLLC_ADD_FDBACK_DIV_M) >> PLLC_ADD_FDBACK_DIV_S; ++ divby2 += 1; ++ pllcOut = (40000000/refdiv)*(2*divby2)*fdiv; ++ ++ ++ /* clkm input selected */ ++ switch(clockCtl & CPUCLK_CLK_SEL_M) { ++ case 0: ++ case 1: ++ clkDiv = PLLC_DIVIDE_TABLE[(pllcCtrl & PLLC_CLKM_DIV_M) >> PLLC_CLKM_DIV_S]; ++ break; ++ case 2: ++ clkDiv = PLLC_DIVIDE_TABLE[(pllcCtrl & PLLC_CLKC_DIV_M) >> PLLC_CLKC_DIV_S]; ++ break; ++ default: ++ pllcOut = 40000000; ++ clkDiv = 1; ++ break; ++ } ++ cpuDiv = (clockCtl & CPUCLK_CLK_DIV_M) >> CPUCLK_CLK_DIV_S; ++ cpuDiv = cpuDiv * 2 ?: 1; ++ return (pllcOut/(clkDiv * cpuDiv)); ++} ++ ++static inline unsigned int ++ar2315_cpu_frequency(void) ++{ ++ return ar2315_sys_clk(ar231x_read_reg(AR2315_CPUCLK)); ++} ++ ++static inline unsigned int ++ar2315_apb_frequency(void) ++{ ++ return ar2315_sys_clk(ar231x_read_reg(AR2315_AMBACLK)); ++} ++ ++void __init ++ar2315_time_init(void) ++{ ++ if (!is_2315()) ++ return; ++ ++ mips_hpt_frequency = ar2315_cpu_frequency() / 2; ++} ++ ++void __init ++ar2315_prom_init(void) ++{ ++ u32 memsize, memcfg, devid; ++ ++ if (!is_2315()) ++ return; ++ ++ memcfg = ar231x_read_reg(AR2315_MEM_CFG); ++ memsize = 1 + ((memcfg & SDRAM_DATA_WIDTH_M) >> SDRAM_DATA_WIDTH_S); ++ memsize <<= 1 + ((memcfg & SDRAM_COL_WIDTH_M) >> SDRAM_COL_WIDTH_S); ++ memsize <<= 1 + ((memcfg & SDRAM_ROW_WIDTH_M) >> SDRAM_ROW_WIDTH_S); ++ memsize <<= 3; ++ add_memory_region(0, memsize, BOOT_MEM_RAM); ++ ++ /* Detect the hardware based on the device ID */ ++ devid = ar231x_read_reg(AR2315_SREV) & AR2315_REV_CHIP; ++ switch(devid) { ++ case 0x90: ++ case 0x91: ++ ar231x_devtype = DEV_TYPE_AR2317; ++ break; ++ default: ++ ar231x_devtype = DEV_TYPE_AR2315; ++ break; ++ } ++ ar231x_gpiodev = &ar2315_gpiodev; ++ ar231x_board.devid = devid; ++} ++ ++void __init ++ar2315_plat_setup(void) ++{ ++ u32 config; ++ ++ if (!is_2315()) ++ return; ++ ++ /* Clear any lingering AHB errors */ ++ config = read_c0_config(); ++ write_c0_config(config & ~0x3); ++ ar231x_write_reg(AR2315_AHB_ERR0,AHB_ERROR_DET); ++ ar231x_read_reg(AR2315_AHB_ERR1); ++ ar231x_write_reg(AR2315_WDC, AR2315_WDC_IGNORE_EXPIRATION); ++ ++ _machine_restart = ar2315_restart; ++ ar231x_serial_setup(KSEG1ADDR(AR2315_UART0), ar2315_apb_frequency()); ++} +diff -Nur linux-2.6.37.orig/arch/mips/ar231x/ar2315.h linux-2.6.37/arch/mips/ar231x/ar2315.h +--- linux-2.6.37.orig/arch/mips/ar231x/ar2315.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar231x/ar2315.h 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,37 @@ ++#ifndef __AR2315_H ++#define __AR2315_H ++ ++#ifdef CONFIG_ATHEROS_AR2315 ++ ++extern void ar2315_irq_init(void); ++extern int ar2315_init_devices(void); ++extern void ar2315_prom_init(void); ++extern void ar2315_plat_setup(void); ++extern void ar2315_time_init(void); ++ ++#else ++ ++static inline void ar2315_irq_init(void) ++{ ++} ++ ++static inline int ar2315_init_devices(void) ++{ ++ return 0; ++} ++ ++static inline void ar2315_prom_init(void) ++{ ++} ++ ++static inline void ar2315_plat_setup(void) ++{ ++} ++ ++static inline void ar2315_time_init(void) ++{ ++} ++ ++#endif ++ ++#endif +diff -Nur linux-2.6.37.orig/arch/mips/ar231x/ar5312.c linux-2.6.37/arch/mips/ar231x/ar5312.c +--- linux-2.6.37.orig/arch/mips/ar231x/ar5312.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar231x/ar5312.c 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,549 @@ ++/* ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright (C) 2003 Atheros Communications, Inc., All Rights Reserved. ++ * Copyright (C) 2006 FON Technology, SL. ++ * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org> ++ * Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org> ++ */ ++ ++/* ++ * Platform devices for Atheros SoCs ++ */ ++ ++#include <generated/autoconf.h> ++#include <linux/init.h> ++#include <linux/module.h> ++#include <linux/types.h> ++#include <linux/string.h> ++#include <linux/mtd/physmap.h> ++#include <linux/platform_device.h> ++#include <linux/kernel.h> ++#include <linux/reboot.h> ++#include <linux/leds.h> ++#include <asm/bootinfo.h> ++#include <asm/reboot.h> ++#include <asm/time.h> ++#include <asm/irq.h> ++#include <asm/io.h> ++#include <gpio.h> ++ ++#include <ar231x_platform.h> ++#include <ar5312_regs.h> ++#include <ar231x.h> ++#include "devices.h" ++#include "ar5312.h" ++ ++static void ++ar5312_misc_irq_dispatch(void) ++{ ++ unsigned int ar231x_misc_intrs = ar231x_read_reg(AR531X_ISR) & ar231x_read_reg(AR531X_IMR); ++ ++ if (ar231x_misc_intrs & AR531X_ISR_TIMER) { ++ do_IRQ(AR531X_MISC_IRQ_TIMER); ++ (void)ar231x_read_reg(AR531X_TIMER); ++ } else if (ar231x_misc_intrs & AR531X_ISR_AHBPROC) ++ do_IRQ(AR531X_MISC_IRQ_AHB_PROC); ++ else if ((ar231x_misc_intrs & AR531X_ISR_UART0)) ++ do_IRQ(AR531X_MISC_IRQ_UART0); ++ else if (ar231x_misc_intrs & AR531X_ISR_WD) ++ do_IRQ(AR531X_MISC_IRQ_WATCHDOG); ++ else ++ do_IRQ(AR531X_MISC_IRQ_NONE); ++} ++ ++static asmlinkage void ++ar5312_irq_dispatch(void) ++{ ++ int pending = read_c0_status() & read_c0_cause(); ++ ++ if (pending & CAUSEF_IP2) ++ do_IRQ(AR5312_IRQ_WLAN0_INTRS); ++ else if (pending & CAUSEF_IP3) ++ do_IRQ(AR5312_IRQ_ENET0_INTRS); ++ else if (pending & CAUSEF_IP4) ++ do_IRQ(AR5312_IRQ_ENET1_INTRS); ++ else if (pending & CAUSEF_IP5) ++ do_IRQ(AR5312_IRQ_WLAN1_INTRS); ++ else if (pending & CAUSEF_IP6) ++ ar5312_misc_irq_dispatch(); ++ else if (pending & CAUSEF_IP7) ++ do_IRQ(AR531X_IRQ_CPU_CLOCK); ++} ++ ++ ++/* Enable the specified AR531X_MISC_IRQ interrupt */ ++static void ++ar5312_misc_intr_enable(unsigned int irq) ++{ ++ unsigned int imr; ++ ++ imr = ar231x_read_reg(AR531X_IMR); ++ imr |= (1 << (irq - AR531X_MISC_IRQ_BASE - 1)); ++ ar231x_write_reg(AR531X_IMR, imr); ++} ++ ++/* Disable the specified AR531X_MISC_IRQ interrupt */ ++static void ++ar5312_misc_intr_disable(unsigned int irq) ++{ ++ unsigned int imr; ++ ++ imr = ar231x_read_reg(AR531X_IMR); ++ imr &= ~(1 << (irq - AR531X_MISC_IRQ_BASE - 1)); ++ ar231x_write_reg(AR531X_IMR, imr); ++ ar231x_read_reg(AR531X_IMR); /* flush write buffer */ ++} ++ ++static void ++ar5312_misc_intr_end(unsigned int irq) ++{ ++ if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) ++ ar5312_misc_intr_enable(irq); ++} ++ ++static struct irq_chip ar5312_misc_intr_controller = { ++ .name = "AR5312-MISC", ++ .disable = ar5312_misc_intr_disable, ++ .ack = ar5312_misc_intr_disable, ++ .mask_ack = ar5312_misc_intr_disable, ++ .mask = ar5312_misc_intr_disable, ++ .unmask = ar5312_misc_intr_enable, ++ .end = ar5312_misc_intr_end, ++}; ++ ++ ++static irqreturn_t ar5312_ahb_proc_handler(int cpl, void *dev_id) ++{ ++ u32 proc1 = ar231x_read_reg(AR531X_PROC1); ++ u32 procAddr = ar231x_read_reg(AR531X_PROCADDR); /* clears error state */ ++ u32 dma1 = ar231x_read_reg(AR531X_DMA1); ++ u32 dmaAddr = ar231x_read_reg(AR531X_DMAADDR); /* clears error state */ ++ ++ printk("AHB interrupt: PROCADDR=0x%8.8x PROC1=0x%8.8x DMAADDR=0x%8.8x DMA1=0x%8.8x\n", ++ procAddr, proc1, dmaAddr, dma1); ++ ++ machine_restart("AHB error"); /* Catastrophic failure */ ++ return IRQ_HANDLED; ++} ++ ++ ++static struct irqaction ar5312_ahb_proc_interrupt = { ++ .handler = ar5312_ahb_proc_handler, ++ .flags = IRQF_DISABLED, ++ .name = "ar5312_ahb_proc_interrupt", ++}; ++ ++ ++static struct irqaction cascade = { ++ .handler = no_action, ++ .flags = IRQF_DISABLED, ++ .name = "cascade", ++}; ++ ++void __init ar5312_irq_init(void) ++{ ++ int i; ++ ++ if (!is_5312()) ++ return; ++ ++ ar231x_irq_dispatch = ar5312_irq_dispatch; ++ for (i = 0; i < AR531X_MISC_IRQ_COUNT; i++) { ++ int irq = AR531X_MISC_IRQ_BASE + i; ++ set_irq_chip_and_handler(irq, &ar5312_misc_intr_controller, ++ handle_level_irq); ++ } ++ setup_irq(AR531X_MISC_IRQ_AHB_PROC, &ar5312_ahb_proc_interrupt); ++ setup_irq(AR5312_IRQ_MISC_INTRS, &cascade); ++} ++ ++const struct ar231x_gpiodev ar5312_gpiodev; ++ ++static u32 ++ar5312_gpio_get_output(void) ++{ ++ u32 reg; ++ reg = ~(ar231x_read_reg(AR531X_GPIO_CR)); ++ reg &= ar5312_gpiodev.valid_mask; ++ return reg; ++} ++ ++static u32 ++ar5312_gpio_set_output(u32 mask, u32 val) ++{ ++ u32 reg; ++ ++ reg = ar231x_read_reg(AR531X_GPIO_CR); ++ reg |= mask; ++ reg &= ~val; ++ ar231x_write_reg(AR531X_GPIO_CR, reg); ++ return reg; ++} ++ ++static u32 ++ar5312_gpio_get(void) ++{ ++ u32 reg; ++ reg = ar231x_read_reg(AR531X_GPIO_DI); ++ reg &= ar5312_gpiodev.valid_mask; ++ return reg; ++} ++ ++static u32 ++ar5312_gpio_set(u32 mask, u32 value) ++{ ++ u32 reg; ++ reg = ar231x_read_reg(AR531X_GPIO_DO); ++ reg &= ~mask; ++ reg |= value; ++ ar231x_write_reg(AR531X_GPIO_DO, reg); ++ return reg; ++} ++ ++const struct ar231x_gpiodev ar5312_gpiodev = { ++ .valid_mask = (1 << 8) - 1, ++ .get_output = ar5312_gpio_get_output, ++ .set_output = ar5312_gpio_set_output, ++ .get = ar5312_gpio_get, ++ .set = ar5312_gpio_set, ++}; ++ ++static struct physmap_flash_data ar5312_flash_data = { ++ .width = 2, ++}; ++ ++static struct resource ar5312_flash_resource = { ++ .start = AR531X_FLASH, ++ .end = AR531X_FLASH + 0x800000 - 1, ++ .flags = IORESOURCE_MEM, ++}; ++ ++static struct ar231x_eth ar5312_eth0_data = { ++ .reset_base = AR531X_RESET, ++ .reset_mac = AR531X_RESET_ENET0, ++ .reset_phy = AR531X_RESET_EPHY0, ++ .phy_base = KSEG1ADDR(AR531X_ENET0), ++ .config = &ar231x_board, ++}; ++ ++static struct ar231x_eth ar5312_eth1_data = { ++ .reset_base = AR531X_RESET, ++ .reset_mac = AR531X_RESET_ENET1, ++ .reset_phy = AR531X_RESET_EPHY1, ++ .phy_base = KSEG1ADDR(AR531X_ENET1), ++ .config = &ar231x_board, ++}; ++ ++static struct platform_device ar5312_physmap_flash = { ++ .name = "physmap-flash", ++ .id = 0, ++ .dev.platform_data = &ar5312_flash_data, ++ .resource = &ar5312_flash_resource, ++ .num_resources = 1, ++}; ++ ++#ifdef CONFIG_LEDS_GPIO ++static struct gpio_led ar5312_leds[] = { ++ { .name = "wlan", .gpio = 0, .active_low = 1, }, ++}; ++ ++static const struct gpio_led_platform_data ar5312_led_data = { ++ .num_leds = ARRAY_SIZE(ar5312_leds), ++ .leds = (void *) ar5312_leds, ++}; ++ ++static struct platform_device ar5312_gpio_leds = { ++ .name = "leds-gpio", ++ .id = -1, ++ .dev.platform_data = (void *) &ar5312_led_data, ++}; ++#endif ++ ++/* ++ * NB: This mapping size is larger than the actual flash size, ++ * but this shouldn't be a problem here, because the flash ++ * will simply be mapped multiple times. ++ */ ++static char __init *ar5312_flash_limit(void) ++{ ++ u32 ctl; ++ /* ++ * Configure flash bank 0. ++ * Assume 8M window size. Flash will be aliased if it's smaller ++ */ ++ ctl = FLASHCTL_E | ++ FLASHCTL_AC_8M | ++ FLASHCTL_RBLE | ++ (0x01 << FLASHCTL_IDCY_S) | ++ (0x07 << FLASHCTL_WST1_S) | ++ (0x07 << FLASHCTL_WST2_S) | ++ (ar231x_read_reg(AR531X_FLASHCTL0) & FLASHCTL_MW); ++ ++ ar231x_write_reg(AR531X_FLASHCTL0, ctl); ++ ++ /* Disable other flash banks */ ++ ar231x_write_reg(AR531X_FLASHCTL1, ++ ar231x_read_reg(AR531X_FLASHCTL1) & ~(FLASHCTL_E | FLASHCTL_AC)); ++ ++ ar231x_write_reg(AR531X_FLASHCTL2, ++ ar231x_read_reg(AR531X_FLASHCTL2) & ~(FLASHCTL_E | FLASHCTL_AC)); ++ ++ return (char *) KSEG1ADDR(AR531X_FLASH + 0x800000); ++} ++ ++int __init ar5312_init_devices(void) ++{ ++ struct ar231x_boarddata *config; ++ u32 fctl = 0; ++ const u8 *radio; ++ u8 *c; ++ ++ if (!is_5312()) ++ return 0; ++ ++ /* Locate board/radio config data */ ++ ar231x_find_config(ar5312_flash_limit()); ++ config = ar231x_board.config; ++ ++ ++ /* ++ * Chip IDs and hardware detection for some Atheros ++ * models are really broken! ++ * ++ * Atheros uses a disabled WMAC0 and Silicon ID of AR5312 ++ * as indication for AR2312, which is otherwise ++ * indistinguishable from the real AR5312. ++ */ ++ if (ar231x_board.radio) { ++ radio = ar231x_board.radio + AR531X_RADIO_MASK_OFF; ++ if ((*((const u32 *) radio) & AR531X_RADIO0_MASK) == 0) ++ config->flags |= BD_ISCASPER; ++ } else ++ radio = NULL; ++ ++ /* AR2313 has CPU minor rev. 10 */ ++ if ((current_cpu_data.processor_id & 0xff) == 0x0a) ++ ar231x_devtype = DEV_TYPE_AR2313; ++ ++ /* AR2312 shares the same Silicon ID as AR5312 */ ++ else if (config->flags & BD_ISCASPER) ++ ar231x_devtype = DEV_TYPE_AR2312; ++ ++ /* Everything else is probably AR5312 or compatible */ ++ else ++ ar231x_devtype = DEV_TYPE_AR5312; ++ ++ /* fixup flash width */ ++ fctl = ar231x_read_reg(AR531X_FLASHCTL) & FLASHCTL_MW; ++ switch (fctl) { ++ case FLASHCTL_MWx16: ++ ar5312_flash_data.width = 2; ++ break; ++ case FLASHCTL_MWx8: ++ default: ++ ar5312_flash_data.width = 1; ++ break; ++ } ++ ++ platform_device_register(&ar5312_physmap_flash); ++ ++#ifdef CONFIG_LEDS_GPIO ++ ar5312_leds[0].gpio = config->sysLedGpio; ++ platform_device_register(&ar5312_gpio_leds); ++#endif ++ ++ /* Fix up MAC addresses if necessary */ ++ if (!memcmp(config->enet0_mac, "\xff\xff\xff\xff\xff\xff", 6)) ++ memcpy(config->enet0_mac, config->enet1_mac, 6); ++ ++ /* If ENET0 and ENET1 have the same mac address, ++ * increment the one from ENET1 */ ++ if (memcmp(config->enet0_mac, config->enet1_mac, 6) == 0) { ++ c = config->enet1_mac + 5; ++ while ((c >= config->enet1_mac) && !(++(*c))) ++ c--; ++ } ++ ++ switch(ar231x_devtype) { ++ case DEV_TYPE_AR5312: ++ ar5312_eth0_data.macaddr = config->enet0_mac; ++ ar231x_add_ethernet(0, KSEG1ADDR(AR531X_ENET0), ++ AR5312_IRQ_ENET0_INTRS, &ar5312_eth0_data); ++ ++ ar5312_eth1_data.macaddr = config->enet1_mac; ++ ar231x_add_ethernet(1, KSEG1ADDR(AR531X_ENET1), ++ AR5312_IRQ_ENET1_INTRS, &ar5312_eth1_data); ++ ++ if (!ar231x_board.radio) ++ return 0; ++ ++ if ((*((u32 *) radio) & AR531X_RADIO0_MASK) && ++ (config->flags & BD_WLAN0)) ++ ar231x_add_wmac(0, AR531X_WLAN0, ++ AR5312_IRQ_WLAN0_INTRS); ++ ++ break; ++ /* ++ * AR2312/3 ethernet uses the PHY of ENET0, but the MAC ++ * of ENET1. Atheros calls it 'twisted' for a reason :) ++ */ ++ case DEV_TYPE_AR2312: ++ case DEV_TYPE_AR2313: ++ ar5312_eth1_data.phy_base = ar5312_eth0_data.phy_base; ++ ar5312_eth1_data.reset_phy = ar5312_eth0_data.reset_phy; ++ ar5312_eth1_data.macaddr = config->enet0_mac; ++ ar231x_add_ethernet(0, KSEG1ADDR(AR531X_ENET1), ++ AR5312_IRQ_ENET1_INTRS, &ar5312_eth1_data); ++ ++ if (!ar231x_board.radio) ++ return 0; ++ break; ++ default: ++ break; ++ } ++ ++ if ((*((u32 *) radio) & AR531X_RADIO1_MASK) && ++ (config->flags & BD_WLAN1)) ++ ar231x_add_wmac(1, AR531X_WLAN1, ++ AR5312_IRQ_WLAN1_INTRS); ++ ++ return 0; ++} ++ ++ ++static void ar5312_restart(char *command) ++{ ++ /* reset the system */ ++ local_irq_disable(); ++ while(1) { ++ ar231x_write_reg(AR531X_RESET, AR531X_RESET_SYSTEM); ++ } ++} ++ ++ ++/* ++ * This table is indexed by bits 5..4 of the CLOCKCTL1 register ++ * to determine the predevisor value. ++ */ ++static int __initdata CLOCKCTL1_PREDIVIDE_TABLE[4] = { 1, 2, 4, 5 }; ++ ++ ++static int __init ++ar5312_cpu_frequency(void) ++{ ++ unsigned int result; ++ unsigned int predivide_mask, predivide_shift; ++ unsigned int multiplier_mask, multiplier_shift; ++ unsigned int clockCtl1, preDivideSelect, preDivisor, multiplier; ++ unsigned int doubler_mask; ++ u16 devid; ++ ++ /* Trust the bootrom's idea of cpu frequency. */ ++ if ((result = ar231x_read_reg(AR5312_SCRATCH))) ++ return result; ++ ++ devid = ar231x_read_reg(AR531X_REV); ++ devid &= AR531X_REV_MAJ; ++ devid >>= AR531X_REV_MAJ_S; ++ if (devid == AR531X_REV_MAJ_AR2313) { ++ predivide_mask = AR2313_CLOCKCTL1_PREDIVIDE_MASK; ++ predivide_shift = AR2313_CLOCKCTL1_PREDIVIDE_SHIFT; ++ multiplier_mask = AR2313_CLOCKCTL1_MULTIPLIER_MASK; ++ multiplier_shift = AR2313_CLOCKCTL1_MULTIPLIER_SHIFT; ++ doubler_mask = AR2313_CLOCKCTL1_DOUBLER_MASK; ++ } else { /* AR5312 and AR2312 */ ++ predivide_mask = AR5312_CLOCKCTL1_PREDIVIDE_MASK; ++ predivide_shift = AR5312_CLOCKCTL1_PREDIVIDE_SHIFT; ++ multiplier_mask = AR5312_CLOCKCTL1_MULTIPLIER_MASK; ++ multiplier_shift = AR5312_CLOCKCTL1_MULTIPLIER_SHIFT; ++ doubler_mask = AR5312_CLOCKCTL1_DOUBLER_MASK; ++ } ++ ++ /* ++ * Clocking is derived from a fixed 40MHz input clock. ++ * ++ * cpuFreq = InputClock * MULT (where MULT is PLL multiplier) ++ * sysFreq = cpuFreq / 4 (used for APB clock, serial, ++ * flash, Timer, Watchdog Timer) ++ * ++ * cntFreq = cpuFreq / 2 (use for CPU count/compare) ++ * ++ * So, for example, with a PLL multiplier of 5, we have ++ * ++ * cpuFreq = 200MHz ++ * sysFreq = 50MHz ++ * cntFreq = 100MHz ++ * ++ * We compute the CPU frequency, based on PLL settings. ++ */ ++ ++ clockCtl1 = ar231x_read_reg(AR5312_CLOCKCTL1); ++ preDivideSelect = (clockCtl1 & predivide_mask) >> predivide_shift; ++ preDivisor = CLOCKCTL1_PREDIVIDE_TABLE[preDivideSelect]; ++ multiplier = (clockCtl1 & multiplier_mask) >> multiplier_shift; ++ ++ if (clockCtl1 & doubler_mask) { ++ multiplier = multiplier << 1; ++ } ++ return (40000000 / preDivisor) * multiplier; ++} ++ ++static inline int ++ar5312_sys_frequency(void) ++{ ++ return ar5312_cpu_frequency() / 4; ++} ++ ++void __init ++ar5312_time_init(void) ++{ ++ if (!is_5312()) ++ return; ++ ++ mips_hpt_frequency = ar5312_cpu_frequency() / 2; ++} ++ ++ ++void __init ++ar5312_prom_init(void) ++{ ++ u32 memsize, memcfg, bank0AC, bank1AC; ++ u32 devid; ++ ++ if (!is_5312()) ++ return; ++ ++ /* Detect memory size */ ++ memcfg = ar231x_read_reg(AR531X_MEM_CFG1); ++ bank0AC = (memcfg & MEM_CFG1_AC0) >> MEM_CFG1_AC0_S; ++ bank1AC = (memcfg & MEM_CFG1_AC1) >> MEM_CFG1_AC1_S; ++ memsize = (bank0AC ? (1 << (bank0AC+1)) : 0) ++ + (bank1AC ? (1 << (bank1AC+1)) : 0); ++ memsize <<= 20; ++ add_memory_region(0, memsize, BOOT_MEM_RAM); ++ ++ devid = ar231x_read_reg(AR531X_REV); ++ devid >>= AR531X_REV_WMAC_MIN_S; ++ devid &= AR531X_REV_CHIP; ++ ar231x_board.devid = (u16) devid; ++ ar231x_gpiodev = &ar5312_gpiodev; ++} ++ ++void __init ++ar5312_plat_setup(void) ++{ ++ if (!is_5312()) ++ return; ++ ++ /* Clear any lingering AHB errors */ ++ ar231x_read_reg(AR531X_PROCADDR); ++ ar231x_read_reg(AR531X_DMAADDR); ++ ar231x_write_reg(AR531X_WD_CTRL, AR531X_WD_CTRL_IGNORE_EXPIRATION); ++ ++ _machine_restart = ar5312_restart; ++ ar231x_serial_setup(KSEG1ADDR(AR531X_UART0), ar5312_sys_frequency()); ++} ++ +diff -Nur linux-2.6.37.orig/arch/mips/ar231x/ar5312.h linux-2.6.37/arch/mips/ar231x/ar5312.h +--- linux-2.6.37.orig/arch/mips/ar231x/ar5312.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar231x/ar5312.h 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,38 @@ ++#ifndef __AR5312_H ++#define __AR5312_H ++ ++#ifdef CONFIG_ATHEROS_AR5312 ++ ++extern void ar5312_irq_init(void); ++extern int ar5312_init_devices(void); ++extern void ar5312_prom_init(void); ++extern void ar5312_plat_setup(void); ++extern void ar5312_time_init(void); ++extern void ar5312_time_init(void); ++ ++#else ++ ++static inline void ar5312_irq_init(void) ++{ ++} ++ ++static inline int ar5312_init_devices(void) ++{ ++ return 0; ++} ++ ++static inline void ar5312_prom_init(void) ++{ ++} ++ ++static inline void ar5312_plat_setup(void) ++{ ++} ++ ++static inline void ar5312_time_init(void) ++{ ++} ++ ++#endif ++ ++#endif +diff -Nur linux-2.6.37.orig/arch/mips/ar231x/board.c linux-2.6.37/arch/mips/ar231x/board.c +--- linux-2.6.37.orig/arch/mips/ar231x/board.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar231x/board.c 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,251 @@ ++/* ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright (C) 2003 Atheros Communications, Inc., All Rights Reserved. ++ * Copyright (C) 2006 FON Technology, SL. ++ * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org> ++ * Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org> ++ */ ++ ++#include <generated/autoconf.h> ++#include <linux/init.h> ++#include <linux/module.h> ++#include <linux/types.h> ++#include <linux/string.h> ++#include <linux/platform_device.h> ++#include <linux/kernel.h> ++#include <linux/random.h> ++#include <linux/etherdevice.h> ++#include <asm/irq_cpu.h> ++#include <asm/reboot.h> ++#include <asm/io.h> ++ ++#include <ar231x_platform.h> ++#include "devices.h" ++#include "ar5312.h" ++#include "ar2315.h" ++ ++void (*ar231x_irq_dispatch)(void); ++ ++static inline bool ++check_radio_magic(u8 *addr) ++{ ++ addr += 0x7a; /* offset for flash magic */ ++ if ((addr[0] == 0x5a) && (addr[1] == 0xa5)) { ++ return 1; ++ } ++ return 0; ++} ++ ++static inline bool ++check_board_data(u8 *flash_limit, u8 *addr, bool broken) ++{ ++ /* config magic found */ ++ if (*((u32 *)addr) == AR531X_BD_MAGIC) ++ return 1; ++ ++ if (!broken) ++ return 0; ++ ++ if (check_radio_magic(addr + 0xf8)) ++ ar231x_board.radio = addr + 0xf8; ++ if ((addr < flash_limit + 0x10000) && ++ check_radio_magic(addr + 0x10000)) ++ ar231x_board.radio = addr + 0x10000; ++ ++ if (ar231x_board.radio) { ++ /* broken board data detected, use radio data to find the offset, ++ * user will fix this */ ++ return 1; ++ } ++ return 0; ++} ++ ++static u8 * ++find_board_config(u8 *flash_limit, bool broken) ++{ ++ u8 *addr; ++ int found = 0; ++ ++ for (addr = flash_limit - 0x1000; ++ addr >= flash_limit - 0x30000; ++ addr -= 0x1000) { ++ ++ if (check_board_data(flash_limit, addr, broken)) { ++ found = 1; ++ break; ++ } ++ } ++ ++ if (!found) ++ addr = NULL; ++ ++ return addr; ++} ++ ++static u8 * ++find_radio_config(u8 *flash_limit, u8 *board_config) ++{ ++ int found; ++ u8 *radio_config; ++ ++ /* ++ * Now find the start of Radio Configuration data, using heuristics: ++ * Search forward from Board Configuration data by 0x1000 bytes ++ * at a time until we find non-0xffffffff. ++ */ ++ found = 0; ++ for (radio_config = board_config + 0x1000; ++ (radio_config < flash_limit); ++ radio_config += 0x1000) { ++ if ((*(u32 *)radio_config != 0xffffffff) && ++ check_radio_magic(radio_config)) { ++ found = 1; ++ break; ++ } ++ } ++ ++ /* AR2316 relocates radio config to new location */ ++ if (!found) { ++ for (radio_config = board_config + 0xf8; ++ (radio_config < flash_limit - 0x1000 + 0xf8); ++ radio_config += 0x1000) { ++ if ((*(u32 *)radio_config != 0xffffffff) && ++ check_radio_magic(radio_config)) { ++ found = 1; ++ break; ++ } ++ } ++ } ++ ++ if (!found) { ++ printk("Could not find Radio Configuration data\n"); ++ radio_config = 0; ++ } ++ ++ return (u8 *) radio_config; ++} ++ ++int __init ++ar231x_find_config(u8 *flash_limit) ++{ ++ struct ar231x_boarddata *config; ++ unsigned int rcfg_size; ++ int broken_boarddata = 0; ++ u8 *bcfg, *rcfg; ++ u8 *board_data; ++ u8 *radio_data; ++ u32 offset; ++ ++ ar231x_board.config = NULL; ++ ar231x_board.radio = NULL; ++ /* Copy the board and radio data to RAM, because accessing the mapped ++ * memory of the flash directly after booting is not safe */ ++ ++ /* Try to find valid board and radio data */ ++ bcfg = find_board_config(flash_limit, false); ++ ++ /* If that fails, try to at least find valid radio data */ ++ if (!bcfg) { ++ bcfg = find_board_config(flash_limit, true); ++ broken_boarddata = 1; ++ } ++ ++ if (!bcfg) { ++ printk(KERN_WARNING "WARNING: No board configuration data found!\n"); ++ return -ENODEV; ++ } ++ ++ board_data = kzalloc(BOARD_CONFIG_BUFSZ, GFP_KERNEL); ++ ar231x_board.config = (struct ar231x_boarddata *) board_data; ++ memcpy(board_data, bcfg, 0x100); ++ if (broken_boarddata) { ++ printk(KERN_WARNING "WARNING: broken board data detected\n"); ++ config = ar231x_board.config; ++ if (!memcmp(config->enet0_mac, "\x00\x00\x00\x00\x00\x00", 6)) { ++ printk(KERN_INFO "Fixing up empty mac addresses\n"); ++ config->resetConfigGpio = 0xffff; ++ config->sysLedGpio = 0xffff; ++ random_ether_addr(config->wlan0_mac); ++ config->wlan0_mac[0] &= ~0x06; ++ random_ether_addr(config->enet0_mac); ++ random_ether_addr(config->enet1_mac); ++ } ++ } ++ ++ ++ /* Radio config starts 0x100 bytes after board config, regardless ++ * of what the physical layout on the flash chip looks like */ ++ ++ if (ar231x_board.radio) ++ rcfg = (u8 *) ar231x_board.radio; ++ else ++ rcfg = find_radio_config(flash_limit, bcfg); ++ ++ if (!rcfg) ++ return -ENODEV; ++ ++ radio_data = board_data + 0x100 + ((rcfg - bcfg) & 0xfff); ++ ar231x_board.radio = radio_data; ++ offset = radio_data - board_data; ++ printk(KERN_INFO "Radio config found at offset 0x%x(0x%x)\n", rcfg - bcfg, offset); ++ rcfg_size = BOARD_CONFIG_BUFSZ - offset; ++ memcpy(radio_data, rcfg, rcfg_size); ++ ++ return 0; ++} ++ ++static void ++ar231x_halt(void) ++{ ++ local_irq_disable(); ++ while (1); ++} ++ ++void __init ++plat_mem_setup(void) ++{ ++ _machine_halt = ar231x_halt; ++ pm_power_off = ar231x_halt; ++ ++ ar5312_plat_setup(); ++ ar2315_plat_setup(); ++ ++ /* Disable data watchpoints */ ++ write_c0_watchlo0(0); ++} ++ ++ ++asmlinkage void ++plat_irq_dispatch(void) ++{ ++ ar231x_irq_dispatch(); ++} ++ ++void __init ++plat_time_init(void) ++{ ++ ar5312_time_init(); ++ ar2315_time_init(); ++} ++ ++unsigned int __cpuinit ++get_c0_compare_int(void) ++{ ++ return CP0_LEGACY_COMPARE_IRQ; ++} ++ ++void __init ++arch_init_irq(void) ++{ ++ clear_c0_status(ST0_IM); ++ mips_cpu_irq_init(); ++ ++ /* Initialize interrupt controllers */ ++ ar5312_irq_init(); ++ ar2315_irq_init(); ++} ++ ++ +diff -Nur linux-2.6.37.orig/arch/mips/ar231x/devices.c linux-2.6.37/arch/mips/ar231x/devices.c +--- linux-2.6.37.orig/arch/mips/ar231x/devices.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar231x/devices.c 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,175 @@ ++#include <linux/kernel.h> ++#include <linux/init.h> ++#include <linux/serial.h> ++#include <linux/serial_core.h> ++#include <linux/serial_8250.h> ++#include <linux/platform_device.h> ++#include <ar231x_platform.h> ++#include <ar231x.h> ++#include "devices.h" ++#include "ar5312.h" ++#include "ar2315.h" ++ ++struct ar231x_board_config ar231x_board; ++int ar231x_devtype = DEV_TYPE_UNKNOWN; ++const struct ar231x_gpiodev *ar231x_gpiodev; ++EXPORT_SYMBOL(ar231x_gpiodev); ++ ++static struct resource ar231x_eth0_res[] = { ++ { ++ .name = "eth0_membase", ++ .flags = IORESOURCE_MEM, ++ }, ++ { ++ .name = "eth0_irq", ++ .flags = IORESOURCE_IRQ, ++ } ++}; ++ ++static struct resource ar231x_eth1_res[] = { ++ { ++ .name = "eth1_membase", ++ .flags = IORESOURCE_MEM, ++ }, ++ { ++ .name = "eth1_irq", ++ .flags = IORESOURCE_IRQ, ++ } ++}; ++ ++static struct platform_device ar231x_eth[] = { ++ { ++ .id = 0, ++ .name = "ar231x-eth", ++ .resource = ar231x_eth0_res, ++ .num_resources = ARRAY_SIZE(ar231x_eth0_res) ++ }, ++ { ++ .id = 1, ++ .name = "ar231x-eth", ++ .resource = ar231x_eth1_res, ++ .num_resources = ARRAY_SIZE(ar231x_eth1_res) ++ } ++}; ++ ++static struct resource ar231x_wmac0_res[] = { ++ { ++ .name = "wmac0_membase", ++ .flags = IORESOURCE_MEM, ++ }, ++ { ++ .name = "wmac0_irq", ++ .flags = IORESOURCE_IRQ, ++ } ++}; ++ ++static struct resource ar231x_wmac1_res[] = { ++ { ++ .name = "wmac1_membase", ++ .flags = IORESOURCE_MEM, ++ }, ++ { ++ .name = "wmac1_irq", ++ .flags = IORESOURCE_IRQ, ++ } ++}; ++ ++ ++static struct platform_device ar231x_wmac[] = { ++ { ++ .id = 0, ++ .name = "ar231x-wmac", ++ .resource = ar231x_wmac0_res, ++ .num_resources = ARRAY_SIZE(ar231x_wmac0_res), ++ .dev.platform_data = &ar231x_board, ++ }, ++ { ++ .id = 1, ++ .name = "ar231x-wmac", ++ .resource = ar231x_wmac1_res, ++ .num_resources = ARRAY_SIZE(ar231x_wmac1_res), ++ .dev.platform_data = &ar231x_board, ++ }, ++}; ++ ++static const char *devtype_strings[] = { ++ [DEV_TYPE_AR5312] = "Atheros AR5312", ++ [DEV_TYPE_AR2312] = "Atheros AR2312", ++ [DEV_TYPE_AR2313] = "Atheros AR2313", ++ [DEV_TYPE_AR2315] = "Atheros AR2315", ++ [DEV_TYPE_AR2316] = "Atheros AR2316", ++ [DEV_TYPE_AR2317] = "Atheros AR2317", ++ [DEV_TYPE_UNKNOWN] = "Atheros (unknown)", ++}; ++ ++const char *get_system_type(void) ++{ ++ if ((ar231x_devtype >= ARRAY_SIZE(devtype_strings)) || ++ !devtype_strings[ar231x_devtype]) ++ return devtype_strings[DEV_TYPE_UNKNOWN]; ++ return devtype_strings[ar231x_devtype]; ++} ++ ++ ++int __init ++ar231x_add_ethernet(int nr, u32 base, int irq, void *pdata) ++{ ++ struct resource *res; ++ ++ ar231x_eth[nr].dev.platform_data = pdata; ++ res = &ar231x_eth[nr].resource[0]; ++ res->start = base; ++ res->end = base + 0x2000 - 1; ++ res++; ++ res->start = irq; ++ res->end = irq; ++ return platform_device_register(&ar231x_eth[nr]); ++} ++ ++void __init ++ar231x_serial_setup(u32 mapbase, unsigned int uartclk) ++{ ++ struct uart_port s; ++ ++ memset(&s, 0, sizeof(s)); ++ ++ s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; ++ s.iotype = UPIO_MEM; ++ s.irq = AR531X_MISC_IRQ_UART0; ++ s.regshift = 2; ++ s.mapbase = mapbase; ++ s.uartclk = uartclk; ++ s.membase = (void __iomem *)s.mapbase; ++ ++ early_serial_setup(&s); ++} ++ ++int __init ++ar231x_add_wmac(int nr, u32 base, int irq) ++{ ++ struct resource *res; ++ ++ ar231x_wmac[nr].dev.platform_data = &ar231x_board; ++ res = &ar231x_wmac[nr].resource[0]; ++ res->start = base; ++ res->end = base + 0x10000 - 1; ++ res++; ++ res->start = irq; ++ res->end = irq; ++ return platform_device_register(&ar231x_wmac[nr]); ++} ++ ++static int __init ar231x_register_devices(void) ++{ ++ static struct resource res = { ++ .start = 0xFFFFFFFF, ++ }; ++ ++ platform_device_register_simple("GPIODEV", 0, &res, 1); ++ ar5312_init_devices(); ++ ar2315_init_devices(); ++ ++ return 0; ++} ++ ++device_initcall(ar231x_register_devices); +diff -Nur linux-2.6.37.orig/arch/mips/ar231x/devices.h linux-2.6.37/arch/mips/ar231x/devices.h +--- linux-2.6.37.orig/arch/mips/ar231x/devices.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar231x/devices.h 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,37 @@ ++#ifndef __AR231X_DEVICES_H ++#define __AR231X_DEVICES_H ++ ++enum { ++ /* handled by ar5312.c */ ++ DEV_TYPE_AR2312, ++ DEV_TYPE_AR2313, ++ DEV_TYPE_AR5312, ++ ++ /* handled by ar2315.c */ ++ DEV_TYPE_AR2315, ++ DEV_TYPE_AR2316, ++ DEV_TYPE_AR2317, ++ ++ DEV_TYPE_UNKNOWN ++}; ++ ++extern int ar231x_devtype; ++extern struct ar231x_board_config ar231x_board; ++extern asmlinkage void (*ar231x_irq_dispatch)(void); ++ ++extern int ar231x_find_config(u8 *flash_limit); ++extern void ar231x_serial_setup(u32 mapbase, unsigned int uartclk); ++extern int ar231x_add_wmac(int nr, u32 base, int irq); ++extern int ar231x_add_ethernet(int nr, u32 base, int irq, void *pdata); ++ ++static inline bool is_2315(void) ++{ ++ return (current_cpu_data.cputype == CPU_4KEC); ++} ++ ++static inline bool is_5312(void) ++{ ++ return !is_2315(); ++} ++ ++#endif +diff -Nur linux-2.6.37.orig/arch/mips/ar231x/early_printk.c linux-2.6.37/arch/mips/ar231x/early_printk.c +--- linux-2.6.37.orig/arch/mips/ar231x/early_printk.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar231x/early_printk.c 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,44 @@ ++/* ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright (C) 2010 Gabor Juhos <juhosg@openwrt.org> ++ */ ++ ++#include <linux/mm.h> ++#include <linux/io.h> ++#include <linux/serial_reg.h> ++#include <asm/addrspace.h> ++ ++#include <asm/mach-ar231x/ar2315_regs.h> ++#include <asm/mach-ar231x/ar5312_regs.h> ++#include "devices.h" ++ ++static inline void prom_uart_wr(void __iomem *base, unsigned reg, ++ unsigned char ch) ++{ ++ __raw_writeb(ch, base + 4 * reg); ++} ++ ++static inline unsigned char prom_uart_rr(void __iomem *base, unsigned reg) ++{ ++ return __raw_readb(base + 4 * reg); ++} ++ ++void prom_putchar(unsigned char ch) ++{ ++ static void __iomem *base; ++ ++ if (unlikely(base == NULL)) { ++ if (is_2315()) ++ base = (void __iomem *)(KSEG1ADDR(AR2315_UART0)); ++ else ++ base = (void __iomem *)(KSEG1ADDR(AR531X_UART0)); ++ } ++ ++ while ((prom_uart_rr(base, UART_LSR) & UART_LSR_THRE) == 0); ++ prom_uart_wr(base, UART_TX, ch); ++ while ((prom_uart_rr(base, UART_LSR) & UART_LSR_THRE) == 0); ++} ++ +diff -Nur linux-2.6.37.orig/arch/mips/ar231x/pci.c linux-2.6.37/arch/mips/ar231x/pci.c +--- linux-2.6.37.orig/arch/mips/ar231x/pci.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar231x/pci.c 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,230 @@ ++/* ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ * ++ * This program 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 General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ */ ++ ++#include <linux/types.h> ++#include <linux/pci.h> ++#include <linux/kernel.h> ++#include <linux/init.h> ++#include <linux/mm.h> ++#include <linux/spinlock.h> ++#include <linux/delay.h> ++#include <linux/irq.h> ++#include <asm/bootinfo.h> ++#include <asm/paccess.h> ++#include <asm/irq_cpu.h> ++#include <asm/io.h> ++#include <ar231x_platform.h> ++#include <ar231x.h> ++#include <ar2315_regs.h> ++#include "devices.h" ++ ++#define AR531X_MEM_BASE 0x80800000UL ++#define AR531X_MEM_SIZE 0x00ffffffUL ++#define AR531X_IO_SIZE 0x00007fffUL ++ ++static unsigned long configspace; ++ ++static int config_access(int devfn, int where, int size, u32 *ptr, bool write) ++{ ++ unsigned long flags; ++ int func = PCI_FUNC(devfn); ++ int dev = PCI_SLOT(devfn); ++ u32 value = 0; ++ int err = 0; ++ u32 addr; ++ ++ if (((dev != 0) && (dev != 3)) || (func > 2)) ++ return PCIBIOS_DEVICE_NOT_FOUND; ++ ++ /* Select Configuration access */ ++ local_irq_save(flags); ++ ar231x_mask_reg(AR2315_PCI_MISC_CONFIG, 0, AR2315_PCIMISC_CFG_SEL); ++ mb(); ++ ++ addr = (u32) configspace + (1 << (13 + dev)) + (func << 8) + where; ++ if (size == 1) ++ addr ^= 0x3; ++ else if (size == 2) ++ addr ^= 0x2; ++ ++ if (write) { ++ value = *ptr; ++ if (size == 1) ++ err = put_dbe(value, (u8 *) addr); ++ else if (size == 2) ++ err = put_dbe(value, (u16 *) addr); ++ else if (size == 4) ++ err = put_dbe(value, (u32 *) addr); ++ } else { ++ if (size == 1) ++ err = get_dbe(value, (u8 *) addr); ++ else if (size == 2) ++ err = get_dbe(value, (u16 *) addr); ++ else if (size == 4) ++ err = get_dbe(value, (u32 *) addr); ++ if (err) ++ *ptr = 0xffffffff; ++ else ++ *ptr = value; ++ } ++ ++ /* Select Memory access */ ++ ar231x_mask_reg(AR2315_PCI_MISC_CONFIG, AR2315_PCIMISC_CFG_SEL, 0); ++ local_irq_restore(flags); ++ ++ return (err ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL); ++} ++ ++static int ar231x_pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * value) ++{ ++ return config_access(devfn, where, size, value, 0); ++} ++ ++static int ar231x_pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 value) ++{ ++ return config_access(devfn, where, size, &value, 1); ++} ++ ++struct pci_ops ar231x_pci_ops = { ++ .read = ar231x_pci_read, ++ .write = ar231x_pci_write, ++}; ++ ++static struct resource ar231x_mem_resource = { ++ .name = "AR531x PCI MEM", ++ .start = AR531X_MEM_BASE, ++ .end = AR531X_MEM_BASE + AR531X_MEM_SIZE - AR531X_IO_SIZE - 1 + 0x4000000, ++ .flags = IORESOURCE_MEM, ++}; ++ ++static struct resource ar231x_io_resource = { ++ .name = "AR531x PCI I/O", ++ .start = AR531X_MEM_BASE + AR531X_MEM_SIZE - AR531X_IO_SIZE, ++ .end = AR531X_MEM_BASE + AR531X_MEM_SIZE - 1, ++ .flags = IORESOURCE_IO, ++}; ++ ++struct pci_controller ar231x_pci_controller = { ++ .pci_ops = &ar231x_pci_ops, ++ .mem_resource = &ar231x_mem_resource, ++ .io_resource = &ar231x_io_resource, ++ .mem_offset = 0x00000000UL, ++ .io_offset = 0x00000000UL, ++}; ++ ++int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) ++{ ++ return AR2315_IRQ_LCBUS_PCI; ++} ++ ++int pcibios_plat_dev_init(struct pci_dev *dev) ++{ ++ pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 5); ++ pci_write_config_word(dev, 0x40, 0); ++ ++ /* Clear any pending Abort or external Interrupts ++ * and enable interrupt processing */ ++ ar231x_mask_reg(AR2315_PCI_INTEN_REG, AR2315_PCI_INT_ENABLE, 0); ++ ar231x_write_reg(AR2315_PCI_INT_STATUS, (AR2315_PCI_ABORT_INT | AR2315_PCI_EXT_INT)); ++ ar231x_write_reg(AR2315_PCI_INT_MASK, (AR2315_PCI_ABORT_INT | AR2315_PCI_EXT_INT)); ++ ar231x_mask_reg(AR2315_PCI_INTEN_REG, 0, AR2315_PCI_INT_ENABLE); ++ ++ return 0; ++} ++ ++static void ++ar2315_pci_fixup(struct pci_dev *dev) ++{ ++ unsigned int devfn = dev->devfn; ++ ++ if (dev->bus->number != 0) ++ return; ++ ++ /* Only fix up the PCI host settings */ ++ if ((PCI_SLOT(devfn) != 3) || (PCI_FUNC(devfn) != 0)) ++ return; ++ ++ /* Fix up MBARs */ ++ pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, HOST_PCI_MBAR0); ++ pci_write_config_dword(dev, PCI_BASE_ADDRESS_1, HOST_PCI_MBAR1); ++ pci_write_config_dword(dev, PCI_BASE_ADDRESS_2, HOST_PCI_MBAR2); ++ pci_write_config_dword(dev, PCI_COMMAND, ++ PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_SPECIAL | ++ PCI_COMMAND_INVALIDATE | PCI_COMMAND_PARITY | PCI_COMMAND_SERR | ++ PCI_COMMAND_FAST_BACK); ++} ++DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, ar2315_pci_fixup); ++ ++static int __init ++ar2315_pci_init(void) ++{ ++ u32 reg; ++ ++ if (ar231x_devtype != DEV_TYPE_AR2315) ++ return -ENODEV; ++ ++ configspace = (unsigned long) ioremap_nocache(0x80000000, 1*1024*1024); /* Remap PCI config space */ ++ ar231x_pci_controller.io_map_base = ++ (unsigned long) ioremap_nocache(AR531X_MEM_BASE + AR531X_MEM_SIZE, AR531X_IO_SIZE); ++ set_io_port_base(ar231x_pci_controller.io_map_base); /* PCI I/O space */ ++ ++ reg = ar231x_mask_reg(AR2315_RESET, 0, AR2315_RESET_PCIDMA); ++ msleep(10); ++ ++ reg &= ~AR2315_RESET_PCIDMA; ++ ar231x_write_reg(AR2315_RESET, reg); ++ msleep(10); ++ ++ ar231x_mask_reg(AR2315_ENDIAN_CTL, 0, ++ AR2315_CONFIG_PCIAHB | AR2315_CONFIG_PCIAHB_BRIDGE); ++ ++ ar231x_write_reg(AR2315_PCICLK, AR2315_PCICLK_PLLC_CLKM | ++ (AR2315_PCICLK_IN_FREQ_DIV_6 << AR2315_PCICLK_DIV_S)); ++ ar231x_mask_reg(AR2315_AHB_ARB_CTL, 0, AR2315_ARB_PCI); ++ ar231x_mask_reg(AR2315_IF_CTL, AR2315_IF_PCI_CLK_MASK | AR2315_IF_MASK, ++ AR2315_IF_PCI | AR2315_IF_PCI_HOST | AR2315_IF_PCI_INTR | ++ (AR2315_IF_PCI_CLK_OUTPUT_CLK << AR2315_IF_PCI_CLK_SHIFT)); ++ ++ /* Reset the PCI bus by setting bits 5-4 in PCI_MCFG */ ++ ar231x_mask_reg(AR2315_PCI_MISC_CONFIG, AR2315_PCIMISC_RST_MODE, ++ AR2315_PCIRST_LOW); ++ msleep(100); ++ ++ /* Bring the PCI out of reset */ ++ ar231x_mask_reg(AR2315_PCI_MISC_CONFIG, AR2315_PCIMISC_RST_MODE, ++ AR2315_PCIRST_HIGH | AR2315_PCICACHE_DIS | 0x8); ++ ++ ar231x_write_reg(AR2315_PCI_UNCACHE_CFG, ++ 0x1E | /* 1GB uncached */ ++ (1 << 5) | /* Enable uncached */ ++ (0x2 << 30) /* Base: 0x80000000 */ ++ ); ++ ar231x_read_reg(AR2315_PCI_UNCACHE_CFG); ++ ++ msleep(500); ++ ++ /* dirty hack - anyone with a datasheet that knows the memory map ? */ ++ ioport_resource.start = 0x10000000; ++ ioport_resource.end = 0xffffffff; ++ iomem_resource.start = 0x10000000; ++ iomem_resource.end = 0xffffffff; ++ ++ register_pci_controller(&ar231x_pci_controller); ++ ++ return 0; ++} ++ ++arch_initcall(ar2315_pci_init); +diff -Nur linux-2.6.37.orig/arch/mips/ar231x/prom.c linux-2.6.37/arch/mips/ar231x/prom.c +--- linux-2.6.37.orig/arch/mips/ar231x/prom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar231x/prom.c 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,37 @@ ++/* ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright MontaVista Software Inc ++ * Copyright (C) 2003 Atheros Communications, Inc., All Rights Reserved. ++ * Copyright (C) 2006 FON Technology, SL. ++ * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org> ++ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> ++ */ ++ ++/* ++ * Prom setup file for ar531x ++ */ ++ ++#include <linux/init.h> ++#include <generated/autoconf.h> ++#include <linux/kernel.h> ++#include <linux/string.h> ++#include <linux/mm.h> ++#include <linux/bootmem.h> ++ ++#include <asm/bootinfo.h> ++#include <asm/addrspace.h> ++#include "ar5312.h" ++#include "ar2315.h" ++ ++void __init prom_init(void) ++{ ++ ar5312_prom_init(); ++ ar2315_prom_init(); ++} ++ ++void __init prom_free_prom_memory(void) ++{ ++} +diff -Nur linux-2.6.37.orig/arch/mips/ar231x/reset.c linux-2.6.37/arch/mips/ar231x/reset.c +--- linux-2.6.37.orig/arch/mips/ar231x/reset.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar231x/reset.c 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,161 @@ ++#include <linux/init.h> ++#include <linux/module.h> ++#include <linux/timer.h> ++#include <linux/interrupt.h> ++#include <linux/kobject.h> ++#include <linux/workqueue.h> ++#include <linux/skbuff.h> ++#include <linux/netlink.h> ++#include <net/sock.h> ++#include <asm/uaccess.h> ++#include <ar231x_platform.h> ++#include <ar231x.h> ++#include <gpio.h> ++#include "devices.h" ++ ++#define AR531X_RESET_GPIO_IRQ (AR531X_GPIO_IRQ(ar231x_board.config->resetConfigGpio)) ++ ++struct event_t { ++ struct work_struct wq; ++ int set; ++ unsigned long jiffies; ++}; ++ ++static struct timer_list rst_button_timer; ++static unsigned long seen; ++ ++struct sock *uevent_sock = NULL; ++EXPORT_SYMBOL_GPL(uevent_sock); ++extern u64 uevent_next_seqnum(void); ++ ++static int no_release_workaround = 1; ++module_param(no_release_workaround, int, 0); ++ ++static inline void ++add_msg(struct sk_buff *skb, char *msg) ++{ ++ char *scratch; ++ scratch = skb_put(skb, strlen(msg) + 1); ++ sprintf(scratch, msg); ++} ++ ++static void ++hotplug_button(struct work_struct *wq) ++{ ++ struct sk_buff *skb; ++ struct event_t *event; ++ size_t len; ++ char *scratch, *s; ++ char buf[128]; ++ ++ event = container_of(wq, struct event_t, wq); ++ if (!uevent_sock) ++ goto done; ++ ++ /* allocate message with the maximum possible size */ ++ s = event->set ? "pressed" : "released"; ++ len = strlen(s) + 2; ++ skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); ++ if (!skb) ++ goto done; ++ ++ /* add header */ ++ scratch = skb_put(skb, len); ++ sprintf(scratch, "%s@",s); ++ ++ /* copy keys to our continuous event payload buffer */ ++ add_msg(skb, "HOME=/"); ++ add_msg(skb, "PATH=/sbin:/bin:/usr/sbin:/usr/bin"); ++ add_msg(skb, "SUBSYSTEM=button"); ++ add_msg(skb, "BUTTON=reset"); ++ add_msg(skb, (event->set ? "ACTION=pressed" : "ACTION=released")); ++ sprintf(buf, "SEEN=%ld", (event->jiffies - seen)/HZ); ++ add_msg(skb, buf); ++ snprintf(buf, 128, "SEQNUM=%llu", uevent_next_seqnum()); ++ add_msg(skb, buf); ++ ++ NETLINK_CB(skb).dst_group = 1; ++ netlink_broadcast(uevent_sock, skb, 0, 1, GFP_KERNEL); ++ ++done: ++ kfree(event); ++} ++ ++static void ++reset_button_poll(unsigned long unused) ++{ ++ struct event_t *event; ++ int gpio = ~0; ++ ++ if(!no_release_workaround) ++ return; ++ ++ gpio = ar231x_gpiodev->get(); ++ gpio &= (1 << (AR531X_RESET_GPIO_IRQ - AR531X_GPIO_IRQ_BASE)); ++ if(gpio) { ++ rst_button_timer.expires = jiffies + (HZ / 4); ++ add_timer(&rst_button_timer); ++ return; ++ } ++ ++ event = (struct event_t *) kzalloc(sizeof(struct event_t), GFP_ATOMIC); ++ if (!event) ++ return; ++ ++ event->set = 0; ++ event->jiffies = jiffies; ++ INIT_WORK(&event->wq, hotplug_button); ++ schedule_work(&event->wq); ++} ++ ++static irqreturn_t ++button_handler(int irq, void *dev_id) ++{ ++ static int pressed = 0; ++ struct event_t *event; ++ u32 gpio = ~0; ++ ++ event = (struct event_t *) kzalloc(sizeof(struct event_t), GFP_ATOMIC); ++ if (!event) ++ return IRQ_NONE; ++ ++ pressed = !pressed; ++ ++ gpio = ar231x_gpiodev->get() & (1 << (irq - AR531X_GPIO_IRQ_BASE)); ++ ++ event->set = gpio; ++ if(!event->set) ++ no_release_workaround = 0; ++ ++ event->jiffies = jiffies; ++ ++ INIT_WORK(&event->wq, hotplug_button); ++ schedule_work(&event->wq); ++ ++ seen = jiffies; ++ if(event->set && no_release_workaround) ++ mod_timer(&rst_button_timer, jiffies + (HZ / 4)); ++ ++ return IRQ_HANDLED; ++} ++ ++ ++static int __init ++ar231x_init_reset(void) ++{ ++ seen = jiffies; ++ ++ if (ar231x_board.config->resetConfigGpio == 0xffff) ++ return -ENODEV; ++ ++ init_timer(&rst_button_timer); ++ rst_button_timer.function = reset_button_poll; ++ rst_button_timer.expires = jiffies + HZ / 50; ++ add_timer(&rst_button_timer); ++ ++ request_irq(AR531X_RESET_GPIO_IRQ, &button_handler, IRQF_SAMPLE_RANDOM, "ar231x_reset", NULL); ++ ++ return 0; ++} ++ ++module_init(ar231x_init_reset); +diff -Nur linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/ar2315_regs.h linux-2.6.37/arch/mips/include/asm/mach-ar231x/ar2315_regs.h +--- linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/ar2315_regs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/include/asm/mach-ar231x/ar2315_regs.h 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,580 @@ ++/* ++ * Register definitions for AR2315+ ++ * ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright (C) 2003 Atheros Communications, Inc., All Rights Reserved. ++ * Copyright (C) 2006 FON Technology, SL. ++ * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org> ++ * Copyright (C) 2006-2008 Felix Fietkau <nbd@openwrt.org> ++ */ ++ ++#ifndef __AR2315_REG_H ++#define __AR2315_REG_H ++ ++/* ++ * IRQs ++ */ ++#define AR2315_IRQ_MISC_INTRS MIPS_CPU_IRQ_BASE+2 /* C0_CAUSE: 0x0400 */ ++#define AR2315_IRQ_WLAN0_INTRS MIPS_CPU_IRQ_BASE+3 /* C0_CAUSE: 0x0800 */ ++#define AR2315_IRQ_ENET0_INTRS MIPS_CPU_IRQ_BASE+4 /* C0_CAUSE: 0x1000 */ ++#define AR2315_IRQ_LCBUS_PCI MIPS_CPU_IRQ_BASE+5 /* C0_CAUSE: 0x2000 */ ++#define AR2315_IRQ_WLAN0_POLL MIPS_CPU_IRQ_BASE+6 /* C0_CAUSE: 0x4000 */ ++ ++/* ++ * Address map ++ */ ++#define AR2315_SPI_READ 0x08000000 /* SPI FLASH */ ++#define AR2315_WLAN0 0xB0000000 /* Wireless MMR */ ++#define AR2315_PCI 0xB0100000 /* PCI MMR */ ++#define AR2315_SDRAMCTL 0xB0300000 /* SDRAM MMR */ ++#define AR2315_LOCAL 0xB0400000 /* LOCAL BUS MMR */ ++#define AR2315_ENET0 0xB0500000 /* ETHERNET MMR */ ++#define AR2315_DSLBASE 0xB1000000 /* RESET CONTROL MMR */ ++#define AR2315_UART0 0xB1100003 /* UART MMR */ ++#define AR2315_SPI 0xB1300000 /* SPI FLASH MMR */ ++#define AR2315_PCIEXT 0x80000000 /* pci external */ ++ ++/* ++ * Reset Register ++ */ ++#define AR2315_COLD_RESET (AR2315_DSLBASE + 0x0000) ++ ++#define AR2315_RESET_COLD_AHB 0x00000001 ++#define AR2315_RESET_COLD_APB 0x00000002 ++#define AR2315_RESET_COLD_CPU 0x00000004 ++#define AR2315_RESET_COLD_CPUWARM 0x00000008 ++#define AR2315_RESET_SYSTEM (RESET_COLD_CPU | RESET_COLD_APB | RESET_COLD_AHB) /* full system */ ++#define AR2317_RESET_SYSTEM 0x00000010 ++ ++ ++#define AR2315_RESET (AR2315_DSLBASE + 0x0004) ++ ++#define AR2315_RESET_WARM_WLAN0_MAC 0x00000001 /* warm reset WLAN0 MAC */ ++#define AR2315_RESET_WARM_WLAN0_BB 0x00000002 /* warm reset WLAN0 BaseBand */ ++#define AR2315_RESET_MPEGTS_RSVD 0x00000004 /* warm reset MPEG-TS */ ++#define AR2315_RESET_PCIDMA 0x00000008 /* warm reset PCI ahb/dma */ ++#define AR2315_RESET_MEMCTL 0x00000010 /* warm reset memory controller */ ++#define AR2315_RESET_LOCAL 0x00000020 /* warm reset local bus */ ++#define AR2315_RESET_I2C_RSVD 0x00000040 /* warm reset I2C bus */ ++#define AR2315_RESET_SPI 0x00000080 /* warm reset SPI interface */ ++#define AR2315_RESET_UART0 0x00000100 /* warm reset UART0 */ ++#define AR2315_RESET_IR_RSVD 0x00000200 /* warm reset IR interface */ ++#define AR2315_RESET_EPHY0 0x00000400 /* cold reset ENET0 phy */ ++#define AR2315_RESET_ENET0 0x00000800 /* cold reset ENET0 mac */ ++ ++/* ++ * AHB master arbitration control ++ */ ++#define AR2315_AHB_ARB_CTL (AR2315_DSLBASE + 0x0008) ++ ++#define AR2315_ARB_CPU 0x00000001 /* CPU, default */ ++#define AR2315_ARB_WLAN 0x00000002 /* WLAN */ ++#define AR2315_ARB_MPEGTS_RSVD 0x00000004 /* MPEG-TS */ ++#define AR2315_ARB_LOCAL 0x00000008 /* LOCAL */ ++#define AR2315_ARB_PCI 0x00000010 /* PCI */ ++#define AR2315_ARB_ETHERNET 0x00000020 /* Ethernet */ ++#define AR2315_ARB_RETRY 0x00000100 /* retry policy, debug only */ ++ ++/* ++ * Config Register ++ */ ++#define AR2315_ENDIAN_CTL (AR2315_DSLBASE + 0x000c) ++ ++#define AR2315_CONFIG_AHB 0x00000001 /* EC - AHB bridge endianess */ ++#define AR2315_CONFIG_WLAN 0x00000002 /* WLAN byteswap */ ++#define AR2315_CONFIG_MPEGTS_RSVD 0x00000004 /* MPEG-TS byteswap */ ++#define AR2315_CONFIG_PCI 0x00000008 /* PCI byteswap */ ++#define AR2315_CONFIG_MEMCTL 0x00000010 /* Memory controller endianess */ ++#define AR2315_CONFIG_LOCAL 0x00000020 /* Local bus byteswap */ ++#define AR2315_CONFIG_ETHERNET 0x00000040 /* Ethernet byteswap */ ++ ++#define AR2315_CONFIG_MERGE 0x00000200 /* CPU write buffer merge */ ++#define AR2315_CONFIG_CPU 0x00000400 /* CPU big endian */ ++#define AR2315_CONFIG_PCIAHB 0x00000800 ++#define AR2315_CONFIG_PCIAHB_BRIDGE 0x00001000 ++#define AR2315_CONFIG_SPI 0x00008000 /* SPI byteswap */ ++#define AR2315_CONFIG_CPU_DRAM 0x00010000 ++#define AR2315_CONFIG_CPU_PCI 0x00020000 ++#define AR2315_CONFIG_CPU_MMR 0x00040000 ++#define AR2315_CONFIG_BIG 0x00000400 ++ ++ ++/* ++ * NMI control ++ */ ++#define AR2315_NMI_CTL (AR2315_DSLBASE + 0x0010) ++ ++#define AR2315_NMI_EN 1 ++ ++/* ++ * Revision Register - Initial value is 0x3010 (WMAC 3.0, AR531X 1.0). ++ */ ++#define AR2315_SREV (AR2315_DSLBASE + 0x0014) ++ ++#define AR2315_REV_MAJ 0x00f0 ++#define AR2315_REV_MAJ_S 4 ++#define AR2315_REV_MIN 0x000f ++#define AR2315_REV_MIN_S 0 ++#define AR2315_REV_CHIP (AR2315_REV_MAJ|AR2315_REV_MIN) ++ ++/* ++ * Interface Enable ++ */ ++#define AR2315_IF_CTL (AR2315_DSLBASE + 0x0018) ++ ++#define AR2315_IF_MASK 0x00000007 ++#define AR2315_IF_DISABLED 0 ++#define AR2315_IF_PCI 1 ++#define AR2315_IF_TS_LOCAL 2 ++#define AR2315_IF_ALL 3 /* only for emulation with separate pins */ ++#define AR2315_IF_LOCAL_HOST 0x00000008 ++#define AR2315_IF_PCI_HOST 0x00000010 ++#define AR2315_IF_PCI_INTR 0x00000020 ++#define AR2315_IF_PCI_CLK_MASK 0x00030000 ++#define AR2315_IF_PCI_CLK_INPUT 0 ++#define AR2315_IF_PCI_CLK_OUTPUT_LOW 1 ++#define AR2315_IF_PCI_CLK_OUTPUT_CLK 2 ++#define AR2315_IF_PCI_CLK_OUTPUT_HIGH 3 ++#define AR2315_IF_PCI_CLK_SHIFT 16 ++ ++/* ++ * APB Interrupt control ++ */ ++ ++#define AR2315_ISR (AR2315_DSLBASE + 0x0020) ++#define AR2315_IMR (AR2315_DSLBASE + 0x0024) ++#define AR2315_GISR (AR2315_DSLBASE + 0x0028) ++ ++#define AR2315_ISR_UART0 0x0001 /* high speed UART */ ++#define AR2315_ISR_I2C_RSVD 0x0002 /* I2C bus */ ++#define AR2315_ISR_SPI 0x0004 /* SPI bus */ ++#define AR2315_ISR_AHB 0x0008 /* AHB error */ ++#define AR2315_ISR_APB 0x0010 /* APB error */ ++#define AR2315_ISR_TIMER 0x0020 /* timer */ ++#define AR2315_ISR_GPIO 0x0040 /* GPIO */ ++#define AR2315_ISR_WD 0x0080 /* watchdog */ ++#define AR2315_ISR_IR_RSVD 0x0100 /* IR */ ++ ++#define AR2315_GISR_MISC 0x0001 ++#define AR2315_GISR_WLAN0 0x0002 ++#define AR2315_GISR_MPEGTS_RSVD 0x0004 ++#define AR2315_GISR_LOCALPCI 0x0008 ++#define AR2315_GISR_WMACPOLL 0x0010 ++#define AR2315_GISR_TIMER 0x0020 ++#define AR2315_GISR_ETHERNET 0x0040 ++ ++/* ++ * Interrupt routing from IO to the processor IP bits ++ * Define our inter mask and level ++ */ ++#define AR2315_INTR_MISCIO SR_IBIT3 ++#define AR2315_INTR_WLAN0 SR_IBIT4 ++#define AR2315_INTR_ENET0 SR_IBIT5 ++#define AR2315_INTR_LOCALPCI SR_IBIT6 ++#define AR2315_INTR_WMACPOLL SR_IBIT7 ++#define AR2315_INTR_COMPARE SR_IBIT8 ++ ++/* ++ * Timers ++ */ ++#define AR2315_TIMER (AR2315_DSLBASE + 0x0030) ++#define AR2315_RELOAD (AR2315_DSLBASE + 0x0034) ++#define AR2315_WD (AR2315_DSLBASE + 0x0038) ++#define AR2315_WDC (AR2315_DSLBASE + 0x003c) ++ ++#define AR2315_WDC_IGNORE_EXPIRATION 0x00000000 ++#define AR2315_WDC_NMI 0x00000001 /* NMI on watchdog */ ++#define AR2315_WDC_RESET 0x00000002 /* reset on watchdog */ ++ ++/* ++ * CPU Performance Counters ++ */ ++#define AR2315_PERFCNT0 (AR2315_DSLBASE + 0x0048) ++#define AR2315_PERFCNT1 (AR2315_DSLBASE + 0x004c) ++ ++#define AR2315_PERF0_DATAHIT 0x0001 /* Count Data Cache Hits */ ++#define AR2315_PERF0_DATAMISS 0x0002 /* Count Data Cache Misses */ ++#define AR2315_PERF0_INSTHIT 0x0004 /* Count Instruction Cache Hits */ ++#define AR2315_PERF0_INSTMISS 0x0008 /* Count Instruction Cache Misses */ ++#define AR2315_PERF0_ACTIVE 0x0010 /* Count Active Processor Cycles */ ++#define AR2315_PERF0_WBHIT 0x0020 /* Count CPU Write Buffer Hits */ ++#define AR2315_PERF0_WBMISS 0x0040 /* Count CPU Write Buffer Misses */ ++ ++#define AR2315_PERF1_EB_ARDY 0x0001 /* Count EB_ARdy signal */ ++#define AR2315_PERF1_EB_AVALID 0x0002 /* Count EB_AValid signal */ ++#define AR2315_PERF1_EB_WDRDY 0x0004 /* Count EB_WDRdy signal */ ++#define AR2315_PERF1_EB_RDVAL 0x0008 /* Count EB_RdVal signal */ ++#define AR2315_PERF1_VRADDR 0x0010 /* Count valid read address cycles */ ++#define AR2315_PERF1_VWADDR 0x0020 /* Count valid write address cycles */ ++#define AR2315_PERF1_VWDATA 0x0040 /* Count valid write data cycles */ ++ ++/* ++ * AHB Error Reporting. ++ */ ++#define AR2315_AHB_ERR0 (AR2315_DSLBASE + 0x0050) /* error */ ++#define AR2315_AHB_ERR1 (AR2315_DSLBASE + 0x0054) /* haddr */ ++#define AR2315_AHB_ERR2 (AR2315_DSLBASE + 0x0058) /* hwdata */ ++#define AR2315_AHB_ERR3 (AR2315_DSLBASE + 0x005c) /* hrdata */ ++#define AR2315_AHB_ERR4 (AR2315_DSLBASE + 0x0060) /* status */ ++ ++#define AHB_ERROR_DET 1 /* AHB Error has been detected, */ ++ /* write 1 to clear all bits in ERR0 */ ++#define AHB_ERROR_OVR 2 /* AHB Error overflow has been detected */ ++#define AHB_ERROR_WDT 4 /* AHB Error due to wdt instead of hresp */ ++ ++#define AR2315_PROCERR_HMAST 0x0000000f ++#define AR2315_PROCERR_HMAST_DFLT 0 ++#define AR2315_PROCERR_HMAST_WMAC 1 ++#define AR2315_PROCERR_HMAST_ENET 2 ++#define AR2315_PROCERR_HMAST_PCIENDPT 3 ++#define AR2315_PROCERR_HMAST_LOCAL 4 ++#define AR2315_PROCERR_HMAST_CPU 5 ++#define AR2315_PROCERR_HMAST_PCITGT 6 ++ ++#define AR2315_PROCERR_HMAST_S 0 ++#define AR2315_PROCERR_HWRITE 0x00000010 ++#define AR2315_PROCERR_HSIZE 0x00000060 ++#define AR2315_PROCERR_HSIZE_S 5 ++#define AR2315_PROCERR_HTRANS 0x00000180 ++#define AR2315_PROCERR_HTRANS_S 7 ++#define AR2315_PROCERR_HBURST 0x00000e00 ++#define AR2315_PROCERR_HBURST_S 9 ++ ++/* ++ * Clock Control ++ */ ++#define AR2315_PLLC_CTL (AR2315_DSLBASE + 0x0064) ++#define AR2315_PLLV_CTL (AR2315_DSLBASE + 0x0068) ++#define AR2315_CPUCLK (AR2315_DSLBASE + 0x006c) ++#define AR2315_AMBACLK (AR2315_DSLBASE + 0x0070) ++#define AR2315_SYNCCLK (AR2315_DSLBASE + 0x0074) ++#define AR2315_DSL_SLEEP_CTL (AR2315_DSLBASE + 0x0080) ++#define AR2315_DSL_SLEEP_DUR (AR2315_DSLBASE + 0x0084) ++ ++/* PLLc Control fields */ ++#define PLLC_REF_DIV_M 0x00000003 ++#define PLLC_REF_DIV_S 0 ++#define PLLC_FDBACK_DIV_M 0x0000007C ++#define PLLC_FDBACK_DIV_S 2 ++#define PLLC_ADD_FDBACK_DIV_M 0x00000080 ++#define PLLC_ADD_FDBACK_DIV_S 7 ++#define PLLC_CLKC_DIV_M 0x0001c000 ++#define PLLC_CLKC_DIV_S 14 ++#define PLLC_CLKM_DIV_M 0x00700000 ++#define PLLC_CLKM_DIV_S 20 ++ ++/* CPU CLK Control fields */ ++#define CPUCLK_CLK_SEL_M 0x00000003 ++#define CPUCLK_CLK_SEL_S 0 ++#define CPUCLK_CLK_DIV_M 0x0000000c ++#define CPUCLK_CLK_DIV_S 2 ++ ++/* AMBA CLK Control fields */ ++#define AMBACLK_CLK_SEL_M 0x00000003 ++#define AMBACLK_CLK_SEL_S 0 ++#define AMBACLK_CLK_DIV_M 0x0000000c ++#define AMBACLK_CLK_DIV_S 2 ++ ++/* ++ * GPIO ++ */ ++#define AR2315_GPIO_DI (AR2315_DSLBASE + 0x0088) ++#define AR2315_GPIO_DO (AR2315_DSLBASE + 0x0090) ++#define AR2315_GPIO_CR (AR2315_DSLBASE + 0x0098) ++#define AR2315_GPIO_INT (AR2315_DSLBASE + 0x00a0) ++ ++#define AR2315_GPIO_CR_M(x) (1 << (x)) /* mask for i/o */ ++#define AR2315_GPIO_CR_O(x) (1 << (x)) /* output */ ++#define AR2315_GPIO_CR_I(x) (0) /* input */ ++ ++#define AR2315_GPIO_INT_S(x) (x) /* interrupt enable */ ++#define AR2315_GPIO_INT_M (0x3F) /* mask for int */ ++#define AR2315_GPIO_INT_LVL(x) ((x) << 6) /* interrupt level */ ++#define AR2315_GPIO_INT_LVL_M ((0x3) << 6) /* mask for int level */ ++ ++#define AR2315_GPIO_INT_MAX_Y 1 /* Maximum value of Y for AR5313_GPIO_INT_* macros */ ++#define AR2315_GPIO_INT_LVL_OFF 0 /* Triggerring off */ ++#define AR2315_GPIO_INT_LVL_LOW 1 /* Low Level Triggered */ ++#define AR2315_GPIO_INT_LVL_HIGH 2 /* High Level Triggered */ ++#define AR2315_GPIO_INT_LVL_EDGE 3 /* Edge Triggered */ ++ ++#define AR2315_RESET_GPIO 5 ++#define AR2315_NUM_GPIO 22 ++ ++/* ++ * PCI Clock Control ++ */ ++#define AR2315_PCICLK (AR2315_DSLBASE + 0x00a4) ++ ++#define AR2315_PCICLK_INPUT_M 0x3 ++#define AR2315_PCICLK_INPUT_S 0 ++ ++#define AR2315_PCICLK_PLLC_CLKM 0 ++#define AR2315_PCICLK_PLLC_CLKM1 1 ++#define AR2315_PCICLK_PLLC_CLKC 2 ++#define AR2315_PCICLK_REF_CLK 3 ++ ++#define AR2315_PCICLK_DIV_M 0xc ++#define AR2315_PCICLK_DIV_S 2 ++ ++#define AR2315_PCICLK_IN_FREQ 0 ++#define AR2315_PCICLK_IN_FREQ_DIV_6 1 ++#define AR2315_PCICLK_IN_FREQ_DIV_8 2 ++#define AR2315_PCICLK_IN_FREQ_DIV_10 3 ++ ++/* ++ * Observation Control Register ++ */ ++#define AR2315_OCR (AR2315_DSLBASE + 0x00b0) ++#define OCR_GPIO0_IRIN 0x0040 ++#define OCR_GPIO1_IROUT 0x0080 ++#define OCR_GPIO3_RXCLR 0x0200 ++ ++/* ++ * General Clock Control ++ */ ++ ++#define AR2315_MISCCLK (AR2315_DSLBASE + 0x00b4) ++#define MISCCLK_PLLBYPASS_EN 0x00000001 ++#define MISCCLK_PROCREFCLK 0x00000002 ++ ++/* ++ * SDRAM Controller ++ * - No read or write buffers are included. ++ */ ++#define AR2315_MEM_CFG (AR2315_SDRAMCTL + 0x00) ++#define AR2315_MEM_CTRL (AR2315_SDRAMCTL + 0x0c) ++#define AR2315_MEM_REF (AR2315_SDRAMCTL + 0x10) ++ ++#define SDRAM_DATA_WIDTH_M 0x00006000 ++#define SDRAM_DATA_WIDTH_S 13 ++ ++#define SDRAM_COL_WIDTH_M 0x00001E00 ++#define SDRAM_COL_WIDTH_S 9 ++ ++#define SDRAM_ROW_WIDTH_M 0x000001E0 ++#define SDRAM_ROW_WIDTH_S 5 ++ ++#define SDRAM_BANKADDR_BITS_M 0x00000018 ++#define SDRAM_BANKADDR_BITS_S 3 ++ ++/* ++ * SPI Flash Interface Registers ++ */ ++ ++#define AR2315_SPI_CTL (AR2315_SPI + 0x00) ++#define AR2315_SPI_OPCODE (AR2315_SPI + 0x04) ++#define AR2315_SPI_DATA (AR2315_SPI + 0x08) ++ ++#define SPI_CTL_START 0x00000100 ++#define SPI_CTL_BUSY 0x00010000 ++#define SPI_CTL_TXCNT_MASK 0x0000000f ++#define SPI_CTL_RXCNT_MASK 0x000000f0 ++#define SPI_CTL_TX_RX_CNT_MASK 0x000000ff ++#define SPI_CTL_SIZE_MASK 0x00060000 ++ ++#define SPI_CTL_CLK_SEL_MASK 0x03000000 ++#define SPI_OPCODE_MASK 0x000000ff ++ ++/* ++ * PCI Bus Interface Registers ++ */ ++#define AR2315_PCI_1MS_REG (AR2315_PCI + 0x0008) ++#define AR2315_PCI_1MS_MASK 0x3FFFF /* # of AHB clk cycles in 1ms */ ++ ++#define AR2315_PCI_MISC_CONFIG (AR2315_PCI + 0x000c) ++#define AR2315_PCIMISC_TXD_EN 0x00000001 /* Enable TXD for fragments */ ++#define AR2315_PCIMISC_CFG_SEL 0x00000002 /* mem or config cycles */ ++#define AR2315_PCIMISC_GIG_MASK 0x0000000C /* bits 31-30 for pci req */ ++#define AR2315_PCIMISC_RST_MODE 0x00000030 ++#define AR2315_PCIRST_INPUT 0x00000000 /* 4:5=0 rst is input */ ++#define AR2315_PCIRST_LOW 0x00000010 /* 4:5=1 rst to GND */ ++#define AR2315_PCIRST_HIGH 0x00000020 /* 4:5=2 rst to VDD */ ++#define AR2315_PCIGRANT_EN 0x00000000 /* 6:7=0 early grant en */ ++#define AR2315_PCIGRANT_FRAME 0x00000040 /* 6:7=1 grant waits 4 frame */ ++#define AR2315_PCIGRANT_IDLE 0x00000080 /* 6:7=2 grant waits 4 idle */ ++#define AR2315_PCIGRANT_GAP 0x00000000 /* 6:7=2 grant waits 4 idle */ ++#define AR2315_PCICACHE_DIS 0x00001000 /* PCI external access cache disable */ ++ ++#define AR2315_PCI_OUT_TSTAMP (AR2315_PCI + 0x0010) ++ ++#define AR2315_PCI_UNCACHE_CFG (AR2315_PCI + 0x0014) ++ ++#define AR2315_PCI_IN_EN (AR2315_PCI + 0x0100) ++#define AR2315_PCI_IN_EN0 0x01 /* Enable chain 0 */ ++#define AR2315_PCI_IN_EN1 0x02 /* Enable chain 1 */ ++#define AR2315_PCI_IN_EN2 0x04 /* Enable chain 2 */ ++#define AR2315_PCI_IN_EN3 0x08 /* Enable chain 3 */ ++ ++#define AR2315_PCI_IN_DIS (AR2315_PCI + 0x0104) ++#define AR2315_PCI_IN_DIS0 0x01 /* Disable chain 0 */ ++#define AR2315_PCI_IN_DIS1 0x02 /* Disable chain 1 */ ++#define AR2315_PCI_IN_DIS2 0x04 /* Disable chain 2 */ ++#define AR2315_PCI_IN_DIS3 0x08 /* Disable chain 3 */ ++ ++#define AR2315_PCI_IN_PTR (AR2315_PCI + 0x0200) ++ ++#define AR2315_PCI_OUT_EN (AR2315_PCI + 0x0400) ++#define AR2315_PCI_OUT_EN0 0x01 /* Enable chain 0 */ ++ ++#define AR2315_PCI_OUT_DIS (AR2315_PCI + 0x0404) ++#define AR2315_PCI_OUT_DIS0 0x01 /* Disable chain 0 */ ++ ++#define AR2315_PCI_OUT_PTR (AR2315_PCI + 0x0408) ++ ++#define AR2315_PCI_INT_STATUS (AR2315_PCI + 0x0500) /* write one to clr */ ++#define AR2315_PCI_TXINT 0x00000001 /* Desc In Completed */ ++#define AR2315_PCI_TXOK 0x00000002 /* Desc In OK */ ++#define AR2315_PCI_TXERR 0x00000004 /* Desc In ERR */ ++#define AR2315_PCI_TXEOL 0x00000008 /* Desc In End-of-List */ ++#define AR2315_PCI_RXINT 0x00000010 /* Desc Out Completed */ ++#define AR2315_PCI_RXOK 0x00000020 /* Desc Out OK */ ++#define AR2315_PCI_RXERR 0x00000040 /* Desc Out ERR */ ++#define AR2315_PCI_RXEOL 0x00000080 /* Desc Out EOL */ ++#define AR2315_PCI_TXOOD 0x00000200 /* Desc In Out-of-Desc */ ++#define AR2315_PCI_MASK 0x0000FFFF /* Desc Mask */ ++#define AR2315_PCI_EXT_INT 0x02000000 ++#define AR2315_PCI_ABORT_INT 0x04000000 ++ ++#define AR2315_PCI_INT_MASK (AR2315_PCI + 0x0504) /* same as INT_STATUS */ ++ ++#define AR2315_PCI_INTEN_REG (AR2315_PCI + 0x0508) ++#define AR2315_PCI_INT_DISABLE 0x00 /* disable pci interrupts */ ++#define AR2315_PCI_INT_ENABLE 0x01 /* enable pci interrupts */ ++ ++#define AR2315_PCI_HOST_IN_EN (AR2315_PCI + 0x0800) ++#define AR2315_PCI_HOST_IN_DIS (AR2315_PCI + 0x0804) ++#define AR2315_PCI_HOST_IN_PTR (AR2315_PCI + 0x0810) ++#define AR2315_PCI_HOST_OUT_EN (AR2315_PCI + 0x0900) ++#define AR2315_PCI_HOST_OUT_DIS (AR2315_PCI + 0x0904) ++#define AR2315_PCI_HOST_OUT_PTR (AR2315_PCI + 0x0908) ++ ++ ++/* ++ * Local Bus Interface Registers ++ */ ++#define AR2315_LB_CONFIG (AR2315_LOCAL + 0x0000) ++#define AR2315_LBCONF_OE 0x00000001 /* =1 OE is low-true */ ++#define AR2315_LBCONF_CS0 0x00000002 /* =1 first CS is low-true */ ++#define AR2315_LBCONF_CS1 0x00000004 /* =1 2nd CS is low-true */ ++#define AR2315_LBCONF_RDY 0x00000008 /* =1 RDY is low-true */ ++#define AR2315_LBCONF_WE 0x00000010 /* =1 Write En is low-true */ ++#define AR2315_LBCONF_WAIT 0x00000020 /* =1 WAIT is low-true */ ++#define AR2315_LBCONF_ADS 0x00000040 /* =1 Adr Strobe is low-true */ ++#define AR2315_LBCONF_MOT 0x00000080 /* =0 Intel, =1 Motorola */ ++#define AR2315_LBCONF_8CS 0x00000100 /* =1 8 bits CS, 0= 16bits */ ++#define AR2315_LBCONF_8DS 0x00000200 /* =1 8 bits Data S, 0=16bits */ ++#define AR2315_LBCONF_ADS_EN 0x00000400 /* =1 Enable ADS */ ++#define AR2315_LBCONF_ADR_OE 0x00000800 /* =1 Adr cap on OE, WE or DS */ ++#define AR2315_LBCONF_ADDT_MUX 0x00001000 /* =1 Adr and Data share bus */ ++#define AR2315_LBCONF_DATA_OE 0x00002000 /* =1 Data cap on OE, WE, DS */ ++#define AR2315_LBCONF_16DATA 0x00004000 /* =1 Data is 16 bits wide */ ++#define AR2315_LBCONF_SWAPDT 0x00008000 /* =1 Byte swap data */ ++#define AR2315_LBCONF_SYNC 0x00010000 /* =1 Bus synchronous to clk */ ++#define AR2315_LBCONF_INT 0x00020000 /* =1 Intr is low true */ ++#define AR2315_LBCONF_INT_CTR0 0x00000000 /* GND high-Z, Vdd is high-Z */ ++#define AR2315_LBCONF_INT_CTR1 0x00040000 /* GND drive, Vdd is high-Z */ ++#define AR2315_LBCONF_INT_CTR2 0x00080000 /* GND high-Z, Vdd drive */ ++#define AR2315_LBCONF_INT_CTR3 0x000C0000 /* GND drive, Vdd drive */ ++#define AR2315_LBCONF_RDY_WAIT 0x00100000 /* =1 RDY is negative of WAIT */ ++#define AR2315_LBCONF_INT_PULSE 0x00200000 /* =1 Interrupt is a pulse */ ++#define AR2315_LBCONF_ENABLE 0x00400000 /* =1 Falcon respond to LB */ ++ ++#define AR2315_LB_CLKSEL (AR2315_LOCAL + 0x0004) ++#define AR2315_LBCLK_EXT 0x0001 /* use external clk for lb */ ++ ++#define AR2315_LB_1MS (AR2315_LOCAL + 0x0008) ++#define AR2315_LB1MS_MASK 0x3FFFF /* # of AHB clk cycles in 1ms */ ++ ++#define AR2315_LB_MISCCFG (AR2315_LOCAL + 0x000C) ++#define AR2315_LBM_TXD_EN 0x00000001 /* Enable TXD for fragments */ ++#define AR2315_LBM_RX_INTEN 0x00000002 /* Enable LB ints on RX ready */ ++#define AR2315_LBM_MBOXWR_INTEN 0x00000004 /* Enable LB ints on mbox wr */ ++#define AR2315_LBM_MBOXRD_INTEN 0x00000008 /* Enable LB ints on mbox rd */ ++#define AR2315_LMB_DESCSWAP_EN 0x00000010 /* Byte swap desc enable */ ++#define AR2315_LBM_TIMEOUT_MASK 0x00FFFF80 ++#define AR2315_LBM_TIMEOUT_SHFT 7 ++#define AR2315_LBM_PORTMUX 0x07000000 ++ ++ ++#define AR2315_LB_RXTSOFF (AR2315_LOCAL + 0x0010) ++ ++#define AR2315_LB_TX_CHAIN_EN (AR2315_LOCAL + 0x0100) ++#define AR2315_LB_TXEN_0 0x01 ++#define AR2315_LB_TXEN_1 0x02 ++#define AR2315_LB_TXEN_2 0x04 ++#define AR2315_LB_TXEN_3 0x08 ++ ++#define AR2315_LB_TX_CHAIN_DIS (AR2315_LOCAL + 0x0104) ++#define AR2315_LB_TX_DESC_PTR (AR2315_LOCAL + 0x0200) ++ ++#define AR2315_LB_RX_CHAIN_EN (AR2315_LOCAL + 0x0400) ++#define AR2315_LB_RXEN 0x01 ++ ++#define AR2315_LB_RX_CHAIN_DIS (AR2315_LOCAL + 0x0404) ++#define AR2315_LB_RX_DESC_PTR (AR2315_LOCAL + 0x0408) ++ ++#define AR2315_LB_INT_STATUS (AR2315_LOCAL + 0x0500) ++#define AR2315_INT_TX_DESC 0x0001 ++#define AR2315_INT_TX_OK 0x0002 ++#define AR2315_INT_TX_ERR 0x0004 ++#define AR2315_INT_TX_EOF 0x0008 ++#define AR2315_INT_RX_DESC 0x0010 ++#define AR2315_INT_RX_OK 0x0020 ++#define AR2315_INT_RX_ERR 0x0040 ++#define AR2315_INT_RX_EOF 0x0080 ++#define AR2315_INT_TX_TRUNC 0x0100 ++#define AR2315_INT_TX_STARVE 0x0200 ++#define AR2315_INT_LB_TIMEOUT 0x0400 ++#define AR2315_INT_LB_ERR 0x0800 ++#define AR2315_INT_MBOX_WR 0x1000 ++#define AR2315_INT_MBOX_RD 0x2000 ++ ++/* Bit definitions for INT MASK are the same as INT_STATUS */ ++#define AR2315_LB_INT_MASK (AR2315_LOCAL + 0x0504) ++ ++#define AR2315_LB_INT_EN (AR2315_LOCAL + 0x0508) ++#define AR2315_LB_MBOX (AR2315_LOCAL + 0x0600) ++ ++/* ++ * IR Interface Registers ++ */ ++#define AR2315_IR_PKTDATA (AR2315_IR + 0x0000) ++ ++#define AR2315_IR_PKTLEN (AR2315_IR + 0x07fc) /* 0 - 63 */ ++ ++#define AR2315_IR_CONTROL (AR2315_IR + 0x0800) ++#define AR2315_IRCTL_TX 0x00000000 /* use as tranmitter */ ++#define AR2315_IRCTL_RX 0x00000001 /* use as receiver */ ++#define AR2315_IRCTL_SAMPLECLK_MASK 0x00003ffe /* Sample clk divisor mask */ ++#define AR2315_IRCTL_SAMPLECLK_SHFT 1 ++#define AR2315_IRCTL_OUTPUTCLK_MASK 0x03ffc000 /* Output clk divisor mask */ ++#define AR2315_IRCTL_OUTPUTCLK_SHFT 14 ++ ++#define AR2315_IR_STATUS (AR2315_IR + 0x0804) ++#define AR2315_IRSTS_RX 0x00000001 /* receive in progress */ ++#define AR2315_IRSTS_TX 0x00000002 /* transmit in progress */ ++ ++#define AR2315_IR_CONFIG (AR2315_IR + 0x0808) ++#define AR2315_IRCFG_INVIN 0x00000001 /* invert input polarity */ ++#define AR2315_IRCFG_INVOUT 0x00000002 /* invert output polarity */ ++#define AR2315_IRCFG_SEQ_START_WIN_SEL 0x00000004 /* 1 => 28, 0 => 7 */ ++#define AR2315_IRCFG_SEQ_START_THRESH 0x000000f0 /* */ ++#define AR2315_IRCFG_SEQ_END_UNIT_SEL 0x00000100 /* */ ++#define AR2315_IRCFG_SEQ_END_UNIT_THRESH 0x00007e00 /* */ ++#define AR2315_IRCFG_SEQ_END_WIN_SEL 0x00008000 /* */ ++#define AR2315_IRCFG_SEQ_END_WIN_THRESH 0x001f0000 /* */ ++#define AR2315_IRCFG_NUM_BACKOFF_WORDS 0x01e00000 /* */ ++ ++#define HOST_PCI_DEV_ID 3 ++#define HOST_PCI_MBAR0 0x10000000 ++#define HOST_PCI_MBAR1 0x20000000 ++#define HOST_PCI_MBAR2 0x30000000 ++ ++#define HOST_PCI_SDRAM_BASEADDR HOST_PCI_MBAR1 ++#define PCI_DEVICE_MEM_SPACE 0x800000 ++ ++#endif /* __AR2315_REG_H */ +diff -Nur linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/ar2315_spiflash.h linux-2.6.37/arch/mips/include/asm/mach-ar231x/ar2315_spiflash.h +--- linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/ar2315_spiflash.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/include/asm/mach-ar231x/ar2315_spiflash.h 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,116 @@ ++/* ++ * SPI Flash Memory support header file. ++ * ++ * Copyright (c) 2005, Atheros Communications Inc. ++ * Copyright (C) 2006 FON Technology, SL. ++ * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org> ++ * Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org> ++ * ++ * This code is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ */ ++#ifndef __AR2315_SPIFLASH_H ++#define __AR2315_SPIFLASH_H ++ ++#define STM_PAGE_SIZE 256 ++ ++#define SFI_WRITE_BUFFER_SIZE 4 ++#define SFI_FLASH_ADDR_MASK 0x00ffffff ++ ++#define STM_8MBIT_SIGNATURE 0x13 ++#define STM_M25P80_BYTE_COUNT 1048576 ++#define STM_M25P80_SECTOR_COUNT 16 ++#define STM_M25P80_SECTOR_SIZE 0x10000 ++ ++#define STM_16MBIT_SIGNATURE 0x14 ++#define STM_M25P16_BYTE_COUNT 2097152 ++#define STM_M25P16_SECTOR_COUNT 32 ++#define STM_M25P16_SECTOR_SIZE 0x10000 ++ ++#define STM_32MBIT_SIGNATURE 0x15 ++#define STM_M25P32_BYTE_COUNT 4194304 ++#define STM_M25P32_SECTOR_COUNT 64 ++#define STM_M25P32_SECTOR_SIZE 0x10000 ++ ++#define STM_64MBIT_SIGNATURE 0x16 ++#define STM_M25P64_BYTE_COUNT 8388608 ++#define STM_M25P64_SECTOR_COUNT 128 ++#define STM_M25P64_SECTOR_SIZE 0x10000 ++ ++#define STM_128MBIT_SIGNATURE 0x17 ++#define STM_M25P128_BYTE_COUNT 16777216 ++#define STM_M25P128_SECTOR_COUNT 256 ++#define STM_M25P128_SECTOR_SIZE 0x10000 ++ ++#define STM_1MB_BYTE_COUNT STM_M25P80_BYTE_COUNT ++#define STM_1MB_SECTOR_COUNT STM_M25P80_SECTOR_COUNT ++#define STM_1MB_SECTOR_SIZE STM_M25P80_SECTOR_SIZE ++#define STM_2MB_BYTE_COUNT STM_M25P16_BYTE_COUNT ++#define STM_2MB_SECTOR_COUNT STM_M25P16_SECTOR_COUNT ++#define STM_2MB_SECTOR_SIZE STM_M25P16_SECTOR_SIZE ++#define STM_4MB_BYTE_COUNT STM_M25P32_BYTE_COUNT ++#define STM_4MB_SECTOR_COUNT STM_M25P32_SECTOR_COUNT ++#define STM_4MB_SECTOR_SIZE STM_M25P32_SECTOR_SIZE ++#define STM_8MB_BYTE_COUNT STM_M25P64_BYTE_COUNT ++#define STM_8MB_SECTOR_COUNT STM_M25P64_SECTOR_COUNT ++#define STM_8MB_SECTOR_SIZE STM_M25P64_SECTOR_SIZE ++#define STM_16MB_BYTE_COUNT STM_M25P128_BYTE_COUNT ++#define STM_16MB_SECTOR_COUNT STM_M25P128_SECTOR_COUNT ++#define STM_16MB_SECTOR_SIZE STM_M25P128_SECTOR_SIZE ++ ++/* ++ * ST Microelectronics Opcodes for Serial Flash ++ */ ++ ++#define STM_OP_WR_ENABLE 0x06 /* Write Enable */ ++#define STM_OP_WR_DISABLE 0x04 /* Write Disable */ ++#define STM_OP_RD_STATUS 0x05 /* Read Status */ ++#define STM_OP_WR_STATUS 0x01 /* Write Status */ ++#define STM_OP_RD_DATA 0x03 /* Read Data */ ++#define STM_OP_FAST_RD_DATA 0x0b /* Fast Read Data */ ++#define STM_OP_PAGE_PGRM 0x02 /* Page Program */ ++#define STM_OP_SECTOR_ERASE 0xd8 /* Sector Erase */ ++#define STM_OP_BULK_ERASE 0xc7 /* Bulk Erase */ ++#define STM_OP_DEEP_PWRDOWN 0xb9 /* Deep Power-Down Mode */ ++#define STM_OP_RD_SIG 0xab /* Read Electronic Signature */ ++ ++#define STM_STATUS_WIP 0x01 /* Write-In-Progress */ ++#define STM_STATUS_WEL 0x02 /* Write Enable Latch */ ++#define STM_STATUS_BP0 0x04 /* Block Protect 0 */ ++#define STM_STATUS_BP1 0x08 /* Block Protect 1 */ ++#define STM_STATUS_BP2 0x10 /* Block Protect 2 */ ++#define STM_STATUS_SRWD 0x80 /* Status Register Write Disable */ ++ ++/* ++ * SPI Flash Interface Registers ++ */ ++#define AR531XPLUS_SPI_READ 0x08000000 ++#define AR531XPLUS_SPI_MMR 0x11300000 ++#define AR531XPLUS_SPI_MMR_SIZE 12 ++ ++#define AR531XPLUS_SPI_CTL 0x00 ++#define AR531XPLUS_SPI_OPCODE 0x04 ++#define AR531XPLUS_SPI_DATA 0x08 ++ ++#define SPI_FLASH_READ AR531XPLUS_SPI_READ ++#define SPI_FLASH_MMR AR531XPLUS_SPI_MMR ++#define SPI_FLASH_MMR_SIZE AR531XPLUS_SPI_MMR_SIZE ++#define SPI_FLASH_CTL AR531XPLUS_SPI_CTL ++#define SPI_FLASH_OPCODE AR531XPLUS_SPI_OPCODE ++#define SPI_FLASH_DATA AR531XPLUS_SPI_DATA ++ ++#define SPI_CTL_START 0x00000100 ++#define SPI_CTL_BUSY 0x00010000 ++#define SPI_CTL_TXCNT_MASK 0x0000000f ++#define SPI_CTL_RXCNT_MASK 0x000000f0 ++#define SPI_CTL_TX_RX_CNT_MASK 0x000000ff ++#define SPI_CTL_SIZE_MASK 0x00060000 ++ ++#define SPI_CTL_CLK_SEL_MASK 0x03000000 ++#define SPI_OPCODE_MASK 0x000000ff ++ ++#define SPI_STATUS_WIP STM_STATUS_WIP ++ ++#endif +diff -Nur linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/ar231x.h linux-2.6.37/arch/mips/include/asm/mach-ar231x/ar231x.h +--- linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/ar231x.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/include/asm/mach-ar231x/ar231x.h 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,54 @@ ++#ifndef __AR531X_H ++#define __AR531X_H ++ ++#define AR531X_MISC_IRQ_BASE 0x20 ++#define AR531X_GPIO_IRQ_BASE 0x30 ++ ++/* Software's idea of interrupts handled by "CPU Interrupt Controller" */ ++#define AR531X_IRQ_NONE MIPS_CPU_IRQ_BASE+0 ++#define AR531X_IRQ_CPU_CLOCK MIPS_CPU_IRQ_BASE+7 /* C0_CAUSE: 0x8000 */ ++ ++/* Miscellaneous interrupts, which share IP6 */ ++#define AR531X_MISC_IRQ_NONE AR531X_MISC_IRQ_BASE+0 ++#define AR531X_MISC_IRQ_TIMER AR531X_MISC_IRQ_BASE+1 ++#define AR531X_MISC_IRQ_AHB_PROC AR531X_MISC_IRQ_BASE+2 ++#define AR531X_MISC_IRQ_AHB_DMA AR531X_MISC_IRQ_BASE+3 ++#define AR531X_MISC_IRQ_GPIO AR531X_MISC_IRQ_BASE+4 ++#define AR531X_MISC_IRQ_UART0 AR531X_MISC_IRQ_BASE+5 ++#define AR531X_MISC_IRQ_UART0_DMA AR531X_MISC_IRQ_BASE+6 ++#define AR531X_MISC_IRQ_WATCHDOG AR531X_MISC_IRQ_BASE+7 ++#define AR531X_MISC_IRQ_LOCAL AR531X_MISC_IRQ_BASE+8 ++#define AR531X_MISC_IRQ_SPI AR531X_MISC_IRQ_BASE+9 ++#define AR531X_MISC_IRQ_COUNT 10 ++ ++/* GPIO Interrupts [0..7], share AR531X_MISC_IRQ_GPIO */ ++#define AR531X_GPIO_IRQ_NONE AR531X_GPIO_IRQ_BASE+0 ++#define AR531X_GPIO_IRQ(n) AR531X_GPIO_IRQ_BASE+n ++#define AR531X_GPIO_IRQ_COUNT 22 ++ ++static inline u32 ++ar231x_read_reg(u32 reg) ++{ ++ return __raw_readl((u32 *) KSEG1ADDR(reg)); ++} ++ ++static inline void ++ar231x_write_reg(u32 reg, u32 val) ++{ ++ __raw_writel(val, (u32 *) KSEG1ADDR(reg)); ++} ++ ++static inline u32 ++ar231x_mask_reg(u32 reg, u32 mask, u32 val) ++{ ++ u32 ret; ++ ++ ret = ar231x_read_reg(reg); ++ ret &= ~mask; ++ ret |= val; ++ ar231x_write_reg(reg, ret); ++ ++ return ret; ++} ++ ++#endif +diff -Nur linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/ar231x_platform.h linux-2.6.37/arch/mips/include/asm/mach-ar231x/ar231x_platform.h +--- linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/ar231x_platform.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/include/asm/mach-ar231x/ar231x_platform.h 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,83 @@ ++#ifndef __AR531X_PLATFORM_H ++#define __AR531X_PLATFORM_H ++ ++/* ++ * This is board-specific data that is stored in a "fixed" location in flash. ++ * It is shared across operating systems, so it should not be changed lightly. ++ * The main reason we need it is in order to extract the ethernet MAC ++ * address(es). ++ */ ++struct ar231x_boarddata { ++ u32 magic; /* board data is valid */ ++#define AR531X_BD_MAGIC 0x35333131 /* "5311", for all 531x platforms */ ++ u16 cksum; /* checksum (starting with BD_REV 2) */ ++ u16 rev; /* revision of this struct */ ++#define BD_REV 4 ++ char boardName[64]; /* Name of board */ ++ u16 major; /* Board major number */ ++ u16 minor; /* Board minor number */ ++ u32 flags; /* Board configuration */ ++#define BD_ENET0 0x00000001 /* ENET0 is stuffed */ ++#define BD_ENET1 0x00000002 /* ENET1 is stuffed */ ++#define BD_UART1 0x00000004 /* UART1 is stuffed */ ++#define BD_UART0 0x00000008 /* UART0 is stuffed (dma) */ ++#define BD_RSTFACTORY 0x00000010 /* Reset factory defaults stuffed */ ++#define BD_SYSLED 0x00000020 /* System LED stuffed */ ++#define BD_EXTUARTCLK 0x00000040 /* External UART clock */ ++#define BD_CPUFREQ 0x00000080 /* cpu freq is valid in nvram */ ++#define BD_SYSFREQ 0x00000100 /* sys freq is set in nvram */ ++#define BD_WLAN0 0x00000200 /* Enable WLAN0 */ ++#define BD_MEMCAP 0x00000400 /* CAP SDRAM @ memCap for testing */ ++#define BD_DISWATCHDOG 0x00000800 /* disable system watchdog */ ++#define BD_WLAN1 0x00001000 /* Enable WLAN1 (ar5212) */ ++#define BD_ISCASPER 0x00002000 /* FLAG for AR2312 */ ++#define BD_WLAN0_2G_EN 0x00004000 /* FLAG for radio0_2G */ ++#define BD_WLAN0_5G_EN 0x00008000 /* FLAG for radio0_2G */ ++#define BD_WLAN1_2G_EN 0x00020000 /* FLAG for radio0_2G */ ++#define BD_WLAN1_5G_EN 0x00040000 /* FLAG for radio0_2G */ ++ u16 resetConfigGpio; /* Reset factory GPIO pin */ ++ u16 sysLedGpio; /* System LED GPIO pin */ ++ ++ u32 cpuFreq; /* CPU core frequency in Hz */ ++ u32 sysFreq; /* System frequency in Hz */ ++ u32 cntFreq; /* Calculated C0_COUNT frequency */ ++ ++ u8 wlan0_mac[6]; ++ u8 enet0_mac[6]; ++ u8 enet1_mac[6]; ++ ++ u16 pciId; /* Pseudo PCIID for common code */ ++ u16 memCap; /* cap bank1 in MB */ ++ ++ /* version 3 */ ++ u8 wlan1_mac[6]; /* (ar5212) */ ++}; ++ ++#define BOARD_CONFIG_BUFSZ 0x1000 ++ ++/* ++ * Platform device information for the Wireless MAC ++ */ ++struct ar231x_board_config { ++ u16 devid; ++ ++ /* board config data */ ++ struct ar231x_boarddata *config; ++ ++ /* radio calibration data */ ++ const char *radio; ++}; ++ ++/* ++ * Platform device information for the Ethernet MAC ++ */ ++struct ar231x_eth { ++ u32 reset_base; ++ u32 reset_mac; ++ u32 reset_phy; ++ u32 phy_base; ++ struct ar231x_board_config *config; ++ char *macaddr; ++}; ++ ++#endif /* __AR531X_PLATFORM_H */ +diff -Nur linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/ar5312_regs.h linux-2.6.37/arch/mips/include/asm/mach-ar231x/ar5312_regs.h +--- linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/ar5312_regs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/include/asm/mach-ar231x/ar5312_regs.h 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,236 @@ ++/* ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright (C) 2003 Atheros Communications, Inc., All Rights Reserved. ++ * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org> ++ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> ++ */ ++ ++#ifndef AR5312_H ++#define AR5312_H ++ ++#include <asm/addrspace.h> ++ ++/* ++ * IRQs ++ */ ++ ++#define AR5312_IRQ_WLAN0_INTRS MIPS_CPU_IRQ_BASE+2 /* C0_CAUSE: 0x0400 */ ++#define AR5312_IRQ_ENET0_INTRS MIPS_CPU_IRQ_BASE+3 /* C0_CAUSE: 0x0800 */ ++#define AR5312_IRQ_ENET1_INTRS MIPS_CPU_IRQ_BASE+4 /* C0_CAUSE: 0x1000 */ ++#define AR5312_IRQ_WLAN1_INTRS MIPS_CPU_IRQ_BASE+5 /* C0_CAUSE: 0x2000 */ ++#define AR5312_IRQ_MISC_INTRS MIPS_CPU_IRQ_BASE+6 /* C0_CAUSE: 0x4000 */ ++ ++ ++/* Address Map */ ++#define AR531X_WLAN0 0x18000000 ++#define AR531X_WLAN1 0x18500000 ++#define AR531X_ENET0 0x18100000 ++#define AR531X_ENET1 0x18200000 ++#define AR531X_SDRAMCTL 0x18300000 ++#define AR531X_FLASHCTL 0x18400000 ++#define AR531X_APBBASE 0x1c000000 ++#define AR531X_FLASH 0x1e000000 ++#define AR531X_UART0 0xbc000003 /* UART MMR */ ++ ++/* ++ * AR531X_NUM_ENET_MAC defines the number of ethernet MACs that ++ * should be considered available. The AR5312 supports 2 enet MACS, ++ * even though many reference boards only actually use 1 of them ++ * (i.e. Only MAC 0 is actually connected to an enet PHY or PHY switch. ++ * The AR2312 supports 1 enet MAC. ++ */ ++#define AR531X_NUM_ENET_MAC 2 ++ ++/* ++ * Need these defines to determine true number of ethernet MACs ++ */ ++#define AR5212_AR5312_REV2 0x0052 /* AR5312 WMAC (AP31) */ ++#define AR5212_AR5312_REV7 0x0057 /* AR5312 WMAC (AP30-040) */ ++#define AR5212_AR2313_REV8 0x0058 /* AR2313 WMAC (AP43-030) */ ++#define AR531X_RADIO_MASK_OFF 0xc8 ++#define AR531X_RADIO0_MASK 0x0003 ++#define AR531X_RADIO1_MASK 0x000c ++#define AR531X_RADIO1_S 2 ++ ++/* ++ * AR531X_NUM_WMAC defines the number of Wireless MACs that\ ++ * should be considered available. ++ */ ++#define AR531X_NUM_WMAC 2 ++ ++/* Reset/Timer Block Address Map */ ++#define AR531X_RESETTMR (AR531X_APBBASE + 0x3000) ++#define AR531X_TIMER (AR531X_RESETTMR + 0x0000) /* countdown timer */ ++#define AR531X_WD_CTRL (AR531X_RESETTMR + 0x0008) /* watchdog cntrl */ ++#define AR531X_WD_TIMER (AR531X_RESETTMR + 0x000c) /* watchdog timer */ ++#define AR531X_ISR (AR531X_RESETTMR + 0x0010) /* Intr Status Reg */ ++#define AR531X_IMR (AR531X_RESETTMR + 0x0014) /* Intr Mask Reg */ ++#define AR531X_RESET (AR531X_RESETTMR + 0x0020) ++#define AR5312_CLOCKCTL1 (AR531X_RESETTMR + 0x0064) ++#define AR5312_SCRATCH (AR531X_RESETTMR + 0x006c) ++#define AR531X_PROCADDR (AR531X_RESETTMR + 0x0070) ++#define AR531X_PROC1 (AR531X_RESETTMR + 0x0074) ++#define AR531X_DMAADDR (AR531X_RESETTMR + 0x0078) ++#define AR531X_DMA1 (AR531X_RESETTMR + 0x007c) ++#define AR531X_ENABLE (AR531X_RESETTMR + 0x0080) /* interface enb */ ++#define AR531X_REV (AR531X_RESETTMR + 0x0090) /* revision */ ++ ++/* AR531X_WD_CTRL register bit field definitions */ ++#define AR531X_WD_CTRL_IGNORE_EXPIRATION 0x0000 ++#define AR531X_WD_CTRL_NMI 0x0001 ++#define AR531X_WD_CTRL_RESET 0x0002 ++ ++/* AR531X_ISR register bit field definitions */ ++#define AR531X_ISR_NONE 0x0000 ++#define AR531X_ISR_TIMER 0x0001 ++#define AR531X_ISR_AHBPROC 0x0002 ++#define AR531X_ISR_AHBDMA 0x0004 ++#define AR531X_ISR_GPIO 0x0008 ++#define AR531X_ISR_UART0 0x0010 ++#define AR531X_ISR_UART0DMA 0x0020 ++#define AR531X_ISR_WD 0x0040 ++#define AR531X_ISR_LOCAL 0x0080 ++ ++/* AR531X_RESET register bit field definitions */ ++#define AR531X_RESET_SYSTEM 0x00000001 /* cold reset full system */ ++#define AR531X_RESET_PROC 0x00000002 /* cold reset MIPS core */ ++#define AR531X_RESET_WLAN0 0x00000004 /* cold reset WLAN MAC and BB */ ++#define AR531X_RESET_EPHY0 0x00000008 /* cold reset ENET0 phy */ ++#define AR531X_RESET_EPHY1 0x00000010 /* cold reset ENET1 phy */ ++#define AR531X_RESET_ENET0 0x00000020 /* cold reset ENET0 mac */ ++#define AR531X_RESET_ENET1 0x00000040 /* cold reset ENET1 mac */ ++#define AR531X_RESET_UART0 0x00000100 /* cold reset UART0 (high speed) */ ++#define AR531X_RESET_WLAN1 0x00000200 /* cold reset WLAN MAC/BB */ ++#define AR531X_RESET_APB 0x00000400 /* cold reset APB (ar5312) */ ++#define AR531X_RESET_WARM_PROC 0x00001000 /* warm reset MIPS core */ ++#define AR531X_RESET_WARM_WLAN0_MAC 0x00002000 /* warm reset WLAN0 MAC */ ++#define AR531X_RESET_WARM_WLAN0_BB 0x00004000 /* warm reset WLAN0 BaseBand */ ++#define AR531X_RESET_NMI 0x00010000 /* send an NMI to the processor */ ++#define AR531X_RESET_WARM_WLAN1_MAC 0x00020000 /* warm reset WLAN1 mac */ ++#define AR531X_RESET_WARM_WLAN1_BB 0x00040000 /* warm reset WLAN1 baseband */ ++#define AR531X_RESET_LOCAL_BUS 0x00080000 /* reset local bus */ ++#define AR531X_RESET_WDOG 0x00100000 /* last reset was a watchdog */ ++ ++#define AR531X_RESET_WMAC0_BITS \ ++ AR531X_RESET_WLAN0 |\ ++ AR531X_RESET_WARM_WLAN0_MAC |\ ++ AR531X_RESET_WARM_WLAN0_BB ++ ++#define AR531X_RESERT_WMAC1_BITS \ ++ AR531X_RESET_WLAN1 |\ ++ AR531X_RESET_WARM_WLAN1_MAC |\ ++ AR531X_RESET_WARM_WLAN1_BB ++ ++/* AR5312_CLOCKCTL1 register bit field definitions */ ++#define AR5312_CLOCKCTL1_PREDIVIDE_MASK 0x00000030 ++#define AR5312_CLOCKCTL1_PREDIVIDE_SHIFT 4 ++#define AR5312_CLOCKCTL1_MULTIPLIER_MASK 0x00001f00 ++#define AR5312_CLOCKCTL1_MULTIPLIER_SHIFT 8 ++#define AR5312_CLOCKCTL1_DOUBLER_MASK 0x00010000 ++ ++/* Valid for AR5312 and AR2312 */ ++#define AR5312_CLOCKCTL1_PREDIVIDE_MASK 0x00000030 ++#define AR5312_CLOCKCTL1_PREDIVIDE_SHIFT 4 ++#define AR5312_CLOCKCTL1_MULTIPLIER_MASK 0x00001f00 ++#define AR5312_CLOCKCTL1_MULTIPLIER_SHIFT 8 ++#define AR5312_CLOCKCTL1_DOUBLER_MASK 0x00010000 ++ ++/* Valid for AR2313 */ ++#define AR2313_CLOCKCTL1_PREDIVIDE_MASK 0x00003000 ++#define AR2313_CLOCKCTL1_PREDIVIDE_SHIFT 12 ++#define AR2313_CLOCKCTL1_MULTIPLIER_MASK 0x001f0000 ++#define AR2313_CLOCKCTL1_MULTIPLIER_SHIFT 16 ++#define AR2313_CLOCKCTL1_DOUBLER_MASK 0x00000000 ++ ++ ++/* AR531X_ENABLE register bit field definitions */ ++#define AR531X_ENABLE_WLAN0 0x0001 ++#define AR531X_ENABLE_ENET0 0x0002 ++#define AR531X_ENABLE_ENET1 0x0004 ++#define AR531X_ENABLE_UART_AND_WLAN1_PIO 0x0008 /* UART, and WLAN1 PIOs */ ++#define AR531X_ENABLE_WLAN1_DMA 0x0010 /* WLAN1 DMAs */ ++#define AR531X_ENABLE_WLAN1 \ ++ (AR531X_ENABLE_UART_AND_WLAN1_PIO | AR531X_ENABLE_WLAN1_DMA) ++ ++/* AR531X_REV register bit field definitions */ ++#define AR531X_REV_WMAC_MAJ 0xf000 ++#define AR531X_REV_WMAC_MAJ_S 12 ++#define AR531X_REV_WMAC_MIN 0x0f00 ++#define AR531X_REV_WMAC_MIN_S 8 ++#define AR531X_REV_MAJ 0x00f0 ++#define AR531X_REV_MAJ_S 4 ++#define AR531X_REV_MIN 0x000f ++#define AR531X_REV_MIN_S 0 ++#define AR531X_REV_CHIP (AR531X_REV_MAJ|AR531X_REV_MIN) ++ ++/* Major revision numbers, bits 7..4 of Revision ID register */ ++#define AR531X_REV_MAJ_AR5312 0x4 ++#define AR531X_REV_MAJ_AR2313 0x5 ++ ++/* Minor revision numbers, bits 3..0 of Revision ID register */ ++#define AR5312_REV_MIN_DUAL 0x0 /* Dual WLAN version */ ++#define AR5312_REV_MIN_SINGLE 0x1 /* Single WLAN version */ ++ ++/* AR531X_FLASHCTL register bit field definitions */ ++#define FLASHCTL_IDCY 0x0000000f /* Idle cycle turn around time */ ++#define FLASHCTL_IDCY_S 0 ++#define FLASHCTL_WST1 0x000003e0 /* Wait state 1 */ ++#define FLASHCTL_WST1_S 5 ++#define FLASHCTL_RBLE 0x00000400 /* Read byte lane enable */ ++#define FLASHCTL_WST2 0x0000f800 /* Wait state 2 */ ++#define FLASHCTL_WST2_S 11 ++#define FLASHCTL_AC 0x00070000 /* Flash address check (added) */ ++#define FLASHCTL_AC_S 16 ++#define FLASHCTL_AC_128K 0x00000000 ++#define FLASHCTL_AC_256K 0x00010000 ++#define FLASHCTL_AC_512K 0x00020000 ++#define FLASHCTL_AC_1M 0x00030000 ++#define FLASHCTL_AC_2M 0x00040000 ++#define FLASHCTL_AC_4M 0x00050000 ++#define FLASHCTL_AC_8M 0x00060000 ++#define FLASHCTL_AC_RES 0x00070000 /* 16MB is not supported */ ++#define FLASHCTL_E 0x00080000 /* Flash bank enable (added) */ ++#define FLASHCTL_BUSERR 0x01000000 /* Bus transfer error status flag */ ++#define FLASHCTL_WPERR 0x02000000 /* Write protect error status flag */ ++#define FLASHCTL_WP 0x04000000 /* Write protect */ ++#define FLASHCTL_BM 0x08000000 /* Burst mode */ ++#define FLASHCTL_MW 0x30000000 /* Memory width */ ++#define FLASHCTL_MWx8 0x00000000 /* Memory width x8 */ ++#define FLASHCTL_MWx16 0x10000000 /* Memory width x16 */ ++#define FLASHCTL_MWx32 0x20000000 /* Memory width x32 (not supported) */ ++#define FLASHCTL_ATNR 0x00000000 /* Access type == no retry */ ++#define FLASHCTL_ATR 0x80000000 /* Access type == retry every */ ++#define FLASHCTL_ATR4 0xc0000000 /* Access type == retry every 4 */ ++ ++/* ARM Flash Controller -- 3 flash banks with either x8 or x16 devices. */ ++#define AR531X_FLASHCTL0 (AR531X_FLASHCTL + 0x00) ++#define AR531X_FLASHCTL1 (AR531X_FLASHCTL + 0x04) ++#define AR531X_FLASHCTL2 (AR531X_FLASHCTL + 0x08) ++ ++/* ARM SDRAM Controller -- just enough to determine memory size */ ++#define AR531X_MEM_CFG1 (AR531X_SDRAMCTL + 0x04) ++#define MEM_CFG1_AC0 0x00000700 /* bank 0: SDRAM addr check (added) */ ++#define MEM_CFG1_AC0_S 8 ++#define MEM_CFG1_AC1 0x00007000 /* bank 1: SDRAM addr check (added) */ ++#define MEM_CFG1_AC1_S 12 ++ ++/* GPIO Address Map */ ++#define AR531X_GPIO (AR531X_APBBASE + 0x2000) ++#define AR531X_GPIO_DO (AR531X_GPIO + 0x00) /* output register */ ++#define AR531X_GPIO_DI (AR531X_GPIO + 0x04) /* intput register */ ++#define AR531X_GPIO_CR (AR531X_GPIO + 0x08) /* control register */ ++ ++/* GPIO Control Register bit field definitions */ ++#define AR531X_GPIO_CR_M(x) (1 << (x)) /* mask for i/o */ ++#define AR531X_GPIO_CR_O(x) (0 << (x)) /* mask for output */ ++#define AR531X_GPIO_CR_I(x) (1 << (x)) /* mask for input */ ++#define AR531X_GPIO_CR_INT(x) (1 << ((x)+8)) /* mask for interrupt */ ++#define AR531X_GPIO_CR_UART(x) (1 << ((x)+16)) /* uart multiplex */ ++#define AR531X_NUM_GPIO 8 ++ ++ ++#endif ++ +diff -Nur linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/cpu-feature-overrides.h linux-2.6.37/arch/mips/include/asm/mach-ar231x/cpu-feature-overrides.h +--- linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/cpu-feature-overrides.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/include/asm/mach-ar231x/cpu-feature-overrides.h 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,84 @@ ++/* ++ * Atheros SoC specific CPU feature overrides ++ * ++ * Copyright (C) 2008 Gabor Juhos <juhosg@openwrt.org> ++ * ++ * This file was derived from: include/asm-mips/cpu-features.h ++ * Copyright (C) 2003, 2004 Ralf Baechle ++ * Copyright (C) 2004 Maciej W. Rozycki ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published ++ * by the Free Software Foundation. ++ * ++ */ ++#ifndef __ASM_MACH_ATHEROS_CPU_FEATURE_OVERRIDES_H ++#define __ASM_MACH_ATHEROS_CPU_FEATURE_OVERRIDES_H ++ ++/* ++ * The ATHEROS SoCs have MIPS 4Kc/4KEc core. ++ */ ++#define cpu_has_tlb 1 ++#define cpu_has_4kex 1 ++#define cpu_has_3k_cache 0 ++#define cpu_has_4k_cache 1 ++#define cpu_has_tx39_cache 0 ++#define cpu_has_sb1_cache 0 ++#define cpu_has_fpu 0 ++#define cpu_has_32fpr 0 ++#define cpu_has_counter 1 ++/* #define cpu_has_watch ? */ ++/* #define cpu_has_divec ? */ ++/* #define cpu_has_vce ? */ ++/* #define cpu_has_cache_cdex_p ? */ ++/* #define cpu_has_cache_cdex_s ? */ ++/* #define cpu_has_prefetch ? */ ++/* #define cpu_has_mcheck ? */ ++#define cpu_has_ejtag 1 ++ ++#if !defined(CONFIG_ATHEROS_AR5312) ++# define cpu_has_llsc 1 ++#else ++/* ++ * The MIPS 4Kc V0.9 core in the AR5312/AR2312 have problems with the ++ * ll/sc instructions. ++ */ ++# define cpu_has_llsc 0 ++#endif ++ ++#define cpu_has_mips16 0 ++#define cpu_has_mdmx 0 ++#define cpu_has_mips3d 0 ++#define cpu_has_smartmips 0 ++ ++/* #define cpu_has_vtag_icache ? */ ++/* #define cpu_has_dc_aliases ? */ ++/* #define cpu_has_ic_fills_f_dc ? */ ++/* #define cpu_has_pindexed_dcache ? */ ++ ++/* #define cpu_icache_snoops_remote_store ? */ ++ ++#define cpu_has_mips32r1 1 ++ ++#if !defined(CONFIG_ATHEROS_AR5312) ++# define cpu_has_mips32r2 1 ++#endif ++ ++#define cpu_has_mips64r1 0 ++#define cpu_has_mips64r2 0 ++ ++#define cpu_has_dsp 0 ++#define cpu_has_mipsmt 0 ++ ++/* #define cpu_has_nofpuex ? */ ++#define cpu_has_64bits 0 ++#define cpu_has_64bit_zero_reg 0 ++#define cpu_has_64bit_gp_regs 0 ++#define cpu_has_64bit_addresses 0 ++ ++/* #define cpu_has_inclusive_pcaches ? */ ++ ++/* #define cpu_dcache_line_size() ? */ ++/* #define cpu_icache_line_size() ? */ ++ ++#endif /* __ASM_MACH_ATHEROS_CPU_FEATURE_OVERRIDES_H */ +diff -Nur linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/dma-coherence.h linux-2.6.37/arch/mips/include/asm/mach-ar231x/dma-coherence.h +--- linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/dma-coherence.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/include/asm/mach-ar231x/dma-coherence.h 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,64 @@ ++/* ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> ++ * Copyright (C) 2007 Felix Fietkau <nbd@openwrt.org> ++ * ++ */ ++#ifndef __ASM_MACH_GENERIC_DMA_COHERENCE_H ++#define __ASM_MACH_GENERIC_DMA_COHERENCE_H ++ ++#define PCI_DMA_OFFSET 0x20000000 ++ ++struct device; ++ ++static inline dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) ++{ ++ return virt_to_phys(addr) + (dev != NULL ? PCI_DMA_OFFSET : 0); ++} ++ ++static inline dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) ++{ ++ return page_to_phys(page) + (dev != NULL ? PCI_DMA_OFFSET : 0); ++} ++ ++static inline unsigned long plat_dma_addr_to_phys(struct device *dev, ++ dma_addr_t dma_addr) ++{ ++ return (dma_addr > PCI_DMA_OFFSET ? dma_addr - PCI_DMA_OFFSET : dma_addr); ++} ++ ++static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr, ++ size_t size, enum dma_data_direction direction) ++{ ++} ++ ++static inline int plat_dma_supported(struct device *dev, u64 mask) ++{ ++ return 1; ++} ++ ++static inline void plat_extra_sync_for_device(struct device *dev) ++{ ++ return; ++} ++ ++static inline int plat_dma_mapping_error(struct device *dev, ++ dma_addr_t dma_addr) ++{ ++ return 0; ++} ++ ++static inline int plat_device_is_coherent(struct device *dev) ++{ ++#ifdef CONFIG_DMA_COHERENT ++ return 1; ++#endif ++#ifdef CONFIG_DMA_NONCOHERENT ++ return 0; ++#endif ++} ++ ++#endif /* __ASM_MACH_GENERIC_DMA_COHERENCE_H */ +diff -Nur linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/gpio.h linux-2.6.37/arch/mips/include/asm/mach-ar231x/gpio.h +--- linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/gpio.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/include/asm/mach-ar231x/gpio.h 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,84 @@ ++#ifndef _ATHEROS_GPIO_H_ ++#define _ATHEROS_GPIO_H_ ++ ++#include <ar231x.h> ++ ++struct ar231x_gpiodev { ++ u32 valid_mask; ++ u32 (*get_output)(void); ++ u32 (*set_output)(u32 mask, u32 val); ++ u32 (*get)(void); ++ u32 (*set)(u32 mask, u32 val); ++}; ++ ++extern const struct ar231x_gpiodev *ar231x_gpiodev; ++ ++/* ++ * Wrappers for the generic GPIO layer ++ */ ++ ++static inline int gpio_direction_input(unsigned gpio) { ++ u32 mask = 1 << gpio; ++ ++ if (!(ar231x_gpiodev->valid_mask & mask)) ++ return -ENXIO; ++ ++ ar231x_gpiodev->set_output(mask, 0); ++ return 0; ++} ++ ++static inline void gpio_set_value(unsigned gpio, int value) { ++ u32 mask = 1 << gpio; ++ ++ if (!(ar231x_gpiodev->valid_mask & mask)) ++ return; ++ ++ ar231x_gpiodev->set(mask, (!!value) * mask); ++} ++ ++static inline int gpio_direction_output(unsigned gpio, int value) { ++ u32 mask = 1 << gpio; ++ ++ if (!(ar231x_gpiodev->valid_mask & mask)) ++ return -ENXIO; ++ ++ ar231x_gpiodev->set_output(mask, mask); ++ ar231x_gpiodev->set(mask, (!!value) * mask); ++ return 0; ++} ++ ++/* Reads the gpio pin. Unchecked function */ ++static inline int gpio_get_value(unsigned gpio) { ++ u32 mask = 1 << gpio; ++ ++ if (!(ar231x_gpiodev->valid_mask & mask)) ++ return 0; ++ ++ return !!(ar231x_gpiodev->get() & mask); ++} ++ ++static inline int gpio_request(unsigned gpio, const char *label) { ++ return 0; ++} ++ ++static inline void gpio_free(unsigned gpio) { ++} ++ ++/* Returns IRQ to attach for gpio. Unchecked function */ ++static inline int gpio_to_irq(unsigned gpio) { ++ return AR531X_GPIO_IRQ(gpio); ++} ++ ++/* Returns gpio for IRQ attached. Unchecked function */ ++static inline int irq_to_gpio(unsigned irq) { ++ return (irq - (AR531X_GPIO_IRQ(0))); ++} ++ ++static inline int gpio_set_debounce(unsigned gpio, unsigned debounce) ++{ ++ return -ENOSYS; ++} ++ ++#include <asm-generic/gpio.h> /* cansleep wrappers */ ++ ++#endif +diff -Nur linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/reset.h linux-2.6.37/arch/mips/include/asm/mach-ar231x/reset.h +--- linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/reset.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/include/asm/mach-ar231x/reset.h 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,6 @@ ++#ifndef __AR531X_RESET_H ++#define __AR531X_RESET_H ++ ++void ar531x_disable_reset_button(void); ++ ++#endif /* __AR531X_RESET_H */ +diff -Nur linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/war.h linux-2.6.37/arch/mips/include/asm/mach-ar231x/war.h +--- linux-2.6.37.orig/arch/mips/include/asm/mach-ar231x/war.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/include/asm/mach-ar231x/war.h 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,25 @@ ++/* ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org> ++ */ ++#ifndef __ASM_MIPS_MACH_ATHEROS_WAR_H ++#define __ASM_MIPS_MACH_ATHEROS_WAR_H ++ ++#define R4600_V1_INDEX_ICACHEOP_WAR 0 ++#define R4600_V1_HIT_CACHEOP_WAR 0 ++#define R4600_V2_HIT_CACHEOP_WAR 0 ++#define R5432_CP0_INTERRUPT_WAR 0 ++#define BCM1250_M3_WAR 0 ++#define SIBYTE_1956_WAR 0 ++#define MIPS4K_ICACHE_REFILL_WAR 0 ++#define MIPS_CACHE_SYNC_WAR 0 ++#define TX49XX_ICACHE_INDEX_INV_WAR 0 ++#define RM9000_CDEX_SMP_WAR 0 ++#define ICACHE_REFILLS_WORKAROUND_WAR 0 ++#define R10000_LLSC_WAR 0 ++#define MIPS34K_MISSED_ITLB_WAR 0 ++ ++#endif /* __ASM_MIPS_MACH_ATHEROS_WAR_H */ +diff -Nur linux-2.6.37.orig/arch/mips/kernel/cevt-r4k.c linux-2.6.37/arch/mips/kernel/cevt-r4k.c +--- linux-2.6.37.orig/arch/mips/kernel/cevt-r4k.c 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/arch/mips/kernel/cevt-r4k.c 2011-04-12 08:12:01.000000000 +0200 +@@ -168,20 +168,23 @@ + struct clock_event_device *cd; + unsigned int irq; + +- if (!cpu_has_counter || !mips_hpt_frequency) +- return -ENXIO; +- +- if (!c0_compare_int_usable()) +- return -ENXIO; +- + /* + * With vectored interrupts things are getting platform specific. + * get_c0_compare_int is a hook to allow a platform to return the + * interrupt number of it's liking. + */ + irq = MIPS_CPU_IRQ_BASE + cp0_compare_irq; +- if (get_c0_compare_int) ++ if (get_c0_compare_int) { + irq = get_c0_compare_int(); ++ if ((irq >= MIPS_CPU_IRQ_BASE) && (irq < MIPS_CPU_IRQ_BASE + 8)) ++ cp0_compare_irq = irq - MIPS_CPU_IRQ_BASE; ++ } ++ ++ if (!cpu_has_counter || !mips_hpt_frequency) ++ return -ENXIO; ++ ++ if (!c0_compare_int_usable()) ++ return -ENXIO; + + cd = &per_cpu(mips_clockevent_device, cpu); + +diff -Nur linux-2.6.37.orig/drivers/mtd/devices/Kconfig linux-2.6.37/drivers/mtd/devices/Kconfig +--- linux-2.6.37.orig/drivers/mtd/devices/Kconfig 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/drivers/mtd/devices/Kconfig 2011-04-12 08:12:01.000000000 +0200 +@@ -112,6 +112,10 @@ + Set up your spi devices with the right board-specific platform data, + if you want to specify device partitioning. + ++config MTD_AR2315 ++ tristate "Atheros AR2315+ SPI Flash support" ++ depends on ATHEROS_AR2315 ++ + config MTD_SLRAM + tristate "Uncached system RAM" + help +diff -Nur linux-2.6.37.orig/drivers/mtd/devices/Makefile linux-2.6.37/drivers/mtd/devices/Makefile +--- linux-2.6.37.orig/drivers/mtd/devices/Makefile 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/drivers/mtd/devices/Makefile 2011-04-12 08:12:01.000000000 +0200 +@@ -17,3 +17,4 @@ + obj-$(CONFIG_MTD_DATAFLASH) += mtd_dataflash.o + obj-$(CONFIG_MTD_M25P80) += m25p80.o + obj-$(CONFIG_MTD_SST25L) += sst25l.o ++obj-$(CONFIG_MTD_AR2315) += ar2315.o +diff -Nur linux-2.6.37.orig/drivers/mtd/devices/ar2315.c linux-2.6.37/drivers/mtd/devices/ar2315.c +--- linux-2.6.37.orig/drivers/mtd/devices/ar2315.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/drivers/mtd/devices/ar2315.c 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,517 @@ ++ ++/* ++ * MTD driver for the SPI Flash Memory support on Atheros AR2315 ++ * ++ * Copyright (c) 2005-2006 Atheros Communications Inc. ++ * Copyright (C) 2006-2007 FON Technology, SL. ++ * Copyright (C) 2006-2007 Imre Kaloz <kaloz@openwrt.org> ++ * Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org> ++ * ++ * This code is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ */ ++ ++#include <linux/kernel.h> ++#include <linux/module.h> ++#include <linux/types.h> ++#include <linux/version.h> ++#include <linux/errno.h> ++#include <linux/slab.h> ++#include <linux/mtd/mtd.h> ++#include <linux/mtd/partitions.h> ++#include <linux/platform_device.h> ++#include <linux/sched.h> ++#include <linux/root_dev.h> ++#include <linux/delay.h> ++#include <asm/delay.h> ++#include <asm/io.h> ++ ++#include <ar2315_spiflash.h> ++#include <ar231x_platform.h> ++#include <ar231x.h> ++ ++ ++#define SPIFLASH "spiflash: " ++#define busy_wait(_priv, _condition, _wait) do { \ ++ while (_condition) { \ ++ spin_unlock_bh(&_priv->lock); \ ++ if (_wait > 1) \ ++ msleep(_wait); \ ++ else if ((_wait == 1) && need_resched()) \ ++ schedule(); \ ++ else \ ++ udelay(1); \ ++ spin_lock_bh(&_priv->lock); \ ++ } \ ++} while (0) ++ ++enum { ++ FLASH_NONE, ++ FLASH_1MB, ++ FLASH_2MB, ++ FLASH_4MB, ++ FLASH_8MB, ++ FLASH_16MB, ++}; ++ ++/* Flash configuration table */ ++struct flashconfig { ++ u32 byte_cnt; ++ u32 sector_cnt; ++ u32 sector_size; ++}; ++ ++const struct flashconfig flashconfig_tbl[] = { ++ [FLASH_NONE] = { 0, 0, 0}, ++ [FLASH_1MB] = { STM_1MB_BYTE_COUNT, STM_1MB_SECTOR_COUNT, STM_1MB_SECTOR_SIZE}, ++ [FLASH_2MB] = { STM_2MB_BYTE_COUNT, STM_2MB_SECTOR_COUNT, STM_2MB_SECTOR_SIZE}, ++ [FLASH_4MB] = { STM_4MB_BYTE_COUNT, STM_4MB_SECTOR_COUNT, STM_4MB_SECTOR_SIZE}, ++ [FLASH_8MB] = { STM_8MB_BYTE_COUNT, STM_8MB_SECTOR_COUNT, STM_8MB_SECTOR_SIZE}, ++ [FLASH_16MB] = { STM_16MB_BYTE_COUNT, STM_16MB_SECTOR_COUNT, STM_16MB_SECTOR_SIZE} ++}; ++ ++/* Mapping of generic opcodes to STM serial flash opcodes */ ++enum { ++ SPI_WRITE_ENABLE, ++ SPI_WRITE_DISABLE, ++ SPI_RD_STATUS, ++ SPI_WR_STATUS, ++ SPI_RD_DATA, ++ SPI_FAST_RD_DATA, ++ SPI_PAGE_PROGRAM, ++ SPI_SECTOR_ERASE, ++ SPI_BULK_ERASE, ++ SPI_DEEP_PWRDOWN, ++ SPI_RD_SIG, ++}; ++ ++struct opcodes { ++ __u16 code; ++ __s8 tx_cnt; ++ __s8 rx_cnt; ++}; ++const struct opcodes stm_opcodes[] = { ++ [SPI_WRITE_ENABLE] = {STM_OP_WR_ENABLE, 1, 0}, ++ [SPI_WRITE_DISABLE] = {STM_OP_WR_DISABLE, 1, 0}, ++ [SPI_RD_STATUS] = {STM_OP_RD_STATUS, 1, 1}, ++ [SPI_WR_STATUS] = {STM_OP_WR_STATUS, 1, 0}, ++ [SPI_RD_DATA] = {STM_OP_RD_DATA, 4, 4}, ++ [SPI_FAST_RD_DATA] = {STM_OP_FAST_RD_DATA, 5, 0}, ++ [SPI_PAGE_PROGRAM] = {STM_OP_PAGE_PGRM, 8, 0}, ++ [SPI_SECTOR_ERASE] = {STM_OP_SECTOR_ERASE, 4, 0}, ++ [SPI_BULK_ERASE] = {STM_OP_BULK_ERASE, 1, 0}, ++ [SPI_DEEP_PWRDOWN] = {STM_OP_DEEP_PWRDOWN, 1, 0}, ++ [SPI_RD_SIG] = {STM_OP_RD_SIG, 4, 1}, ++}; ++ ++/* Driver private data structure */ ++struct spiflash_priv { ++ struct mtd_info mtd; ++ void *readaddr; /* memory mapped data for read */ ++ void *mmraddr; /* memory mapped register space */ ++ wait_queue_head_t wq; ++ spinlock_t lock; ++ int state; ++}; ++ ++#define to_spiflash(_mtd) container_of(_mtd, struct spiflash_priv, mtd) ++ ++enum { ++ FL_READY, ++ FL_READING, ++ FL_ERASING, ++ FL_WRITING ++}; ++ ++/***************************************************************************************************/ ++ ++static u32 ++spiflash_read_reg(struct spiflash_priv *priv, int reg) ++{ ++ return ar231x_read_reg((u32) priv->mmraddr + reg); ++} ++ ++static void ++spiflash_write_reg(struct spiflash_priv *priv, int reg, u32 data) ++{ ++ ar231x_write_reg((u32) priv->mmraddr + reg, data); ++} ++ ++static u32 ++spiflash_wait_busy(struct spiflash_priv *priv) ++{ ++ u32 reg; ++ ++ busy_wait(priv, (reg = spiflash_read_reg(priv, SPI_FLASH_CTL)) & ++ SPI_CTL_BUSY, 0); ++ return reg; ++} ++ ++static u32 ++spiflash_sendcmd (struct spiflash_priv *priv, int opcode, u32 addr) ++{ ++ const struct opcodes *op; ++ u32 reg, mask; ++ ++ op = &stm_opcodes[opcode]; ++ reg = spiflash_wait_busy(priv); ++ spiflash_write_reg(priv, SPI_FLASH_OPCODE, ++ ((u32) op->code) | (addr << 8)); ++ ++ reg &= ~SPI_CTL_TX_RX_CNT_MASK; ++ reg |= SPI_CTL_START | op->tx_cnt | (op->rx_cnt << 4); ++ ++ spiflash_write_reg(priv, SPI_FLASH_CTL, reg); ++ spiflash_wait_busy(priv); ++ ++ if (!op->rx_cnt) ++ return 0; ++ ++ reg = spiflash_read_reg(priv, SPI_FLASH_DATA); ++ ++ switch (op->rx_cnt) { ++ case 1: ++ mask = 0x000000ff; ++ break; ++ case 2: ++ mask = 0x0000ffff; ++ break; ++ case 3: ++ mask = 0x00ffffff; ++ break; ++ default: ++ mask = 0xffffffff; ++ break; ++ } ++ reg &= mask; ++ ++ return reg; ++} ++ ++ ++/* ++ * Probe SPI flash device ++ * Function returns 0 for failure. ++ * and flashconfig_tbl array index for success. ++ */ ++static int ++spiflash_probe_chip (struct spiflash_priv *priv) ++{ ++ u32 sig; ++ int flash_size; ++ ++ /* Read the signature on the flash device */ ++ spin_lock_bh(&priv->lock); ++ sig = spiflash_sendcmd(priv, SPI_RD_SIG, 0); ++ spin_unlock_bh(&priv->lock); ++ ++ switch (sig) { ++ case STM_8MBIT_SIGNATURE: ++ flash_size = FLASH_1MB; ++ break; ++ case STM_16MBIT_SIGNATURE: ++ flash_size = FLASH_2MB; ++ break; ++ case STM_32MBIT_SIGNATURE: ++ flash_size = FLASH_4MB; ++ break; ++ case STM_64MBIT_SIGNATURE: ++ flash_size = FLASH_8MB; ++ break; ++ case STM_128MBIT_SIGNATURE: ++ flash_size = FLASH_16MB; ++ break; ++ default: ++ printk (KERN_WARNING SPIFLASH "Read of flash device signature failed!\n"); ++ return 0; ++ } ++ ++ return flash_size; ++} ++ ++ ++/* wait until the flash chip is ready and grab a lock */ ++static int spiflash_wait_ready(struct spiflash_priv *priv, int state) ++{ ++ DECLARE_WAITQUEUE(wait, current); ++ ++retry: ++ spin_lock_bh(&priv->lock); ++ if (priv->state != FL_READY) { ++ set_current_state(TASK_UNINTERRUPTIBLE); ++ add_wait_queue(&priv->wq, &wait); ++ spin_unlock_bh(&priv->lock); ++ schedule(); ++ remove_wait_queue(&priv->wq, &wait); ++ ++ if(signal_pending(current)) ++ return 0; ++ ++ goto retry; ++ } ++ priv->state = state; ++ ++ return 1; ++} ++ ++static inline void spiflash_done(struct spiflash_priv *priv) ++{ ++ priv->state = FL_READY; ++ spin_unlock_bh(&priv->lock); ++ wake_up(&priv->wq); ++} ++ ++static void ++spiflash_wait_complete(struct spiflash_priv *priv, unsigned int timeout) ++{ ++ busy_wait(priv, spiflash_sendcmd(priv, SPI_RD_STATUS, 0) & ++ SPI_STATUS_WIP, timeout); ++ spiflash_done(priv); ++} ++ ++ ++ ++static int ++spiflash_erase (struct mtd_info *mtd, struct erase_info *instr) ++{ ++ struct spiflash_priv *priv = to_spiflash(mtd); ++ const struct opcodes *op; ++ u32 temp, reg; ++ ++ if (instr->addr + instr->len > mtd->size) ++ return -EINVAL; ++ ++ if (!spiflash_wait_ready(priv, FL_ERASING)) ++ return -EINTR; ++ ++ spiflash_sendcmd(priv, SPI_WRITE_ENABLE, 0); ++ reg = spiflash_wait_busy(priv); ++ ++ op = &stm_opcodes[SPI_SECTOR_ERASE]; ++ temp = ((u32)instr->addr << 8) | (u32)(op->code); ++ spiflash_write_reg(priv, SPI_FLASH_OPCODE, temp); ++ ++ reg &= ~SPI_CTL_TX_RX_CNT_MASK; ++ reg |= op->tx_cnt | SPI_CTL_START; ++ spiflash_write_reg(priv, SPI_FLASH_CTL, reg); ++ ++ spiflash_wait_complete(priv, 20); ++ ++ instr->state = MTD_ERASE_DONE; ++ mtd_erase_callback(instr); ++ ++ return 0; ++} ++ ++static int ++spiflash_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) ++{ ++ struct spiflash_priv *priv = to_spiflash(mtd); ++ u8 *read_addr; ++ ++ if (!len) ++ return 0; ++ ++ if (from + len > mtd->size) ++ return -EINVAL; ++ ++ *retlen = len; ++ ++ if (!spiflash_wait_ready(priv, FL_READING)) ++ return -EINTR; ++ ++ read_addr = (u8 *)(priv->readaddr + from); ++ memcpy_fromio(buf, read_addr, len); ++ spiflash_done(priv); ++ ++ return 0; ++} ++ ++static int ++spiflash_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u8 *buf) ++{ ++ struct spiflash_priv *priv = to_spiflash(mtd); ++ u32 opcode, bytes_left; ++ ++ *retlen = 0; ++ ++ if (!len) ++ return 0; ++ ++ if (to + len > mtd->size) ++ return -EINVAL; ++ ++ bytes_left = len; ++ ++ do { ++ u32 read_len, reg, page_offset, spi_data = 0; ++ ++ read_len = min(bytes_left, sizeof(u32)); ++ ++ /* 32-bit writes cannot span across a page boundary ++ * (256 bytes). This types of writes require two page ++ * program operations to handle it correctly. The STM part ++ * will write the overflow data to the beginning of the ++ * current page as opposed to the subsequent page. ++ */ ++ page_offset = (to & (STM_PAGE_SIZE - 1)) + read_len; ++ ++ if (page_offset > STM_PAGE_SIZE) ++ read_len -= (page_offset - STM_PAGE_SIZE); ++ ++ if (!spiflash_wait_ready(priv, FL_WRITING)) ++ return -EINTR; ++ ++ spiflash_sendcmd(priv, SPI_WRITE_ENABLE, 0); ++ spi_data = 0; ++ switch (read_len) { ++ case 4: ++ spi_data |= buf[3] << 24; ++ /* fall through */ ++ case 3: ++ spi_data |= buf[2] << 16; ++ /* fall through */ ++ case 2: ++ spi_data |= buf[1] << 8; ++ /* fall through */ ++ case 1: ++ spi_data |= buf[0] & 0xff; ++ break; ++ default: ++ break; ++ } ++ ++ spiflash_write_reg(priv, SPI_FLASH_DATA, spi_data); ++ opcode = stm_opcodes[SPI_PAGE_PROGRAM].code | ++ (to & 0x00ffffff) << 8; ++ spiflash_write_reg(priv, SPI_FLASH_OPCODE, opcode); ++ ++ reg = spiflash_read_reg(priv, SPI_FLASH_CTL); ++ reg &= ~SPI_CTL_TX_RX_CNT_MASK; ++ reg |= (read_len + 4) | SPI_CTL_START; ++ spiflash_write_reg(priv, SPI_FLASH_CTL, reg); ++ ++ spiflash_wait_complete(priv, 1); ++ ++ bytes_left -= read_len; ++ to += read_len; ++ buf += read_len; ++ ++ *retlen += read_len; ++ } while (bytes_left != 0); ++ ++ return 0; ++} ++ ++ ++#ifdef CONFIG_MTD_PARTITIONS ++static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", "MyLoader", NULL }; ++#endif ++ ++ ++static int ++spiflash_probe(struct platform_device *pdev) ++{ ++ struct spiflash_priv *priv; ++ struct mtd_partition *parts; ++ struct mtd_info *mtd; ++ int index, num_parts; ++ int result = 0; ++ ++ priv = kzalloc(sizeof(struct spiflash_priv), GFP_KERNEL); ++ spin_lock_init(&priv->lock); ++ init_waitqueue_head(&priv->wq); ++ priv->state = FL_READY; ++ mtd = &priv->mtd; ++ ++ priv->mmraddr = ioremap_nocache(SPI_FLASH_MMR, SPI_FLASH_MMR_SIZE); ++ if (!priv->mmraddr) { ++ printk(KERN_WARNING SPIFLASH "Failed to map flash device\n"); ++ goto error; ++ } ++ ++ index = spiflash_probe_chip(priv); ++ if (!index) { ++ printk (KERN_WARNING SPIFLASH "Found no serial flash device\n"); ++ goto error; ++ } ++ ++ priv->readaddr = ioremap_nocache(SPI_FLASH_READ, flashconfig_tbl[index].byte_cnt); ++ if (!priv->readaddr) { ++ printk (KERN_WARNING SPIFLASH "Failed to map flash device\n"); ++ goto error; ++ } ++ ++ platform_set_drvdata(pdev, priv); ++ mtd->name = "spiflash"; ++ mtd->type = MTD_NORFLASH; ++ mtd->flags = (MTD_CAP_NORFLASH|MTD_WRITEABLE); ++ mtd->size = flashconfig_tbl[index].byte_cnt; ++ mtd->erasesize = flashconfig_tbl[index].sector_size; ++ mtd->writesize = 1; ++ mtd->numeraseregions = 0; ++ mtd->eraseregions = NULL; ++ mtd->erase = spiflash_erase; ++ mtd->read = spiflash_read; ++ mtd->write = spiflash_write; ++ mtd->owner = THIS_MODULE; ++ ++#ifdef CONFIG_MTD_PARTITIONS ++ /* parse redboot partitions */ ++ num_parts = parse_mtd_partitions(mtd, part_probe_types, &parts, 0); ++ if (!num_parts) ++ goto error; ++ ++ result = add_mtd_partitions(mtd, parts, num_parts); ++#endif ++ ++ return result; ++ ++error: ++ if (priv->mmraddr) ++ iounmap(priv->mmraddr); ++ kfree(priv); ++ return -ENXIO; ++} ++ ++static int ++spiflash_remove (struct platform_device *pdev) ++{ ++ struct spiflash_priv *priv = platform_get_drvdata(pdev); ++ struct mtd_info *mtd = &priv->mtd; ++ ++ del_mtd_partitions(mtd); ++ iounmap(priv->mmraddr); ++ iounmap(priv->readaddr); ++ kfree(priv); ++ ++ return 0; ++} ++ ++struct platform_driver spiflash_driver = { ++ .driver.name = "spiflash", ++ .probe = spiflash_probe, ++ .remove = spiflash_remove, ++}; ++ ++int __init ++spiflash_init (void) ++{ ++ return platform_driver_register(&spiflash_driver); ++} ++ ++void __exit ++spiflash_exit (void) ++{ ++ return platform_driver_unregister(&spiflash_driver); ++} ++ ++module_init (spiflash_init); ++module_exit (spiflash_exit); ++ ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("OpenWrt.org, Atheros Communications Inc"); ++MODULE_DESCRIPTION("MTD driver for SPI Flash on Atheros SOC"); ++ +diff -Nur linux-2.6.37.orig/drivers/mtd/redboot.c linux-2.6.37/drivers/mtd/redboot.c +--- linux-2.6.37.orig/drivers/mtd/redboot.c 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/drivers/mtd/redboot.c 2011-04-12 08:12:01.000000000 +0200 +@@ -55,6 +55,22 @@ + return 1; + } + ++static uint32_t mtd_get_offset_erasesize(struct mtd_info *mtd, uint64_t offset) ++{ ++ struct mtd_erase_region_info *regions = mtd->eraseregions; ++ int i; ++ ++ for (i = 0; i < mtd->numeraseregions; i++) { ++ if (regions[i].offset + ++ regions[i].numblocks * regions[i].erasesize <= offset) ++ continue; ++ ++ return regions[i].erasesize; ++ } ++ ++ return mtd->erasesize; ++} ++ + static int parse_redboot_partitions(struct mtd_info *master, + struct mtd_partition **pparts, + unsigned long fis_origin) +@@ -70,36 +86,38 @@ + int namelen = 0; + int nulllen = 0; + int numslots; ++ int first_slot; + unsigned long offset; + #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED + static char nullstring[] = "unallocated"; + #endif + ++ buf = vmalloc(master->erasesize); ++ if (!buf) ++ return -ENOMEM; ++ ++ restart: + if ( directory < 0 ) { + offset = master->size + directory * master->erasesize; +- while (master->block_isbad && ++ while (master->block_isbad && + master->block_isbad(master, offset)) { + if (!offset) { + nogood: + printk(KERN_NOTICE "Failed to find a non-bad block to check for RedBoot partition table\n"); ++ vfree(buf); + return -EIO; + } + offset -= master->erasesize; + } + } else { + offset = directory * master->erasesize; +- while (master->block_isbad && ++ while (master->block_isbad && + master->block_isbad(master, offset)) { + offset += master->erasesize; + if (offset == master->size) + goto nogood; + } + } +- buf = vmalloc(master->erasesize); +- +- if (!buf) +- return -ENOMEM; +- + printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n", + master->name, offset); + +@@ -171,13 +189,21 @@ + } + if (i == numslots) { + /* Didn't find it */ ++ if (offset + master->erasesize < master->size) { ++ /* not at the end of the flash yet, maybe next block :) */ ++ directory++; ++ goto restart; ++ } + printk(KERN_NOTICE "No RedBoot partition table detected in %s\n", + master->name); + ret = 0; + goto out; + } + +- for (i = 0; i < numslots; i++) { ++ first_slot = (buf[i].flash_base & (master->erasesize - 1)) / ++ sizeof(struct fis_image_desc); ++ ++ for (i = first_slot; i < first_slot + numslots; i++) { + struct fis_list *new_fl, **prev; + + if (buf[i].name[0] == 0xff) { +diff -Nur linux-2.6.37.orig/drivers/net/Kconfig linux-2.6.37/drivers/net/Kconfig +--- linux-2.6.37.orig/drivers/net/Kconfig 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/drivers/net/Kconfig 2011-04-12 08:12:01.000000000 +0200 +@@ -251,6 +251,12 @@ + help + Select this if your platform comes with an external 93CX6 eeprom. + ++config AR231X_ETHERNET ++ tristate "AR231x Ethernet support" ++ depends on ATHEROS_AR231X ++ help ++ Support for the AR231x/531x ethernet controller ++ + config MACE + tristate "MACE (Power Mac ethernet) support" + depends on PPC_PMAC && PPC32 +diff -Nur linux-2.6.37.orig/drivers/net/Makefile linux-2.6.37/drivers/net/Makefile +--- linux-2.6.37.orig/drivers/net/Makefile 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/drivers/net/Makefile 2011-04-12 08:12:01.000000000 +0200 +@@ -224,6 +224,7 @@ + obj-$(CONFIG_KORINA) += korina.o + obj-$(CONFIG_MIPS_JAZZ_SONIC) += jazzsonic.o + obj-$(CONFIG_MIPS_AU1X00_ENET) += au1000_eth.o ++obj-$(CONFIG_AR231X_ETHERNET) += ar231x.o + obj-$(CONFIG_MIPS_SIM_NET) += mipsnet.o + obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o + obj-$(CONFIG_DECLANCE) += declance.o +diff -Nur linux-2.6.37.orig/drivers/net/ar231x.c linux-2.6.37/drivers/net/ar231x.c +--- linux-2.6.37.orig/drivers/net/ar231x.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/drivers/net/ar231x.c 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,1327 @@ ++/* ++ * ar231x.c: Linux driver for the Atheros AR231x Ethernet device. ++ * ++ * Copyright (C) 2004 by Sameer Dekate <sdekate@arubanetworks.com> ++ * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org> ++ * Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org> ++ * ++ * Thanks to Atheros for providing hardware and documentation ++ * enabling me to write this driver. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * Additional credits: ++ * This code is taken from John Taylor's Sibyte driver and then ++ * modified for the AR2313. ++ */ ++ ++#include <linux/module.h> ++#include <linux/version.h> ++#include <linux/types.h> ++#include <linux/errno.h> ++#include <linux/ioport.h> ++#include <linux/pci.h> ++#include <linux/netdevice.h> ++#include <linux/etherdevice.h> ++#include <linux/skbuff.h> ++#include <linux/init.h> ++#include <linux/delay.h> ++#include <linux/mm.h> ++#include <linux/highmem.h> ++#include <linux/sockios.h> ++#include <linux/pkt_sched.h> ++#include <linux/mii.h> ++#include <linux/phy.h> ++#include <linux/ethtool.h> ++#include <linux/ctype.h> ++#include <linux/platform_device.h> ++ ++#include <net/sock.h> ++#include <net/ip.h> ++ ++#include <asm/system.h> ++#include <asm/io.h> ++#include <asm/irq.h> ++#include <asm/byteorder.h> ++#include <asm/uaccess.h> ++#include <asm/bootinfo.h> ++ ++#define AR2313_MTU 1692 ++#define AR2313_PRIOS 1 ++#define AR2313_QUEUES (2*AR2313_PRIOS) ++#define AR2313_DESCR_ENTRIES 64 ++ ++ ++#ifndef min ++#define min(a,b) (((a)<(b))?(a):(b)) ++#endif ++ ++#ifndef SMP_CACHE_BYTES ++#define SMP_CACHE_BYTES L1_CACHE_BYTES ++#endif ++ ++#define AR2313_MBOX_SET_BIT 0x8 ++ ++#include "ar231x.h" ++ ++/* ++ * New interrupt handler strategy: ++ * ++ * An old interrupt handler worked using the traditional method of ++ * replacing an skbuff with a new one when a packet arrives. However ++ * the rx rings do not need to contain a static number of buffer ++ * descriptors, thus it makes sense to move the memory allocation out ++ * of the main interrupt handler and do it in a bottom half handler ++ * and only allocate new buffers when the number of buffers in the ++ * ring is below a certain threshold. In order to avoid starving the ++ * NIC under heavy load it is however necessary to force allocation ++ * when hitting a minimum threshold. The strategy for alloction is as ++ * follows: ++ * ++ * RX_LOW_BUF_THRES - allocate buffers in the bottom half ++ * RX_PANIC_LOW_THRES - we are very low on buffers, allocate ++ * the buffers in the interrupt handler ++ * RX_RING_THRES - maximum number of buffers in the rx ring ++ * ++ * One advantagous side effect of this allocation approach is that the ++ * entire rx processing can be done without holding any spin lock ++ * since the rx rings and registers are totally independent of the tx ++ * ring and its registers. This of course includes the kmalloc's of ++ * new skb's. Thus start_xmit can run in parallel with rx processing ++ * and the memory allocation on SMP systems. ++ * ++ * Note that running the skb reallocation in a bottom half opens up ++ * another can of races which needs to be handled properly. In ++ * particular it can happen that the interrupt handler tries to run ++ * the reallocation while the bottom half is either running on another ++ * CPU or was interrupted on the same CPU. To get around this the ++ * driver uses bitops to prevent the reallocation routines from being ++ * reentered. ++ * ++ * TX handling can also be done without holding any spin lock, wheee ++ * this is fun! since tx_csm is only written to by the interrupt ++ * handler. ++ */ ++ ++/* ++ * Threshold values for RX buffer allocation - the low water marks for ++ * when to start refilling the rings are set to 75% of the ring ++ * sizes. It seems to make sense to refill the rings entirely from the ++ * intrrupt handler once it gets below the panic threshold, that way ++ * we don't risk that the refilling is moved to another CPU when the ++ * one running the interrupt handler just got the slab code hot in its ++ * cache. ++ */ ++#define RX_RING_SIZE AR2313_DESCR_ENTRIES ++#define RX_PANIC_THRES (RX_RING_SIZE/4) ++#define RX_LOW_THRES ((3*RX_RING_SIZE)/4) ++#define CRC_LEN 4 ++#define RX_OFFSET 2 ++ ++#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) ++#define VLAN_HDR 4 ++#else ++#define VLAN_HDR 0 ++#endif ++ ++#define AR2313_BUFSIZE (AR2313_MTU + VLAN_HDR + ETH_HLEN + CRC_LEN + RX_OFFSET) ++ ++#ifdef MODULE ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("Sameer Dekate <sdekate@arubanetworks.com>, Imre Kaloz <kaloz@openwrt.org>, Felix Fietkau <nbd@openwrt.org>"); ++MODULE_DESCRIPTION("AR231x Ethernet driver"); ++#endif ++ ++#define virt_to_phys(x) ((u32)(x) & 0x1fffffff) ++ ++// prototypes ++static void ar231x_halt(struct net_device *dev); ++static void rx_tasklet_func(unsigned long data); ++static void rx_tasklet_cleanup(struct net_device *dev); ++static void ar231x_multicast_list(struct net_device *dev); ++static void ar231x_tx_timeout(struct net_device *dev); ++ ++static int ar231x_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum); ++static int ar231x_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, u16 value); ++static int ar231x_mdiobus_reset(struct mii_bus *bus); ++static int ar231x_mdiobus_probe (struct net_device *dev); ++static void ar231x_adjust_link(struct net_device *dev); ++static bool no_phy = false; ++ ++#ifndef ERR ++#define ERR(fmt, args...) printk("%s: " fmt, __func__, ##args) ++#endif ++ ++#ifdef CONFIG_NET_POLL_CONTROLLER ++static void ++ar231x_netpoll(struct net_device *dev) ++{ ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ ar231x_interrupt(dev->irq, dev); ++ local_irq_restore(flags); ++} ++#endif ++ ++static const struct net_device_ops ar231x_ops = { ++ .ndo_open = ar231x_open, ++ .ndo_stop = ar231x_close, ++ .ndo_start_xmit = ar231x_start_xmit, ++ .ndo_set_multicast_list = ar231x_multicast_list, ++ .ndo_do_ioctl = ar231x_ioctl, ++ .ndo_change_mtu = eth_change_mtu, ++ .ndo_validate_addr = eth_validate_addr, ++ .ndo_set_mac_address = eth_mac_addr, ++ .ndo_tx_timeout = ar231x_tx_timeout, ++#ifdef CONFIG_NET_POLL_CONTROLLER ++ .ndo_poll_controller = ar231x_netpoll, ++#endif ++}; ++ ++int __init ar231x_probe(struct platform_device *pdev) ++{ ++ struct net_device *dev; ++ struct ar231x_private *sp; ++ struct resource *res; ++ unsigned long ar_eth_base; ++ char buf[64]; ++ ++ dev = alloc_etherdev(sizeof(struct ar231x_private)); ++ ++ if (dev == NULL) { ++ printk(KERN_ERR ++ "ar231x: Unable to allocate net_device structure!\n"); ++ return -ENOMEM; ++ } ++ ++ platform_set_drvdata(pdev, dev); ++ ++ sp = netdev_priv(dev); ++ sp->dev = dev; ++ sp->cfg = pdev->dev.platform_data; ++ ++ sprintf(buf, "eth%d_membase", pdev->id); ++ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, buf); ++ if (!res) ++ return -ENODEV; ++ ++ sp->link = 0; ++ ar_eth_base = res->start; ++ ++ sprintf(buf, "eth%d_irq", pdev->id); ++ dev->irq = platform_get_irq_byname(pdev, buf); ++ ++ spin_lock_init(&sp->lock); ++ ++ dev->features |= NETIF_F_HIGHDMA; ++ dev->netdev_ops = &ar231x_ops; ++ ++ tasklet_init(&sp->rx_tasklet, rx_tasklet_func, (unsigned long) dev); ++ tasklet_disable(&sp->rx_tasklet); ++ ++ sp->eth_regs = ++ ioremap_nocache(virt_to_phys(ar_eth_base), sizeof(*sp->eth_regs)); ++ if (!sp->eth_regs) { ++ printk("Can't remap eth registers\n"); ++ return (-ENXIO); ++ } ++ ++ /* ++ * When there's only one MAC, PHY regs are typically on ENET0, ++ * even though the MAC might be on ENET1. ++ * Needto remap PHY regs separately in this case ++ */ ++ if (virt_to_phys(ar_eth_base) == virt_to_phys(sp->phy_regs)) ++ sp->phy_regs = sp->eth_regs; ++ else { ++ sp->phy_regs = ++ ioremap_nocache(virt_to_phys(sp->cfg->phy_base), ++ sizeof(*sp->phy_regs)); ++ if (!sp->phy_regs) { ++ printk("Can't remap phy registers\n"); ++ return (-ENXIO); ++ } ++ } ++ ++ sp->dma_regs = ++ ioremap_nocache(virt_to_phys(ar_eth_base + 0x1000), ++ sizeof(*sp->dma_regs)); ++ dev->base_addr = (unsigned int) sp->dma_regs; ++ if (!sp->dma_regs) { ++ printk("Can't remap DMA registers\n"); ++ return (-ENXIO); ++ } ++ ++ sp->int_regs = ioremap_nocache(virt_to_phys(sp->cfg->reset_base), 4); ++ if (!sp->int_regs) { ++ printk("Can't remap INTERRUPT registers\n"); ++ return (-ENXIO); ++ } ++ ++ strncpy(sp->name, "Atheros AR231x", sizeof(sp->name) - 1); ++ sp->name[sizeof(sp->name) - 1] = '\0'; ++ memcpy(dev->dev_addr, sp->cfg->macaddr, 6); ++ ++ if (ar231x_init(dev)) { ++ /* ++ * ar231x_init() calls ar231x_init_cleanup() on error. ++ */ ++ kfree(dev); ++ return -ENODEV; ++ } ++ ++ if (register_netdev(dev)) { ++ printk("%s: register_netdev failed\n", __func__); ++ return -1; ++ } ++ ++ printk("%s: %s: %02x:%02x:%02x:%02x:%02x:%02x, irq %d\n", ++ dev->name, sp->name, ++ dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], ++ dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5], dev->irq); ++ ++ sp->mii_bus = mdiobus_alloc(); ++ if (sp->mii_bus == NULL) ++ return -1; ++ ++ sp->mii_bus->priv = dev; ++ sp->mii_bus->read = ar231x_mdiobus_read; ++ sp->mii_bus->write = ar231x_mdiobus_write; ++ sp->mii_bus->reset = ar231x_mdiobus_reset; ++ sp->mii_bus->name = "ar231x_eth_mii"; ++ snprintf(sp->mii_bus->id, MII_BUS_ID_SIZE, "%d", pdev->id); ++ sp->mii_bus->irq = kmalloc(sizeof(int), GFP_KERNEL); ++ *sp->mii_bus->irq = PHY_POLL; ++ ++ mdiobus_register(sp->mii_bus); ++ ++ /* Workaround for Micrel switch, which is only available on ++ * one PHY and cannot be configured through MDIO */ ++ if (!no_phy) { ++ u32 phy_id = 0; ++ get_phy_id(sp->mii_bus, 1, &phy_id); ++ if (phy_id == 0x00221450) ++ no_phy = true; ++ } ++ if (no_phy) { ++ sp->link = 1; ++ netif_carrier_on(dev); ++ return 0; ++ } ++ no_phy = true; ++ ++ if (ar231x_mdiobus_probe(dev) != 0) { ++ printk(KERN_ERR "%s: mdiobus_probe failed\n", dev->name); ++ rx_tasklet_cleanup(dev); ++ ar231x_init_cleanup(dev); ++ unregister_netdev(dev); ++ kfree(dev); ++ return -ENODEV; ++ } ++ ++ /* start link poll timer */ ++ ar231x_setup_timer(dev); ++ ++ return 0; ++} ++ ++ ++static void ar231x_multicast_list(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ unsigned int filter; ++ ++ filter = sp->eth_regs->mac_control; ++ ++ if (dev->flags & IFF_PROMISC) ++ filter |= MAC_CONTROL_PR; ++ else ++ filter &= ~MAC_CONTROL_PR; ++ if ((dev->flags & IFF_ALLMULTI) || (netdev_mc_count(dev) > 0)) ++ filter |= MAC_CONTROL_PM; ++ else ++ filter &= ~MAC_CONTROL_PM; ++ ++ sp->eth_regs->mac_control = filter; ++} ++ ++static void rx_tasklet_cleanup(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ ++ /* ++ * Tasklet may be scheduled. Need to get it removed from the list ++ * since we're about to free the struct. ++ */ ++ ++ sp->unloading = 1; ++ tasklet_enable(&sp->rx_tasklet); ++ tasklet_kill(&sp->rx_tasklet); ++} ++ ++static int __devexit ar231x_remove(struct platform_device *pdev) ++{ ++ struct net_device *dev = platform_get_drvdata(pdev); ++ struct ar231x_private *sp = netdev_priv(dev); ++ rx_tasklet_cleanup(dev); ++ ar231x_init_cleanup(dev); ++ unregister_netdev(dev); ++ if (sp->mii_bus) { ++ mdiobus_unregister(sp->mii_bus); ++ mdiobus_free(sp->mii_bus); ++ } ++ kfree(dev); ++ return 0; ++} ++ ++ ++/* ++ * Restart the AR2313 ethernet controller. ++ */ ++static int ar231x_restart(struct net_device *dev) ++{ ++ /* disable interrupts */ ++ disable_irq(dev->irq); ++ ++ /* stop mac */ ++ ar231x_halt(dev); ++ ++ /* initialize */ ++ ar231x_init(dev); ++ ++ /* enable interrupts */ ++ enable_irq(dev->irq); ++ ++ return 0; ++} ++ ++static struct platform_driver ar231x_driver = { ++ .driver.name = "ar231x-eth", ++ .probe = ar231x_probe, ++ .remove = __devexit_p(ar231x_remove), ++}; ++ ++int __init ar231x_module_init(void) ++{ ++ return platform_driver_register(&ar231x_driver); ++} ++ ++void __exit ar231x_module_cleanup(void) ++{ ++ platform_driver_unregister(&ar231x_driver); ++} ++ ++module_init(ar231x_module_init); ++module_exit(ar231x_module_cleanup); ++ ++ ++static void ar231x_free_descriptors(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ if (sp->rx_ring != NULL) { ++ kfree((void *) KSEG0ADDR(sp->rx_ring)); ++ sp->rx_ring = NULL; ++ sp->tx_ring = NULL; ++ } ++} ++ ++ ++static int ar231x_allocate_descriptors(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ int size; ++ int j; ++ ar231x_descr_t *space; ++ ++ if (sp->rx_ring != NULL) { ++ printk("%s: already done.\n", __FUNCTION__); ++ return 0; ++ } ++ ++ size = ++ (sizeof(ar231x_descr_t) * (AR2313_DESCR_ENTRIES * AR2313_QUEUES)); ++ space = kmalloc(size, GFP_KERNEL); ++ if (space == NULL) ++ return 1; ++ ++ /* invalidate caches */ ++ dma_cache_inv((unsigned int) space, size); ++ ++ /* now convert pointer to KSEG1 */ ++ space = (ar231x_descr_t *) KSEG1ADDR(space); ++ ++ memset((void *) space, 0, size); ++ ++ sp->rx_ring = space; ++ space += AR2313_DESCR_ENTRIES; ++ ++ sp->tx_ring = space; ++ space += AR2313_DESCR_ENTRIES; ++ ++ /* Initialize the transmit Descriptors */ ++ for (j = 0; j < AR2313_DESCR_ENTRIES; j++) { ++ ar231x_descr_t *td = &sp->tx_ring[j]; ++ td->status = 0; ++ td->devcs = DMA_TX1_CHAINED; ++ td->addr = 0; ++ td->descr = ++ virt_to_phys(&sp-> ++ tx_ring[(j + 1) & (AR2313_DESCR_ENTRIES - 1)]); ++ } ++ ++ return 0; ++} ++ ++ ++/* ++ * Generic cleanup handling data allocated during init. Used when the ++ * module is unloaded or if an error occurs during initialization ++ */ ++static void ar231x_init_cleanup(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ struct sk_buff *skb; ++ int j; ++ ++ ar231x_free_descriptors(dev); ++ ++ if (sp->eth_regs) ++ iounmap((void *) sp->eth_regs); ++ if (sp->dma_regs) ++ iounmap((void *) sp->dma_regs); ++ ++ if (sp->rx_skb) { ++ for (j = 0; j < AR2313_DESCR_ENTRIES; j++) { ++ skb = sp->rx_skb[j]; ++ if (skb) { ++ sp->rx_skb[j] = NULL; ++ dev_kfree_skb(skb); ++ } ++ } ++ kfree(sp->rx_skb); ++ sp->rx_skb = NULL; ++ } ++ ++ if (sp->tx_skb) { ++ for (j = 0; j < AR2313_DESCR_ENTRIES; j++) { ++ skb = sp->tx_skb[j]; ++ if (skb) { ++ sp->tx_skb[j] = NULL; ++ dev_kfree_skb(skb); ++ } ++ } ++ kfree(sp->tx_skb); ++ sp->tx_skb = NULL; ++ } ++} ++ ++static int ar231x_setup_timer(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ ++ init_timer(&sp->link_timer); ++ ++ sp->link_timer.function = ar231x_link_timer_fn; ++ sp->link_timer.data = (int) dev; ++ sp->link_timer.expires = jiffies + HZ; ++ ++ add_timer(&sp->link_timer); ++ return 0; ++ ++} ++ ++static void ar231x_link_timer_fn(unsigned long data) ++{ ++ struct net_device *dev = (struct net_device *) data; ++ struct ar231x_private *sp = netdev_priv(dev); ++ ++ // see if the link status changed ++ // This was needed to make sure we set the PHY to the ++ // autonegotiated value of half or full duplex. ++ ar231x_check_link(dev); ++ ++ // Loop faster when we don't have link. ++ // This was needed to speed up the AP bootstrap time. ++ if (sp->link == 0) { ++ mod_timer(&sp->link_timer, jiffies + HZ / 2); ++ } else { ++ mod_timer(&sp->link_timer, jiffies + LINK_TIMER); ++ } ++} ++ ++static void ar231x_check_link(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ u16 phyData; ++ ++ phyData = ar231x_mdiobus_read(sp->mii_bus, sp->phy, MII_BMSR); ++ if (sp->phyData != phyData) { ++ if (phyData & BMSR_LSTATUS) { ++ /* link is present, ready link partner ability to deterine ++ duplexity */ ++ int duplex = 0; ++ u16 reg; ++ ++ sp->link = 1; ++ reg = ar231x_mdiobus_read(sp->mii_bus, sp->phy, MII_BMCR); ++ if (reg & BMCR_ANENABLE) { ++ /* auto neg enabled */ ++ reg = ar231x_mdiobus_read(sp->mii_bus, sp->phy, MII_LPA); ++ duplex = (reg & (LPA_100FULL | LPA_10FULL)) ? 1 : 0; ++ } else { ++ /* no auto neg, just read duplex config */ ++ duplex = (reg & BMCR_FULLDPLX) ? 1 : 0; ++ } ++ ++ printk(KERN_INFO "%s: Configuring MAC for %s duplex\n", ++ dev->name, (duplex) ? "full" : "half"); ++ ++ if (duplex) { ++ /* full duplex */ ++ sp->eth_regs->mac_control = ++ ((sp->eth_regs-> ++ mac_control | MAC_CONTROL_F) & ~MAC_CONTROL_DRO); ++ } else { ++ /* half duplex */ ++ sp->eth_regs->mac_control = ++ ((sp->eth_regs-> ++ mac_control | MAC_CONTROL_DRO) & ~MAC_CONTROL_F); ++ } ++ } else { ++ /* no link */ ++ sp->link = 0; ++ } ++ sp->phyData = phyData; ++ } ++} ++ ++static int ar231x_reset_reg(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ unsigned int ethsal, ethsah; ++ unsigned int flags; ++ ++ *sp->int_regs |= sp->cfg->reset_mac; ++ mdelay(10); ++ *sp->int_regs &= ~sp->cfg->reset_mac; ++ mdelay(10); ++ *sp->int_regs |= sp->cfg->reset_phy; ++ mdelay(10); ++ *sp->int_regs &= ~sp->cfg->reset_phy; ++ mdelay(10); ++ ++ sp->dma_regs->bus_mode = (DMA_BUS_MODE_SWR); ++ mdelay(10); ++ sp->dma_regs->bus_mode = ++ ((32 << DMA_BUS_MODE_PBL_SHIFT) | DMA_BUS_MODE_BLE); ++ ++ /* enable interrupts */ ++ sp->dma_regs->intr_ena = (DMA_STATUS_AIS | ++ DMA_STATUS_NIS | ++ DMA_STATUS_RI | ++ DMA_STATUS_TI | DMA_STATUS_FBE); ++ sp->dma_regs->xmt_base = virt_to_phys(sp->tx_ring); ++ sp->dma_regs->rcv_base = virt_to_phys(sp->rx_ring); ++ sp->dma_regs->control = ++ (DMA_CONTROL_SR | DMA_CONTROL_ST | DMA_CONTROL_SF); ++ ++ sp->eth_regs->flow_control = (FLOW_CONTROL_FCE); ++ sp->eth_regs->vlan_tag = (0x8100); ++ ++ /* Enable Ethernet Interface */ ++ flags = (MAC_CONTROL_TE | /* transmit enable */ ++ MAC_CONTROL_PM | /* pass mcast */ ++ MAC_CONTROL_F | /* full duplex */ ++ MAC_CONTROL_HBD); /* heart beat disabled */ ++ ++ if (dev->flags & IFF_PROMISC) { /* set promiscuous mode */ ++ flags |= MAC_CONTROL_PR; ++ } ++ sp->eth_regs->mac_control = flags; ++ ++ /* Set all Ethernet station address registers to their initial values */ ++ ethsah = ((((u_int) (dev->dev_addr[5]) << 8) & (u_int) 0x0000FF00) | ++ (((u_int) (dev->dev_addr[4]) << 0) & (u_int) 0x000000FF)); ++ ++ ethsal = ((((u_int) (dev->dev_addr[3]) << 24) & (u_int) 0xFF000000) | ++ (((u_int) (dev->dev_addr[2]) << 16) & (u_int) 0x00FF0000) | ++ (((u_int) (dev->dev_addr[1]) << 8) & (u_int) 0x0000FF00) | ++ (((u_int) (dev->dev_addr[0]) << 0) & (u_int) 0x000000FF)); ++ ++ sp->eth_regs->mac_addr[0] = ethsah; ++ sp->eth_regs->mac_addr[1] = ethsal; ++ ++ mdelay(10); ++ ++ return (0); ++} ++ ++ ++static int ar231x_init(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ int ecode = 0; ++ ++ /* ++ * Allocate descriptors ++ */ ++ if (ar231x_allocate_descriptors(dev)) { ++ printk("%s: %s: ar231x_allocate_descriptors failed\n", ++ dev->name, __FUNCTION__); ++ ecode = -EAGAIN; ++ goto init_error; ++ } ++ ++ /* ++ * Get the memory for the skb rings. ++ */ ++ if (sp->rx_skb == NULL) { ++ sp->rx_skb = ++ kmalloc(sizeof(struct sk_buff *) * AR2313_DESCR_ENTRIES, ++ GFP_KERNEL); ++ if (!(sp->rx_skb)) { ++ printk("%s: %s: rx_skb kmalloc failed\n", ++ dev->name, __FUNCTION__); ++ ecode = -EAGAIN; ++ goto init_error; ++ } ++ } ++ memset(sp->rx_skb, 0, sizeof(struct sk_buff *) * AR2313_DESCR_ENTRIES); ++ ++ if (sp->tx_skb == NULL) { ++ sp->tx_skb = ++ kmalloc(sizeof(struct sk_buff *) * AR2313_DESCR_ENTRIES, ++ GFP_KERNEL); ++ if (!(sp->tx_skb)) { ++ printk("%s: %s: tx_skb kmalloc failed\n", ++ dev->name, __FUNCTION__); ++ ecode = -EAGAIN; ++ goto init_error; ++ } ++ } ++ memset(sp->tx_skb, 0, sizeof(struct sk_buff *) * AR2313_DESCR_ENTRIES); ++ ++ /* ++ * Set tx_csm before we start receiving interrupts, otherwise ++ * the interrupt handler might think it is supposed to process ++ * tx ints before we are up and running, which may cause a null ++ * pointer access in the int handler. ++ */ ++ sp->rx_skbprd = 0; ++ sp->cur_rx = 0; ++ sp->tx_prd = 0; ++ sp->tx_csm = 0; ++ ++ /* ++ * Zero the stats before starting the interface ++ */ ++ memset(&dev->stats, 0, sizeof(dev->stats)); ++ ++ /* ++ * We load the ring here as there seem to be no way to tell the ++ * firmware to wipe the ring without re-initializing it. ++ */ ++ ar231x_load_rx_ring(dev, RX_RING_SIZE); ++ ++ /* ++ * Init hardware ++ */ ++ ar231x_reset_reg(dev); ++ ++ /* ++ * Get the IRQ ++ */ ++ ecode = ++ request_irq(dev->irq, &ar231x_interrupt, ++ IRQF_DISABLED | IRQF_SAMPLE_RANDOM, ++ dev->name, dev); ++ if (ecode) { ++ printk(KERN_WARNING "%s: %s: Requested IRQ %d is busy\n", ++ dev->name, __FUNCTION__, dev->irq); ++ goto init_error; ++ } ++ ++ ++ tasklet_enable(&sp->rx_tasklet); ++ ++ return 0; ++ ++ init_error: ++ ar231x_init_cleanup(dev); ++ return ecode; ++} ++ ++/* ++ * Load the rx ring. ++ * ++ * Loading rings is safe without holding the spin lock since this is ++ * done only before the device is enabled, thus no interrupts are ++ * generated and by the interrupt handler/tasklet handler. ++ */ ++static void ar231x_load_rx_ring(struct net_device *dev, int nr_bufs) ++{ ++ ++ struct ar231x_private *sp = netdev_priv(dev); ++ short i, idx; ++ ++ idx = sp->rx_skbprd; ++ ++ for (i = 0; i < nr_bufs; i++) { ++ struct sk_buff *skb; ++ ar231x_descr_t *rd; ++ int offset = RX_OFFSET; ++ ++ if (sp->rx_skb[idx]) ++ break; ++ ++ skb = netdev_alloc_skb(dev, AR2313_BUFSIZE); ++ if (!skb) { ++ printk("\n\n\n\n %s: No memory in system\n\n\n\n", ++ __FUNCTION__); ++ break; ++ } ++ ++ /* ++ * Make sure IP header starts on a fresh cache line. ++ */ ++ skb->dev = dev; ++ if (sp->phy_dev) ++ offset += sp->phy_dev->pkt_align; ++ skb_reserve(skb, offset); ++ sp->rx_skb[idx] = skb; ++ ++ rd = (ar231x_descr_t *) & sp->rx_ring[idx]; ++ ++ /* initialize dma descriptor */ ++ rd->devcs = ((AR2313_BUFSIZE << DMA_RX1_BSIZE_SHIFT) | ++ DMA_RX1_CHAINED); ++ rd->addr = virt_to_phys(skb->data); ++ rd->descr = ++ virt_to_phys(&sp-> ++ rx_ring[(idx + 1) & (AR2313_DESCR_ENTRIES - 1)]); ++ rd->status = DMA_RX_OWN; ++ ++ idx = DSC_NEXT(idx); ++ } ++ ++ if (i) ++ sp->rx_skbprd = idx; ++ ++ return; ++} ++ ++#define AR2313_MAX_PKTS_PER_CALL 64 ++ ++static int ar231x_rx_int(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ struct sk_buff *skb, *skb_new; ++ ar231x_descr_t *rxdesc; ++ unsigned int status; ++ u32 idx; ++ int pkts = 0; ++ int rval; ++ ++ idx = sp->cur_rx; ++ ++ /* process at most the entire ring and then wait for another interrupt ++ */ ++ while (1) { ++ ++ rxdesc = &sp->rx_ring[idx]; ++ status = rxdesc->status; ++ if (status & DMA_RX_OWN) { ++ /* SiByte owns descriptor or descr not yet filled in */ ++ rval = 0; ++ break; ++ } ++ ++ if (++pkts > AR2313_MAX_PKTS_PER_CALL) { ++ rval = 1; ++ break; ++ } ++ ++ if ((status & DMA_RX_ERROR) && !(status & DMA_RX_LONG)) { ++ dev->stats.rx_errors++; ++ dev->stats.rx_dropped++; ++ ++ /* add statistics counters */ ++ if (status & DMA_RX_ERR_CRC) ++ dev->stats.rx_crc_errors++; ++ if (status & DMA_RX_ERR_COL) ++ dev->stats.rx_over_errors++; ++ if (status & DMA_RX_ERR_LENGTH) ++ dev->stats.rx_length_errors++; ++ if (status & DMA_RX_ERR_RUNT) ++ dev->stats.rx_over_errors++; ++ if (status & DMA_RX_ERR_DESC) ++ dev->stats.rx_over_errors++; ++ ++ } else { ++ /* alloc new buffer. */ ++ skb_new = netdev_alloc_skb(dev, AR2313_BUFSIZE + RX_OFFSET); ++ if (skb_new != NULL) { ++ int offset; ++ ++ skb = sp->rx_skb[idx]; ++ /* set skb */ ++ skb_put(skb, ++ ((status >> DMA_RX_LEN_SHIFT) & 0x3fff) - CRC_LEN); ++ dev->stats.rx_bytes += skb->len; ++ ++ /* pass the packet to upper layers */ ++ if (sp->rx) { ++ sp->rx(skb); ++ } else { ++ skb->protocol = eth_type_trans(skb, skb->dev); ++ netif_rx(skb); ++ } ++ skb_new->dev = dev; ++ ++ /* 16 bit align */ ++ offset = RX_OFFSET; ++ if (sp->phy_dev) ++ offset += sp->phy_dev->pkt_align; ++ skb_reserve(skb_new, offset); ++ /* reset descriptor's curr_addr */ ++ rxdesc->addr = virt_to_phys(skb_new->data); ++ ++ dev->stats.rx_packets++; ++ sp->rx_skb[idx] = skb_new; ++ } else { ++ dev->stats.rx_dropped++; ++ } ++ } ++ ++ rxdesc->devcs = ((AR2313_BUFSIZE << DMA_RX1_BSIZE_SHIFT) | ++ DMA_RX1_CHAINED); ++ rxdesc->status = DMA_RX_OWN; ++ ++ idx = DSC_NEXT(idx); ++ } ++ ++ sp->cur_rx = idx; ++ ++ return rval; ++} ++ ++ ++static void ar231x_tx_int(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ u32 idx; ++ struct sk_buff *skb; ++ ar231x_descr_t *txdesc; ++ unsigned int status = 0; ++ ++ idx = sp->tx_csm; ++ ++ while (idx != sp->tx_prd) { ++ txdesc = &sp->tx_ring[idx]; ++ ++ if ((status = txdesc->status) & DMA_TX_OWN) { ++ /* ar231x dma still owns descr */ ++ break; ++ } ++ /* done with this descriptor */ ++ dma_unmap_single(NULL, txdesc->addr, ++ txdesc->devcs & DMA_TX1_BSIZE_MASK, ++ DMA_TO_DEVICE); ++ txdesc->status = 0; ++ ++ if (status & DMA_TX_ERROR) { ++ dev->stats.tx_errors++; ++ dev->stats.tx_dropped++; ++ if (status & DMA_TX_ERR_UNDER) ++ dev->stats.tx_fifo_errors++; ++ if (status & DMA_TX_ERR_HB) ++ dev->stats.tx_heartbeat_errors++; ++ if (status & (DMA_TX_ERR_LOSS | DMA_TX_ERR_LINK)) ++ dev->stats.tx_carrier_errors++; ++ if (status & (DMA_TX_ERR_LATE | ++ DMA_TX_ERR_COL | ++ DMA_TX_ERR_JABBER | DMA_TX_ERR_DEFER)) ++ dev->stats.tx_aborted_errors++; ++ } else { ++ /* transmit OK */ ++ dev->stats.tx_packets++; ++ } ++ ++ skb = sp->tx_skb[idx]; ++ sp->tx_skb[idx] = NULL; ++ idx = DSC_NEXT(idx); ++ dev->stats.tx_bytes += skb->len; ++ dev_kfree_skb_irq(skb); ++ } ++ ++ sp->tx_csm = idx; ++ ++ return; ++} ++ ++ ++static void rx_tasklet_func(unsigned long data) ++{ ++ struct net_device *dev = (struct net_device *) data; ++ struct ar231x_private *sp = netdev_priv(dev); ++ ++ if (sp->unloading) { ++ return; ++ } ++ ++ if (ar231x_rx_int(dev)) { ++ tasklet_hi_schedule(&sp->rx_tasklet); ++ } else { ++ unsigned long flags; ++ spin_lock_irqsave(&sp->lock, flags); ++ sp->dma_regs->intr_ena |= DMA_STATUS_RI; ++ spin_unlock_irqrestore(&sp->lock, flags); ++ } ++} ++ ++static void rx_schedule(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ ++ sp->dma_regs->intr_ena &= ~DMA_STATUS_RI; ++ ++ tasklet_hi_schedule(&sp->rx_tasklet); ++} ++ ++static irqreturn_t ar231x_interrupt(int irq, void *dev_id) ++{ ++ struct net_device *dev = (struct net_device *) dev_id; ++ struct ar231x_private *sp = netdev_priv(dev); ++ unsigned int status, enabled; ++ ++ /* clear interrupt */ ++ /* ++ * Don't clear RI bit if currently disabled. ++ */ ++ status = sp->dma_regs->status; ++ enabled = sp->dma_regs->intr_ena; ++ sp->dma_regs->status = status & enabled; ++ ++ if (status & DMA_STATUS_NIS) { ++ /* normal status */ ++ /* ++ * Don't schedule rx processing if interrupt ++ * is already disabled. ++ */ ++ if (status & enabled & DMA_STATUS_RI) { ++ /* receive interrupt */ ++ rx_schedule(dev); ++ } ++ if (status & DMA_STATUS_TI) { ++ /* transmit interrupt */ ++ ar231x_tx_int(dev); ++ } ++ } ++ ++ /* abnormal status */ ++ if (status & (DMA_STATUS_FBE | DMA_STATUS_TPS)) { ++ ar231x_restart(dev); ++ } ++ return IRQ_HANDLED; ++} ++ ++ ++static int ar231x_open(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ unsigned int ethsal, ethsah; ++ ++ /* reset the hardware, in case the MAC address changed */ ++ ethsah = ((((u_int) (dev->dev_addr[5]) << 8) & (u_int) 0x0000FF00) | ++ (((u_int) (dev->dev_addr[4]) << 0) & (u_int) 0x000000FF)); ++ ++ ethsal = ((((u_int) (dev->dev_addr[3]) << 24) & (u_int) 0xFF000000) | ++ (((u_int) (dev->dev_addr[2]) << 16) & (u_int) 0x00FF0000) | ++ (((u_int) (dev->dev_addr[1]) << 8) & (u_int) 0x0000FF00) | ++ (((u_int) (dev->dev_addr[0]) << 0) & (u_int) 0x000000FF)); ++ ++ sp->eth_regs->mac_addr[0] = ethsah; ++ sp->eth_regs->mac_addr[1] = ethsal; ++ ++ mdelay(10); ++ ++ dev->mtu = 1500; ++ netif_start_queue(dev); ++ ++ sp->eth_regs->mac_control |= MAC_CONTROL_RE; ++ ++ return 0; ++} ++ ++static void ar231x_tx_timeout(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ unsigned long flags; ++ ++ spin_lock_irqsave(&sp->lock, flags); ++ ar231x_restart(dev); ++ spin_unlock_irqrestore(&sp->lock, flags); ++} ++ ++static void ar231x_halt(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ int j; ++ ++ tasklet_disable(&sp->rx_tasklet); ++ ++ /* kill the MAC */ ++ sp->eth_regs->mac_control &= ~(MAC_CONTROL_RE | /* disable Receives */ ++ MAC_CONTROL_TE); /* disable Transmits */ ++ /* stop dma */ ++ sp->dma_regs->control = 0; ++ sp->dma_regs->bus_mode = DMA_BUS_MODE_SWR; ++ ++ /* place phy and MAC in reset */ ++ *sp->int_regs |= (sp->cfg->reset_mac | sp->cfg->reset_phy); ++ ++ /* free buffers on tx ring */ ++ for (j = 0; j < AR2313_DESCR_ENTRIES; j++) { ++ struct sk_buff *skb; ++ ar231x_descr_t *txdesc; ++ ++ txdesc = &sp->tx_ring[j]; ++ txdesc->descr = 0; ++ ++ skb = sp->tx_skb[j]; ++ if (skb) { ++ dev_kfree_skb(skb); ++ sp->tx_skb[j] = NULL; ++ } ++ } ++} ++ ++/* ++ * close should do nothing. Here's why. It's called when ++ * 'ifconfig bond0 down' is run. If it calls free_irq then ++ * the irq is gone forever ! When bond0 is made 'up' again, ++ * the ar231x_open () does not call request_irq (). Worse, ++ * the call to ar231x_halt() generates a WDOG reset due to ++ * the write to 'sp->int_regs' and the box reboots. ++ * Commenting this out is good since it allows the ++ * system to resume when bond0 is made up again. ++ */ ++static int ar231x_close(struct net_device *dev) ++{ ++#if 0 ++ /* ++ * Disable interrupts ++ */ ++ disable_irq(dev->irq); ++ ++ /* ++ * Without (or before) releasing irq and stopping hardware, this ++ * is an absolute non-sense, by the way. It will be reset instantly ++ * by the first irq. ++ */ ++ netif_stop_queue(dev); ++ ++ /* stop the MAC and DMA engines */ ++ ar231x_halt(dev); ++ ++ /* release the interrupt */ ++ free_irq(dev->irq, dev); ++ ++#endif ++ return 0; ++} ++ ++static int ar231x_start_xmit(struct sk_buff *skb, struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ ar231x_descr_t *td; ++ u32 idx; ++ ++ idx = sp->tx_prd; ++ td = &sp->tx_ring[idx]; ++ ++ if (td->status & DMA_TX_OWN) { ++ /* free skbuf and lie to the caller that we sent it out */ ++ dev->stats.tx_dropped++; ++ dev_kfree_skb(skb); ++ ++ /* restart transmitter in case locked */ ++ sp->dma_regs->xmt_poll = 0; ++ return 0; ++ } ++ ++ /* Setup the transmit descriptor. */ ++ td->devcs = ((skb->len << DMA_TX1_BSIZE_SHIFT) | ++ (DMA_TX1_LS | DMA_TX1_IC | DMA_TX1_CHAINED)); ++ td->addr = dma_map_single(NULL, skb->data, skb->len, DMA_TO_DEVICE); ++ td->status = DMA_TX_OWN; ++ ++ /* kick transmitter last */ ++ sp->dma_regs->xmt_poll = 0; ++ ++ sp->tx_skb[idx] = skb; ++ idx = DSC_NEXT(idx); ++ sp->tx_prd = idx; ++ ++ return 0; ++} ++ ++static int ar231x_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) ++{ ++ struct mii_ioctl_data *data = (struct mii_ioctl_data *) &ifr->ifr_data; ++ struct ar231x_private *sp = netdev_priv(dev); ++ int ret; ++ ++ if (!sp->phy_dev) ++ return -ENODEV; ++ ++ switch (cmd) { ++ ++ case SIOCETHTOOL: ++ spin_lock_irq(&sp->lock); ++ ret = phy_ethtool_ioctl(sp->phy_dev, (void *) ifr->ifr_data); ++ spin_unlock_irq(&sp->lock); ++ return ret; ++ ++ case SIOCSIFHWADDR: ++ if (copy_from_user ++ (dev->dev_addr, ifr->ifr_data, sizeof(dev->dev_addr))) ++ return -EFAULT; ++ return 0; ++ ++ case SIOCGIFHWADDR: ++ if (copy_to_user ++ (ifr->ifr_data, dev->dev_addr, sizeof(dev->dev_addr))) ++ return -EFAULT; ++ return 0; ++ ++ case SIOCGMIIPHY: ++ case SIOCGMIIREG: ++ case SIOCSMIIREG: ++ return phy_mii_ioctl(sp->phy_dev, data, cmd); ++ ++ default: ++ break; ++ } ++ ++ return -EOPNOTSUPP; ++} ++ ++static void ar231x_adjust_link(struct net_device *dev) ++{ ++ struct ar231x_private *sp = netdev_priv(dev); ++ unsigned int mc; ++ ++ if (!sp->phy_dev->link) ++ return; ++ ++ if (sp->phy_dev->duplex != sp->oldduplex) { ++ mc = readl(&sp->eth_regs->mac_control); ++ mc &= ~(MAC_CONTROL_F | MAC_CONTROL_DRO); ++ if (sp->phy_dev->duplex) ++ mc |= MAC_CONTROL_F; ++ else ++ mc |= MAC_CONTROL_DRO; ++ writel(mc, &sp->eth_regs->mac_control); ++ sp->oldduplex = sp->phy_dev->duplex; ++ } ++} ++ ++#define MII_ADDR(phy, reg) \ ++ ((reg << MII_ADDR_REG_SHIFT) | (phy << MII_ADDR_PHY_SHIFT)) ++ ++static int ++ar231x_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum) ++{ ++ struct net_device *const dev = bus->priv; ++ struct ar231x_private *sp = netdev_priv(dev); ++ volatile ETHERNET_STRUCT *ethernet = sp->phy_regs; ++ ++ ethernet->mii_addr = MII_ADDR(phy_addr, regnum); ++ while (ethernet->mii_addr & MII_ADDR_BUSY); ++ return (ethernet->mii_data >> MII_DATA_SHIFT); ++} ++ ++static int ++ar231x_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, ++ u16 value) ++{ ++ struct net_device *const dev = bus->priv; ++ struct ar231x_private *sp = netdev_priv(dev); ++ volatile ETHERNET_STRUCT *ethernet = sp->phy_regs; ++ ++ while (ethernet->mii_addr & MII_ADDR_BUSY); ++ ethernet->mii_data = value << MII_DATA_SHIFT; ++ ethernet->mii_addr = MII_ADDR(phy_addr, regnum) | MII_ADDR_WRITE; ++ ++ return 0; ++} ++ ++static int ar231x_mdiobus_reset(struct mii_bus *bus) ++{ ++ struct net_device *const dev = bus->priv; ++ ++ ar231x_reset_reg(dev); ++ ++ return 0; ++} ++ ++static int ar231x_mdiobus_probe (struct net_device *dev) ++{ ++ struct ar231x_private *const sp = netdev_priv(dev); ++ struct phy_device *phydev = NULL; ++ int phy_addr; ++ ++ /* find the first (lowest address) PHY on the current MAC's MII bus */ ++ for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) ++ if (sp->mii_bus->phy_map[phy_addr]) { ++ phydev = sp->mii_bus->phy_map[phy_addr]; ++ sp->phy = phy_addr; ++ break; /* break out with first one found */ ++ } ++ ++ if (!phydev) { ++ printk (KERN_ERR "ar231x: %s: no PHY found\n", dev->name); ++ return -1; ++ } ++ ++ /* now we are supposed to have a proper phydev, to attach to... */ ++ BUG_ON(!phydev); ++ BUG_ON(phydev->attached_dev); ++ ++ phydev = phy_connect(dev, dev_name(&phydev->dev), &ar231x_adjust_link, 0, ++ PHY_INTERFACE_MODE_MII); ++ ++ if (IS_ERR(phydev)) { ++ printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); ++ return PTR_ERR(phydev); ++ } ++ ++ sp->rx = phydev->netif_rx; ++ ++ /* mask with MAC supported features */ ++ phydev->supported &= (SUPPORTED_10baseT_Half ++ | SUPPORTED_10baseT_Full ++ | SUPPORTED_100baseT_Half ++ | SUPPORTED_100baseT_Full ++ | SUPPORTED_Autoneg ++ /* | SUPPORTED_Pause | SUPPORTED_Asym_Pause */ ++ | SUPPORTED_MII ++ | SUPPORTED_TP); ++ ++ phydev->advertising = phydev->supported; ++ ++ sp->oldduplex = -1; ++ sp->phy_dev = phydev; ++ ++ printk(KERN_INFO "%s: attached PHY driver [%s] " ++ "(mii_bus:phy_addr=%s)\n", ++ dev->name, phydev->drv->name, dev_name(&phydev->dev)); ++ ++ return 0; ++} ++ +diff -Nur linux-2.6.37.orig/drivers/net/ar231x.h linux-2.6.37/drivers/net/ar231x.h +--- linux-2.6.37.orig/drivers/net/ar231x.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/drivers/net/ar231x.h 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,304 @@ ++/* ++ * ar231x.h: Linux driver for the Atheros AR231x Ethernet device. ++ * ++ * Copyright (C) 2004 by Sameer Dekate <sdekate@arubanetworks.com> ++ * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org> ++ * Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org> ++ * ++ * Thanks to Atheros for providing hardware and documentation ++ * enabling me to write this driver. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ */ ++ ++#ifndef _AR2313_H_ ++#define _AR2313_H_ ++ ++#include <generated/autoconf.h> ++#include <linux/bitops.h> ++#include <asm/bootinfo.h> ++#include <ar231x_platform.h> ++ ++/* ++ * probe link timer - 5 secs ++ */ ++#define LINK_TIMER (5*HZ) ++ ++#define IS_DMA_TX_INT(X) (((X) & (DMA_STATUS_TI)) != 0) ++#define IS_DMA_RX_INT(X) (((X) & (DMA_STATUS_RI)) != 0) ++#define IS_DRIVER_OWNED(X) (((X) & (DMA_TX_OWN)) == 0) ++ ++#define AR2313_TX_TIMEOUT (HZ/4) ++ ++/* ++ * Rings ++ */ ++#define DSC_RING_ENTRIES_SIZE (AR2313_DESCR_ENTRIES * sizeof(struct desc)) ++#define DSC_NEXT(idx) ((idx + 1) & (AR2313_DESCR_ENTRIES - 1)) ++ ++#define AR2313_MBGET 2 ++#define AR2313_MBSET 3 ++#define AR2313_PCI_RECONFIG 4 ++#define AR2313_PCI_DUMP 5 ++#define AR2313_TEST_PANIC 6 ++#define AR2313_TEST_NULLPTR 7 ++#define AR2313_READ_DATA 8 ++#define AR2313_WRITE_DATA 9 ++#define AR2313_GET_VERSION 10 ++#define AR2313_TEST_HANG 11 ++#define AR2313_SYNC 12 ++ ++#define DMA_RX_ERR_CRC BIT(1) ++#define DMA_RX_ERR_DRIB BIT(2) ++#define DMA_RX_ERR_MII BIT(3) ++#define DMA_RX_EV2 BIT(5) ++#define DMA_RX_ERR_COL BIT(6) ++#define DMA_RX_LONG BIT(7) ++#define DMA_RX_LS BIT(8) /* last descriptor */ ++#define DMA_RX_FS BIT(9) /* first descriptor */ ++#define DMA_RX_MF BIT(10) /* multicast frame */ ++#define DMA_RX_ERR_RUNT BIT(11) /* runt frame */ ++#define DMA_RX_ERR_LENGTH BIT(12) /* length error */ ++#define DMA_RX_ERR_DESC BIT(14) /* descriptor error */ ++#define DMA_RX_ERROR BIT(15) /* error summary */ ++#define DMA_RX_LEN_MASK 0x3fff0000 ++#define DMA_RX_LEN_SHIFT 16 ++#define DMA_RX_FILT BIT(30) ++#define DMA_RX_OWN BIT(31) /* desc owned by DMA controller */ ++ ++#define DMA_RX1_BSIZE_MASK 0x000007ff ++#define DMA_RX1_BSIZE_SHIFT 0 ++#define DMA_RX1_CHAINED BIT(24) ++#define DMA_RX1_RER BIT(25) ++ ++#define DMA_TX_ERR_UNDER BIT(1) /* underflow error */ ++#define DMA_TX_ERR_DEFER BIT(2) /* excessive deferral */ ++#define DMA_TX_COL_MASK 0x78 ++#define DMA_TX_COL_SHIFT 3 ++#define DMA_TX_ERR_HB BIT(7) /* hearbeat failure */ ++#define DMA_TX_ERR_COL BIT(8) /* excessive collisions */ ++#define DMA_TX_ERR_LATE BIT(9) /* late collision */ ++#define DMA_TX_ERR_LINK BIT(10) /* no carrier */ ++#define DMA_TX_ERR_LOSS BIT(11) /* loss of carrier */ ++#define DMA_TX_ERR_JABBER BIT(14) /* transmit jabber timeout */ ++#define DMA_TX_ERROR BIT(15) /* frame aborted */ ++#define DMA_TX_OWN BIT(31) /* descr owned by DMA controller */ ++ ++#define DMA_TX1_BSIZE_MASK 0x000007ff ++#define DMA_TX1_BSIZE_SHIFT 0 ++#define DMA_TX1_CHAINED BIT(24) /* chained descriptors */ ++#define DMA_TX1_TER BIT(25) /* transmit end of ring */ ++#define DMA_TX1_FS BIT(29) /* first segment */ ++#define DMA_TX1_LS BIT(30) /* last segment */ ++#define DMA_TX1_IC BIT(31) /* interrupt on completion */ ++ ++#define RCVPKT_LENGTH(X) (X >> 16) /* Received pkt Length */ ++ ++#define MAC_CONTROL_RE BIT(2) /* receive enable */ ++#define MAC_CONTROL_TE BIT(3) /* transmit enable */ ++#define MAC_CONTROL_DC BIT(5) /* Deferral check */ ++#define MAC_CONTROL_ASTP BIT(8) /* Auto pad strip */ ++#define MAC_CONTROL_DRTY BIT(10) /* Disable retry */ ++#define MAC_CONTROL_DBF BIT(11) /* Disable bcast frames */ ++#define MAC_CONTROL_LCC BIT(12) /* late collision ctrl */ ++#define MAC_CONTROL_HP BIT(13) /* Hash Perfect filtering */ ++#define MAC_CONTROL_HASH BIT(14) /* Unicast hash filtering */ ++#define MAC_CONTROL_HO BIT(15) /* Hash only filtering */ ++#define MAC_CONTROL_PB BIT(16) /* Pass Bad frames */ ++#define MAC_CONTROL_IF BIT(17) /* Inverse filtering */ ++#define MAC_CONTROL_PR BIT(18) /* promiscuous mode (valid frames only) */ ++#define MAC_CONTROL_PM BIT(19) /* pass multicast */ ++#define MAC_CONTROL_F BIT(20) /* full-duplex */ ++#define MAC_CONTROL_DRO BIT(23) /* Disable Receive Own */ ++#define MAC_CONTROL_HBD BIT(28) /* heart-beat disabled (MUST BE SET) */ ++#define MAC_CONTROL_BLE BIT(30) /* big endian mode */ ++#define MAC_CONTROL_RA BIT(31) /* receive all (valid and invalid frames) */ ++ ++#define MII_ADDR_BUSY BIT(0) ++#define MII_ADDR_WRITE BIT(1) ++#define MII_ADDR_REG_SHIFT 6 ++#define MII_ADDR_PHY_SHIFT 11 ++#define MII_DATA_SHIFT 0 ++ ++#define FLOW_CONTROL_FCE BIT(1) ++ ++#define DMA_BUS_MODE_SWR BIT(0) /* software reset */ ++#define DMA_BUS_MODE_BLE BIT(7) /* big endian mode */ ++#define DMA_BUS_MODE_PBL_SHIFT 8 /* programmable burst length 32 */ ++#define DMA_BUS_MODE_DBO BIT(20) /* big-endian descriptors */ ++ ++#define DMA_STATUS_TI BIT(0) /* transmit interrupt */ ++#define DMA_STATUS_TPS BIT(1) /* transmit process stopped */ ++#define DMA_STATUS_TU BIT(2) /* transmit buffer unavailable */ ++#define DMA_STATUS_TJT BIT(3) /* transmit buffer timeout */ ++#define DMA_STATUS_UNF BIT(5) /* transmit underflow */ ++#define DMA_STATUS_RI BIT(6) /* receive interrupt */ ++#define DMA_STATUS_RU BIT(7) /* receive buffer unavailable */ ++#define DMA_STATUS_RPS BIT(8) /* receive process stopped */ ++#define DMA_STATUS_ETI BIT(10) /* early transmit interrupt */ ++#define DMA_STATUS_FBE BIT(13) /* fatal bus interrupt */ ++#define DMA_STATUS_ERI BIT(14) /* early receive interrupt */ ++#define DMA_STATUS_AIS BIT(15) /* abnormal interrupt summary */ ++#define DMA_STATUS_NIS BIT(16) /* normal interrupt summary */ ++#define DMA_STATUS_RS_SHIFT 17 /* receive process state */ ++#define DMA_STATUS_TS_SHIFT 20 /* transmit process state */ ++#define DMA_STATUS_EB_SHIFT 23 /* error bits */ ++ ++#define DMA_CONTROL_SR BIT(1) /* start receive */ ++#define DMA_CONTROL_ST BIT(13) /* start transmit */ ++#define DMA_CONTROL_SF BIT(21) /* store and forward */ ++ ++ ++typedef struct { ++ volatile unsigned int status; // OWN, Device control and status. ++ volatile unsigned int devcs; // pkt Control bits + Length ++ volatile unsigned int addr; // Current Address. ++ volatile unsigned int descr; // Next descriptor in chain. ++} ar231x_descr_t; ++ ++ ++ ++// ++// New Combo structure for Both Eth0 AND eth1 ++// ++typedef struct { ++ volatile unsigned int mac_control; /* 0x00 */ ++ volatile unsigned int mac_addr[2]; /* 0x04 - 0x08 */ ++ volatile unsigned int mcast_table[2]; /* 0x0c - 0x10 */ ++ volatile unsigned int mii_addr; /* 0x14 */ ++ volatile unsigned int mii_data; /* 0x18 */ ++ volatile unsigned int flow_control; /* 0x1c */ ++ volatile unsigned int vlan_tag; /* 0x20 */ ++ volatile unsigned int pad[7]; /* 0x24 - 0x3c */ ++ volatile unsigned int ucast_table[8]; /* 0x40-0x5c */ ++ ++} ETHERNET_STRUCT; ++ ++/******************************************************************** ++ * Interrupt controller ++ ********************************************************************/ ++ ++typedef struct { ++ volatile unsigned int wdog_control; /* 0x08 */ ++ volatile unsigned int wdog_timer; /* 0x0c */ ++ volatile unsigned int misc_status; /* 0x10 */ ++ volatile unsigned int misc_mask; /* 0x14 */ ++ volatile unsigned int global_status; /* 0x18 */ ++ volatile unsigned int reserved; /* 0x1c */ ++ volatile unsigned int reset_control; /* 0x20 */ ++} INTERRUPT; ++ ++/******************************************************************** ++ * DMA controller ++ ********************************************************************/ ++typedef struct { ++ volatile unsigned int bus_mode; /* 0x00 (CSR0) */ ++ volatile unsigned int xmt_poll; /* 0x04 (CSR1) */ ++ volatile unsigned int rcv_poll; /* 0x08 (CSR2) */ ++ volatile unsigned int rcv_base; /* 0x0c (CSR3) */ ++ volatile unsigned int xmt_base; /* 0x10 (CSR4) */ ++ volatile unsigned int status; /* 0x14 (CSR5) */ ++ volatile unsigned int control; /* 0x18 (CSR6) */ ++ volatile unsigned int intr_ena; /* 0x1c (CSR7) */ ++ volatile unsigned int rcv_missed; /* 0x20 (CSR8) */ ++ volatile unsigned int reserved[11]; /* 0x24-0x4c (CSR9-19) */ ++ volatile unsigned int cur_tx_buf_addr; /* 0x50 (CSR20) */ ++ volatile unsigned int cur_rx_buf_addr; /* 0x50 (CSR21) */ ++} DMA; ++ ++/* ++ * Struct private for the Sibyte. ++ * ++ * Elements are grouped so variables used by the tx handling goes ++ * together, and will go into the same cache lines etc. in order to ++ * avoid cache line contention between the rx and tx handling on SMP. ++ * ++ * Frequently accessed variables are put at the beginning of the ++ * struct to help the compiler generate better/shorter code. ++ */ ++struct ar231x_private { ++ struct net_device *dev; ++ int (*rx)(struct sk_buff *skb); ++ ++ int version; ++ u32 mb[2]; ++ ++ volatile ETHERNET_STRUCT *phy_regs; ++ volatile ETHERNET_STRUCT *eth_regs; ++ volatile DMA *dma_regs; ++ volatile u32 *int_regs; ++ struct ar231x_eth *cfg; ++ ++ spinlock_t lock; /* Serialise access to device */ ++ ++ /* ++ * RX and TX descriptors, must be adjacent ++ */ ++ ar231x_descr_t *rx_ring; ++ ar231x_descr_t *tx_ring; ++ ++ ++ struct sk_buff **rx_skb; ++ struct sk_buff **tx_skb; ++ ++ /* ++ * RX elements ++ */ ++ u32 rx_skbprd; ++ u32 cur_rx; ++ ++ /* ++ * TX elements ++ */ ++ u32 tx_prd; ++ u32 tx_csm; ++ ++ /* ++ * Misc elements ++ */ ++ char name[48]; ++ struct { ++ u32 address; ++ u32 length; ++ char *mapping; ++ } desc; ++ ++ ++ struct timer_list link_timer; ++ unsigned short phy; /* merlot phy = 1, samsung phy = 0x1f */ ++ unsigned short mac; ++ unsigned short link; /* 0 - link down, 1 - link up */ ++ u16 phyData; ++ ++ struct tasklet_struct rx_tasklet; ++ int unloading; ++ ++ struct phy_device *phy_dev; ++ struct mii_bus *mii_bus; ++ int oldduplex; ++}; ++ ++ ++/* ++ * Prototypes ++ */ ++static int ar231x_init(struct net_device *dev); ++#ifdef TX_TIMEOUT ++static void ar231x_tx_timeout(struct net_device *dev); ++#endif ++static int ar231x_restart(struct net_device *dev); ++static void ar231x_load_rx_ring(struct net_device *dev, int bufs); ++static irqreturn_t ar231x_interrupt(int irq, void *dev_id); ++static int ar231x_open(struct net_device *dev); ++static int ar231x_start_xmit(struct sk_buff *skb, struct net_device *dev); ++static int ar231x_close(struct net_device *dev); ++static int ar231x_ioctl(struct net_device *dev, struct ifreq *ifr, ++ int cmd); ++static void ar231x_init_cleanup(struct net_device *dev); ++static int ar231x_setup_timer(struct net_device *dev); ++static void ar231x_link_timer_fn(unsigned long data); ++static void ar231x_check_link(struct net_device *dev); ++#endif /* _AR2313_H_ */ +diff -Nur linux-2.6.37.orig/drivers/watchdog/Kconfig linux-2.6.37/drivers/watchdog/Kconfig +--- linux-2.6.37.orig/drivers/watchdog/Kconfig 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/drivers/watchdog/Kconfig 2011-04-12 08:12:01.000000000 +0200 +@@ -930,6 +930,12 @@ + To compile this driver as a loadable module, choose M here. + The module will be called bcm63xx_wdt. + ++config ATHEROS_WDT ++ tristate "Atheros wisoc Watchdog Timer" ++ depends on ATHEROS_AR231X ++ help ++ Hardware driver for the Atheros wisoc Watchdog Timer. ++ + # PARISC Architecture + + # POWERPC Architecture +diff -Nur linux-2.6.37.orig/drivers/watchdog/Makefile linux-2.6.37/drivers/watchdog/Makefile +--- linux-2.6.37.orig/drivers/watchdog/Makefile 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/drivers/watchdog/Makefile 2011-04-12 08:12:01.000000000 +0200 +@@ -116,6 +116,7 @@ + obj-$(CONFIG_PNX833X_WDT) += pnx833x_wdt.o + obj-$(CONFIG_SIBYTE_WDOG) += sb_wdog.o + obj-$(CONFIG_AR7_WDT) += ar7_wdt.o ++obj-$(CONFIG_ATHEROS_WDT) += ar2315-wtd.o + obj-$(CONFIG_TXX9_WDT) += txx9wdt.o + obj-$(CONFIG_OCTEON_WDT) += octeon-wdt.o + octeon-wdt-y := octeon-wdt-main.o octeon-wdt-nmi.o +diff -Nur linux-2.6.37.orig/drivers/watchdog/ar2315-wtd.c linux-2.6.37/drivers/watchdog/ar2315-wtd.c +--- linux-2.6.37.orig/drivers/watchdog/ar2315-wtd.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/drivers/watchdog/ar2315-wtd.c 2011-04-12 08:12:01.000000000 +0200 +@@ -0,0 +1,200 @@ ++/* ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program 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 General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ * Copyright (C) 2008 John Crispin <blogic@openwrt.org> ++ * Based on EP93xx and ifxmips wdt driver ++ */ ++ ++#include <linux/interrupt.h> ++#include <linux/module.h> ++#include <linux/moduleparam.h> ++#include <linux/types.h> ++#include <linux/miscdevice.h> ++#include <linux/watchdog.h> ++#include <linux/fs.h> ++#include <linux/ioport.h> ++#include <linux/notifier.h> ++#include <linux/reboot.h> ++#include <linux/init.h> ++#include <linux/platform_device.h> ++ ++#include <asm/io.h> ++#include <asm/uaccess.h> ++#include <asm/system.h> ++#include <asm/addrspace.h> ++#include <ar231x_platform.h> ++#include <ar2315_regs.h> ++#include <ar231x.h> ++ ++#define CLOCK_RATE 40000000 ++#define HEARTBEAT(x) (x < 1 || x > 90)?(20):(x) ++ ++static int wdt_timeout = 20; ++static int started = 0; ++static int in_use = 0; ++ ++static void ++ar2315_wdt_enable(void) ++{ ++ ar231x_write_reg(AR2315_WD, wdt_timeout * CLOCK_RATE); ++ ar231x_write_reg(AR2315_ISR, 0x80); ++} ++ ++static ssize_t ++ar2315_wdt_write(struct file *file, const char __user *data, size_t len, loff_t *ppos) ++{ ++ if(len) ++ ar2315_wdt_enable(); ++ return len; ++} ++ ++static int ++ar2315_wdt_open(struct inode *inode, struct file *file) ++{ ++ if(in_use) ++ return -EBUSY; ++ ar2315_wdt_enable(); ++ in_use = started = 1; ++ return nonseekable_open(inode, file); ++} ++ ++static int ++ar2315_wdt_release(struct inode *inode, struct file *file) ++{ ++ in_use = 0; ++ return 0; ++} ++ ++static irqreturn_t ++ar2315_wdt_interrupt(int irq, void *dev_id) ++{ ++ if(started) ++ { ++ printk(KERN_CRIT "watchdog expired, rebooting system\n"); ++ emergency_restart(); ++ } else { ++ ar231x_write_reg(AR2315_WDC, 0); ++ ar231x_write_reg(AR2315_WD, 0); ++ ar231x_write_reg(AR2315_ISR, 0x80); ++ } ++ return IRQ_HANDLED; ++} ++ ++static struct watchdog_info ident = { ++ .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, ++ .identity = "ar2315 Watchdog", ++}; ++ ++static int ++ar2315_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) ++{ ++ int new_wdt_timeout; ++ int ret = -ENOIOCTLCMD; ++ ++ switch(cmd) ++ { ++ case WDIOC_GETSUPPORT: ++ ret = copy_to_user((struct watchdog_info __user *)arg, &ident, sizeof(ident)) ? -EFAULT : 0; ++ break; ++ ++ case WDIOC_KEEPALIVE: ++ ar2315_wdt_enable(); ++ ret = 0; ++ break; ++ ++ case WDIOC_SETTIMEOUT: ++ if((ret = get_user(new_wdt_timeout, (int __user *)arg))) ++ break; ++ wdt_timeout = HEARTBEAT(new_wdt_timeout); ++ ar2315_wdt_enable(); ++ break; ++ ++ case WDIOC_GETTIMEOUT: ++ ret = put_user(wdt_timeout, (int __user *)arg); ++ break; ++ } ++ return ret; ++} ++ ++static struct file_operations ar2315_wdt_fops = { ++ .owner = THIS_MODULE, ++ .llseek = no_llseek, ++ .write = ar2315_wdt_write, ++ .unlocked_ioctl = ar2315_wdt_ioctl, ++ .open = ar2315_wdt_open, ++ .release = ar2315_wdt_release, ++}; ++ ++static struct miscdevice ar2315_wdt_miscdev = { ++ .minor = WATCHDOG_MINOR, ++ .name = "watchdog", ++ .fops = &ar2315_wdt_fops, ++}; ++ ++static int ++ar2315_wdt_probe(struct platform_device *dev) ++{ ++ int ret = 0; ++ ++ ar2315_wdt_enable(); ++ ret = request_irq(AR531X_MISC_IRQ_WATCHDOG, ar2315_wdt_interrupt, IRQF_DISABLED, "ar2315_wdt", NULL); ++ if(ret) ++ { ++ printk(KERN_ERR "ar2315wdt: failed to register inetrrupt\n"); ++ goto out; ++ } ++ ++ ret = misc_register(&ar2315_wdt_miscdev); ++ if(ret) ++ printk(KERN_ERR "ar2315wdt: failed to register miscdev\n"); ++ ++out: ++ return ret; ++} ++ ++static int ++ar2315_wdt_remove(struct platform_device *dev) ++{ ++ misc_deregister(&ar2315_wdt_miscdev); ++ free_irq(AR531X_MISC_IRQ_WATCHDOG, NULL); ++ return 0; ++} ++ ++static struct platform_driver ar2315_wdt_driver = { ++ .probe = ar2315_wdt_probe, ++ .remove = ar2315_wdt_remove, ++ .driver = { ++ .name = "ar2315_wdt", ++ .owner = THIS_MODULE, ++ }, ++}; ++ ++static int __init ++init_ar2315_wdt(void) ++{ ++ int ret = platform_driver_register(&ar2315_wdt_driver); ++ if(ret) ++ printk(KERN_INFO "ar2315_wdt: error registering platfom driver!"); ++ return ret; ++} ++ ++static void __exit ++exit_ar2315_wdt(void) ++{ ++ platform_driver_unregister(&ar2315_wdt_driver); ++} ++ ++module_init(init_ar2315_wdt); ++module_exit(exit_ar2315_wdt); diff --git a/target/linux/patches/2.6.37/usb-defaults-off.patch b/target/linux/patches/2.6.37/usb-defaults-off.patch new file mode 100644 index 000000000..31367108a --- /dev/null +++ b/target/linux/patches/2.6.37/usb-defaults-off.patch @@ -0,0 +1,32 @@ +diff -Nur linux-2.6.37.orig//drivers/usb/core/Kconfig linux-2.6.37/drivers/usb/core/Kconfig +--- linux-2.6.37.orig//drivers/usb/core/Kconfig 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/drivers/usb/core/Kconfig 2011-04-12 19:04:23.000000000 +0200 +@@ -59,7 +59,7 @@ + config USB_DEVICE_CLASS + bool "USB device class-devices (DEPRECATED)" + depends on USB +- default y ++ default n + ---help--- + Userspace access to USB devices is granted by device-nodes exported + directly from the usbdev in sysfs. Old versions of the driver +diff -Nur linux-2.6.37.orig//drivers/usb/host/Kconfig linux-2.6.37/drivers/usb/host/Kconfig +--- linux-2.6.37.orig//drivers/usb/host/Kconfig 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/drivers/usb/host/Kconfig 2011-04-12 19:04:48.000000000 +0200 +@@ -62,6 +62,7 @@ + config USB_EHCI_ROOT_HUB_TT + bool "Root Hub Transaction Translators" + depends on USB_EHCI_HCD ++ default n + ---help--- + Some EHCI chips have vendor-specific extensions to integrate + transaction translators, so that no OHCI or UHCI companion +@@ -74,7 +75,7 @@ + config USB_EHCI_TT_NEWSCHED + bool "Improved Transaction Translator scheduling" + depends on USB_EHCI_HCD +- default y ++ default n + ---help--- + This changes the periodic scheduling code to fill more of the low + and full speed bandwidth available from the Transaction Translator diff --git a/target/linux/patches/2.6.37/vga-cons-default-off.patch b/target/linux/patches/2.6.37/vga-cons-default-off.patch new file mode 100644 index 000000000..178aeeeb9 --- /dev/null +++ b/target/linux/patches/2.6.37/vga-cons-default-off.patch @@ -0,0 +1,12 @@ +diff -Nur linux-2.6.37.orig//drivers/video/console/Kconfig linux-2.6.37/drivers/video/console/Kconfig +--- linux-2.6.37.orig//drivers/video/console/Kconfig 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/drivers/video/console/Kconfig 2011-04-12 16:29:34.000000000 +0200 +@@ -7,7 +7,7 @@ + config VGA_CONSOLE + bool "VGA text console" if EMBEDDED || !X86 + depends on !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !SUPERH && !BLACKFIN && !AVR32 && !MN10300 && (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) +- default y ++ default n + help + Saying Y here will allow you to use Linux in text mode through a + display that complies with the generic VGA standard. Virtually diff --git a/target/mips/sys-available/fon-fon2100 b/target/mips/sys-available/fon-fon2100 new file mode 100644 index 000000000..4e5416b89 --- /dev/null +++ b/target/mips/sys-available/fon-fon2100 @@ -0,0 +1,8 @@ +config ADK_TARGET_SYSTEM_FON_FON2100 + bool "FON's FON2100" + select ADK_mips + select ADK_fon_fon2100 + select ADK_KERNEL_ATHEROS_AR231X + help + Support for FON's FON2100. + diff --git a/target/mips64el/Makefile b/target/mips64el/Makefile index 3c4a08f64..fa160b1ff 100644 --- a/target/mips64el/Makefile +++ b/target/mips64el/Makefile @@ -7,7 +7,11 @@ include $(TOPDIR)/mk/modules.mk include $(TOPDIR)/mk/kernel-build.mk include $(TOPDIR)/mk/image.mk +ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y) +KERNEL:=$(LINUX_DIR)/vmlinuz +else KERNEL:=$(LINUX_DIR)/vmlinux +endif ifeq ($(ADK_TARGET_FS),nfsroot) imageinstall: $(BIN_DIR)/$(ROOTFSUSERTARBALL) @@ -31,3 +35,31 @@ imageinstall: $(BIN_DIR)/$(INITRAMFS) @echo 'The initramfs image is: ${BIN_DIR}/${INITRAMFS}' @echo 'qemu-system-mips64el -nographic -M malta -kernel $(BIN_DIR)/${TARGET_KERNEL} -initrd ${BIN_DIR}/${INITRAMFS}' endif +ifeq ($(ADK_TARGET_FS),usb) +imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL) + @echo "The RootFS tarball is: $(BIN_DIR)/$(ROOTFSTARBALL)" +ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y) + @echo "Startup the netbook and type del to enter PMON:" + @echo "PMON> load /dev/fs/ext2@usb0/boot/kernel" + @echo "PMON> g console=tty no_auto_cmd" +endif +endif +ifeq ($(ADK_TARGET_FS),initramfs) +imageinstall: $(BIN_DIR)/$(INITRAMFS) + @cp $(KERNEL) $(BIN_DIR)/$(TARGET_KERNEL) + @echo 'The kernel file is: $(BIN_DIR)/${TARGET_KERNEL}' + @echo 'The initramfs image is: ${BIN_DIR}/${INITRAMFS}' +ifeq ($(ADK_TARGET_SYSTEM_QEMU_MIPS64EL),y) + @echo "Start qemu with following command line:" + @echo 'qemu-system-mips64el -nographic -net user,hostfwd=tcp::2222-:22 -net nic,model=e1000 -kernel $(BIN_DIR)/$(TARGET_KERNEL) -initrd ${BIN_DIR}/${INITRAMFS}' +endif +endif +ifeq ($(ADK_TARGET_FS),initramfs-piggyback) +imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs + @cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL} + @echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}' +ifeq ($(ADK_TARGET_SYSTEM_QEMU_MIPS64EL),y) + @echo "Start qemu with following command line:" + @echo 'qemu-system-mips64el -nographic -net user,hostfwd=tcp::2222-:22 -net nic,model=e1000 -kernel $(BIN_DIR)/$(TARGET_KERNEL)' +endif +endif diff --git a/target/mips64el/kernel.config b/target/mips64el/kernel.config index 40a48f745..9803b4212 100644 --- a/target/mips64el/kernel.config +++ b/target/mips64el/kernel.config @@ -1,14 +1,13 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.36 -# Tue Jan 4 13:47:01 2011 +# Linux/mips 2.6.37 Kernel Configuration +# Tue Apr 12 15:11:16 2011 # CONFIG_MIPS=y # # Machine selection # -CONFIG_ZONE_DMA=y # CONFIG_MIPS_ALCHEMY is not set # CONFIG_AR7 is not set # CONFIG_ATHEROS_AR71XX is not set @@ -19,8 +18,8 @@ CONFIG_ZONE_DMA=y # CONFIG_MACH_JAZZ is not set # CONFIG_MACH_JZ4740 is not set # CONFIG_LASAT is not set -# CONFIG_MACH_LOONGSON is not set -CONFIG_MIPS_MALTA=y +CONFIG_MACH_LOONGSON=y +# CONFIG_MIPS_MALTA is not set # CONFIG_MIPS_SIM is not set # CONFIG_NEC_MARKEINS is not set # CONFIG_MACH_VR41XX is not set @@ -51,9 +50,14 @@ CONFIG_MIPS_MALTA=y # CONFIG_CAVIUM_OCTEON_SIMULATOR is not set # CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set # CONFIG_ALCHEMY_GPIO_INDIRECT is not set +CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_CAVIUM_OCTEON_HELPER=y +# CONFIG_LEMOTE_FULOONG2E is not set +CONFIG_LEMOTE_MACH2F=y +CONFIG_CS5536=y +# CONFIG_CS5536_MFGPT is not set CONFIG_LOONGSON_UART_BASE=y -# CONFIG_LOONGSON_MC146818 is not set +CONFIG_LOONGSON_MC146818=y CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_ARCH_HAS_ILOG2_U32 is not set # CONFIG_ARCH_HAS_ILOG2_U64 is not set @@ -65,8 +69,6 @@ CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_SCHED_OMIT_FRAME_POINTER=y CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y -CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_BOOT_RAW=y CONFIG_CEVT_R4K_LIB=y CONFIG_CEVT_R4K=y CONFIG_CSRC_R4K_LIB=y @@ -75,89 +77,68 @@ CONFIG_DMA_NONCOHERENT=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_SYS_HAS_EARLY_PRINTK=y CONFIG_I8259=y -CONFIG_MIPS_BONITO64=y -CONFIG_MIPS_MSC=y # CONFIG_MIPS_MACHINE is not set # CONFIG_NO_IOPORT is not set CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN=y CONFIG_ISA_DMA_API=y -# CONFIG_CPU_BIG_ENDIAN is not set +CONFIG_GENERIC_GPIO=y CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y -CONFIG_SYS_SUPPORTS_HUGETLBFS=y CONFIG_IRQ_CPU=y -CONFIG_IRQ_GIC=y -CONFIG_MIPS_BOARDS_GEN=y -CONFIG_PCI_GT64XXX_PCI0=y -CONFIG_SWAP_IO_SPACE=y CONFIG_BOOT_ELF32=y -CONFIG_MIPS_L1_CACHE_SHIFT=6 +CONFIG_MIPS_L1_CACHE_SHIFT=5 # # CPU selection # -# CONFIG_CPU_MIPS32_R1 is not set -# CONFIG_CPU_MIPS32_R2 is not set -CONFIG_CPU_MIPS64_R1=y -# CONFIG_CPU_NEVADA is not set -# CONFIG_CPU_RM7000 is not set +CONFIG_CPU_LOONGSON2F=y +CONFIG_CPU_NOP_WORKAROUNDS=y +CONFIG_CPU_JUMP_WORKAROUNDS=y +CONFIG_CPU_LOONGSON2F_WORKAROUNDS=y CONFIG_SYS_SUPPORTS_ZBOOT=y -CONFIG_SYS_HAS_CPU_MIPS32_R1=y -CONFIG_SYS_HAS_CPU_MIPS32_R2=y -CONFIG_SYS_HAS_CPU_MIPS64_R1=y -CONFIG_SYS_HAS_CPU_NEVADA=y -CONFIG_SYS_HAS_CPU_RM7000=y -CONFIG_CPU_MIPS64=y -CONFIG_CPU_MIPSR1=y +CONFIG_CPU_LOONGSON2=y +CONFIG_SYS_HAS_CPU_LOONGSON2F=y CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y -CONFIG_CPU_SUPPORTS_HUGEPAGES=y -CONFIG_HARDWARE_WATCHPOINTS=y +CONFIG_CPU_SUPPORTS_CPUFREQ=y +CONFIG_CPU_SUPPORTS_ADDRWINCFG=y +CONFIG_CPU_SUPPORTS_UNCACHED_ACCELERATED=y # # Kernel type # # CONFIG_32BIT is not set CONFIG_64BIT=y -CONFIG_PAGE_SIZE_4KB=y -# CONFIG_PAGE_SIZE_16KB is not set +CONFIG_PAGE_SIZE_16KB=y # CONFIG_PAGE_SIZE_64KB is not set +CONFIG_FORCE_MAX_ZONEORDER=11 CONFIG_BOARD_SCACHE=y -CONFIG_MIPS_CPU_SCACHE=y -CONFIG_CPU_HAS_PREFETCH=y CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMP is not set -CONFIG_SYS_SUPPORTS_MULTITHREADING=y -# CONFIG_MIPS_VPE_LOADER is not set -# CONFIG_MIPS_CMP is not set # CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -# CONFIG_CPU_HAS_SMARTMIPS is not set +CONFIG_CPU_HAS_WB=y CONFIG_CPU_HAS_SYNC=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y CONFIG_CPU_SUPPORTS_HIGHMEM=y -CONFIG_SYS_SUPPORTS_SMARTMIPS=y -CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_SYS_SUPPORTS_HIGHMEM=y CONFIG_ARCH_POPULATES_NODE_MAP=y CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_SPARSEMEM_MANUAL=y +CONFIG_SPARSEMEM=y +CONFIG_HAVE_MEMORY_PRESENT=y +CONFIG_SPARSEMEM_STATIC=y CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_PHYS_ADDR_T_64BIT=y -CONFIG_ZONE_DMA_FLAG=1 +CONFIG_ZONE_DMA_FLAG=0 CONFIG_VIRT_TO_BUS=y # CONFIG_KSM is not set CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_SYS_SUPPORTS_MIPS_CMP=y +CONFIG_NEED_PER_CPU_KM=y # CONFIG_NO_HZ is not set # CONFIG_HIGH_RES_TIMERS is not set CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_CPU_SUPPORTS_HR_SCHED_CLOCK=y # CONFIG_HZ_48 is not set CONFIG_HZ_100=y # CONFIG_HZ_128 is not set @@ -172,6 +153,7 @@ CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT is not set # CONFIG_KEXEC is not set # CONFIG_SECCOMP is not set +# CONFIG_USE_OF is not set CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" @@ -201,22 +183,32 @@ CONFIG_POSIX_MQUEUE_SYSCTL=y # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_TASKSTATS is not set # CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +# CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED is not set +# CONFIG_HAVE_SPARSE_IRQ is not set +CONFIG_GENERIC_IRQ_PROBE=y +# CONFIG_GENERIC_PENDING_IRQ is not set +# CONFIG_AUTO_IRQ_AFFINITY is not set +# CONFIG_IRQ_PER_CPU is not set +# CONFIG_HARDIRQS_SW_RESEND is not set # # RCU Subsystem # -CONFIG_TREE_RCU=y -# CONFIG_TINY_RCU is not set -# CONFIG_RCU_TRACE is not set -CONFIG_RCU_FANOUT=32 -# CONFIG_RCU_FANOUT_EXACT is not set +CONFIG_TINY_RCU=y +# CONFIG_PREEMPT_RCU is not set # CONFIG_TREE_RCU_TRACE is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_CGROUPS is not set -# CONFIG_SYSFS_DEPRECATED_V2 is not set -# CONFIG_RELAY is not set # CONFIG_NAMESPACES is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set # CONFIG_BLK_DEV_INITRD is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y @@ -238,10 +230,14 @@ CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_AIO=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y # # Kernel Performance Events And Counters # +# CONFIG_PERF_EVENTS is not set +# CONFIG_PERF_COUNTERS is not set # CONFIG_VM_EVENT_COUNTERS is not set CONFIG_PCI_QUIRKS=y # CONFIG_COMPAT_BRK is not set @@ -254,6 +250,8 @@ CONFIG_HAVE_OPROFILE=y CONFIG_HAVE_SYSCALL_WRAPPERS=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_API_DEBUG=y # # GCOV-based kernel profiling @@ -269,7 +267,6 @@ CONFIG_MODULE_FORCE_UNLOAD=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_BLOCK is not set -# CONFIG_DEFAULT_NOOP is not set # CONFIG_INLINE_SPIN_TRYLOCK is not set # CONFIG_INLINE_SPIN_TRYLOCK_BH is not set # CONFIG_INLINE_SPIN_LOCK is not set @@ -310,8 +307,8 @@ CONFIG_PCI_DOMAINS=y # CONFIG_ARCH_SUPPORTS_MSI is not set # CONFIG_PCI_STUB is not set # CONFIG_PCI_IOV is not set +CONFIG_ISA=y CONFIG_MMU=y -CONFIG_I8253=y # CONFIG_PCCARD is not set # CONFIG_HOTPLUG_PCI is not set @@ -329,7 +326,6 @@ CONFIG_BINFMT_ELF=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=y # CONFIG_PM is not set -CONFIG_MIPS_EXTERNAL_TIMER=y CONFIG_NET=y # @@ -344,7 +340,7 @@ CONFIG_INET=y CONFIG_IP_FIB_HASH=y # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set +# CONFIG_NET_IPGRE_DEMUX is not set # CONFIG_ARPD is not set # CONFIG_SYN_COOKIES is not set # CONFIG_INET_AH is not set @@ -400,6 +396,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_RFKILL is not set # CONFIG_NET_9P is not set # CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set # # Device Drivers @@ -418,6 +415,7 @@ CONFIG_DEVTMPFS_MOUNT=y # CONFIG_CONNECTOR is not set # CONFIG_MTD is not set # CONFIG_PARPORT is not set +# CONFIG_PNP is not set # CONFIG_MISC_DEVICES is not set CONFIG_HAVE_IDE=y @@ -432,16 +430,7 @@ CONFIG_SCSI_MOD=y # # IEEE 1394 (FireWire) support # - -# -# You can enable one or both FireWire driver stacks. -# - -# -# The newer stack is recommended. -# # CONFIG_FIREWIRE is not set -# CONFIG_IEEE1394 is not set # CONFIG_FIREWIRE_NOSY is not set # CONFIG_I2O is not set # CONFIG_NETDEVICES is not set @@ -491,10 +480,14 @@ CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set # CONFIG_LEGACY_PTYS is not set +# CONFIG_TTY_PRINTK is not set # CONFIG_IPMI_HANDLER is not set # CONFIG_HW_RANDOM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set +# CONFIG_GPIO_DEVICE is not set # CONFIG_TCG_TPM is not set CONFIG_DEVPORT=y # CONFIG_RAMOOPS is not set @@ -505,6 +498,42 @@ CONFIG_DEVPORT=y # PPS support # # CONFIG_PPS is not set +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +# CONFIG_GPIO_SYSFS is not set + +# +# Memory mapped GPIO expanders: +# +# CONFIG_GPIO_BASIC_MMIO is not set +# CONFIG_GPIO_IT8761E is not set +# CONFIG_GPIO_SCH is not set +# CONFIG_GPIO_VX855 is not set + +# +# I2C GPIO expanders: +# + +# +# PCI GPIO expanders: +# +# CONFIG_GPIO_CS5535 is not set +# CONFIG_GPIO_BT8XX is not set +# CONFIG_GPIO_LANGWELL is not set +# CONFIG_GPIO_PCH is not set +# CONFIG_GPIO_RDC321X is not set + +# +# SPI GPIO expanders: +# + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# # CONFIG_W1 is not set # CONFIG_POWER_SUPPLY is not set # CONFIG_HWMON is not set @@ -525,6 +554,7 @@ CONFIG_SSB_POSSIBLE=y # # CONFIG_VGA_ARB is not set # CONFIG_DRM is not set +# CONFIG_STUB_POULSBO is not set # CONFIG_VGASTATE is not set # CONFIG_VIDEO_OUTPUT_CONTROL is not set # CONFIG_FB is not set @@ -542,13 +572,31 @@ CONFIG_SSB_POSSIBLE=y # CONFIG_NEW_LEDS is not set # CONFIG_ACCESSIBILITY is not set # CONFIG_INFINIBAND is not set -CONFIG_RTC_LIB=y # CONFIG_RTC_CLASS is not set # CONFIG_DMADEVICES is not set # CONFIG_AUXDISPLAY is not set # CONFIG_UIO is not set -# CONFIG_STAGING is not set -# CONFIG_MIPS_PLATFORM_DEVICES is not set +CONFIG_STAGING=y +# CONFIG_STAGING_EXCLUDE_BUILD is not set +# CONFIG_ECHO is not set +# CONFIG_COMEDI is not set +# CONFIG_POHMELFS is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_VME_BUS is not set +# CONFIG_IIO is not set +# CONFIG_BATMAN_ADV is not set +# CONFIG_CRYSTALHD is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_SMB_FS is not set +CONFIG_MACH_NO_WESTBRIDGE=y +# CONFIG_FT1000 is not set + +# +# Speakup console speech +# # # File systems @@ -557,8 +605,9 @@ CONFIG_FILE_LOCKING=y # CONFIG_FSNOTIFY is not set # CONFIG_DNOTIFY is not set # CONFIG_INOTIFY_USER is not set +# CONFIG_FANOTIFY is not set # CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set +# CONFIG_QUOTACTL is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_FUSE_FS is not set @@ -577,7 +626,6 @@ CONFIG_PROC_SYSCTL=y CONFIG_SYSFS=y CONFIG_TMPFS=y # CONFIG_TMPFS_POSIX_ACL is not set -# CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set # CONFIG_CONFIGFS_FS is not set # CONFIG_MISC_FILESYSTEMS is not set @@ -600,16 +648,19 @@ CONFIG_MAGIC_SYSRQ=y # CONFIG_HEADERS_CHECK is not set # CONFIG_DEBUG_KERNEL is not set # CONFIG_HARDLOCKUP_DETECTOR is not set +CONFIG_BKL=y +# CONFIG_SPARSE_RCU_POINTER is not set # CONFIG_DEBUG_MEMORY_INIT is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set # CONFIG_SYSCTL_SYSCALL_CHECK is not set CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_TRACING_SUPPORT=y # CONFIG_FTRACE is not set +# CONFIG_DMA_API_DEBUG is not set # CONFIG_ATOMIC64_SELFTEST is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y @@ -622,6 +673,7 @@ CONFIG_CMDLINE="init=/init" # Security options # # CONFIG_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set # CONFIG_SECURITY is not set # CONFIG_SECURITYFS is not set CONFIG_DEFAULT_SECURITY_DAC=y @@ -646,6 +698,7 @@ CONFIG_GENERIC_FIND_LAST_BIT=y CONFIG_CRC32=y # CONFIG_CRC7 is not set # CONFIG_LIBCRC32C is not set +CONFIG_DECOMPRESS_LZMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y diff --git a/target/mips64el/sys-available/lemote-yeelong b/target/mips64el/sys-available/lemote-yeelong index b1a91491e..6eedb9ebc 100644 --- a/target/mips64el/sys-available/lemote-yeelong +++ b/target/mips64el/sys-available/lemote-yeelong @@ -3,6 +3,8 @@ config ADK_TARGET_SYSTEM_LEMOTE_YEELONG select ADK_mips64el select ADK_lemote_yeelong select ADK_LINUX_64 + select ADK_KERNEL_MACH_LOONGSON + select ADK_KERNEL_LEMOTE_MACH2F select ADK_TARGET_WITH_USB_BOOT select ADK_TARGET_WITH_USB select ADK_TARGET_WITH_PCI diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index 20f2929b5..7313c4d70 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -95,68 +95,57 @@ $(GCC_BUILD_DIR_MINIMAL)/.configured: ln -sf ${STAGING_TARGET_DIR}/include $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include rm -rf ${STAGING_HOST_DIR}/$(REAL_GNU_TARGET_NAME)/lib ln -sf ${STAGING_TARGET_DIR}/lib $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/lib - (cd $(GCC_BUILD_DIR_MINIMAL); \ - PATH='$(TARGET_PATH)' \ + cd $(GCC_BUILD_DIR_MINIMAL); PATH='$(TARGET_PATH)' \ $(WRKBUILD)/configure \ ${GCC_CONFOPTS} \ --enable-languages=c \ --disable-shared \ --with-newlib \ - --without-headers \ - ); + --without-headers touch $@ $(GCC_BUILD_DIR_MINIMAL)/.compiled: $(GCC_BUILD_DIR_MINIMAL)/.configured - PATH='$(TARGET_PATH)' \ - $(MAKE) ${GCC_MAKEOPTS} -C $(GCC_BUILD_DIR_MINIMAL) all-gcc + PATH='$(TARGET_PATH)' $(MAKE) ${GCC_MAKEOPTS} -C $(GCC_BUILD_DIR_MINIMAL) all-gcc touch $@ $(WRKBUILD)/.headers: $(GCC_BUILD_DIR_MINIMAL)/.compiled - PATH='$(TARGET_PATH)' \ - $(MAKE) -C $(GCC_BUILD_DIR_MINIMAL) install-gcc + PATH='$(TARGET_PATH)' $(MAKE) -C $(GCC_BUILD_DIR_MINIMAL) install-gcc touch $@ $(GCC_BUILD_DIR_INITIAL)/.configured: mkdir -p $(GCC_BUILD_DIR_INITIAL) - (cd $(GCC_BUILD_DIR_INITIAL); \ - PATH='$(TARGET_PATH)' \ + cd $(GCC_BUILD_DIR_INITIAL); PATH='$(TARGET_PATH)' \ $(WRKBUILD)/configure \ ${GCC_CONFOPTS} \ --enable-languages=c \ --disable-shared \ --disable-threads \ --with-newlib \ - --with-sysroot=$(STAGING_TARGET_DIR) \ - ); + --with-sysroot=$(STAGING_TARGET_DIR) touch $@ $(GCC_BUILD_DIR_INITIAL)/.compiled: $(GCC_BUILD_DIR_INITIAL)/.configured - PATH='$(TARGET_PATH)' \ - $(MAKE) ${GCC_MAKEOPTS} -C $(GCC_BUILD_DIR_INITIAL) all-gcc all-target-libgcc + PATH='$(TARGET_PATH)' $(MAKE) ${GCC_MAKEOPTS} -C $(GCC_BUILD_DIR_INITIAL) all-gcc all-target-libgcc touch $@ $(WRKBUILD)/.configured: $(GCC_BUILD_DIR_INITIAL)/.compiled - PATH='$(TARGET_PATH)' \ - $(MAKE) -C $(GCC_BUILD_DIR_INITIAL) install-gcc install-target-libgcc + PATH='$(TARGET_PATH)' $(MAKE) -C $(GCC_BUILD_DIR_INITIAL) install-gcc install-target-libgcc touch $@ $(GCC_BUILD_DIR_FINAL)/.configured: mkdir -p $(GCC_BUILD_DIR_FINAL) - (cd $(GCC_BUILD_DIR_FINAL); \ - PATH='$(TARGET_PATH)' \ + cd $(GCC_BUILD_DIR_FINAL); PATH='$(TARGET_PATH)' \ $(WRKBUILD)/configure \ ${GCC_CONFOPTS} \ --enable-languages=$(LANGUAGES) \ --with-sysroot='$${prefix}/${STAGING_HOST2TARGET}' \ --with-slibdir=$(STAGING_TARGET_DIR)/lib \ - --enable-shared \ - ); + --enable-shared touch $@ $(WRKBUILD)/.compiled: $(GCC_BUILD_DIR_FINAL)/.configured - PATH='$(TARGET_PATH)' \ - $(MAKE) ${GCC_MAKEOPTS} -C $(GCC_BUILD_DIR_FINAL) all + PATH='$(TARGET_PATH)' $(MAKE) ${GCC_MAKEOPTS} -C $(GCC_BUILD_DIR_FINAL) all touch $@ $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled @@ -165,14 +154,15 @@ $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled @-rm $(STAGING_TARGET_DIR)/lib/libiberty.a $(STAGING_TARGET_DIR)/usr/lib/libiberty.a # Set up the symlinks to enable lying about target name. set -e; \ - (cd $(STAGING_HOST_DIR); \ + cd $(STAGING_HOST_DIR); \ ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \ cd bin; \ for app in $(REAL_GNU_TARGET_NAME)-* ; do \ ln -sf $${app} \ $(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \ - done; \ - ) + done; + # workaround for openjdk + cd $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/bin ; cp * .. touch $@ include ${TOPDIR}/mk/toolchain.mk diff --git a/tools/Makefile b/tools/Makefile index 3a158b839..8bf118641 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -15,11 +15,11 @@ clean: $(TARGETS_CLEAN) %-compile: $(TOOLS_BUILD_DIR) $(TRACE) "tools/$(patsubst %-compile,%,$@)/compile " - $(MAKE) -C $(patsubst %-compile,%,$@) compile + $(MAKE) -C $(patsubst %-compile,%,$@) compile $(MAKE_TRACE) %-install: $(TRACE) "tools/$(patsubst %-install,%,$@)/install " - $(MAKE) -C $(patsubst %-install,%,$@) install + $(MAKE) -C $(patsubst %-install,%,$@) install $(MAKE_TRACE) %-clean: $(TRACE) "tools/$(patsubst %-clean,%,$@)/clean " |